/* Mythic Fox: a cabinet of curiosities. Dark walnut room, lit vitrines, brass plates, specimen cards. */

:root {
  --room: #2f1309;
  --room-deep: #1f0b05;
  --walnut: #5c2615;
  --walnut-dark: #3a150b;
  --mahogany: #9b3918;
  --ember: #d9601e;
  --lamp: #f2a054;
  --card: #f6dbb4;
  --card-ink: #2f1309;
  --text: #f6dbb4;
  --muted: #cf9f78;
  --brass-hi: #f6bd7a;
  --brass: #c8783c;
  --brass-lo: #7c3814;

  --fell: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --fell-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  /* Wordmark: the wide classical capitals of the Mythic Fox Creations logo */
  --crest: "Cinzel", "Trajan Pro", Georgia, serif;
  --sans: "Alegreya Sans", "Gill Sans", "Segoe UI", sans-serif;
  --typed: "Courier Prime", "Courier New", monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* Wood grain: stretched fractal noise. --grain-h runs along the board, --grain-v up it. */
  --grain-h: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 0.42' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.04 0 0 0 0 0.01 0 0 0 0.75 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='600'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.42 0.004' numOctaves='3' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.09 0 0 0 0 0.04 0 0 0 0 0.01 0 0 0 0.75 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.15 0 0 0 0.12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");

  --wood-v: var(--grain-v), linear-gradient(90deg, #47190a, #772d15 18%, #521d0e 42%, #8b3618 66%, #4c1b0b 88%, #622412);
  --wood-h: var(--grain-h), linear-gradient(180deg, #772d15, #521d0e 40%, #381409);
  --brass-face: linear-gradient(180deg, var(--brass-hi), var(--brass) 48%, var(--brass-lo));
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scrollbar-color: var(--mahogany) var(--room-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font: 400 1.0625rem/1.6 var(--sans);
  color: var(--text);
  caret-color: var(--lamp);
  background-color: var(--room);
  /* Panelled walls lost in the dark, warmer toward the lamps overhead */
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(217, 96, 30, .13), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(0, 0, 0, .7), transparent 60%),
    linear-gradient(rgba(27, 11, 6, .8), rgba(27, 11, 6, .8)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .4) 0 3px, rgba(246, 170, 100, .03) 3px 5px, transparent 5px 220px),
    var(--grain-v);
  background-size: auto, auto, auto, auto, 240px 600px;
  background-attachment: fixed;
}

::selection { background: var(--ember); color: var(--room); }

img { display: block; max-width: 100%; }

a { color: var(--lamp); text-underline-offset: .2em; text-decoration-thickness: 1px; }

:focus-visible { outline: 2px solid var(--lamp); outline-offset: 4px; border-radius: 3px; }

h1, h2 {
  font-family: var(--fell);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip { position: absolute; left: -999px; top: .75rem; z-index: 20; padding: .5rem 1rem; background: var(--lamp); color: var(--room); }
.skip:focus { left: .75rem; }

.icon { flex: none; }

/* ---------------- Cornice: the top molding of the cabinet ---------------- */

.cornice {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  border-bottom: 1px solid #100503;
  box-shadow: inset 0 -3px 0 var(--brass-lo), inset 0 -4px 0 rgba(246, 189, 122, .35), 0 12px 32px -6px rgba(0, 0, 0, .85);
}

.cornice__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: .85rem clamp(1rem, 4vw, 2.5rem) 1rem;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.mark {
  font: 600 1.45rem/1 var(--crest);
  letter-spacing: .06em;
  color: var(--lamp);
  text-decoration: none;
  text-shadow: 0 1px 0 #000, 0 0 22px rgba(242, 160, 84, .25);
  white-space: nowrap;
}

.nav { display: flex; gap: clamp(.75rem, 2vw, 1.75rem); }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--lamp); }
.nav a[aria-current="page"] { color: var(--lamp); border-bottom-color: var(--brass); }

/* Hamburger: only below 760px, and only when JS runs (without it the links simply wrap) */
.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--brass-lo);
  border-radius: 3px;
  color: var(--brass-hi);
  background: rgba(38, 14, 6, .45);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brass-hi); color: var(--lamp); }
.nav-toggle__bars { display: grid; gap: 4px; width: 20px; }
.nav-toggle__bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform .3s var(--ease-out), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .cornice__inner { flex-wrap: wrap; row-gap: .6rem; }
  .nav { order: 3; width: 100%; flex-wrap: wrap; }
  .has-js .nav-toggle { display: grid; }
  .has-js .nav { display: none; }
  .has-js .nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: .35rem;
    border-top: 1px solid rgba(200, 120, 60, .3);
  }
  .has-js .nav.is-open a {
    padding: .8rem .25rem;
    border-bottom: 1px solid rgba(200, 120, 60, .15);
    font-size: 1.05rem;
  }
  .has-js .nav.is-open a:last-child { border-bottom: 0; }
  .has-js .nav.is-open a[aria-current="page"] { border-bottom-color: rgba(200, 120, 60, .15); box-shadow: inset 3px 0 0 var(--lamp); padding-left: .85rem; }
}

.visitor { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .95rem; }
.visitor form { margin: 0; }

/* Signed-in visitor: name tag that opens a small drawer with Admin and Log out */
.account { position: relative; }
.account__toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .25rem .6rem .25rem .25rem;
  border: 1px solid var(--brass-lo);
  border-radius: 999px;
  font: 500 .95rem var(--sans);
  color: var(--card);
  background: rgba(32, 14, 9, .45);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.account__toggle:hover, .account__toggle[aria-expanded="true"] { border-color: var(--brass-hi); background: rgba(246, 189, 122, .08); }
.account__toggle img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--brass); }
.account__who { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__chev { color: var(--brass-hi); transition: transform .25s var(--ease-out); }
.account__toggle[aria-expanded="true"] .account__chev { transform: rotate(180deg); }
.account__menu {
  position: absolute;
  right: 0;
  top: calc(100% + .5rem);
  z-index: 30;
  min-width: 11rem;
  padding: .35rem;
  border-radius: 3px;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 0 0 1px var(--brass-lo), inset 0 1px 0 rgba(246, 189, 122, .25), 0 18px 34px -10px rgba(0, 0, 0, .95);
}
.account__menu form { margin: 0; }
.visitor .account__item {
  display: block;
  width: 100%;
  padding: .6rem .8rem;
  border: 0;
  border-radius: 2px;
  font: 500 .95rem var(--sans);
  text-align: left;
  color: var(--card);
  text-decoration: none;
  background: none;
  cursor: pointer;
}
.visitor .account__item:hover, .visitor .account__item:focus-visible { color: var(--lamp); background: rgba(242, 160, 84, .1); text-decoration: none; }

.key {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem .9rem;
  border-radius: 4px;
  border: 1px solid rgba(246, 189, 122, .45);
  color: var(--brass-hi);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s;
}
.visitor .key:hover { text-decoration: none; background: rgba(246, 189, 122, .1); border-color: var(--brass-hi); }

/* ---------------- Page frame ---------------- */

main {
  flex: 1;
  width: 100%;
  overflow-x: clip;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(4rem, 8vw, 6rem);
}

.plinth {
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1rem, 4vw, 2.5rem) 1.5rem;
  font-size: .95rem;
  color: var(--muted);
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 3px 0 var(--brass-lo), inset 0 4px 0 rgba(246, 189, 122, .3), inset 0 60px 80px -40px rgba(0, 0, 0, .55);
}
.plinth p { margin: 0; }
.plinth__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.plinth__about { max-width: 46ch; }
.plinth__mark { font: 600 1.35rem/1.1 var(--crest); letter-spacing: .06em; color: var(--lamp); margin-bottom: .6rem !important; }
.plinth__links { display: grid; gap: .45rem; }
.plinth__links a { color: var(--text); text-decoration: none; }
.plinth__links a:hover { color: var(--lamp); text-decoration: underline; }
.plinth__socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.social {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .95rem;
  border: 1px solid var(--brass-lo);
  border-radius: 3px;
  color: var(--brass-hi);
  text-decoration: none;
  background: rgba(32, 14, 9, .45);
  transition: border-color .2s, background .2s;
}
.social:hover { border-color: var(--brass-hi); background: rgba(246, 189, 122, .1); color: var(--lamp); }
.social i { font-size: 1rem; width: 1.1em; text-align: center; }
.plinth__legal {
  max-width: 1280px;
  margin: 2.5rem auto 0 !important;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(200, 120, 60, .22);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  font: 400 .8rem var(--typed);
  letter-spacing: .03em;
}
.credit { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; }
.credit:hover { color: var(--lamp); }
.credit__heart { width: 14px; height: 14px; color: #e5484d; }

.crumb {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 2rem;
  font: 400 1.05rem var(--fell);
  font-style: italic;
  color: var(--muted);
  text-decoration: none;
}
.crumb::before {
  content: "";
  width: .45em; height: .45em;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.crumb:hover { color: var(--lamp); }

.text-link { font-weight: 500; }
.quiet { color: var(--muted); }

.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 2.5rem; max-width: 60ch; }
.page-head h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); color: var(--card); }
.page-head p { margin: .75rem 0 0; color: var(--muted); font-size: 1.1rem; }

/* ---------------- Vitrine: back panel, cover, glass, on a walnut case ---------------- */

.vitrine {
  --px: 0;
  --py: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  /* The lamps come on one after another; content is visible by default once they have */
  animation: lamp-on 1.1s var(--ease-out) backwards;
  transition: filter .45s var(--ease-out);
}

/* Light pool on the wall behind each case */
.vitrine::before {
  content: "";
  position: absolute;
  inset: -12% -22% 30%;
  z-index: -1;
  background: radial-gradient(ellipse 50% 55% at 50% 35%, rgba(242, 160, 84, .2), transparent 70%);
  opacity: .8;
  transition: opacity .45s var(--ease-out);
  pointer-events: none;
}

.vitrine__case {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 5px 5px 3px 3px;
  background: #2a0d06;
  box-shadow: 0 22px 40px -14px rgba(0, 0, 0, .95), 0 4px 10px rgba(0, 0, 0, .5);
}

/* The walnut frame is a ring laid over the three planes */
.vitrine__case::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 12px;
  border-radius: inherit;
  background: var(--wood-v);
  background-size: 240px 600px, auto;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  box-shadow: inset 0 1px 0 rgba(255, 214, 160, .22), inset 0 -2px 0 rgba(0, 0, 0, .5);
  pointer-events: none;
}

/* Brass fillet inside the frame */
.vitrine__case::before {
  content: "";
  position: absolute;
  inset: 11px;
  z-index: 4;
  border: 1px solid rgba(246, 189, 122, .4);
  border-radius: 2px;
  pointer-events: none;
}

.vitrine__back,
.vitrine__glass { position: absolute; inset: 0; display: block; }

.vitrine__back {
  background:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(242, 160, 84, .38), transparent 70%),
    radial-gradient(circle at 50% 60%, #5d1c0e, #2a0b04 75%);
  transform: translate(calc(var(--px) * -8px), calc(var(--py) * -8px)) scale(1.06);
  transition: transform .5s var(--ease-out);
}

.vitrine__cover {
  position: absolute;
  inset: 13% 13% 11%;
  z-index: 1;
  display: block;
  background: #451609;
  box-shadow: 0 16px 24px -8px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .6);
  transform: translate(calc(var(--px) * 5px), calc(var(--py) * 5px));
  transition: transform .5s var(--ease-out);
}
.vitrine__cover img { width: 100%; height: 100%; object-fit: cover; }

.vitrine__blank {
  display: grid;
  place-items: center;
  height: 100%;
  font: 400 clamp(3rem, 8vw, 6rem)/1 var(--fell);
  color: var(--lamp);
  background: radial-gradient(circle at 50% 40%, #912f13, #451609 70%);
}

/* Glass: two soft glare bands that slide across as the pointer moves */
.vitrine__glass {
  z-index: 2;
  background:
    linear-gradient(112deg, transparent 34%, rgba(255, 236, 210, .14) 42%, rgba(255, 236, 210, .03) 48%, transparent 53%),
    linear-gradient(112deg, transparent 58%, rgba(255, 236, 210, .07) 62%, transparent 67%);
  background-size: 220% 100%;
  background-position: calc(50% - var(--px) * 60%) 0;
  transition: background-position .6s var(--ease-out);
  pointer-events: none;
}

.vitrine__lock {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--card-ink);
  background: var(--brass-face);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .7), 0 3px 8px rgba(0, 0, 0, .7);
}

/* Brass number plate screwed under the case */
.plate {
  position: relative;
  z-index: 6;
  display: inline-block;
  margin-top: -9px;
  padding: .22rem 1.35rem .2rem;
  border-radius: 2px;
  font: 400 .78rem/1.4 var(--typed);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--card-ink);
  text-shadow: 0 1px 0 rgba(255, 236, 196, .6);
  background:
    radial-gradient(circle at 8px 50%, #92400f 1.6px, rgba(255, 240, 200, .8) 2.2px, transparent 2.8px),
    radial-gradient(circle at calc(100% - 8px) 50%, #92400f 1.6px, rgba(255, 240, 200, .8) 2.2px, transparent 2.8px),
    var(--brass-face);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .65), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 4px 8px rgba(0, 0, 0, .7);
  white-space: nowrap;
}

.label { display: block; margin-top: .9rem; text-align: center; max-width: 30ch; }
.label__title { display: block; font: 400 1.25rem/1.2 var(--fell); color: var(--card); text-wrap: balance; }
.label__meta { display: block; margin-top: .3rem; font: 400 .78rem/1.4 var(--typed); color: var(--muted); letter-spacing: .02em; }

.vitrine:hover .label__title, .vitrine:focus-visible .label__title { color: var(--lamp); }
.vitrine:focus-visible { outline: none; }
.vitrine:focus-visible .vitrine__case { outline: 2px solid var(--lamp); outline-offset: 5px; }

/* One curiosity held at a time: the hovered case brightens, the rest of the cabinet dims */
[data-cabinet]:has(.vitrine:hover, .vitrine:focus-visible) .vitrine:not(:hover, :focus-visible) { filter: brightness(.42) saturate(.75); }
.vitrine:hover::before, .vitrine:focus-visible::before { opacity: 1.6; }
.vitrine:hover .vitrine__back { background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(242, 160, 84, .55), transparent 72%),
    radial-gradient(circle at 50% 60%, #772410, #2a0b04 75%); }

@keyframes lamp-on {
  from { filter: brightness(.18) saturate(.6); }
  to { filter: none; }
}

.shelves .vitrine:nth-child(2), .stage__side--left .vitrine { animation-delay: .12s; }
.shelves .vitrine:nth-child(3), .stage__side--right .vitrine { animation-delay: .24s; }
.shelves .vitrine:nth-child(4) { animation-delay: .36s; }
.shelves .vitrine:nth-child(5) { animation-delay: .48s; }
.shelves .vitrine:nth-child(n+6) { animation-delay: .6s; }

/* ---------------- Stage: the centrepiece of the room ---------------- */

.stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
  grid-template-areas: "left centre right";
  align-items: end;
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: min(calc(100svh - 4.5rem), 54rem);
  align-content: center;
  padding: clamp(2rem, 6vh, 4rem) 0 clamp(2.5rem, 6vh, 4rem);
}

/* The ceiling lamp over the centrepiece */
.stage::before {
  content: "";
  position: absolute;
  inset: -2rem -10% 0;
  z-index: -1;
  background: radial-gradient(ellipse 32% 55% at 50% 0%, rgba(242, 160, 84, .2), rgba(217, 96, 30, .05) 55%, transparent 72%);
  pointer-events: none;
}

.stage__centre {
  grid-area: centre;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr);
  align-items: center;
  gap: clamp(1.75rem, 3.5vw, 3.25rem);
}

.stage__side { padding-bottom: 5.5rem; }
.stage__side--left { grid-area: left; }
.stage__side--right { grid-area: right; }
.stage__side .vitrine { filter: brightness(.72); }
.stage__side .label__title { font-size: 1.05rem; }

.vitrine--grand .vitrine__case::after { padding: 16px; }
.vitrine--grand .vitrine__case::before { inset: 15px; }
.vitrine--grand .plate { font-size: .85rem; padding-inline: 1.6rem; }
.vitrine--grand .label { display: none; }
.vitrine--grand .vitrine__lock { top: 26px; right: 26px; width: 36px; height: 36px; }

.stage--solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "centre"; min-height: 0; align-items: start; }
.stage--solo .stage__centre { max-width: 960px; width: 100%; margin: 0 auto; }

.lost .vitrine__blank { font-size: clamp(3rem, 8vw, 5rem); }
.stage--empty .stage__centre { grid-column: 1 / -1; max-width: 900px; margin: 0 auto; width: 100%; }
.vitrine.is-empty { animation: none; }

/* ---------------- Specimen card, tied on with a cord ---------------- */

.specimen {
  position: relative;
  padding: 1.6rem 1.6rem 1.5rem;
  color: var(--card-ink);
  background: var(--paper), var(--card);
  border-radius: 2px;
  transform: rotate(-1.4deg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 24px 40px -14px rgba(0, 0, 0, .95), 0 6px 12px rgba(0, 0, 0, .45);
}

/* Brass eyelet and the cord running back to the case */
.specimen::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--room) 2.5px, var(--brass) 3px, var(--brass-lo) 6px);
}
.specimen::after {
  content: "";
  position: absolute;
  top: calc(1.1rem + 5px);
  right: calc(100% - 1rem - 6px);
  width: clamp(2rem, 4vw, 3.5rem);
  height: 1.5px;
  background: linear-gradient(90deg, rgba(200, 120, 60, 0), var(--brass) 40%);
  transform-origin: right center;
  transform: rotate(8deg);
}

.specimen__no {
  margin: 0 0 .9rem 1.4rem;
  font: 400 .78rem/1 var(--typed);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #97401c;
  min-height: .78rem;
}

.specimen__title {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  color: var(--card-ink);
}

.specimen__data {
  margin: 1.1rem 0 0;
  padding: .85rem 0 0;
  border-top: 1px solid rgba(68, 24, 9, .2);
  display: grid;
  gap: .3rem;
}
.specimen__data div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .75rem; align-items: baseline; }
.specimen__data dt { font: 400 .74rem/1.5 var(--typed); letter-spacing: .1em; text-transform: uppercase; color: #97401c; }
.specimen__data dd { margin: 0; font-size: 1rem; }

.specimen__note {
  margin: 1rem 0 0;
  font: italic 400 1.08rem/1.45 var(--fell);
  color: #763118;
  max-width: 42ch;
}

.brass-btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1.35rem;
  padding: .7rem 1.25rem;
  border-radius: 3px;
  font: 700 1rem/1 var(--sans);
  letter-spacing: .01em;
  color: var(--card-ink);
  text-decoration: none;
  background: var(--brass-face);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .75), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 6px 14px -4px rgba(0, 0, 0, .7);
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out), filter .25s;
}
.brass-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .75), inset 0 -2px 0 rgba(0, 0, 0, .22), 0 10px 22px -6px rgba(0, 0, 0, .8), 0 0 24px rgba(242, 160, 84, .35);
}
.brass-btn:active { transform: translateY(1px); }

/* ---------------- Collection shelves ---------------- */

.collection { margin-top: clamp(3rem, 7vw, 5rem); }
.collection__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid rgba(200, 120, 60, .25);
}
.collection__head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); color: var(--card); }

.shelves {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 3.5rem clamp(1.25rem, 3vw, 2.5rem);
}

/* One sideways row on the home page: a single shelf you slide along */
.shelves--rail {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(170px, 19%, 220px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;
  padding: 18px 4px 22px;
  margin: -18px -4px 0;
  scrollbar-width: thin;
}
.shelves--rail > .vitrine { scroll-snap-align: start; }
.shelves--rail:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.rail-nav { display: flex; gap: .3rem; }
.rail-nav .showcase__btn { box-shadow: inset 0 0 0 1px var(--brass-lo); }
.rail-nav .showcase__btn:disabled { opacity: .35; cursor: default; background: none; }

/* ---------------- Reader ---------------- */

body.is-reading {
  background-image:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(217, 96, 30, .1), transparent 70%),
    linear-gradient(rgba(16, 7, 4, .86), rgba(16, 7, 4, .86)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .4) 0 3px, transparent 3px 220px),
    var(--grain-v);
  background-size: auto, auto, auto, 240px 600px;
  background-color: var(--room-deep);
}

.reader-head {
  max-width: 62ch;
  margin: 0 auto;
  padding: 0 0 2.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reader-head .crumb { margin-bottom: 1.5rem; }
.reader-head .plate { margin: 0 0 1.1rem; }
.reader-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); color: var(--card); }
.reader-head__meta { margin: .8rem 0 0; font: 400 .85rem var(--typed); color: var(--muted); }
.reader-head__note { margin: 1rem 0 0; font: italic 400 1.15rem/1.5 var(--fell); color: var(--text); }

/* An animation or extra pointing back to the comic it belongs to */
.from-link {
  display: inline-flex;
  flex-direction: column;
  gap: .2rem;
  margin-top: 1.4rem;
  padding: .7rem 1.1rem;
  border-radius: 3px;
  font: 400 1.2rem/1.2 var(--fell);
  color: var(--card);
  text-decoration: none;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 0 0 1px var(--brass-lo), 0 10px 20px -10px rgba(0, 0, 0, .9);
  transition: box-shadow .25s var(--ease-out), color .2s;
}
.from-link span { font: 400 .72rem var(--typed); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-hi); }
.from-link:hover { color: var(--lamp); box-shadow: inset 0 0 0 1px var(--brass-hi), 0 0 24px rgba(242, 160, 84, .2); }

.pages {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.pages > img {
  width: 100%;
  height: auto;
  background: #2a0d06;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 30px 60px -30px rgba(0, 0, 0, .9);
}

/* The locked drawer: a walnut drawer front with a brass escutcheon */
.drawer {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.drawer__front {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 4px;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow:
    inset 0 0 0 10px rgba(0, 0, 0, .18),
    inset 0 2px 0 rgba(255, 214, 160, .2),
    inset 12px 12px 18px -12px rgba(255, 214, 160, .12),
    inset -12px -12px 18px -10px rgba(0, 0, 0, .55),
    0 26px 40px -16px rgba(0, 0, 0, .95);
  display: grid;
  place-items: center;
}
.drawer__lock {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--card-ink);
  background: var(--brass-face);
  box-shadow: inset 0 1px 0 rgba(255, 244, 214, .75), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .7), 0 0 30px rgba(242, 160, 84, .25);
}
.drawer__lock .icon { width: 26px; height: 26px; }
.drawer__text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); color: var(--card); }
.drawer__text p { margin: .7rem 0 0; color: var(--text); max-width: 46ch; }
.drawer__text strong { color: var(--lamp); font-weight: 700; }

.chapter-nav {
  max-width: 880px;
  margin: 3.5rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.chapter-nav__link {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  text-decoration: none;
  font: 400 1.2rem/1.25 var(--fell);
  color: var(--card);
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 1px 0 rgba(255, 214, 160, .18), inset 0 0 0 1px rgba(200, 120, 60, .3), 0 14px 24px -12px rgba(0, 0, 0, .9);
  transition: box-shadow .25s var(--ease-out), color .25s;
}
.chapter-nav__link span { font: 400 .74rem var(--typed); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-hi); }
.chapter-nav__link:hover { color: var(--lamp); box-shadow: inset 0 1px 0 rgba(255, 214, 160, .18), inset 0 0 0 1px var(--brass), 0 14px 24px -12px rgba(0, 0, 0, .9), 0 0 28px rgba(242, 160, 84, .18); }
.chapter-nav__link--next { grid-column: 2; text-align: right; align-items: flex-end; }

/* ---------------- Showcase: the wide window over the home feed ---------------- */

.showcase { position: relative; margin-top: clamp(1.5rem, 4vw, 2.75rem); }
/* Lamp hanging over the window */
.showcase::before {
  content: "";
  position: absolute;
  inset: -3rem -8% 20%;
  z-index: -1;
  background: radial-gradient(ellipse 45% 60% at 50% 0%, rgba(242, 160, 84, .18), transparent 70%);
  pointer-events: none;
}
.showcase__case {
  position: relative;
  display: grid;
  aspect-ratio: 21 / 8;
  min-height: 21rem;
  padding: 14px;
  border-radius: 4px;
  background: var(--wood-v);
  background-size: 240px 600px, auto;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px #1d0906, inset 0 1px 0 rgba(255, 214, 160, .15);
}
.showcase__slide {
  grid-area: 1 / 1;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  background: var(--room-deep);
  box-shadow: inset 0 0 0 1px var(--brass-lo), 0 0 0 2px #1d0906;
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
.showcase__slide.is-active { opacity: 1; z-index: 1; }
.showcase__slide[hidden] { display: grid; visibility: hidden; }
.showcase__slide.is-leaving { visibility: visible; }

.showcase__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* No banner: the cover becomes a blurred backdrop, and the cover itself stands on the right */
.showcase__slide:not(.has-banner) .showcase__bg { filter: blur(28px) brightness(.45) saturate(1.2); transform: scale(1.2); }
.showcase__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(19, 8, 6, .92) 0%, rgba(19, 8, 6, .7) 38%, transparent 70%),
    linear-gradient(0deg, rgba(19, 8, 6, .5), transparent 40%);
  pointer-events: none;
}
.showcase__art {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 0;
  height: 94%;
  width: auto;
  max-width: 45%;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .8));
}
.showcase__slide:not(.has-banner) .showcase__art {
  right: 10%;
  top: 8%;
  bottom: auto;
  height: 84%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px var(--brass-lo), 0 24px 40px -10px rgba(0, 0, 0, .9), 0 0 50px rgba(242, 160, 84, .18);
  filter: none;
}
.showcase__text {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 2;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 34rem;
}
.showcase__text .plate { margin: 0 0 1rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.showcase__title { font-size: clamp(2.2rem, 4.6vw, 3.8rem); color: var(--card); text-wrap: balance; text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.showcase__note { margin: .8rem 0 0; font: italic 400 1.15rem/1.45 var(--fell); color: var(--text); text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }

/* Time left on the current slide: a thin lamp-lit rule along the top of the window */
.showcase__progress {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 3;
  height: 2px;
  background: rgba(19, 8, 6, .6);
}
.showcase__progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--brass), var(--lamp));
  box-shadow: 0 0 10px rgba(242, 160, 84, .7);
}
.showcase__progress span.is-running { animation: showcase-progress 7s linear forwards; }
@keyframes showcase-progress { to { transform: scaleX(1); } }

/* Controls: one brass-trimmed rail screwed onto the bottom edge of the window */
.showcase__controls {
  position: relative;
  z-index: 4;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: .25rem;
  margin: -1.35rem auto 0;
  padding: .3rem .55rem;
  border-radius: 999px;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 0 0 1px var(--brass-lo), inset 0 1px 0 rgba(246, 189, 122, .25), 0 10px 24px -8px rgba(0, 0, 0, .9);
}
.showcase__btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--brass-hi);
  background: none;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.showcase__btn:hover { color: var(--lamp); background: rgba(242, 160, 84, .1); }
.showcase__pause .icon--play, .showcase__pause[aria-pressed="true"] .icon--pause { display: none; }
.showcase__pause[aria-pressed="true"] .icon--play { display: block; }
.showcase__sep { width: 1px; height: 1.2rem; margin: 0 .2rem; background: rgba(200, 120, 60, .35); }

.showcase__dots { display: flex; align-items: center; }
.showcase__dot {
  width: 28px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.showcase__dot::before {
  content: "";
  display: block;
  width: 14px;
  height: 3px;
  margin: auto;
  border-radius: 2px;
  background: rgba(246, 189, 122, .28);
  transition: width .4s var(--ease-out), background .3s, box-shadow .3s;
}
.showcase__dot:hover::before { background: rgba(246, 189, 122, .6); }
.showcase__dot[aria-current="true"]::before { width: 24px; background: var(--lamp); box-shadow: 0 0 8px rgba(242, 160, 84, .8); }

.showcase__count {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  margin: 0 .35rem 0 .5rem;
  font: 400 1.05rem/1 var(--fell);
  color: var(--muted);
  font-variant-numeric: oldstyle-nums;
}
.showcase__count span { color: var(--card); min-width: .6em; text-align: right; }
.showcase__count i { font-size: .85rem; }

/* Video on a show page */
.screen {
  display: block;
  width: 100%;
  border-radius: 2px;
  background: #000;
  box-shadow: 0 0 0 1px var(--brass-lo), 0 20px 40px -12px rgba(0, 0, 0, .9);
}

/* ---------------- Login (shared backend view auth/login, restyled here) ---------------- */

body .login-container {
  max-width: 26rem;
  margin: clamp(2.5rem, 8vh, 5rem) auto;
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  color: var(--card-ink);
  background: var(--paper), var(--card);
  border-radius: 3px;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .9), 0 0 60px rgba(242, 160, 84, .12);
  transform: rotate(-.6deg);
}
body .login-header { text-align: center; margin-bottom: .75rem; }
body .login-title { font: 400 2.2rem/1.1 var(--fell); color: var(--card-ink); letter-spacing: 0; margin: 0 0 .4rem; }
body .login-subtitle { color: #8b4728; font-size: 1rem; margin: 0; }
body .login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .85rem 1.25rem;
  border-radius: 3px;
  font: 700 1rem/1 var(--sans);
  letter-spacing: .01em;
  text-transform: none;
  color: var(--card) !important;
  background: var(--wood-h);
  background-size: 600px 240px, auto;
  box-shadow: inset 0 0 0 1px var(--brass-lo), inset 0 1px 0 rgba(246, 189, 122, .3), 0 8px 16px -8px rgba(0, 0, 0, .8);
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
body .login-btn:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--brass-hi), 0 12px 22px -10px rgba(0, 0, 0, .9), 0 0 22px rgba(242, 160, 84, .3); }
body .login-btn i { font-size: 1.15rem; color: var(--lamp); }
body .login-error { background: rgba(165, 40, 30, .1); border: 1px solid rgba(165, 40, 30, .35); color: #7a1f14; border-radius: 3px; }
body .login-footer-text { color: #8b4728; font-size: .85rem; text-align: center; margin: .25rem 0 0; }

/* ---------------- Bars: header and footer in one flat gold-copper, no wood ---------------- */

:root { --bar: #c98a3e; --bar-ink: #2a0f06; --bar-ink-soft: rgba(42, 15, 6, .72); }

.cornice {
  background: var(--bar);
  border-bottom: 0;
  box-shadow: 0 1px 0 rgba(42, 15, 6, .55), 0 10px 26px -8px rgba(0, 0, 0, .75);
}
.cornice .mark { color: var(--bar-ink); text-shadow: none; }
.cornice .nav a { color: var(--bar-ink); }
.cornice .nav a:hover { color: #6b230b; }
.cornice .nav a[aria-current="page"] { color: var(--bar-ink); border-bottom-color: var(--bar-ink); }
.cornice .key { color: var(--bar-ink); border-color: rgba(42, 15, 6, .45); }
.cornice .visitor .key:hover { background: rgba(42, 15, 6, .1); border-color: var(--bar-ink); }
.cornice .account__toggle { color: var(--bar-ink); border-color: rgba(42, 15, 6, .4); background: rgba(255, 236, 200, .18); }
.cornice .account__toggle:hover, .cornice .account__toggle[aria-expanded="true"] { border-color: var(--bar-ink); background: rgba(255, 236, 200, .32); }
.cornice .account__toggle img { box-shadow: 0 0 0 1px var(--bar-ink); }
.cornice .account__chev { color: var(--bar-ink); }
.cornice .account__menu { background: var(--bar); box-shadow: 0 0 0 1px rgba(42, 15, 6, .45), 0 18px 34px -10px rgba(0, 0, 0, .9); }
.cornice .visitor .account__item { color: var(--bar-ink); }
.cornice .visitor .account__item:hover, .cornice .visitor .account__item:focus-visible { color: var(--bar-ink); background: rgba(42, 15, 6, .1); }
.cornice .nav-toggle { color: var(--bar-ink); border-color: rgba(42, 15, 6, .45); background: rgba(255, 236, 200, .18); }
.cornice :focus-visible { outline-color: var(--bar-ink); }

.plinth {
  color: var(--bar-ink-soft);
  background: var(--bar);
  box-shadow: 0 -1px 0 rgba(42, 15, 6, .55);
}
.plinth__mark { color: var(--bar-ink); text-shadow: none; }
.plinth__links a { color: var(--bar-ink); }
.plinth__links a:hover { color: #6b230b; }
.plinth__legal { border-top-color: rgba(42, 15, 6, .25); }
.plinth .credit { color: var(--bar-ink-soft); }
.plinth .credit:hover { color: var(--bar-ink); }
.plinth :focus-visible { outline-color: var(--bar-ink); }

/* Social buttons: one ink colour, each brand's own colour on hover */
.plinth .social { color: var(--bar-ink); border-color: rgba(42, 15, 6, .35); background: transparent; transition: color .2s, border-color .2s, background .2s; }
.plinth .social:hover { --brand: var(--bar-ink); color: var(--brand); border-color: var(--brand); background: rgba(255, 244, 225, .55); }
.social--patreon { --brand-hover: #f96854; }
.social--deviantart { --brand-hover: #05cc47; }
.social--x-twitter { --brand-hover: #000; }
.social--pixiv { --brand-hover: #0096fa; }
.social--bluesky { --brand-hover: #0085ff; }
.social--discord { --brand-hover: #5865f2; }
.plinth .social[class*="social--"]:hover { color: var(--brand-hover); border-color: var(--brand-hover); }

/* ---------------- Cover badges: members only, early access, new ---------------- */

.vitrine__lock--early {
  color: var(--card);
  background: linear-gradient(180deg, #b4552a, #7c2e12);
  box-shadow: inset 0 1px 0 rgba(255, 214, 170, .5), 0 0 0 1px rgba(246, 189, 122, .55), 0 3px 8px rgba(0, 0, 0, .7);
}
.vitrine__new {
  position: absolute;
  top: 22px;
  left: 20px;
  z-index: 5;
  padding: .12rem .45rem .1rem;
  border-radius: 999px;
  font: 700 .66rem/1.3 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--card-ink);
  background: var(--lamp);
  box-shadow: 0 0 0 1px rgba(42, 15, 6, .5), 0 0 14px rgba(242, 160, 84, .7);
}
.vitrine--grand .vitrine__new { top: 28px; left: 28px; }

/* ---------------- Tags and search ---------------- */

.tags { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.reader-head .tags { justify-content: center; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  border-radius: 999px;
  font: 500 .85rem/1.2 var(--sans);
  color: var(--brass-hi);
  text-decoration: none;
  border: 1px solid rgba(200, 120, 60, .5);
  background: rgba(38, 14, 6, .35);
  transition: color .2s, border-color .2s, background .2s;
}
.tag:hover { color: var(--lamp); border-color: var(--lamp); }
.tag.is-on { color: var(--card-ink); background: var(--lamp); border-color: var(--lamp); }
.tag__count { font: 400 .72rem var(--typed); opacity: .75; }
.specimen .tag { color: #6e2a0f; border-color: rgba(110, 42, 15, .35); background: rgba(110, 42, 15, .06); }
.specimen .tag:hover { color: var(--card-ink); border-color: var(--card-ink); }

.search { display: flex; gap: .6rem; max-width: 40rem; }
.search__input {
  flex: 1;
  min-width: 0;
  padding: .75rem 1rem;
  border: 1px solid rgba(200, 120, 60, .55);
  border-radius: 3px;
  font: 400 1.05rem var(--sans);
  color: var(--text);
  background: rgba(20, 7, 3, .55);
}
.search__input::placeholder { color: var(--muted); }
.search__input:focus { outline: 2px solid var(--lamp); outline-offset: 2px; }
.search__go { margin-top: 0; }
.tags--filter { margin-top: 1.5rem; max-width: 60rem; }

/* ---------------- Reader: layout switch, page grid, full-screen viewer ---------------- */

.reader-tools { display: flex; justify-content: center; gap: .35rem; margin: 0 auto 1.5rem; }
.reader-tools__btn {
  padding: .45rem .9rem;
  border: 1px solid rgba(200, 120, 60, .5);
  border-radius: 3px;
  font: 500 .9rem var(--sans);
  color: var(--brass-hi);
  background: rgba(38, 14, 6, .45);
  cursor: pointer;
}
.reader-tools__btn:hover { color: var(--lamp); border-color: var(--lamp); }
.reader-tools__btn[aria-pressed="true"] { color: var(--card-ink); background: var(--lamp); border-color: var(--lamp); }

.page { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.page img {
  width: 100%;
  height: auto;
  background: #2a0d06;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .8), 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.page:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
.pages[data-cols="2"], .pages[data-cols="3"] {
  max-width: 1200px;
  display: grid;
  gap: 1rem;
  align-items: start;
}
.pages[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pages[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pages[data-cols="2"] > :not(.page), .pages[data-cols="3"] > :not(.page) { grid-column: 1 / -1; }

.drawer__early { display: flex; align-items: center; gap: .45rem; color: var(--lamp) !important; }

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 5, 2, .96);
  color: var(--card);
}
.lightbox::backdrop { background: rgba(14, 5, 2, .9); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img { max-width: calc(100vw - 7rem); max-height: calc(100dvh - 4rem); width: auto; height: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .9); }
.lightbox__count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); margin: 0; font: 400 .85rem var(--typed); color: var(--muted); }
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 189, 122, .4);
  border-radius: 50%;
  color: var(--card);
  background: rgba(38, 14, 6, .7);
  cursor: pointer;
}
.lightbox__btn:hover { color: var(--lamp); border-color: var(--lamp); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn:disabled { opacity: .3; cursor: default; }

/* ---------------- Smaller rooms ---------------- */

@media (max-width: 1100px) {
  .stage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "centre centre" "left right";
    min-height: 0;
    align-items: start;
  }
  .stage__side { padding-bottom: 0; }
  .stage__side .vitrine { filter: none; }
}

@media (max-width: 900px) {
  .showcase__case { aspect-ratio: auto; min-height: 0; }
  .showcase__slide { grid-template-columns: 1fr; align-items: end; min-height: 30rem; }
  .showcase__slide::after { background: linear-gradient(0deg, rgba(19, 8, 6, .95) 0%, rgba(19, 8, 6, .75) 45%, transparent 80%); }
  .showcase__art, .showcase__slide:not(.has-banner) .showcase__art { position: relative; inset: auto; height: 15rem; max-width: 80%; justify-self: center; align-self: start; margin-top: 1.25rem; }
  .showcase__slide:not(.has-banner) .showcase__art { height: 13rem; }
  .showcase__text { grid-row: 2; }
  .plinth__inner { grid-template-columns: 1fr 1fr; }
  .plinth__about { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .pages[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-tools [data-layout="3"] { display: none; }
  .lightbox__img { max-width: 100vw; max-height: calc(100dvh - 5rem); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: .6rem; transform: none; }
  .search { flex-direction: column; }
  .mark { font-size: 1.25rem; }
  .account__who { display: none; }
  .key { padding: .35rem .7rem; font-size: .9rem; }

  .stage__centre { grid-template-columns: 1fr; }
  .stage__centre > .vitrine { max-width: 360px; width: 100%; justify-self: center; }
  .specimen { transform: rotate(-.8deg); }
  .specimen::after { display: none; }

  .shelves { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 1rem; }
  .shelves--rail { grid-template-columns: none; grid-auto-columns: 44%; }
  .label__title { font-size: 1.05rem; }
  .plate { font-size: .68rem; padding-inline: 1rem; }

  .showcase__dot { width: 22px; }
  .showcase__count { display: none; }
  .drawer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .drawer__front { width: min(240px, 70%); }
  .chapter-nav { grid-template-columns: 1fr; }
  .chapter-nav__link--next { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
