
/* ================================================================
   MAGLIFICENT / DISTINCT HOME COMPOSITIONS
   Home-only overrides: book, volume and reader layouts are untouched.
   Every theme shares the same live catalogue and functioning links.
   ================================================================ */

/* Shared additions: real data panels, no decorative duplicate links. */
body[class*="theme-"] .archive-home .archive-tree {display:none}
body[class*="theme-"] .archive-home .archive-lower-panels {
  display:grid;grid-template-columns:minmax(250px,1fr) minmax(0,1.5fr);
  gap:24px;max-width:1260px;margin:20px auto 27px;
  color:var(--show-text);position:relative;z-index:1
}
body[class*="theme-"] .archive-home :is(.archive-summary,.archive-excerpts) {
  min-width:0;padding:23px 28px;border:1px solid var(--show-border);
  background:var(--show-card);color:var(--show-text);
  box-shadow:0 7px 25px #00000023
}
body[class*="theme-"] .archive-home .archive-summary h3 {
  margin:13px 0;font:500 23px/1.45 'Songti SC','SimSun',serif;letter-spacing:.08em
}
body[class*="theme-"] .archive-home .archive-summary p {color:var(--show-muted);font-size:12px;line-height:2}
body[class*="theme-"] .archive-home .archive-summary .summary-count {
  font:10px/1.7 monospace;letter-spacing:.1em;padding-top:12px;
  border-top:1px solid var(--show-border);margin-top:18px
}
body[class*="theme-"] .archive-home .archive-excerpts-heading {
  display:flex;justify-content:space-between;gap:20px;
  padding-bottom:12px;border-bottom:1px solid var(--show-border);font-size:10px;color:var(--show-muted)
}
body[class*="theme-"] .archive-home .archive-excerpts-list {display:grid;grid-template-columns:1fr;gap:0}
body[class*="theme-"] .archive-home .excerpt-entry {
  display:grid;grid-template-columns:minmax(90px,25%) minmax(0,1fr) 16px;
  align-items:center;text-align:left;gap:12px;cursor:pointer;padding:12px 2px;
  border:0;border-bottom:1px solid color-mix(in srgb,var(--show-border) 40%,transparent);
  color:var(--show-text);background:none;font:inherit;min-width:0
}
body[class*="theme-"] .archive-home .excerpt-entry .excerpt-book {font-size:11px;color:var(--show-accent);overflow-wrap:anywhere}
body[class*="theme-"] .archive-home .excerpt-entry .excerpt-name {font-size:12px;overflow-wrap:anywhere}
body[class*="theme-"] .archive-home .excerpt-entry:hover {color:var(--show-accent)}
body[class*="theme-"] .archive-home button:focus-visible {
  outline:3px solid var(--show-accent)!important;outline-offset:3px;z-index:3
}
body[class*="theme-"] .archive-home .archive-card.collection-card:nth-child(n) {z-index:1}

/* 01: monumental mid-century archive. Four flanking niches, one central
   folio and a separately plinthed foundation collection. */
body.theme-midcentury .page-view.archive-home {
  --show-bg:#171d1b;--show-border:#d1ae77;--show-text:#fff5db;
  --show-muted:#d9c7a3;--show-accent:#f5d49d;
  background-image:linear-gradient(180deg,#0b1217b8 0%,#20201b38 33%,#151917e5 92%),url('./scenes/museum.svg')!important;
  background-position:center top!important;background-size:100% 100%,cover!important
}
body.theme-midcentury .archive-home .archive-header {
  min-height:300px!important;padding:62px 20px 40px!important;
  background:radial-gradient(ellipse at center,#111414b3,transparent 72%)!important;
  max-width:900px!important
}
body.theme-midcentury .archive-home .archive-title {
  font-size:clamp(37px,5vw,70px)!important;letter-spacing:.2em!important
}
body.theme-midcentury .archive-home .archive-grid {
  position:relative;grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:22px!important;padding:24px 8px 0!important;align-items:center!important
}
body.theme-midcentury .archive-home .archive-grid::before {
  content:''!important;display:block!important;position:absolute;inset:0 0 auto;
  height:370px;pointer-events:none;opacity:.6;
  background:
   radial-gradient(circle at 50% 48%,transparent 0 83px,#cfa66f9e 85px 87px,transparent 89px),
   radial-gradient(ellipse at 50% 48%,transparent 0 126px,#d2b1756b 127px 129px,transparent 131px),
   radial-gradient(ellipse at 50% 48%,#c1a16346,transparent 45%);
}
body.theme-midcentury .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n) {
  grid-row:1!important;min-height:335px!important;
  border:2px solid #a98957!important;border-radius:110px 110px 5px 5px!important;
  box-shadow:inset 0 0 0 6px #19160fc9,inset 0 0 0 8px #d3b47954,0 12px 35px #0009!important;
  background:linear-gradient(180deg,#1c2626ef,#111b20d9 63%,#0e1115f5)!important
}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {grid-column:1/4!important}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n) {grid-column:4/6!important;align-self:end}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n) {grid-column:8/10!important;align-self:end}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n) {grid-column:10/13!important}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) {
  grid-column:4/10!important;grid-row:2!important;min-height:175px!important;
  display:grid!important;grid-template-columns:130px minmax(0,1fr)!important;
  align-content:center;justify-items:start!important;text-align:left!important;
  gap:0 18px!important;border-radius:8px 8px 0 0!important
}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) .collection-emblem {
  grid-column:1;grid-row:1/6;width:120px;max-height:120px;margin:0
}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-foot) {
  grid-column:2;max-width:100%
}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) .card-foot {flex-direction:row;justify-content:space-between}
body.theme-midcentury .archive-home .archive-card.special-collection:nth-child(n) {
  grid-column:4/10!important;grid-row:3!important;min-height:105px!important;
  width:90%!important;justify-self:center;justify-content:center!important;
  background:linear-gradient(115deg,#b49b68,#f1e0bb 50%,#867047)!important;
  border:5px double #514733!important;border-radius:6px!important;
  box-shadow:0 16px 0 -7px #8b7755,0 25px 27px #0009!important;
  color:#28261e!important
}
body.theme-midcentury .archive-home .special-collection :is(.card-name,.card-number,.card-subtitle,.card-count,.card-enter) {
  color:#28261e!important
}
body.theme-midcentury .archive-home .special-collection .collection-emblem{color:#544325!important}
body.theme-midcentury .archive-home .archive-lower-panels {max-width:1120px}
body.theme-midcentury .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts) {
  background:#111717e8;border-top:3px double #d1ae77
}

/* 02: stellar command bridge — modules orbit a central command display. */
body.theme-spacetech .page-view.archive-home {
  background-image:
    radial-gradient(ellipse at 50% 55%,#00162608,#07121a99 75%),
    url('./scenes/observatory.svg')!important;
  background-position: center top!important;background-size:100% 100%,cover!important
}
body.theme-spacetech .archive-home .archive-header {
  position:relative;max-width:800px!important;min-height:215px!important;
  padding:35px 14px 12px!important;
  background:radial-gradient(ellipse,#071b33ee 8%,transparent 73%)!important
}
body.theme-spacetech .archive-home .archive-title {font:400 clamp(33px,4vw,55px)/1.2 'Rajdhani','Songti SC',sans-serif!important;letter-spacing:.25em!important}
body.theme-spacetech .archive-home .archive-grid {
  position:relative;display:block!important;max-width:1260px!important;
  min-height:660px!important;overflow:visible;
  background:
    radial-gradient(ellipse at center,#6bd9ff29 0 4%,transparent 33%),
    repeating-radial-gradient(ellipse at center,transparent 0 70px,#81d8fa30 72px 73px,transparent 75px 112px),
    radial-gradient(ellipse at center,#072d4f87,transparent 70%)!important
}
body.theme-spacetech .archive-home .archive-grid::before {
  position:absolute;content:'MAGLIFICENT  /  STAR CHART  /  ARCHIVE DATA'!important;
  display:flex!important;justify-content:center;align-items:center;
  top:38%;left:29%;width:42%;height:20%;border:1px solid #7fc8e36e;border-radius:50%;
  color:#b5e7fcad;font:11px/1.6 monospace;letter-spacing:.13em;
  background:radial-gradient(ellipse,#71ddfa1c,transparent 75%);pointer-events:none
}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n) {
  position:absolute!important;min-height:130px!important;height:auto!important;
  width:27%!important;padding:17px 19px!important;text-align:left!important;
  align-items:flex-start!important;display:grid!important;
  grid-template-columns:minmax(0,1fr) 65px;gap:2px 8px;
  border-radius:1px!important;clip-path:polygon(0 0,94% 0,100% 11%,100% 100%,6% 100%,0 89%);
  background:linear-gradient(105deg,#061323f2,#183c64df)!important;
  border:1px solid #84d8ffbc!important;box-shadow:0 0 23px #0aaaff22!important;
  backdrop-filter:blur(5px)
}
body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n){top:1%;left:36.5%;width:27%!important}
body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n){top:24%;left:1.5%}
body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n){top:24%;right:1.5%}
body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n){bottom:17%;left:1.5%}
body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n){bottom:17%;right:1.5%}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .collection-emblem {
  display:block;grid-column:2;grid-row:1/5;width:60px;height:75px;margin:0;min-height:0;opacity:.85
}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .collection-emblem svg{width:55px;height:65px}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-foot) {
  grid-column:1;width:100%;max-width:100%;margin:0!important;min-height:0!important
}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-number{font-size:10px!important}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-name{font-size:22px!important;line-height:1.3}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-tag{font-size:9px!important}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-subtitle{font-size:10px!important}
body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-foot {
  flex-direction:row;justify-content:space-between;margin-top:6px!important;padding-top:5px!important
}
body.theme-spacetech .archive-home .archive-card.special-collection:nth-child(n) {
  position:absolute!important;left:36%;bottom:0!important;width:28%!important;min-height:112px!important;
  display:grid!important;grid-template-columns:48px minmax(0,1fr)!important;
  gap:3px 10px;padding:15px!important;align-content:center!important;text-align:left!important;
  border-color:#789fcb!important;background:#06111fee!important
}
body.theme-spacetech .archive-home .special-collection .collection-emblem{grid-column:1;grid-row:1/4;opacity:.65}
body.theme-spacetech .archive-home .special-collection :is(.card-number,.card-name,.card-foot){grid-column:2;width:auto}
body.theme-spacetech .archive-home .special-collection .card-name{font-size:22px!important}
body.theme-spacetech .archive-home .special-collection .card-foot{padding:0!important;margin:0!important}
body.theme-spacetech .archive-home .archive-lower-panels {grid-template-columns:1fr 1fr}
body.theme-spacetech .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts) {
  border:1px solid #6ecfff60;background:#051524dd;box-shadow:inset 0 0 30px #66d3fe0b
}

/* 03: fragments collected from a lost civilization. Nothing is level. */
body.theme-wasteland .page-view.archive-home {
  background-image:linear-gradient(180deg,#1d16142b,#1b1411ce 85%),url('./scenes/ruins.svg')!important;
  background-position:center top!important;background-size:100% 100%,cover!important
}
body.theme-wasteland .archive-home .archive-header {
  align-items:flex-start!important;text-align:left!important;min-height:230px!important;
  margin:4px 0 28px!important;padding:32px 42px!important;max-width:780px!important;
  background:linear-gradient(140deg,#d6c5a5f5,#a79175e7)!important;
  border:1px solid #6e5644!important;clip-path:polygon(0 3%,97% 0,100% 91%,95% 100%,2% 96%);
  transform:rotate(-.6deg)
}
body.theme-wasteland .archive-home .archive-header :is(.archive-title,.archive-kicker,.archive-subtitle,.archive-meta,.layout-caption,.layout-status) {
  color:#3a2d22!important;text-shadow:none!important
}
body.theme-wasteland .archive-home .archive-meta{justify-content:flex-start}
body.theme-wasteland .archive-home .archive-tools{padding:0 10px}
body.theme-wasteland .archive-home .archive-grid{
  position:relative;display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;
  grid-template-rows:minmax(255px,auto) minmax(300px,auto)!important;
  gap:25px 21px!important;align-items:center!important
}
body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n) {
  position:relative!important;min-height:250px!important;height:auto!important;
  padding:24px 22px 18px!important;overflow:visible!important;align-items:flex-start!important;
  text-align:left!important;border:2px solid #7d5c41!important;border-top:13px solid #8f7152!important;
  border-radius:2px!important;box-shadow:8px 11px 4px #06040390,inset 0 0 0 4px #30261b25!important;
  background:linear-gradient(155deg,#d7c19e,#a99172)!important;
  color:#36291e!important
}
body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n)::before {
  display:block!important;position:absolute;content:''!important;top:-21px;left:38%;right:36%;
  height:18px;background:#9f8a67e8;border:1px solid #5a442f;
  box-shadow:0 2px 5px #0007;z-index:5
}
body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n)::after {
  content:'✛'!important;display:block!important;position:absolute;
  top:8px;right:9px;font-size:15px;color:#553922a8
}
body.theme-wasteland .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {grid-column:1/5!important;grid-row:1!important;transform:rotate(-2deg)!important}
body.theme-wasteland .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n) {grid-column:5/9!important;grid-row:1!important;transform:rotate(1.5deg)!important;margin-top:24px!important}
body.theme-wasteland .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n) {grid-column:9/13!important;grid-row:1!important;transform:rotate(-1deg)!important;margin-top:6px!important}
body.theme-wasteland .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n) {grid-column:1/7!important;grid-row:2!important;transform:rotate(1.2deg)!important}
body.theme-wasteland .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) {grid-column:7/10!important;grid-row:2!important;transform:rotate(-1.7deg)!important}
body.theme-wasteland .archive-home .archive-card.special-collection:nth-child(n) {
  grid-column:10/13!important;grid-row:2!important;display:flex!important;
  flex-direction:column!important;min-height:265px!important;align-items:flex-start!important;
  justify-content:center!important;gap:4px;transform:rotate(2deg)!important;
  padding:20px 12px!important;border:7px ridge #876b4b!important;
  background:linear-gradient(130deg,#15181a,#3b362e)!important;color:#f5e2ba!important
}
body.theme-wasteland .archive-home .archive-card.collection-card:hover{filter:brightness(1.07);z-index:4!important}
body.theme-wasteland .archive-home .archive-card :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-count,.card-enter) {
  color:#372a1c!important
}
body.theme-wasteland .archive-home .archive-card .collection-emblem {
  min-height:45px;height:65px;max-height:65px;flex:0 0 65px;align-self:flex-start;
  margin:5px 0!important;color:#664522
}
body.theme-wasteland .archive-home .archive-card .collection-emblem svg{width:78px;height:75px}
body.theme-wasteland .archive-home .archive-card .card-name{font-weight:bold!important;margin:5px 0!important}
body.theme-wasteland .archive-home .archive-card .card-foot {border-color:#8a704e}
body.theme-wasteland .archive-home .special-collection :is(.card-name,.card-number,.card-subtitle,.card-count,.card-enter){
  color:#f3d9ae!important
}
body.theme-wasteland .archive-home .special-collection .collection-emblem{color:#b68c4d!important}
body.theme-wasteland .archive-home .special-collection .card-name{font-size:23px!important}
body.theme-wasteland .archive-home .special-collection .card-foot{width:100%;flex-direction:column;align-items:flex-start}
body.theme-wasteland .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts){
  background:linear-gradient(135deg,#c0a989,#91765c);color:#291e16;border:3px double #624a38
}
body.theme-wasteland .archive-home .archive-lower-panels :is(.archive-kicker,p,.excerpt-entry,.excerpt-entry .excerpt-name,.excerpt-entry .excerpt-book){color:#35251a!important}
body.theme-wasteland .archive-home .archive-lower-panels :is(.archive-excerpts-heading,.excerpt-entry){border-color:#725944}

/* 04: immersive endless underwater reading corridor. Book entrances
   become stops along a central illuminated route, not cards in a row. */
body.theme-poolcore .page-view.archive-home {
  background-image:linear-gradient(180deg,#06212c15 0%,#042e3e87 44%,#073644e7 100%),url('./scenes/underwater.svg')!important;
  background-size:100% 100%,cover!important;background-position:center top!important
}
body.theme-poolcore .archive-home .archive-header {
  max-width:710px!important;min-height:235px!important;
  padding:45px 25px 25px!important;margin-bottom:5px!important;
  background:radial-gradient(ellipse,#043a52ca,transparent 80%)!important
}
body.theme-poolcore .archive-home .archive-title{font-weight:400!important;letter-spacing:.18em!important;text-shadow:0 4px 24px #001927}
body.theme-poolcore .archive-home .archive-tools{max-width:920px}
body.theme-poolcore .archive-home .archive-grid {
  position:relative!important;display:flex!important;flex-direction:column!important;
  gap:40px!important;max-width:1000px!important;min-height:1070px!important;
  padding:22px 10px 35px!important;align-items:stretch!important
}
body.theme-poolcore .archive-home .archive-grid::before {
  content:''!important;display:block!important;position:absolute;
  top:0;bottom:0;left:50%;width:16%;transform:translateX(-50%);
  background:linear-gradient(90deg,transparent,#a7f9ff12 37%,#ceffff1f 50%,#a7f9ff12 63%,transparent),
             repeating-linear-gradient(180deg,transparent 0 85px,#cfffff38 86px 87px,transparent 90px 160px);
  border-inline:1px solid #b4f4fa48;pointer-events:none
}
body.theme-poolcore .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
  width:40%!important;min-height:156px!important;padding:21px 25px 16px!important;
  display:grid!important;grid-template-columns:80px minmax(0,1fr)!important;
  align-content:center;align-items:center!important;justify-items:start!important;
  text-align:left!important;gap:2px 15px!important;
  border:1px solid #b9f9f8ab!important;border-radius:50% 50% 5px 5px / 24% 24% 5px 5px!important;
  background:linear-gradient(130deg,#092b3def,#0b5663df 65%,#042c40f6)!important;
  box-shadow:inset 0 0 0 5px #ffffff12,0 8px 35px #001925ab!important;
  backdrop-filter:blur(10px)
}
body.theme-poolcore .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n),
body.theme-poolcore .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n),
body.theme-poolcore .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) {margin-right:auto!important}
body.theme-poolcore .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n),
body.theme-poolcore .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n) {margin-left:auto!important}
body.theme-poolcore .archive-home .archive-card .collection-emblem {
  grid-column:1;grid-row:1/6;width:70px;min-height:70px;max-height:70px;height:70px;margin:0
}
body.theme-poolcore .archive-home .archive-card .collection-emblem svg{width:67px;height:67px}
body.theme-poolcore .archive-home .archive-card.collection-card:not(.special-collection) :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-foot) {
  grid-column:2;width:100%;max-width:100%;margin:0!important;min-height:0!important
}
body.theme-poolcore .archive-home .archive-card .card-name{font-size:24px!important}
body.theme-poolcore .archive-home .archive-card .card-foot{flex-direction:row;justify-content:space-between;padding-top:7px!important}
body.theme-poolcore .archive-home .archive-card.special-collection:nth-child(n){
  margin:15px auto 0!important;width:46%!important;min-height:120px!important;
  justify-content:center!important;background:#d5f8f0db!important;
  border:2px solid #ecffff!important;border-radius:58% 58% 0 0 / 27% 27% 0 0!important;
  box-shadow:0 0 50px #8de8f26e,0 20px 0 -10px #407a8a!important
}
body.theme-poolcore .archive-home .special-collection :is(.card-name,.card-number,.card-subtitle,.card-count,.card-enter){color:#16485b!important}
body.theme-poolcore .archive-home .special-collection .collection-emblem{color:#1e6773!important}
body.theme-poolcore .archive-home .archive-lower-panels {max-width:930px}
body.theme-poolcore .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts){
  background:#072f40d9;border:1px solid #9ed9df7e;border-radius:12px
}

/* 05: plant-filled private library. The heading is a study desk on the left
   and individual books occupy different shelves on the right. */
body.theme-forest .page-view.archive-home {
  background-image:linear-gradient(100deg,#08170ecf,#142c1d4a 68%,#0d2112da 100%),url('./scenes/forest.svg')!important;
  background-position:center top!important;background-size:100% 100%,cover!important
}
body.theme-forest .archive-home:not([style*="none"]) {
  display:grid!important;grid-template-columns:minmax(250px,31%) minmax(0,1fr)!important;
  grid-template-rows:auto auto auto auto;gap:0 24px;align-items:start
}
body.theme-forest .archive-home .archive-header {
  grid-column:1!important;grid-row:1/3!important;align-items:flex-start!important;
  text-align:left!important;position:sticky!important;top:65px!important;
  min-height:500px!important;max-width:100%!important;
  padding:58px 25px 45px!important;
  background:linear-gradient(180deg,#122319ee,#192b1dc9)!important;
  border-left:6px solid #b4aa74!important;border-top:0!important;border-radius:0 0 30px 0!important
}
body.theme-forest .archive-home .archive-title {
  font-size:clamp(32px,3vw,47px)!important;line-height:1.5!important;
  margin:38px 0 15px!important;letter-spacing:.1em!important
}
body.theme-forest .archive-home .archive-header .archive-meta{justify-content:flex-start;margin-top:30px}
body.theme-forest .archive-home .archive-header .archive-meta span+span{border:0;padding:0}
body.theme-forest .archive-home .archive-tools {grid-column:2!important;grid-row:1!important;margin:0 0 15px!important;padding:15px 0}
body.theme-forest .archive-home .archive-grid {
  grid-column:2!important;grid-row:2!important;display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(160px,auto)) auto!important;
  gap:16px!important;padding:6px 14px 30px!important;align-items:stretch!important;
  border:10px solid #352e22!important;border-top-width:16px!important;
  background:repeating-linear-gradient(180deg,transparent 0 166px,#827457ba 168px 179px,#1d291cdb 181px 187px)!important;
  box-shadow:inset 0 0 35px #070b06,0 13px 30px #0009
}
body.theme-forest .archive-home .archive-card.collection-card:nth-child(n) {
  position:relative!important;min-height:170px!important;margin:0!important;padding:18px!important;
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  text-align:left!important;justify-content:flex-end!important;
  border:2px solid #a99772!important;border-radius:2px!important;
  background:linear-gradient(130deg,#ddd0aaf2,#a99b78e9)!important;
  color:#302b1e!important;box-shadow:3px 6px 0 #181a13c4!important;
  transform:rotate(-.4deg)!important
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n){
  grid-column:1!important;grid-row:1/3!important;min-height:365px!important;
  background:linear-gradient(130deg,#c7b993,#e8dfbc)!important
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n){
  grid-column:2!important;grid-row:1!important;transform:rotate(1deg)!important
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n){
  grid-column:2!important;grid-row:2!important;transform:rotate(-1.2deg)!important
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n){
  grid-column:1!important;grid-row:3!important;transform:rotate(.8deg)!important
}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n){
  grid-column:2!important;grid-row:3!important;transform:rotate(-.6deg)!important
}
body.theme-forest .archive-home .archive-card.collection-card:nth-child(n)::before{
  content:'❧'!important;position:absolute;display:block!important;
  font-size:27px;color:#53704c80;top:5px;right:12px;left:auto
}
body.theme-forest .archive-home .archive-card .collection-emblem{align-self:flex-start;min-height:55px;max-height:90px;margin:0 0 5px;color:#647456}
body.theme-forest .archive-home .archive-card .collection-emblem svg{width:72px;height:72px}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) .collection-emblem{min-height:160px;max-height:190px;flex:1}
body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) .collection-emblem svg{width:126px;height:126px}
body.theme-forest .archive-home .archive-card :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-count,.card-enter){color:#353021!important}
body.theme-forest .archive-home .archive-card .card-name{font-size:23px!important;margin:1px 0!important}
body.theme-forest .archive-home .archive-card .card-subtitle{min-height:0;margin:3px 0 6px!important;font-size:10px!important}
body.theme-forest .archive-home .archive-card .card-foot{border-color:#797050;width:100%;flex-direction:row!important;justify-content:space-between;padding-top:5px}
body.theme-forest .archive-home .archive-card.special-collection:nth-child(n){
  grid-column:1/-1!important;grid-row:4!important;display:flex!important;
  min-height:95px!important;flex-direction:row!important;align-items:center!important;
  background:linear-gradient(180deg,#403222,#241e16)!important;color:#e2d1a7!important;
  border:5px ridge #aa8b5d!important;box-shadow:inset 0 3px 7px #000a!important
}
body.theme-forest .archive-home .special-collection :is(.card-name,.card-number,.card-subtitle,.card-count,.card-enter){color:#e9d8b6!important}
body.theme-forest .archive-home .special-collection .collection-emblem{color:#c7ab72!important;margin:0}
body.theme-forest .archive-home .special-collection .card-foot{border:0;width:auto}
body.theme-forest .archive-home .archive-lower-panels {grid-column:1/-1!important;grid-row:3!important;width:100%}
body.theme-forest .archive-home .archive-footer {grid-column:1/-1!important;grid-row:4!important}
body.theme-forest .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts){
  border:2px solid #8c966e;background:#13251bec
}

/* 06: real two-pane DOS file manager: tree, list and inspector. */
body.theme-dos .page-view.archive-home {
  min-height:calc(100dvh - 58px);background:#030d08!important;
  background-image:repeating-linear-gradient(0deg,#86ffae08 0 1px,transparent 2px 5px)!important;
  color:#b1ffcb!important
}
body.theme-dos .archive-home .archive-header {
  align-items:flex-start!important;text-align:left!important;max-width:100%!important;
  min-height:175px!important;padding:25px 18px 8px!important;margin-bottom:0!important;
  background:none!important;border-top:2px solid #70b78a!important
}
body.theme-dos .archive-home .archive-title{font-family:monospace!important;font-size:clamp(25px,4.4vw,45px)!important;letter-spacing:0!important;text-shadow:0 0 12px #86ffa633}
body.theme-dos .archive-home .archive-meta{justify-content:flex-start}
body.theme-dos .archive-home .archive-tools{border:1px solid #699879;padding:12px 17px;margin-top:12px!important;max-width:100%!important;background:#06190ca8}
body.theme-dos .archive-home .archive-tools h2{font-family:monospace;font-size:15px}
body.theme-dos .archive-home .archive-grid {
  display:grid!important;grid-template-columns:minmax(220px,31%) minmax(0,69%)!important;
  grid-template-rows:40px repeat(6,minmax(67px,auto))!important;
  gap:0!important;max-width:100%!important;padding:0!important;
  align-items:stretch!important;border:1px solid #699879!important;
  background:#06100bbf!important
}
body.theme-dos .archive-home .archive-grid::before {
  content:'NAME               TYPE       FILES           OPEN'!important;
  display:block!important;grid-column:2;grid-row:1;padding:11px 16px;
  background:#102819!important;color:#a9faca;border-bottom:1px solid #699879;
  font:11px/1.5 monospace;letter-spacing:.07em;white-space:pre-wrap
}
body.theme-dos .archive-home .archive-tree {
  display:block!important;grid-column:1;grid-row:1/8;min-width:0;
  border-right:2px solid #699879;color:#b2ffd0;font-family:monospace;
  background:linear-gradient(135deg,#04140a,#06130c)
}
body.theme-dos .archive-home .tree-caption{padding:12px 13px;border-bottom:1px solid #699879;font:11px/1.4 monospace;color:#b9f9ca}
body.theme-dos .archive-home .tree-root{padding:14px 13px;margin:9px;background:#204c34;color:#bbffd0;font:12px/1.5 monospace}
body.theme-dos .archive-home .tree-entry{
  display:grid;grid-template-columns:45px 1fr auto;align-items:center;gap:4px;width:100%;
  min-width:0;padding:12px 10px;border:0;background:none;color:#b7f6c6;
  cursor:pointer;text-align:left;font:12px/1.4 monospace
}
body.theme-dos .archive-home .tree-entry:hover,body.theme-dos .archive-home .tree-entry:focus-visible {
  background:#2d794b;color:#ecffeb
}
body.theme-dos .archive-home .tree-entry span:nth-child(2){min-width:0;overflow-wrap:anywhere}
body.theme-dos .archive-home .tree-entry small{font-size:9px;opacity:.67;white-space:nowrap}
body.theme-dos .archive-home .tree-status{border-top:1px dashed #699879;padding:18px 12px;margin-top:12px;font:10px monospace;color:#79b38a}
body.theme-dos .archive-home .archive-card.collection-card:nth-child(n){
  grid-column:2!important;grid-row:auto!important;display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(80px,1fr) 75px!important;
  gap:3px 14px!important;min-height:67px!important;width:100%!important;
  padding:11px 14px!important;align-items:center!important;text-align:left!important;
  border:0!important;border-bottom:1px dashed #507a5c!important;
  border-radius:0!important;box-shadow:none!important;background:none!important
}
body.theme-dos .archive-home .archive-card.collection-card:hover{background:#245035a8!important}
body.theme-dos .archive-home .archive-card :is(.card-number,.card-tag,.card-subtitle,.collection-emblem){display:none!important}
body.theme-dos .archive-home .archive-card .card-name{
  grid-column:1!important;grid-row:1!important;margin:0!important;
  color:#b3ffce!important;font:17px/1.6 monospace!important
}
body.theme-dos .archive-home .archive-card .card-name::before{content:'▣  ';color:#88edab}
body.theme-dos .archive-home .archive-card .card-foot{
  grid-column:2/4!important;grid-row:1!important;width:100%;align-self:center;
  display:grid!important;grid-template-columns:1fr 75px!important;gap:6px;
  padding:0!important;margin:0!important;border:0!important
}
body.theme-dos .archive-home .archive-card .card-count{font:11px/1.5 monospace!important;color:#b1ffcb!important}
body.theme-dos .archive-home .archive-card .card-enter{text-align:right;color:#b1ffcb}
body.theme-dos .archive-home .archive-card.special-collection:nth-child(n){
  background:#0a2414!important;border-top:1px dashed #699879!important}
body.theme-dos .archive-home .archive-lower-panels {max-width:100%;gap:8px;grid-template-columns:1fr 1fr;margin:10px auto 25px}
body.theme-dos .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts){
  padding:17px;background:#06130b;border:1px solid #6a9a7c;box-shadow:none;
  color:#bbffd0;font:12px monospace
}
body.theme-dos .archive-home .archive-lower-panels .archive-summary h3{font:18px monospace}
body.theme-dos .archive-home .archive-lower-panels .archive-summary p,
body.theme-dos .archive-home .archive-lower-panels .excerpt-entry {font:11px/1.8 monospace}

/* 07: printed bibliographic folio. No card art or badges. */
body.theme-ink .page-view.archive-home {
  color:#161616!important;background:#f3f0e8!important;background-image:none!important;
  --show-text:#151515;--show-muted:#444;--show-accent:#151515;--show-border:#333;
  --show-card:#f3f0e8
}
body.theme-ink .archive-home .archive-header {
  position:relative;display:flex!important;align-items:flex-start!important;
  text-align:left!important;justify-content:center!important;
  padding:30px 25px 35px 52%!important;min-height:300px!important;
  border-top:2px solid #111!important;border-bottom:3px double #111!important;
  margin:10px auto 18px!important;max-width:100%!important;background:none!important
}
body.theme-ink .archive-home .archive-header::before {
  position:absolute;left:0;top:18px;bottom:18px;width:47%;content:''!important;
  display:block!important;background-image:linear-gradient(135deg,#16161666,#10101022),url('./scenes/museum.svg');
  background-size:cover;background-position:center 39%;filter:grayscale(1) contrast(1.28)
}
body.theme-ink .archive-home .archive-header :is(.archive-title,.archive-kicker,.archive-meta,.layout-caption,.layout-status,.archive-subtitle) {
  color:#171717!important;text-shadow:none!important;max-width:100%!important
}
body.theme-ink .archive-home .archive-title{font-size:clamp(32px,4vw,60px)!important;letter-spacing:.08em!important;margin:13px 0!important}
body.theme-ink .archive-home .archive-meta{justify-content:flex-start!important;margin-top:15px}
body.theme-ink .archive-home .archive-tools{
  border-bottom:2px solid #151515;padding:10px 0;margin-bottom:0!important
}
body.theme-ink .archive-home .archive-tools h2{font:500 22px 'Songti SC','SimSun',serif}
body.theme-ink .archive-home .archive-search{border:0;border-bottom:1px solid #444;background:none}
body.theme-ink .archive-home .archive-grid{
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:0!important;padding:0!important;border-bottom:3px double #222!important;background:none!important
}
body.theme-ink .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
  grid-row:1!important;grid-column:auto!important;
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;
  min-height:290px!important;padding:25px 18px 20px!important;margin:0!important;
  text-align:left!important;border:0!important;border-right:1px solid #333!important;
  border-radius:0!important;background:none!important;box-shadow:none!important
}
body.theme-ink .archive-home .archive-card.collection-card:not(.special-collection):nth-child(2){border-left:1px solid #333!important}
body.theme-ink .archive-home .archive-card.collection-card:nth-child(n)::before,
body.theme-ink .archive-home .archive-card.collection-card:nth-child(n)::after {display:none!important}
body.theme-ink .archive-home .archive-card .collection-emblem{display:none!important}
body.theme-ink .archive-home .archive-card .card-number{
  font:35px/1.2 Georgia,serif!important;letter-spacing:0;color:#171717!important;
  margin-bottom:20px!important;width:100%
}
body.theme-ink .archive-home .archive-card .card-tag{font:9px/1.4 monospace!important;letter-spacing:.1em;color:#444!important}
body.theme-ink .archive-home .archive-card .card-name{font:500 23px/1.5 'Songti SC','SimSun',serif!important;color:#111!important;margin:7px 0 15px!important}
body.theme-ink .archive-home .archive-card .card-subtitle{font:12px/2 serif!important;color:#333!important;margin:0 0 18px!important;min-height:75px}
body.theme-ink .archive-home .archive-card .card-foot{
  align-items:flex-start!important;border-top:1px solid #777;
  margin-top:auto!important;width:100%;padding-top:9px!important
}
body.theme-ink .archive-home .archive-card .card-count,body.theme-ink .archive-home .archive-card .card-enter{color:#444!important}
body.theme-ink .archive-home .archive-card.special-collection:nth-child(n) {
  grid-column:1/-1!important;grid-row:2!important;display:grid!important;
  grid-template-columns:1fr 2fr 2fr auto!important;
  align-items:center!important;gap:12px!important;min-height:104px!important;
  padding:18px 24px!important;border:0!important;border-top:2px solid #111!important;
  border-radius:0!important;background:none!important;box-shadow:none!important
}
body.theme-ink .archive-home .special-collection .card-number{grid-column:1;margin:0!important;font:12px monospace!important}
body.theme-ink .archive-home .special-collection .card-name{grid-column:2;font:35px Georgia,serif!important;margin:0!important}
body.theme-ink .archive-home .special-collection .card-subtitle{grid-column:3;margin:0!important;min-height:0!important;border-left:1px solid #aaa;padding-left:18px}
body.theme-ink .archive-home .special-collection .card-foot{grid-column:4;margin:0!important;align-items:flex-end!important;border:0}
body.theme-ink .archive-home .archive-lower-panels{
  grid-template-columns:1fr 2fr;gap:0;max-width:100%;margin-top:26px
}
body.theme-ink .archive-home .archive-lower-panels :is(.archive-summary,.archive-excerpts){
  box-shadow:none;background:none;border:0;border-top:2px solid #222;border-right:1px solid #777
}
body.theme-ink .archive-home .archive-footer{border-color:#222;color:#222}

/* Classic responsive system: each theme keeps its visual grammar. */
@media(max-width:1080px){
  body.theme-midcentury .archive-home .archive-grid {
    grid-template-columns:repeat(6,minmax(0,1fr))!important
  }
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {grid-column:1/4!important;grid-row:1!important}
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="chronicle"]:nth-child(n) {grid-column:4/7!important;grid-row:1!important}
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="labyrinth"]:nth-child(n) {grid-column:1/4!important;grid-row:2!important}
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="gazetteer"]:nth-child(n) {grid-column:4/7!important;grid-row:2!important}
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) {
    grid-column:2/6!important;grid-row:3!important
  }
  body.theme-midcentury .archive-home .archive-card.special-collection:nth-child(n) {
    grid-column:2/6!important;grid-row:4!important
  }
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){width:30%!important}
  body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n){width:34%!important;left:33%}
  body.theme-spacetech .archive-home .archive-card.special-collection:nth-child(n){width:34%!important;left:33%}
  body.theme-forest .archive-home:not([style*="none"]){grid-template-columns:minmax(210px,30%) minmax(0,1fr)!important;gap:0 12px}
  body.theme-forest .archive-home .archive-grid{padding-inline:8px!important}
  body.theme-ink .archive-home .archive-card .card-name{font-size:20px!important}
}
@media(max-width:820px){
  body.theme-spacetech .archive-home .archive-grid {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:auto!important;gap:12px!important;min-height:0!important;padding:55px 0 15px!important
  }
  body.theme-spacetech .archive-home .archive-grid::before{
    top:0;left:10%;height:37px;width:80%;font-size:9px!important;border-radius:0
  }
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
    position:relative!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;
    grid-column:auto!important;grid-row:auto!important;width:100%!important;
    min-height:185px!important;gap:6px!important
  }
  body.theme-spacetech .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n){grid-column:1/-1!important}
  body.theme-spacetech .archive-home .archive-card.special-collection:nth-child(n){
    position:relative!important;top:auto!important;left:auto!important;bottom:auto!important;
    grid-column:1/-1!important;grid-row:auto!important;width:100%!important;min-height:115px!important
  }
  body.theme-wasteland .archive-home .archive-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important
  }
  body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n){
    grid-column:auto!important;grid-row:auto!important;min-height:270px!important;margin:0!important
  }
  body.theme-wasteland .archive-home .archive-card.special-collection:nth-child(n){
    grid-column:1/-1!important;min-height:125px!important;flex-direction:row!important;align-items:center!important
  }
  body.theme-poolcore .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){width:45%!important}
  body.theme-poolcore .archive-home .archive-card.special-collection:nth-child(n){width:70%!important}
  body.theme-forest .archive-home:not([style*="none"]){display:block!important}
  body.theme-forest .archive-home .archive-header{position:relative!important;top:auto!important;min-height:225px!important;padding:24px 30px!important}
  body.theme-forest .archive-home .archive-header .archive-title{margin:16px 0!important}
  body.theme-forest .archive-home .archive-tools{margin-top:15px!important}
  body.theme-forest .archive-home .archive-grid{max-width:780px!important;margin:0 auto!important}
  body.theme-dos .archive-home .archive-grid{grid-template-columns:minmax(200px,34%) minmax(0,66%)!important}
  body.theme-dos .archive-home .archive-card.collection-card:nth-child(n){grid-template-columns:minmax(0,1fr)!important}
  body.theme-dos .archive-home .archive-card .card-name{font-size:16px!important;grid-column:1!important;grid-row:1!important}
  body.theme-dos .archive-home .archive-card .card-foot{grid-column:1!important;grid-row:2!important;gap:8px!important}
  body.theme-ink .archive-home .archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  body.theme-ink .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
    grid-row:auto!important;grid-column:auto!important;min-height:240px!important;border-bottom:1px solid #777!important
  }
  body.theme-ink .archive-home .archive-card.special-collection:nth-child(n){grid-column:1/-1!important;grid-row:auto!important}
}
@media(max-width:620px){
  body[class*="theme-"] .archive-home .archive-lower-panels{grid-template-columns:1fr;gap:10px}
  body[class*="theme-"] .archive-home :is(.archive-summary,.archive-excerpts){padding:16px}
  body.theme-midcentury .archive-home .archive-header{min-height:205px!important;padding:32px 12px 18px!important}
  body.theme-midcentury .archive-home .archive-title{font-size:35px!important;letter-spacing:.07em!important}
  body.theme-midcentury .archive-home .archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  body.theme-midcentury .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
    grid-column:auto!important;grid-row:auto!important;min-height:248px!important;
    border-radius:55px 55px 5px 5px!important;padding:15px!important
  }
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n){grid-column:1/-1!important}
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) {
    grid-column:1/-1!important;grid-row:auto!important;display:flex!important;text-align:center!important;
    align-items:center!important;min-height:220px!important
  }
  body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) .collection-emblem{margin:0 auto!important}
  body.theme-midcentury .archive-home .archive-card.special-collection:nth-child(n) {
    grid-column:1/-1!important;grid-row:auto!important;width:95%!important;
    flex-wrap:wrap;gap:6px;min-height:90px!important;padding:14px!important
  }
  body.theme-midcentury .archive-home .archive-card .card-name{font-size:21px!important}
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n) {
    min-height:173px!important;padding:13px!important;grid-template-columns:minmax(0,1fr)!important
  }
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .collection-emblem {
    display:none!important
  }
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-name{font-size:20px!important}
  body.theme-spacetech .archive-home .archive-card.collection-card:not(.special-collection) .card-foot{flex-direction:column;align-items:flex-start}
  body.theme-wasteland .archive-home .archive-header{min-height:180px!important;padding:23px!important}
  body.theme-wasteland .archive-home .archive-title{font-size:30px!important}
  body.theme-wasteland .archive-home .archive-grid{gap:17px 12px!important;padding:15px 8px!important}
  body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n){
    padding:14px 12px!important;min-height:240px!important
  }
  body.theme-wasteland .archive-home .archive-card .collection-emblem{min-height:45px;max-height:50px;height:50px}
  body.theme-wasteland .archive-home .archive-card .collection-emblem svg{width:58px;height:58px}
  body.theme-wasteland .archive-home .archive-card .card-name{font-size:20px!important}
  body.theme-wasteland .archive-home .archive-card .card-subtitle{font-size:10px!important;min-height:0}
  body.theme-wasteland .archive-home .archive-card.special-collection:nth-child(n){min-height:115px!important}
  body.theme-poolcore .archive-home .archive-header{min-height:178px!important;padding:22px 5px!important}
  body.theme-poolcore .archive-home .archive-grid{gap:25px!important;min-height:0!important;padding:20px 1px!important}
  body.theme-poolcore .archive-home .archive-grid::before{width:9%!important}
  body.theme-poolcore .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n) {
    width:82%!important;min-height:152px!important;padding:14px!important;
    grid-template-columns:45px minmax(0,1fr)!important;gap:8px!important
  }
  body.theme-poolcore .archive-home .archive-card .collection-emblem{width:43px;min-height:43px;max-height:43px;height:43px}
  body.theme-poolcore .archive-home .archive-card .collection-emblem svg{width:43px;height:43px}
  body.theme-poolcore .archive-home .archive-card .card-name{font-size:20px!important}
  body.theme-poolcore .archive-home .archive-card .card-foot{flex-direction:column;align-items:flex-start}
  body.theme-poolcore .archive-home .archive-card.special-collection:nth-child(n){width:90%!important;flex-wrap:wrap;min-height:100px!important}
  body.theme-forest .archive-home .archive-grid {grid-template-columns:1fr!important;grid-template-rows:auto!important;gap:12px!important}
  body.theme-forest .archive-home .archive-card.collection-card:nth-child(n){
    grid-row:auto!important;grid-column:1!important;min-height:165px!important
  }
  body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) {min-height:225px!important}
  body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) .collection-emblem{min-height:70px;max-height:80px}
  body.theme-forest .archive-home .archive-card.collection-card[data-kind="atlas"]:nth-child(n) .collection-emblem svg{width:80px;height:80px}
  body.theme-forest .archive-home .archive-card.special-collection:nth-child(n){
    grid-column:1!important;flex-wrap:wrap;min-height:100px!important
  }
  body.theme-dos .archive-home .archive-header{padding:15px 8px!important;min-height:155px!important}
  body.theme-dos .archive-home .archive-tools {padding:12px 8px}
  body.theme-dos .archive-home .archive-grid {
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto repeat(6,minmax(65px,auto))!important
  }
  body.theme-dos .archive-home .archive-grid::before {grid-column:1;grid-row:2;padding:9px;font-size:9px}
  body.theme-dos .archive-home .archive-tree {
    grid-column:1!important;grid-row:1!important;border-right:0;border-bottom:2px solid #699879
  }
  body.theme-dos .archive-home .tree-caption,.theme-dos .archive-home .tree-status{display:none}
  body.theme-dos .archive-home .tree-root{margin:0;padding:9px}
  body.theme-dos .archive-home .archive-tree{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px}
  body.theme-dos .archive-home .tree-root{grid-column:1/-1}
  body.theme-dos .archive-home .tree-entry{grid-template-columns:19px minmax(0,1fr);font-size:11px;padding:8px 6px}
  body.theme-dos .archive-home .tree-entry small{display:none}
  body.theme-dos .archive-home .archive-card.collection-card:nth-child(n){
    grid-column:1!important;grid-row:auto!important;min-height:67px!important;
    padding:9px!important
  }
  body.theme-dos .archive-home .archive-card .card-name{font-size:15px!important}
  body.theme-dos .archive-home .archive-lower-panels{grid-template-columns:1fr}
  body.theme-ink .archive-home .archive-header{display:block!important;min-height:0!important;padding:155px 2px 22px!important}
  body.theme-ink .archive-home .archive-header::before{top:0;left:0;right:0;width:100%;height:145px;bottom:auto}
  body.theme-ink .archive-home .archive-header .archive-title{font-size:36px!important}
  body.theme-ink .archive-home .archive-tools{align-items:stretch;gap:10px}
  body.theme-ink .archive-home .archive-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.theme-ink .archive-home .archive-card.collection-card:not(.special-collection):nth-child(n){
    min-height:245px!important;padding:18px 10px!important
  }
  body.theme-ink .archive-home .archive-card .card-name{font-size:20px!important}
  body.theme-ink .archive-home .archive-card.special-collection:nth-child(n) {
    display:flex!important;flex-wrap:wrap;padding:14px!important;gap:12px!important
  }
  body.theme-ink .archive-home .special-collection .card-subtitle{padding-left:0;border-left:0}
  body.theme-ink .archive-home .archive-lower-panels{grid-template-columns:1fr}
}
@media(max-width:400px){
  body.theme-wasteland .archive-home .archive-grid{grid-template-columns:1fr!important;gap:15px!important}
  body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n){
    grid-column:1!important;min-height:190px!important
  }
  body.theme-ink .archive-home .archive-grid{grid-template-columns:1fr!important}
  body.theme-ink .archive-home .archive-card.collection-card:nth-child(n) {
    grid-column:1!important;min-height:160px!important
  }
  body.theme-ink .archive-home .archive-card .card-subtitle{min-height:0}
}
@media(prefers-reduced-motion:reduce){
  body[class*="theme-"] .archive-home .archive-card.collection-card:nth-child(n){
    transition:none!important
  }
}

/* Explicit placement selectors outrank legacy generic :nth-child rules. */
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) .card-foot {width:100%;margin-top:5px!important}
body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) .collection-emblem{max-width:130px}
body.theme-wasteland .archive-home .archive-card.collection-card:nth-child(n):hover{filter:brightness(1.07)!important}
@media(max-width:620px){
 body.theme-midcentury .archive-home .archive-card.collection-card[data-kind="journal"]:nth-child(n) :is(.card-number,.card-tag,.card-name,.card-subtitle,.card-foot){grid-column:auto}
}

/* ARCHIVE SCROLL BOUNDARY FIX / mobile rubber-band backdrop */
/*
 * The archive itself owns vertical scrolling. When Android's browser tries
 * to chain an overscroll gesture to #content/body, their old light background
 * can flash beneath the themed gallery. Paint all exposed layers consistently
 * and prevent scroll chaining without changing the book/reader pages.
 */
body[class*="theme-"] .page-view.archive-home {
  height:100%!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  background-color:var(--show-bg)!important;
}
body[class*="theme-"]:has(.archive-home:not([style*="none"])) {
  overscroll-behavior-y:none;
  background-color:var(--show-bg)!important;
}
body[class*="theme-"]:has(.archive-home:not([style*="none"])) .app {
  overflow:hidden!important;
  overscroll-behavior-y:none;
}
body[class*="theme-"]:has(.archive-home:not([style*="none"])) #content {
  overflow:hidden!important;
  min-height:0!important;
  background:var(--show-bg)!important;
  overscroll-behavior-y:none;
}
@media(max-width:700px){
  body[class*="theme-"] .page-view.archive-home {
    overscroll-behavior-y:contain;
  }
}
