.main-hall-page .site-scene { background: #e9d4af; }
.main-hall-page #site-nav a[aria-current='page'] { background: #c5a26b30; box-shadow: inset 0 -2px var(--red); }
.main-book { margin: 42px 24px 0; padding-bottom: 24px; }
.main-opening { position: relative; isolation: isolate; min-height: 350px; display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; border: 1px solid #7b5836; padding: 25px 5%; overflow: hidden; }
.archive-backdrop { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 57%; }
.main-title-paper { text-align: center; padding: 18px 20px; color: #4c2b1e; background: #f2e1c2ec; border: 1px solid #8a624363; outline: 3px double #c5a579; outline-offset: 5px; box-shadow: 2px 3px 10px #3c261531; }
.main-title-paper h1 { margin: 0; font-size: clamp(3.8rem,6.5vw,5.6rem); font-weight: 600; letter-spacing: .3em; padding-left: .3em; line-height: 1.2; }
.main-english { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 8px 0 12px; font: .875rem Georgia,serif; letter-spacing: .19em; }
.main-english::before,.main-english::after { content: ''; width: 45px; border-top: 1px solid #b08d66; }
.main-title-paper h2 { margin: 0 0 15px; padding-bottom: 13px; border-bottom: 1px solid #a38058; font-size: 1.55rem; letter-spacing: .2em; font-weight: 600; }
.main-title-paper > p:last-child { font-size: 1rem; line-height: 1.9; margin: 0; text-align: left; }
.main-greeter { display: flex; justify-content: flex-end; align-items: center; align-self: end; padding-bottom: 6px; gap: 12px; }
.main-greeter img { width: 145px; height: 205px; object-fit: contain; filter: drop-shadow(2px 5px 3px #25170c65); }
.main-greeter p { background: #f3e2c5; color: #503720; border: 3px double #99724d; box-shadow: 2px 3px 0 #3c291747; padding: 20px 16px; margin: 0; font-size: .9375rem; line-height: 1.9; transform: rotate(-2deg); }
.main-panel { position: relative; padding: 18px 18px 20px; margin-top: 14px; border: 1px solid #a68159; outline: 1px solid #ceb08a; outline-offset: -5px; background: radial-gradient(ellipse at 0 0,#fff8e74a,transparent 75%),repeating-linear-gradient(35deg,#73523506 0 1px,transparent 1px 4px),#f1dfbf; }
.shelf-heading { display: flex; align-items: center; gap: 13px; margin: -7px 0 15px; min-width: 0; }
.shelf-heading h2 { margin: 0; padding: 7px 21px; border: 3px double #e1bea0; outline: 1px solid #874c34; background: linear-gradient(100deg,#823d2be8,#713825); color: #fff2d7; font-size: 1.45rem; font-weight: 500; letter-spacing: .14em; line-height: 1.5; }
.shelf-heading > span { font: .6875rem Georgia,serif; letter-spacing: .16em; color: #795139; }
.shelf-note { margin: 0 0 16px; font-size: .875rem; letter-spacing: .08em; }
.main-panel > p { font-size: 1rem; line-height: 1.95; margin: 0 0 14px; }
.main-panel > .shelf-note { font-size: .875rem; }
.pickup-shelf { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); align-items: start; gap: 13px; padding: 5px 0 8px; }
.specimen { min-width: 0; }
.specimen a { display: block; text-decoration: none; }
.specimen-image { display: block; padding: 5px; background: #ddc59f; border: 1px solid #aa8059; box-shadow: 1px 3px 3px #4d301e30; transition: transform .15s ease; }
.specimen-image img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.pickup-shelf .specimen:nth-child(3n+1) .specimen-image { transform: rotate(-1.5deg); }
.pickup-shelf .specimen:nth-child(3n+2) .specimen-image { transform: rotate(1.5deg); }
.specimen a:hover .specimen-image,.specimen a:focus-visible .specimen-image { transform: translateY(-3px); outline: 2px solid #8b452e; outline-offset: 2px; }
.specimen-title { display: block; margin-top: 10px; font-size: .9375rem; font-weight: 600; line-height: 1.6; text-decoration: underline; text-decoration-color: #76553c75; text-underline-offset: .25em; }
.specimen-meta { display: flex; align-items: center; justify-content: space-between; font-size: .75rem; line-height: 1.6; color: #745337; margin-top: 3px; }
.main-panel > .sample-notice,.sample-notice { margin: 8px 0 0; font-size: .8125rem; line-height: 1.8; color: #6c4b32; }
.category-shelf { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 10px; }
.category-shelf a { display: flex; flex-direction: column; align-items: center; padding: 5px 5px 9px; border: 1px solid #b7946d; background: #ead3b0; box-shadow: 1px 2px 1px #63472724; text-decoration: none; }
.category-shelf img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; mix-blend-mode: multiply; }
.west-book .category-shelf img { object-fit: contain; padding: 6px; }
.category-shelf span { display: block; font-size: .875rem; white-space: nowrap; margin-top: 8px; border-bottom: 1px solid #8f6b4770; }
.category-shelf a:hover,.category-shelf a[aria-current] { background: #e1bd8f; outline: 2px solid #85482e; }
.material-catalog { margin-top: 20px; border-top: 1px solid #a7845d; scroll-margin-top: 16px; }
.material-catalog summary { cursor: pointer; font-size: .9375rem; padding: 15px 3px; }
.material-catalog summary:focus-visible { outline: 3px solid #a94324; outline-offset: 2px; }
#catalog-count { margin-left: 16px; font-size: .875rem; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: .875rem; }
.catalog-toolbar p { margin: 0; }
.catalog-toolbar a { padding: 10px 3px; }
.catalog-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 24px 14px; }
.main-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.small-shelf,.collection-shelf { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.specimen-small .specimen-title { font-size: .875rem; }
.collection-shelf a { text-align: center; text-decoration: none; font-size: .875rem; line-height: 1.6; }
.collection-shelf img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; padding: 4px; border: 1px solid #987650; background: #d4ba94; }
.collection-shelf a > span { display: block; margin-top: 6px; }
.collection-shelf small { display: block; font-size: .75rem; margin-top: 5px; text-decoration: underline; text-underline-offset: 3px; }
.collection-shelf a:hover img { outline: 2px solid #88432d; outline-offset: 2px; }
.shelf-button { display: flex; width: fit-content; max-width: 100%; align-items: center; justify-content: center; gap: 16px; min-height: 44px; margin: 18px auto 0; padding: 10px 19px; background: var(--teal); border: 3px double #dbc197; outline: 1px solid #5d4b33; color: #fff2d4; font-size: .9375rem; letter-spacing: .06em; text-decoration: none; line-height: 1.5; }
.shelf-button:hover { background: #35504a; }
.new-stamp { display: inline-block; transform: rotate(-12deg); margin-left: 18px; color: #8a382b; border: 3px double; padding: 0 6px; font: .75rem/1.8 Georgia,serif; }
.permission-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 7px; margin: 20px 0 15px; }
.permission-grid > div { text-align: center; padding: 8px 2px; background: #f8ead3; border: 1px solid #b59068; }
.permission-grid dt { font-size: .875rem; font-weight: 600; }
.permission-grid dd { margin: 5px 0 0; line-height: 1; color: #705334; }
.permission-grid dd > span:first-child { font: 2.2rem/1 Georgia,serif; }
.permission-word { display: block; margin-top: 5px; font-size: .75rem; }
.permission-grid .forbidden { border: 2px solid #994635; background: #f4dfc7; }
.permission-grid .forbidden dd { color: #933a2b; }
.print-notice { font-size: .875rem !important; line-height: 1.9; }
.print-notice strong { color: #8b3526; }
.link-invitation { display: grid; grid-template-columns: minmax(0,1fr) max-content; gap: 15px; }
.link-invitation p { font-size: .9375rem; line-height: 1.95; margin: 0 0 13px; }
.link-welcome { font-weight: 600; letter-spacing: .2em; }
.link-invitation .no-hotlink { align-self: start; padding: 13px 8px; text-align: center; border: 4px double #9b4c39; outline: 1px solid #b98569; outline-offset: 3px; margin: 8px 4px; }
.no-hotlink strong { display: block; color: #913d2c; font-size: 1rem; letter-spacing: 0; white-space: nowrap; }
.no-hotlink span { display: block; font-size: .75rem; line-height: 1.65; margin-top: 7px; white-space: nowrap; }
.banner-shelf { display: flex; gap: 20px 15px; flex-wrap: wrap; align-items: flex-start; margin-top: 20px; }
.banner-download { display: block; max-width: 100%; text-decoration: none; }
.banner-download:first-child { flex-basis: 100%; }
.banner-download img { display: block; max-width: 100%; height: auto; box-shadow: 1px 2px 4px #4c2e2340; }
.banner-download span { display: block; font: .75rem/1.5 Georgia,serif; margin-top: 6px; color: #735038; }
.banner-download:hover img { outline: 2px solid #8b452e; outline-offset: 3px; }
.main-panel .banner-note { font-size: .875rem; margin-top: 20px; }
.main-hall-page .site-footer { background: #342820; color: #ecddbf; }
.material-detail { padding-top: 30px; }
.back-to-shelf { display: inline-block; padding: 12px 0; margin-bottom: 12px; }
.detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.detail-image { width: 100%; height: auto; max-width: 500px; border: 7px solid #d5ba94; }
.detail-layout h1 { font-size: clamp(1.8rem,3vw,2.7rem); line-height: 1.5; font-weight: 500; }
.detail-layout p { line-height: 1.9; }
.detail-category,.detail-meta { font-size: .875rem; color: #785438; }
.material-tags { display: flex; list-style: none; flex-wrap: wrap; gap: 8px; padding: 0; }
.material-tags li { border: 1px solid #b8986f; padding: 4px 9px; font-size: .875rem; }
.material-detail article > section { max-width: 760px; margin: 30px auto 0; padding-top: 20px; border-top: 1px solid #ab8058; font-size: 1rem; line-height: 1.9; }
.material-detail article > section h2 { font-size: 1.5rem; font-weight: 500; }
@media(min-width:1100px) { .pickup-panel > .shelf-note,.categories-panel > .shelf-note { position: absolute; top: 20px; right: 24px; } }
@media(max-width:1050px) {
  .main-opening { padding: 24px; grid-template-columns: 1.3fr 1fr; }
  .main-greeter { gap: 0; }
  .main-greeter img { width: 110px; height: 170px; }
  .main-greeter p { font-size: .8125rem; padding: 12px; }
  .pickup-shelf { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px 16px; }
  .category-shelf { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .small-shelf,.collection-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shelf-heading { flex-wrap: wrap; gap: 8px; }
  .shelf-heading h2 { font-size: 1.3rem; }
  .shelf-heading > span { font-size: .65rem; }
  .link-invitation { display: block; }
  .link-invitation .no-hotlink { width: fit-content; padding: 10px 20px; }
}
@media(max-width:760px) {
  .main-hall-page .site-scene { padding-top: 90px; }
  .main-book { margin: 0 12px; padding-bottom: 18px; }
  .main-opening { display: block; padding: 20px 18px 0; }
  .archive-backdrop { object-position: 65% center; }
  .main-title-paper { padding: 18px 14px; }
  .main-title-paper h1 { font-size: 3.8rem; }
  .main-title-paper h2 { font-size: 1.35rem; }
  .main-title-paper > p:last-child { font-size: 1rem; }
  .main-greeter { justify-content: center; padding: 18px 0 3px; gap: 18px; }
  .main-greeter img { width: 98px; height: 140px; }
  .main-greeter p { padding: 12px 16px; font-size: .875rem; }
  .main-panel { padding: 18px 12px; margin-top: 13px; }
  .shelf-heading { margin-bottom: 13px; gap: 8px; }
  .shelf-heading h2 { padding: 5px 13px; font-size: 1.25rem; letter-spacing: .08em; }
  .shelf-note { font-size: .875rem; }
  .pickup-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px 13px; }
  .category-shelf { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px 9px; }
  .category-shelf span { font-size: .875rem; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .main-columns { display: block; }
  .small-shelf,.collection-shelf { gap: 20px 13px; }
  .permission-grid { gap: 4px; }
  .permission-grid dt { font-size: .8125rem; }
  .permission-grid dd > span:first-child { font-size: 2rem; }
  .link-invitation { display: block; }
  .link-invitation .no-hotlink { padding: 10px 12px; width: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .no-hotlink strong { font-size: 1rem; }
  .detail-layout { grid-template-columns: 1fr; gap: 16px; }
  .material-detail { padding-top: 0; }
}
@media(max-width:359px) { .category-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); } .link-invitation { display: block; } .link-invitation .no-hotlink { display: block; width: fit-content; padding: 10px 20px; } .permission-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(prefers-reduced-motion:reduce) { .specimen-image { transition: none; } }
.downloadable .specimen-image img { object-fit:contain; background:#e1d1b8; padding:6px; }
.series-picker { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin-bottom:18px; font-size:.875rem; }
.series-picker:empty { display:none; }
.series-picker select { max-width:100%; min-height:44px; padding:8px; color:#382d22; font:inherit; border:1px solid #aa8059; background:#f7e7ce; }
.detail-preview { margin:0; min-width:0; }
.detail-preview .detail-image { display:block; max-height:680px; object-fit:contain; }
.transparent-preview .detail-image { background:#ddcdb5; padding:14px; border:1px solid #ab8058; }
.detail-preview figcaption { margin:10px 0; font-size:.875rem; line-height:1.7; color:#634932; }
.detail-series { font-size:.9375rem; }
.material-tags a { text-underline-offset:3px; }
.material-download { border-top:1px solid #b9966c; margin-top:20px; padding-top:10px; }
.material-download p { font-size:.9375rem; }
.material-download strong { color:#7a352e; }
.usage-anchor { display:inline-block; padding:12px 0; font-size:.875rem; }
@media(max-width:760px) { .series-picker { align-items:stretch; flex-direction:column; } .detail-preview .detail-image { max-height:480px; } .detail-meta { overflow-wrap:anywhere; } }

.material-origin { font-size:.875rem; color:#634932; }
.repeat-section { margin-top:30px; }
.repeat-preview { height:420px; border:1px solid #ab8058; background-repeat:repeat; background-size:384px 384px; }
@media(max-width:760px) { .repeat-preview { height:360px; } }

/* Larger specimens on the main hall category shelf. */
.main-book:not(.west-book) .category-shelf { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 16px; }
.main-book:not(.west-book) .category-shelf a { padding: 8px 8px 12px; }
.main-book:not(.west-book) .category-shelf span { font-size: 1rem; margin-top: 10px; }
@media(max-width:1050px) { .main-book:not(.west-book) .category-shelf { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; } }
@media(max-width:760px) { .main-book:not(.west-book) .category-shelf { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 12px; } }

.category-pending { display:flex; flex-direction:column; align-items:center; padding:8px 8px 12px; border:1px solid #b7946d; background:#ead3b0; }
.category-pending-sign { display:grid; place-items:center; width:100%; aspect-ratio:1; background:#eee0c6; }
.category-pending-sign strong { color:#765339; font-weight:500; letter-spacing:.16em; padding:12px 15px; border:3px double #9d7854; background:#f4e6cc; transform:rotate(-4deg); box-shadow:2px 3px 0 #805c3320; }

.main-book:not(.west-book) .category-shelf [data-category-link="people"] img { object-fit:contain; }

.preview-background-control,.tile-size-control {display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:.875rem;margin:14px 0;color:#523f30;}
.preview-background-control select {font:inherit;min-height:40px;padding:6px 12px;color:#352a22;background:#f5e9d2;border:1px solid #a78360;}
.detail-preview[data-background="white"] .detail-image {background:#fff;}
.detail-preview[data-background="black"] .detail-image {background:#111;}
.detail-preview[data-background="checker"] .detail-image {background-color:#fff;background-image:conic-gradient(#c8c8c8 25%,#fff 0 50%,#c8c8c8 0 75%,#fff 0);background-size:20px 20px;}
.tile-size-control input {width:min(100%,360px);accent-color:#684542;}
.repeat-note {font-size:.875rem;}

.west-book .collection-shelf img { object-fit: contain; }
