/* Approved option 2: decorative art is independent of bestiary publication. */
body[data-asterra-page="library"] main { max-width: 1480px; padding: 0 32px 40px; }
body[data-asterra-page="library"] .portal-header {
  max-width: 1480px; margin: auto; min-height: 58px; padding: 7px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid #b9b9ad; background: #1c1d1b;
}
.feast-wordmark { font: 23px/1.2 Georgia, serif; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; text-decoration: none; }
.portal-nav { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.portal-nav a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.portal-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.portal-nav .portal-register { padding: 4px 28px; background: url('asterra-button-frame-20261011.svg') center/100% 100%; }
body[data-asterra-page="library"] .portal-menu { display: none; }
.portal-hero {
  position: relative; min-height: 650px; margin: 0 -32px; padding: 55px 50px 58px;
  background: #1c1d1b url('asterra-ornament-hero-20261011.webp') center right/cover no-repeat;
}
.portal-hero-copy { position: relative; width: min(480px, 42%); }
.portal-hero h1 { margin: 0 0 12px; }
.portal-hero h1 img { width: 100%; height: auto; }
.portal-tagline { font-size: clamp(20px, 1.8vw, 25px); line-height: 1.4; margin: 0 0 22px; text-shadow: 0 2px 8px #000; }
.portal-scene { display: inline-flex; align-items: center; min-height: 36px; font-size: 14px; letter-spacing: .04em; padding: 8px 20px; background: #1c1d1bf0 url('asterra-button-frame-20261011.svg') center/100% 100%; margin: 0 0 28px; text-decoration: none; }
.portal-actions { display: grid; gap: 16px; width: 350px; max-width: 100%; }
.portal-actions a { position: relative; display: flex; justify-content: center; align-items: center; gap: 20px; min-height: 48px; padding: 9px 15px; font-size: 20px; text-decoration: none; background: #1c1d1bf5 url('asterra-button-frame-20261011.svg') center/100% 100%; }
.portal-actions a.portal-primary { min-height: 62px; color: #181916; font: 500 26px/1.2 Georgia, serif; white-space: nowrap; gap: 16px; background-color: #eeb23e; box-shadow: inset 0 0 12px #9e5e1355; outline: 1px solid #efb543; outline-offset: 2px; }
.portal-primary::before { content: ''; position: absolute; inset: 4px; border: 1px solid #30220f; clip-path: polygon(0 12%,2% 0,97% 0,100% 12%,100% 85%,98% 100%,2% 100%,0 86%); pointer-events: none; }
.portal-actions a:hover { filter: brightness(1.12); }
.portal-gateways { position: relative; display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 18px; margin: 10px 0 40px; scroll-margin-top: 38px; }
.portal-tile { min-width: 0; min-height: 295px; position: relative; display: flex; align-items: flex-end; padding: 24px 23px 16px; text-decoration: none; background-color: #1c1d1b; background-size: cover; background-position: center; }
.portal-tile::before { content: ''; position: absolute; inset: -8px; background: url('asterra-ink-frame-20261011.svg') center/100% 100% no-repeat; pointer-events: none; z-index: 2; }
.portal-tile > div { position: relative; width: 100%; z-index: 1; }
.portal-tile h2 { font-size: clamp(28px,2.9vw,43px); line-height: 1.08; font-weight: 500; margin: 0 0 4px; text-align: left; text-wrap: nowrap; text-shadow: 0 1px 4px #000; }
.portal-story h2 { font-size: clamp(34px,3.6vw,52px); }
.portal-tile p { margin: 3px 0; font-size: 19px; line-height: 1.35; }
.portal-tile span,.portal-tile nav a { border-bottom: 1px solid #efb543; padding-bottom: 2px; }
.portal-tile span { display: inline-flex; align-items: center; min-height: 36px; font-size: 17px; }
.portal-tile nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.portal-tile nav a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; font-size: 17px; }
.portal-story { background-image: url('asterra-ornament-story-20261011.webp'); }
.portal-story::after { content: ''; position: absolute; top: -52px; left: 2px; width: min(240px,46%); aspect-ratio: 2; background: url('asterra-ornament-claw-20261011.webp') center/contain no-repeat; pointer-events: none; z-index: 3; }
.portal-explore { background-image: url('asterra-ornament-explore-20261011.webp'); }
.portal-oneshots { background-image: url('asterra-ornament-dice-20261011.webp'); background-position: 66% top; }
.portal-oneshots > div { text-shadow: 0 2px 4px #111; }
.portal-oneshots strong { display: inline-block; font-size: 14px; line-height: 1.4; text-transform: uppercase; color: #191b18; background: #f7f5ed; padding: 2px 9px; text-shadow: none; margin: 4px 0; }
.portal-oneshots p { font-size: 16px; }
body[data-asterra-page="library"] .collection { scroll-margin-top: 22px; margin-bottom: 28px; padding: 32px 0 12px; }
body[data-asterra-page="library"] .collection .cards { grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); }
body[data-asterra-page="library"] .collection .card { max-width: 520px; }
body[data-asterra-page="library"] .section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; }
body[data-asterra-page="library"] .section-heading p { margin: 0; }
body[data-asterra-page="library"] .card:hover { border-color: #efb543; }
body[data-asterra-page="library"] .campaign-update { margin: 24px 0; padding: 16px; }
body[data-asterra-page="library"] .empty { margin: 30px 0; }
body[data-asterra-page="library"] .portal-footer { max-width: 1416px; margin: auto; padding: 18px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; text-align: left; border-top: 1px solid #b9b9ad; }
.portal-footer > span { font-size: 12px; }
.portal-footer nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.portal-footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
@media (max-width: 1100px) and (min-width: 721px) {
  body[data-asterra-page="library"] .portal-header { padding-inline: 24px; gap: 16px; }
  .feast-wordmark { font-size: 18px; }
  .portal-nav { gap: 16px; font-size: 13px; }
  .portal-nav .portal-register { padding-inline: 20px; }
  .portal-hero { padding-left: 32px; min-height: 590px; background-position: 59% center; }
  .portal-hero-copy { width: 47%; }
  .portal-actions a.portal-primary { font-size: 24px; }
  .portal-gateways { grid-template-columns: 1.2fr 1fr; gap: 24px; }
  .portal-oneshots { grid-column: 1/-1; min-height: 185px; background-size: 65% auto; background-repeat: no-repeat; background-position: right 44%; }
  .portal-tile h2 { font-size: 34px; }
  .portal-story h2 { font-size: 40px; }
}
@media (max-width: 720px) {
  body[data-asterra-page="library"] main { padding: 0 18px 24px; }
  body[data-asterra-page="library"] .portal-header { padding: 3px 20px; gap: 10px; min-height: 52px; }
  .feast-wordmark { font-size: 18px; letter-spacing: .12em; }
  .portal-nav { display: none; }
  body[data-asterra-page="library"] .portal-menu { display: block; position: relative; z-index: 5; border: 0; margin: 0; padding: 0; background: transparent; }
  .portal-menu summary { display: flex; align-items: center; gap: 12px; padding: 6px 0 6px 10px; font-size: 15px; min-height: 44px; list-style: none; }
  .portal-menu summary::-webkit-details-marker { display: none; }
  .portal-menu summary span { font-size: 26px; line-height: 1; }
  .portal-menu nav { position: absolute; right: 0; top: 100%; width: 215px; display: grid; padding: 12px; background: #252824; border: 1px solid #efb543; box-shadow: 0 6px 18px #000a; }
  .portal-menu a { padding: 12px; min-height: 44px; text-decoration: none; }
  .portal-menu a:hover { background: #38382c; }
  .portal-hero { min-height: max(500px,115vw); margin: 0 -18px; padding: 18px 24px 85px; background-image: linear-gradient(90deg,#1c1d1b88,transparent 86%),url('asterra-ornament-hero-mobile-20261011.webp'); background-position: center; }
  .portal-hero-copy { width: 100%; position: static; }
  .portal-hero h1 { max-width: 290px; width: 81%; margin: 0 0 8px; filter: drop-shadow(0 2px 3px #000); }
  .portal-tagline { font-size: 17px; line-height: 1.4; margin: 0 0 16px; }
  .portal-actions { width: min(280px,94%); gap: 10px; }
  .portal-actions a { font-size: 17px; min-height: 44px; padding: 8px 12px; }
  .portal-actions a.portal-primary { font-size: 22px; min-height: 48px; gap: 16px; }
  .portal-scene { position: absolute; bottom: 28px; left: 24px; max-width: calc(100% - 48px); font-size: 12px; min-height: 36px; margin: 0; padding: 6px 12px; }
  .portal-gateways { grid-template-columns: minmax(0,1fr); gap: 22px; margin: 0 0 34px; }
  .portal-tile { width: 100%; max-width: 100%; min-height: 176px; padding: 18px 13px 10px; }
  .portal-tile h2 { font-size: 31px; }
  .portal-story h2 { font-size: 36px; }
  .portal-tile p { font-size: 16px; }
  .portal-tile span { font-size: 15px; min-height: 34px; }
  .portal-tile nav { gap: 0 20px; }
  .portal-tile nav a { font-size: 15px; }
  .portal-story { aspect-ratio: 2; background-image: linear-gradient(22deg,#1c1d1b 0%,#1c1d1b 29%,transparent 64%),url('asterra-ornament-story-20261011.webp'); }
  .portal-story::after { top: -35px; left: -1px; width: 146px; }
  .portal-explore { min-height: 166px; aspect-ratio: 2.2; background-image: linear-gradient(18deg,#1c1d1b 0%,#1c1d1b 28%,transparent 65%),url('asterra-ornament-explore-20261011.webp'); background-size: cover; background-position: center top; }
  .portal-explore > div { margin-bottom: -2px; }
  .portal-oneshots { min-height: 132px; aspect-ratio: 2.7; background-size: 82% auto; background-repeat: no-repeat; background-position: right 28%; }
  .portal-oneshots h2 { font-size: 30px; }
  .portal-oneshots strong { font-size: 12px; padding-inline: 7px; }
  .portal-oneshots p { font-size: 13px; }
  body[data-asterra-page="library"] .portal-footer { margin: 0 20px; padding: 18px 0; display: block; }
  .portal-footer > span { display: block; margin-top: 8px; }
  .portal-footer nav { margin-top: 10px; gap: 4px 16px; font-size: 12px; }
}
@media (max-width: 359px) {
  .feast-wordmark { font-size: 16px; }
  .portal-hero { padding-inline: 20px; }
  .portal-hero h1 { width: 85%; }
  .portal-tagline { font-size: 16px; }
  .portal-actions a.portal-primary { font-size: 20px; }
  .portal-tile h2 { font-size: 28px; }
  .portal-story h2 { font-size: 32px; }
  .portal-tile nav { gap: 0 15px; }
  .portal-tile nav a { font-size: 14px; }
  .portal-tile p { font-size: 14px; }
  .portal-oneshots p { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
