:root {
  --oak: #3a2416;
  --oak-deep: #1a0e08;
  --cherry: #4a1f16;
  --gold: #e4c37a;
  --gold-soft: #c9a05a;
  --cream: #f4e6c8;
  --paper: #efe2c4;
  --ink: #1c120c;
  --turquoise: #2ec4b6;
  --violet: #7b5ea7;
  --ruby: #9c2b3a;
  --sapphire: #1e4d8c;
  --lead: #1a1410;
  --glass: rgba(244, 230, 200, 0.12);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --display: Cinzel, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--cream);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(126, 74, 32, 0.35), transparent 55%),
    linear-gradient(180deg, #120906 0%, var(--oak-deep) 40%, #0b0705 100%);
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }
a { color: var(--gold); }
a:hover { color: #fff3cc; }
button, select, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 1rem;
  z-index: 20;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }
.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  background: rgba(16, 8, 5, 0.82);
  border-bottom: 1px solid rgba(228, 195, 122, 0.25);
  backdrop-filter: blur(8px);
}
.topbar nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.topbar nav a {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.topbar nav a[aria-current="page"] { color: var(--gold); }

.finder {
  display: flex;
  flex: 1 1 18rem;
  max-width: 36rem;
  gap: 0.4rem;
}
.finder input {
  flex: 1;
  border: 1px solid rgba(228, 195, 122, 0.35);
  background: rgba(28, 16, 10, 0.75);
  color: var(--cream);
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
}
.finder input::placeholder { color: rgba(244, 230, 200, 0.55); }
.finder button, .case-nav button, .alcove-btn, .subwings button {
  background: linear-gradient(180deg, #d7b56a, #9a7430);
  color: var(--ink);
  border: 0;
  padding: 0.5rem 0.9rem;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
}
.finder button:hover, .case-nav button:hover, .alcove-btn:hover, .subwings button:hover {
  filter: brightness(1.08);
}

.hall-hero {
  position: relative;
  min-height: min(86vh, 820px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hall-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  z-index: -2;
}
.hall-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(12, 6, 4, 0.15) 10%, rgba(12, 6, 4, 0.25) 45%, rgba(12, 6, 4, 0.88) 100%),
    radial-gradient(closest-side at 30% 35%, rgba(46, 196, 182, 0.12), transparent 70%),
    radial-gradient(closest-side at 70% 30%, rgba(123, 94, 167, 0.14), transparent 70%);
  pointer-events: none;
}
.hall-motes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 236, 180, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 236, 180, 0.45) 0 1px, transparent 2px);
  background-size: 180px 180px, 110px 140px;
  background-position: 0 0, 40px 70px;
  animation: drift 36s linear infinite;
  opacity: 0.35;
  mix-blend-mode: screen;
}
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-180px); }
}
@media (prefers-reduced-motion: reduce) {
  .hall-motes { animation: none; }
  .book.glow { animation: none; }
}

.hall-copy {
  position: relative;
  padding: 2.5rem 6vw 2rem;
  max-width: 46rem;
}
.kicker, .preview-flag, .cite, .world-title, .crumbs, .shelf-count, .case-label {
  font-family: var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
}
.preview-flag {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(228, 195, 122, 0.45);
}
h1, h2, .shelf-heading {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0.2rem 0 0.6rem;
  line-height: 1.15;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}
h1 { font-size: clamp(2.1rem, 5vw, 4rem); }
.dek {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
  max-width: 38rem;
  margin: 0 0 1rem;
}
.epigraph {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.45;
  color: #fff6de;
  margin: 0;
  max-width: 34rem;
}
.cite { margin: 0.35rem 0 0; color: rgba(228, 195, 122, 0.8); }

.world {
  padding: 1.5rem 6vw 3rem;
  background:
    linear-gradient(180deg, rgba(18, 8, 5, 0.0), rgba(18, 8, 5, 0.92) 8%, #140b07 100%);
}
.world-title { margin: 0 0 0.4rem; }
.world-lede {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 1.25rem;
  max-width: 42rem;
  color: var(--paper);
}

.plan {
  width: 100%;
  max-width: 980px;
  display: block;
  margin: 0 auto 1.75rem;
  overflow: visible;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,0.45));
}
.plan .lead { fill: none; stroke: #2a1d14; stroke-width: 10; }
.plan .came { fill: none; stroke: #0e0a07; stroke-width: 3; }
.plan .floor { fill: #24160f; }
.plan .nave { fill: url(#glassNave); stroke: #3a2a1c; stroke-width: 2; }
.plan-alcove { cursor: pointer; }
.plan-alcove rect, .plan-alcove path, .plan-alcove polygon {
  stroke: #120c08;
  stroke-width: 3;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.plan-alcove:hover rect, .plan-alcove:focus-visible rect,
.plan-alcove:hover path, .plan-alcove:focus-visible path,
.plan-alcove:hover polygon, .plan-alcove:focus-visible polygon {
  filter: brightness(1.18) drop-shadow(0 0 10px rgba(228,195,122,0.55));
}
.plan text {
  font-family: Cinzel, serif;
  fill: #f8edd2;
  letter-spacing: 1.5px;
  text-anchor: middle;
  pointer-events: none;
  text-transform: uppercase;
}
.plan .count { fill: #e4c37a; font-size: 11px; letter-spacing: 0.5px; }
.plan .note { fill: #d9c7a1; font-size: 10px; letter-spacing: 0.8px; font-family: "Cormorant Garamond", serif; text-transform: none; font-style: italic; }
.plan .glow-mark { fill: #ffe38a; }

.alcoves {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .alcoves { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .alcoves { grid-template-columns: 1fr; }
  .topbar { position: static; }
  .hall-copy { padding: 1.5rem 1rem 1.25rem; }
  .world { padding: 1rem 1rem 2.5rem; }
}

.alcove-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
  padding: 0;
  background: none;
  color: var(--cream);
  border: 1px solid rgba(228, 195, 122, 0.28);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.alcove-btn .glass {
  display: block;
  width: 100%;
  height: 86px;
}
.alcove-btn .body {
  padding: 0.85rem 1rem 1rem;
  background: linear-gradient(180deg, #2a180f, #160d09);
  width: 100%;
}
.alcove-btn h3 {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  color: var(--gold);
}
.alcove-btn p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.02rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--paper);
}
.alcove-btn .n {
  color: var(--gold-soft);
  font-family: var(--display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.shelves, .results { padding: 1.1rem 4vw 3rem; }
.shelf-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1.2rem;
  align-items: end;
  margin-bottom: 0.8rem;
}
.crumbs { margin: 0; }
.crumbs a { color: var(--gold); text-decoration: none; }
.crumb-now::before { content: " · "; color: rgba(228,195,122,0.6); }
.shelf-tools { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.shelf-tools select {
  background: #1c100b;
  color: var(--cream);
  border: 1px solid rgba(228, 195, 122, 0.3);
  padding: 0.4rem 0.55rem;
  border-radius: 2px;
}
.subwings { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.subwings button[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff3cc inset; }
.shelf-heading { font-size: clamp(1.5rem, 3vw, 2.3rem); margin-top: 0.4rem; }
.shelf-count { margin: 0 0 0.8rem; color: rgba(228,195,122,0.85); }

.disclaimer {
  border: 1px solid rgba(228, 195, 122, 0.35);
  background:
    linear-gradient(90deg, rgba(156, 43, 58, 0.18), rgba(28, 16, 10, 0.65));
  padding: 0.9rem 1rem;
  margin: 0.4rem 0 1rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.45;
  color: #f6ead0;
  max-width: 58rem;
}
.disclaimer a { color: var(--gold); }

.case-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
}
.case-label { margin: 0; flex: 1; text-align: center; }

.case {
  background:
    linear-gradient(180deg, rgba(18, 8, 6, 0.3), rgba(18, 8, 6, 0.55)),
    url("images/library-hall.jpg") center 35% / cover no-repeat,
    #2a160f;
  border: 10px solid #3a2216;
  box-shadow:
    inset 0 0 0 3px #1a0f0a,
    0 20px 50px rgba(0,0,0,0.5);
  padding: 1rem 0.8rem 1.2rem;
  position: relative;
  overflow: hidden;
}
.case::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(46,196,182,0.08), transparent 30%, rgba(123,94,167,0.1) 58%, rgba(228,195,122,0.12));
  mix-blend-mode: screen;
}
.shelf-row {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  min-height: 9.2rem;
  padding: 0.35rem 0.4rem 0;
  position: relative;
  z-index: 1;
}
.ledge {
  height: 12px;
  margin: 0 -0.15rem 0.35rem;
  background:
    linear-gradient(180deg, #8a5a32, #5a351c 55%, #3a2010);
  box-shadow: 0 6px 8px rgba(0,0,0,0.35);
  position: relative;
  z-index: 1;
}

.book {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: var(--w, 22px);
  height: var(--h, 8.4rem);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.14), transparent 18%, transparent 82%, rgba(0,0,0,0.35)),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 30%),
    var(--c, #4a1c22);
  color: var(--ink-spine, #f3e2b8);
  text-decoration: none;
  border-radius: 1px 2px 0 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
  overflow: hidden;
  flex: 0 0 auto;
}
.book:hover, .book:focus-visible {
  transform: translateY(-8px);
  z-index: 2;
  box-shadow: 0 10px 18px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(255,236,180,0.4);
}
.book .spine {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--serif);
  font-size: 0.72rem;
  line-height: 1.05;
  padding: 0.4rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 100%;
  letter-spacing: 0.02em;
}
.book.glow {
  width: 28px;
  height: 9.1rem;
  background:
    linear-gradient(90deg, rgba(255,245,180,0.5), transparent 20%, transparent 80%, rgba(120,70,0,0.4)),
    linear-gradient(#f4d56a, #9a6b12);
  color: #3a2408;
  animation: pulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 18px 4px rgba(255, 214, 90, 0.65), 0 0 40px rgba(255, 200, 60, 0.35);
  z-index: 2;
}
.book.glow::after {
  content: "";
  position: absolute;
  inset: auto -8px -30px -8px;
  height: 50px;
  background: radial-gradient(ellipse, rgba(255,220,100,0.55), transparent 70%);
  pointer-events: none;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 14px 3px rgba(255, 214, 90, 0.5); }
  50% { box-shadow: 0 0 26px 8px rgba(255, 230, 140, 0.8); }
}
.book.hilite {
  outline: 2px solid #fff3cc;
  outline-offset: 2px;
}

.tip {
  position: fixed;
  z-index: 30;
  max-width: 22rem;
  padding: 0.7rem 0.85rem;
  background: #1a100b;
  color: var(--cream);
  border: 1px solid var(--gold-soft);
  box-shadow: var(--shadow);
  pointer-events: none;
  font-size: 0.92rem;
}
.tip strong { display: block; font-family: var(--serif); font-size: 1.15rem; color: #fff6de; }
.tip span { display: block; color: var(--gold-soft); font-size: 0.8rem; letter-spacing: 0.04em; }

.results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.results-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.6rem 0.9rem;
  align-items: baseline;
  text-decoration: none;
  color: var(--cream);
  padding: 0.65rem 0.8rem;
  background: rgba(28, 16, 10, 0.7);
  border: 1px solid rgba(228, 195, 122, 0.18);
}
.results-list a:hover { border-color: var(--gold); }
.results-list .show {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.results-list .when { color: rgba(244,230,200,0.65); font-size: 0.85rem; }
.results-list a.glow-hit {
  border-color: #f4d56a;
  box-shadow: 0 0 16px rgba(255, 210, 80, 0.25);
}

.status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-foot {
  padding: 2rem 6vw 2.5rem;
  border-top: 1px solid rgba(228, 195, 122, 0.2);
  color: rgba(244, 230, 200, 0.75);
  font-family: var(--serif);
  font-size: 1.05rem;
}
.counter { margin-top: 1.2rem; font-family: var(--sans); font-size: 0.8rem; }

@media (max-width: 700px) {
  .shelf-row { min-height: 7.6rem; }
  .book { height: 6.8rem; }
  .book.glow { height: 7.4rem; }
  .book .spine { font-size: 0.64rem; }
}

.glow-cta { margin: 1rem 0 0; }
a.glow-link {
  display: inline-block;
  width: auto;
  padding: 0.55rem 1rem;
  text-decoration: none;
  color: #3a2408;
  background: linear-gradient(180deg, #f4d56a, #9a6b12);
  box-shadow: 0 0 18px rgba(255, 214, 90, 0.45);
}
a.glow-link:hover { color: #1c120c; }

.rose {
  display: block;
  width: 132px;
  height: 132px;
  margin: 0 0 0.8rem;
  filter: drop-shadow(0 8px 24px rgba(255, 214, 90, 0.28));
}
.work-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin: 0 0 1.4rem;
}
.work-card, .work-card.coming {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--cream);
  background: linear-gradient(180deg, #2a180f, #160d09);
  border: 1px solid rgba(228, 195, 122, 0.28);
  overflow: hidden;
  min-height: 100%;
}
.work-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #1a100b;
}
.work-card .body { padding: 0.85rem 0.95rem 1rem; flex: 1; display: flex; flex-direction: column; }
.work-card h3 {
  font-family: var(--display);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  color: var(--gold);
}
.work-card p {
  font-family: var(--serif);
  font-size: 1.05rem;
  margin: 0 0 0.7rem;
  flex: 1;
  color: var(--paper);
}
.work-card .open {
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.work-card.glow-card {
  border-color: #f4d56a;
  box-shadow: 0 0 22px rgba(255, 210, 80, 0.35);
}
.work-card.coming { opacity: 0.8; }
.disclaimer.note {
  background: linear-gradient(90deg, rgba(62, 42, 16, 0.45), rgba(28, 16, 10, 0.65));
}
.new-strip {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(228, 195, 122, 0.4);
  background: rgba(28, 16, 10, 0.7);
}
.new-strip h3 {
  margin: 0 0 0.2rem;
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.new-strip a {
  color: var(--cream);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.12rem;
}
.new-strip a:hover { color: #fff3cc; }
.new-strip .mark {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0 0.35rem;
  font-family: var(--display);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3a2408;
  background: linear-gradient(180deg, #f4d56a, #9a6b12);
}
.book.new {
  box-shadow: inset 0 0 0 1px rgba(255, 220, 100, 0.55);
}
.book.new::before {
  content: "New";
  position: absolute;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--display);
  font-size: 0.48rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3a2408;
  background: #f4d56a;
  padding: 0 0.2rem;
  writing-mode: horizontal-tb;
}
.alcoves { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .alcoves { grid-template-columns: 1fr 1fr; }
  .rose { width: 108px; height: 108px; }
}
@media (max-width: 560px) {
  .alcoves { grid-template-columns: 1fr; }
}
.plan-group-label {
  font-family: Cinzel, serif;
  fill: #e4c37a;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-anchor: start;
}

[hidden] { display: none !important; }
