@font-face { font-family: "Platypi"; src: url(../fonts/platypi.woff2) format("woff2"); }
@font-face { font-family: "Noto Serif Devanagari"; src: url(../fonts/noto-serif-devanagari.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Outfit"; src: url(../fonts/outfit.woff2) format("woff2"); }
:root {
  --wall: #2b1610;
  --ember: #e8833a;
  --gold: #f2c46d;
  --cream: #fbeedb;
  --paper: #f6e7cb;
  --ink: #2a160d;
  --plank: #c9975b;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #1d0e09;
  color: var(--cream);
  font-family: var(--serif);
  color-scheme: dark;
}

/* De kamer */
.room {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.stage {
  position: relative;
  width: min(100vw, calc(100dvh * 1376 / 768));
  aspect-ratio: 1376 / 768;
  flex: none;
  transition: translate .6s ease-out;
}
.stage > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Past de foto niet precies, dan vult een wazige versie de rand */
.room::before {
  content: "";
  position: fixed;
  inset: -60px;
  background: var(--photo) center / cover;
  filter: blur(36px) brightness(.5);
}

/* Staand scherm: de kamer is breder dan het scherm, je kijkt rond door te vegen */
@media (max-aspect-ratio: 1/1) {
  .room {
    display: block;
    place-items: normal;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .room::-webkit-scrollbar { display: none; }
  .stage {
    width: calc(100dvh * 1376 / 768);
    height: 100dvh;
  }
}

.glow { animation: flicker 2.8s ease-in-out infinite; }
.glow.quick { animation-duration: 1.7s; animation-delay: -.6s; }
@keyframes flicker {
  0%, 100% { opacity: .85; }
  22% { opacity: 1; }
  41% { opacity: .78; }
  63% { opacity: .96; }
  80% { opacity: .82; }
}

/* Alleen de vlammen bewegen: dit vlak ligt precies op de haard in de foto */
.fire {
  position: absolute;
  left: calc(585 / 1376 * 100%);
  top: calc(375 / 768 * 100%);
  width: calc(150 / 1376 * 100%);
  height: calc(125 / 768 * 100%);
}

/* Klikbare voorwerpen */
.hot {
  --px: calc(var(--x) / 1376 * 100%);
  position: absolute;
  left: var(--px);
  top: calc(var(--y) / 768 * 100%);
  width: calc(var(--w) / 1376 * 100%);
  height: calc(var(--h) / 768 * 100%);
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background .3s, box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .hot:hover {
    background: radial-gradient(closest-side, rgba(255, 196, 110, .26), rgba(255, 196, 110, 0));
    box-shadow: 0 0 28px rgba(255, 180, 90, .22);
  }
  .hot:hover .shape { opacity: 1; }
  .hot:hover .tag { opacity: 1; translate: -50% 0; }
  .door:hover { transform: rotateY(9deg); }
}
.kbd .hot:focus-visible {
  background: radial-gradient(closest-side, rgba(255, 196, 110, .26), rgba(255, 196, 110, 0));
  box-shadow: 0 0 28px rgba(255, 180, 90, .22);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.kbd .hot:focus-visible .shape { opacity: 1; }
.kbd .hot:focus-visible .tag { opacity: 1; translate: -50% 0; }
.hot:has(.shape), .hot:has(.shape):hover, .kbd .hot:has(.shape):focus-visible {
  background: none;
  box-shadow: none;
  outline: none;
}
.hot .shape {
  position: absolute;
  inset: 0;
  opacity: 0;
  filter: drop-shadow(0 0 12px rgba(255, 180, 90, .55));
  transition: opacity .3s;
}
.hot .shape::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 196, 110, .16);
  clip-path: polygon(4.4% 35%, 95% 1.6%, 95% 87.4%, 4.4% 97.9%);
}
.hot .dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff4c9;
  box-shadow: 0 0 6px 2px #ffe08a, 0 0 18px 7px rgba(255, 176, 70, .85), 0 0 34px 12px rgba(255, 150, 50, .4);
  animation: breathe 2.8s ease-in-out infinite;
}
.hot.seen .dot { animation-duration: 5s; box-shadow: 0 0 5px 1px #ffe08a, 0 0 12px 4px rgba(255, 176, 70, .55); }
@keyframes breathe {
  0%, 100% { opacity: .5; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.18); }
}
.hot .tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  translate: -50% 4px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(29, 14, 9, .88);
  color: var(--cream);
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, translate .2s;
}

/* De drempel: muur met een opening, deur op scharnieren */
.threshold {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
}
.doorway {
  position: absolute;
  --w: min(350vw, 199dvh, max(100vw, calc(100dvh * 1376 / 768)));
  left: 50%;
  /* Op een hoog scherm blijft de boog bovenin heel, de stenen lopen onderaan door */
  top: min(0px, calc((100dvh - var(--w) * 768 / 1376) / 2));
  translate: -50% 0;
  width: var(--w);
  aspect-ratio: 1376 / 768;
}
.doorway > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.frame {
  position: absolute;
  left: calc(527.5 / 1376 * 100%);
  top: calc(78.5 / 768 * 100%);
  width: calc(322.0 / 1376 * 100%);
  height: calc(571.5 / 768 * 100%);
  border-radius: 50% 50% 0 0 / 28.2% 28.2% 0 0;
  perspective: 1500px;
}
.door {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: none;
  cursor: pointer;
  transform-origin: left center;
  transition: transform .6s cubic-bezier(.3, .7, .3, 1);
  -webkit-tap-highlight-color: transparent;
}
.door svg { display: block; width: 100%; height: 100%; }
.kbd .door:focus-visible { transform: rotateY(9deg); outline: 2px solid var(--gold); outline-offset: 5px; }

/* De kier: warm licht achter de deur, tot de kamer er is */
.kier {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(70% 60% at 78% 58%, #ffd48a, #e8833a 48%, #5a2109);
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
}
.threshold.ajar .kier { opacity: 1; }
.threshold.opening .kier { opacity: 0; transition-duration: 1.3s; }
.door.ajar, .door.ajar:hover, .kbd .door.ajar:focus-visible { transform: rotateY(14deg); }

/* Het woord: bovenin op een telefoon, zodat het toetsenbord het niet bedekt */
.word {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 5dvh;
  translate: -50% 0;
  width: min(100vw - 48px, 320px);
  padding: 16px 18px 14px;
  border: 1px solid rgba(242, 196, 109, .35);
  border-radius: 14px;
  background: rgba(29, 14, 9, .86);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55);
  color: var(--cream);
  font-family: "Outfit", system-ui, sans-serif;
  text-align: center;
  animation: word-in .6s ease both;
}
.word[hidden] { display: none; }
@keyframes word-in { from { opacity: 0; } to { opacity: 1; } }
.word label {
  display: block;
  margin-bottom: 10px;
  font-family: "Platypi", var(--serif);
  font-size: 21px;
}
.word-row { display: flex; gap: 8px; }
.word input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(251, 238, 219, .35);
  border-radius: 10px;
  background: rgba(251, 238, 219, .08);
  color: var(--cream);
  font: 17px "Outfit", system-ui, sans-serif;
  text-align: center;
}
.word input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.word button {
  flex: none;
  width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #8f2a17;
  color: var(--cream);
  font: 20px/1 "Outfit", system-ui, sans-serif;
  cursor: pointer;
}
.kbd .word button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.word p {
  height: 0;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-style: italic;
  opacity: 0;
  transition: opacity .6s;
}
.word p.shown { height: auto; margin-top: 10px; opacity: .85; }
@media (max-aspect-ratio: 1/1), (max-height: 600px) {
  .word { top: 10dvh; bottom: auto; }
}
.dusk {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(75% 85% at 50% 50%, rgba(20, 8, 3, 0) 55%, rgba(20, 8, 3, .42));
}
.hint {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 3dvh;
  margin: 0;
  text-align: center;
  font-size: clamp(15px, 2.2vmin, 19px);
  font-style: italic;
  letter-spacing: .03em;
  color: var(--cream);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .9);
  pointer-events: none;
  animation: appear 1.6s ease 1.4s both;
}
@keyframes appear { from { opacity: 0; } to { opacity: .82; } }

.welcome {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.swipe {
  position: fixed;
  z-index: 15;
  left: 0;
  right: 0;
  bottom: 22px;
  display: none;
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--cream);
  text-shadow: 0 1px 6px #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s;
}
@media (max-aspect-ratio: 1/1) { .swipe { display: block; } }

.sound {
  position: fixed;
  z-index: 10;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(251, 238, 219, .35);
  border-radius: 999px;
  background: rgba(29, 14, 9, .68);
  color: var(--cream);
  font: 15px var(--serif);
  cursor: pointer;
  opacity: 0;
  transition: opacity .8s, background .2s;
}
.sound.shown { opacity: 1; }
.sound:hover { background: rgba(29, 14, 9, .92); }
.kbd .sound:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Voorwerp groot in beeld */
dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: auto;
}
dialog[open] { display: grid; place-items: center; }
dialog::backdrop { background: rgba(20, 8, 4, .72); backdrop-filter: blur(3px); }
.close {
  z-index: 10;
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(251, 238, 219, .45);
  border-radius: 50%;
  background: rgba(29, 14, 9, .8);
  color: var(--cream);
  font: 26px/1 var(--serif);
  cursor: pointer;
}
.kbd .close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.todo { font-style: italic; opacity: .72; }

/* De voorwerpen zijn foto's, die meerekken als er meer tekst op komt */
dialog { font-family: "Outfit", system-ui, sans-serif; }
dialog h2, .note strong, .cover, .greeting, .collect .lead {
  font-family: "Platypi", var(--serif);
  font-weight: normal;
}

/* Verweerd bord met spijkergaten */
.sign {
  display: grid;
  align-content: center;
  --w: min(100vw - 32px, 660px);
  width: var(--w);
  min-height: calc(var(--w) * 9 / 16);
  padding: clamp(38px, 9vmin, 64px);
  background: center / 100% 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  color: var(--cream);
  text-align: center;
  text-shadow: 0 1px 3px rgba(20, 8, 2, .95), 0 0 16px rgba(20, 8, 2, .75);
}
.sign h2 { margin: 0 0 10px; font-size: clamp(28px, 5.6vmin, 40px); }
.sign p { margin: 0; font-size: clamp(16px, 2.6vmin, 18px); line-height: 1.5; }
.sign .ask { margin-bottom: 8px; font-family: "Platypi", var(--serif); font-size: clamp(20px, 3.4vmin, 25px); line-height: 1.25; }
.sign .live { margin-top: 12px; }
.sign a { color: #f4d48c; }

/* Lijstje van de schouw */
.framed {
  display: grid;
  align-content: center;
  --fw: min(100vw - 32px, 580px);
  width: var(--fw);
  min-height: calc(var(--fw) * 896 / 1200);
  padding: calc(var(--fw) * .175) calc(var(--fw) * .185);
  background: center / 100% 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  text-align: center;
}
.framed h2 { margin: 0 0 12px; font-size: clamp(25px, 5vmin, 34px); }
.framed p { margin: 0; font-size: clamp(16px, 2.6vmin, 18px); line-height: 1.5; }

/* Plank boven de haard */
.plaque {
  display: grid;
  align-content: center;
  --w: min(100vw - 32px, 700px);
  width: var(--w);
  min-height: calc(var(--w) * 9 / 16);
  padding: clamp(38px, 5.5vmin, 48px) clamp(24px, 6vmin, 58px);
  background: center / 100% 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  color: var(--cream);
  text-align: center;
  text-shadow: 0 1px 3px rgba(15, 6, 1, .95), 0 0 14px rgba(15, 6, 1, .7);
}
.plaque .sanskrit {
  margin: 0 0 16px;
  color: #f4d48c;
  font-family: "Noto Serif Devanagari", "Kohinoor Devanagari", "Devanagari Sangam MN", "Nirmala UI", serif;
  font-size: clamp(27px, 6vmin, 44px);
  line-height: 1.35;
}
.plaque h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 4.4vmin, 32px);
  line-height: 1.25;
}
.plaque .meaning {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(16px, 2.6vmin, 19px);
  line-height: 1.55;
}

/* Collectebus: foto naast de tekst, op het donkere hout */
.collect {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(100%, 780px);
  background: #2a160d center / cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  color: var(--cream);
  text-align: center;
  text-shadow: 0 1px 3px rgba(15, 6, 1, .9);
}
.collect .photo { aspect-ratio: 1; background: center / cover; }
.collect .words {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px 26px;
}
.collect p { margin: 0 0 8px; font-size: 18px; line-height: 1.4; }
.collect .lead { font-size: clamp(24px, 4vmin, 30px); line-height: 1.25; }
.give {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 10px 24px;
  border-radius: 999px;
  background: #8f2a17;
  color: var(--cream);
  font: 17px "Outfit", system-ui, sans-serif;
  text-decoration: none;
}
.kbd .give:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Prikbord: de lijst uit de foto, de kurk rekt niet mee */
.cork {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-content: center;
  gap: 18px;
  --w: min(100vw - 32px, 720px);
  width: var(--w);
  min-height: calc(var(--w) * 896 / 1200);
  padding: clamp(20px, 3.4vmin, 28px);
  border: solid transparent;
  border-width: clamp(14px, 3vmin, 27px);
  border-image-slice: 44 46 44 48;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.cork::before {
  content: "";
  position: absolute;
  inset: -8%;
  z-index: -1;
  background: center / cover;
}
.note {
  position: relative;
  margin: 0;
  padding: 24px 18px 20px;
  background: #f4ecd9;
  box-shadow: 0 5px 12px rgba(42, 22, 13, .5);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.note::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5px;
  border-radius: 50%;
  background: #b08a3e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.note:nth-child(1) { rotate: -1.4deg; }
.note:nth-child(2) { rotate: 1deg; }
.note:nth-child(3) { rotate: -.6deg; }
.note:nth-child(5) { rotate: -.8deg; }
.note:nth-child(4) { rotate: 1.2deg; }
.note strong { display: block; margin-bottom: 4px; font-size: 20px; }
.note a { color: #8f2a17; }

/* Het boek: kaft en opengeslagen bladzijden uit de foto's */
.book-wrap {
  width: min(100%, 880px, calc((100dvh - 56px) * 1264 / 848));
  perspective: 1800px;
}
.book {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 1264 / 848;
  translate: -25% 0;
  transition: translate .9s cubic-bezier(.3, .7, .3, 1);
  transform-style: preserve-3d;
}
.book.open { translate: 0 0; }
.page {
  position: relative;
  background: 0 0 / 200% 100% no-repeat;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  color: #3a2210;
}
/* De tekst blijft vrij van de bloemen in de hoeken */
.page.left {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30% 3.5% 30% 38%;
  text-align: center;
  opacity: 0;
  transition: opacity .2s linear .4s;
}
.book.open .page.left { opacity: 1; }
.page.right {
  padding: 30% 39% 30% 5%;
  background-position: 100% 0;
  text-align: center;
}
.greeting { font-size: clamp(24px, 3.6vmin, 30px); line-height: 1.15; }
.held { margin: 14px 0 0; font-size: clamp(15px, 2.4vmin, 17px); line-height: 1.4; }
.founder { margin-top: auto; padding-top: 14px; font-size: clamp(13px, 2vmin, 14px); line-height: 1.4; }
.founder p { margin: 6px 0; }
.founder a { color: #8f2a17; }
.hg-logo { display: block; width: clamp(30px, 6vmin, 42px); height: auto; margin: 0 auto; }
.page h2 { margin: 0 0 14px; font-size: clamp(24px, 3.6vmin, 30px); line-height: 1.15; }
.page ul { margin: 0; padding: 0; list-style: none; }
.page li { margin-bottom: 12px; font-size: clamp(15px, 2.4vmin, 17px); line-height: 1.4; }
.cover {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  display: grid;
  place-items: center;
  background: center / 100% 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  color: #e9c477;
  pointer-events: none;
  text-align: center;
  text-shadow: 0 1px 2px rgba(30, 6, 2, .9);
  font-size: clamp(24px, 4.6vmin, 36px);
  line-height: 1.25;
  transform-origin: left center;
  backface-visibility: hidden;
  transition: transform .9s cubic-bezier(.3, .7, .3, 1);
}
.book.open .cover {
  transform: rotateY(-180deg);
  visibility: hidden;
  transition: transform .9s cubic-bezier(.3, .7, .3, 1), visibility 0s linear .9s;
}

/* Staand of heel laag scherm: voorwerpen onder elkaar, je veegt door het boek */
@media (max-aspect-ratio: 1/1), (max-height: 520px) {
  .collect { grid-template-columns: 1fr; width: min(100%, 420px); }
  .collect .photo { aspect-ratio: auto; height: min(36dvh, 300px); background-position: 50% 62%; }
  .book-wrap { --pw: min(100vw - 32px, 420px); width: var(--pw); }
  .book { grid-template-columns: 1fr; aspect-ratio: auto; translate: 0 0; }
  .page { min-height: calc(var(--pw) * 848 / 632); }
  .cover { bottom: auto; width: 100%; aspect-ratio: 3 / 4; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .hot .dot, .hint, .word { animation: none; }
  .kier { transition: none; }
  .hint { opacity: .82; }
  .stage, .door, .book, .cover, .page.left { transition: none; }
  .door:hover, .kbd .door:focus-visible { transform: none; }
}

/* De boekenkast: echte foto, boekruggen zijn knoppen met echte tekst */
.shelf-wrap {
  --h: max(320px, min(100dvh - 176px, 760px));
  --cw: calc(var(--h) * 1200 / 896);
  width: min(100vw - 32px, var(--cw));
  color: var(--cream);
  text-align: center;
}
.shelf-wrap h2 {
  margin: 0 0 10px;
  font-size: clamp(25px, 4.4vmin, 34px);
  line-height: 1.2;
}
.case-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  scrollbar-width: none;
}
.case-scroll::-webkit-scrollbar { display: none; }
.case {
  position: relative;
  width: var(--cw);
  height: var(--h);
  background-position: center;
  background-size: 100% 100%;
}
/* De regels staan op de planken uit de foto: hoogtes in pixels van de foto */
.shelf {
  position: absolute;
  left: calc(100 / 1200 * 100%);
  right: calc(100 / 1200 * 100%);
  display: flex;
  align-items: flex-end;
  gap: calc(var(--h) * .003);
}
.shelf:nth-child(1) { bottom: calc((896 - 301) / 896 * 100%); }
.shelf:nth-child(2) { bottom: calc((896 - 566) / 896 * 100%); justify-content: flex-end; }
.shelf:nth-child(3) { bottom: calc((896 - 828) / 896 * 100%); }
.spine {
  --b: #6d2015;
  --i: #f0d08c;
  position: relative;
  display: flex;
  flex: none;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: calc(var(--h) * .006);
  width: calc(var(--h) * var(--sw, .082));
  height: calc(var(--h) * var(--sh, .2));
  padding: calc(var(--h) * .021) 2px;
  border: 0;
  border-radius: 3px 3px 1px 1px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(255, 255, 255, .13) 22%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .34)),
    var(--b);
  box-shadow: 3px 0 8px rgba(0, 0, 0, .5);
  color: var(--i);
  cursor: pointer;
  transition: translate .25s ease, filter .25s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Banden boven en onder, zoals op een gebonden boek */
.spine::before, .spine::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--i);
  opacity: .55;
}
.spine::before { top: calc(var(--h) * .012); }
.spine::after { bottom: calc(var(--h) * .012); }
.spine-title, .spine-author {
  writing-mode: vertical-rl;
  max-height: 100%;
  line-height: 1.1;
}
.spine-title {
  font-family: "Platypi", var(--serif);
  font-size: max(12px, calc(var(--h) * .023));
}
.spine-author {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: max(10px, calc(var(--h) * .0155));
  opacity: .85;
}
@media (hover: hover) {
  .spine:hover { translate: 0 calc(var(--h) * -.008); filter: brightness(1.14); }
}
.kbd .spine:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.spine.c0 { --b: #6d2015; --sw: .09; --sh: .215; }
.spine.c1 { --b: #21402f; --sw: .086; --sh: .2; }
.spine.c2 { --b: #b58a45; --i: #2a160d; --sw: .078; --sh: .207; }
.spine.c3 { --b: #3d2141; --sw: .09; --sh: .222; }
.spine.c4 { --b: #e0cfa8; --i: #4a2412; --sw: .08; --sh: .196; }
.spine.c5 { --b: #1e3442; --sw: .086; --sh: .212; }
.spine.c6 { --b: #8f4a1c; --i: #fbeedb; --sw: .082; --sh: .204; }
.shelf-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  margin-top: 12px;
}
.shelf-foot p { margin: 0; font-size: 16px; line-height: 1.3; }
.shelf-foot .give { min-height: 44px; margin: 0; padding: 8px 22px; }
.shelf-foot .shelf-address { flex-basis: 100%; font-size: 14px; opacity: .78; overflow-wrap: anywhere; }

/* Het kaartje van een boek */
.pick {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(20, 8, 4, .55);
  animation: word-in .3s ease both;
}
.pick[hidden] { display: none; }
.pick-card {
  position: relative;
  width: min(100%, 440px);
  max-height: 100%;
  overflow: auto;
  padding: 30px 30px 26px;
  border-radius: 3px;
  background: #f4ecd9;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  text-align: center;
}
.pick-card h3 {
  margin: 0 22px 4px;
  font-family: "Platypi", var(--serif);
  font-size: 25px;
  font-weight: normal;
  line-height: 1.2;
}
.pick-card p { margin: 0; }
.pick-card .pick-author { margin-bottom: 16px; font-size: 15px; opacity: .72; }
.pick-card .pick-by { margin-top: 16px; font-family: "Platypi", var(--serif); font-size: 16px; color: #8f2a17; }
.pick-close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 26px/1 var(--serif);
  cursor: pointer;
}
.kbd .pick-close:focus-visible { outline: 2px solid #8f2a17; outline-offset: -4px; }

/* De kast staat schuin in de foto: gloed, bolletje en label volgen de bovenrand */
.hot[data-open="d-shelf"] .shape::before { clip-path: polygon(.3% 0, 99.5% 33.7%, 99.5% 95%, .3% 100%); }
.hot[data-open="d-shelf"] .dot { top: calc(33.7% + 4px); }
/* Het bolletje van het prikbord zakt langs de rechterrand, vrij van de knop Sound on */
.hot[data-open="d-board"] .dot { top: 20%; right: calc(5% - 7px); }
/* Het bolletje van het Sanskrietplankje op de rechterbovenhoek van het hout (foto x=780, y=120), niet erboven */
.hot[data-open="d-loka"] .dot { top: calc(33% + 4px); right: calc(2.7% + 4px); }
.hot[data-open="d-shelf"] .tag { bottom: calc(83% + 6px); }

/* Staand scherm: alles op de eerste planken links, de kast loopt door naar rechts */
@media (max-aspect-ratio: 1/1) {
  .shelf:nth-child(2) { justify-content: flex-start; }
  .shelf-wrap { --h: max(320px, min(100dvh - 214px, 760px)); }
}

@media (prefers-reduced-motion: reduce) {
  .spine { transition: none; }
  .pick { animation: none; }
}

/* Alleen voor schermlezers */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
