#fun-stuff { container-type: inline-size; }
#fun-title { margin: 0; font: inherit; }
.fun-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.3rem);
  padding: clamp(1rem, 3vw, 2.4rem);
  font-family: var(--typewriter);
}
.shelf-item { min-width: 0; text-align: center; }
.shelf-item h2 { margin: 0 0 .85rem; color: var(--plum-dark); font: 700 clamp(1.2rem, 2.2vw, 1.7rem)/1.22 var(--typewriter); }
.shelf-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 17rem;
  border: 1px solid #a7808b;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 1px 1px #fffaf1, 2px 2px #e1c8c6;
}
.reading-stage {
  background-color: #ead7c8;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, #f7eadd55 3px 4px), repeating-linear-gradient(90deg, transparent 0 3px, #f7eadd55 3px 4px);
  perspective: 65rem;
}
.book-spread {
  position: relative; width: 9.4rem; height: 12.2rem;
  transform: rotate(-5deg);
  transition: transform .65s ease;
  isolation: isolate;
}
.book-spread.is-open { transform: translateX(2.45rem) rotate(0); }
.book-page, .book-cover, .cover-front, .cover-inside {
  position: absolute; inset: 0;
  border-radius: 2px 5px 5px 2px;
}
.book-page {
  display: grid; align-content: center; gap: .8rem;
  padding: .9rem; text-align: left; color: var(--plum-dark);
  background: linear-gradient(90deg, #cbb299, #f8e6c9 9%, #fff2db 23%, #f9eacb);
  box-shadow: 1px 1px #84695c, 3px 2px #f4e1ca, 4px 3px #967764, 5px 4px #f4dfc3, 7px 7px 5px #40232c39;
  font-size: .85rem; line-height: 1.35;
}
.book-page strong { border-bottom: 1px solid #bc9290; padding-bottom: .4rem; font: italic 700 1.12rem/1.1 Georgia,serif; }
.book-cover {
  display: block; padding: 0; border: 0; background: transparent;
  transform-style: preserve-3d; transform-origin: left center;
  transition: transform .65s ease;
}
.book-spread.is-open .book-cover { transform: perspective(65rem) rotateY(-132deg); }
.cover-front, .cover-inside { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cover-front {
  display: grid; padding: .54rem .47rem .56rem .81rem; color: #ffe6c6;
  border: 1px solid #511d32;
  background: linear-gradient(90deg, #3d1429, #8d4055 5%, #5c2339 8%, #85394f 13%, #753045 70%, #672b41);
  box-shadow: inset -2px -1px #693343;
}
.cover-rule {
  display: grid; place-content: center; justify-items: center; gap: .65rem;
  padding: .3rem; border: 3px double #dfb68a;
  border-radius: 16% 2% 16% 2%;
}
.cover-rule strong { font: italic 700 1.6rem/1.08 Georgia,serif; }
.cover-author { font: .74rem/1.3 var(--typewriter); }
.cover-emblem {
  width: 1.35rem; height: 1.35rem; transform: rotate(45deg);
  border: 3px double #edc69d; margin-bottom: .4rem;
  box-shadow: 4px -4px 0 -2px #783246, 4px -4px #e3ba90;
}
.cover-inside {
  transform: rotateY(180deg); border: 4px solid #753246;
  background: repeating-linear-gradient(50deg, #ecd9c0 0 5px, #e0c4a6 5px 6px);
}
.music-stage {
  background-color: #f2dce6;
  background-image: radial-gradient(#b88da066 .8px, transparent 1px);
  background-size: 6px 6px;
}
.disc-well {
  display: block; position: relative; padding: 0; border: 0; border-radius: 50%;
  width: min(13.4rem, 78%); aspect-ratio: 1; background: transparent;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(1px 5px 4px #522b4845);
}
.fun-disc {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  animation: fun-disc-turn 3.8s linear infinite;
  animation-play-state: paused;
}
.disc-scan { display: block; width: 100%; height: 100%; object-fit: contain; transform: rotate(-20deg); }
@font-face {
  font-family: 'CD Marker';
  src: url('assets/permanent-marker.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
.disc-scan { filter: saturate(.64) contrast(.9); }
.disc-coating {
  position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(114deg,#c1bfcbd6 4%,#fbfaf3d9 36%,#e1e6edd4 58%,#cac3cfbc 82%);
  mask: radial-gradient(closest-side, transparent 0 35%, black 35.7% 94%, transparent 96%);
}
.disc-ink {
  position: absolute; left: 13%; width: 74%; text-align: center;
  font: 400 1.75rem/1.12 'CD Marker', 'Marker Felt', cursive;
  color: #2b2033; letter-spacing: -.035em; transform: rotate(-10deg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.disc-title { top: 19%; }
.disc-artist { top: 67%; left: 15%; font-size: 1.24rem; transform: rotate(-7deg); }
.disc-spec {
  position: absolute; top: 84%; left: 25%; width: 50%;
  font: 700 .48rem/1 Arial, sans-serif; letter-spacing: .12em; color: #534c60;
}
.music-stage.is-spinning.motion-on .fun-disc { animation-play-state: running; }
@keyframes fun-disc-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.track-display { margin: .65rem 0 .55rem; font: .95rem/1.4 var(--typewriter); }
.disc-command { min-height: 44px; }
.motion-control { display: none; }
@media (prefers-reduced-motion: reduce) {
  .motion-control { display: block; margin-top: .5rem; font-size: .9rem; }
}
.disc-credit { margin: .7rem 0; font-size: .92rem; line-height: 1.5; }
.disc-credit a { color: var(--berry); }
.shelf-controls { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .8rem; }
.shelf-controls button { font: 700 1rem/1.15 var(--typewriter); min-height: 44px; min-width: 44px; }
.book-toggle { min-width: 7rem; padding-inline: .9rem; }
.fun-shelf button:focus-visible { outline: 3px solid var(--berry); outline-offset: 3px; }
@container (max-width: 35rem) {
  .fun-shelf { grid-template-columns: minmax(0,1fr); gap: 1.7rem; }
  .shelf-stage { min-height: 16rem; }
}
@media (prefers-reduced-motion: reduce) {
  .book-spread, .book-cover { transition: none; }
}
.book-spread { width: 8.55rem; height: 12.9rem; }
.book-spread.is-open { transform: translateX(2.9rem) rotate(0); }
.cover-front:has(.shelf-cover-image:not([hidden])) { padding: 0; border: 0; background: var(--paper); }
.shelf-cover-image { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.page-title, .page-author, .page-note, .cover-rule { overflow-wrap: anywhere; }
.current-caption { margin: .65rem 0 0; font-size: .95rem; line-height: 1.4; }
.transport { flex-wrap: wrap; }
.transport label, .transport select { font: .92rem var(--typewriter); }
.transport select { padding: .5rem; background: var(--paper); color: var(--plum-dark); border: 1px solid #a7808b; }
.player-status { margin: .5rem 0 0; font-size: .9rem; }
.player-status:empty { display: none; }
.player-mount { min-height: 152px; }
.player-panel { margin-top: 1rem; }
.player-mount iframe { display: block; width: 100%; border: 0; border-radius: .35rem; }
.player-mount iframe[data-service=youtube] { aspect-ratio: 16/9; height: auto; min-height: 200px; }
.player-mount iframe[data-service=spotify] { height: 152px; }
.player-fallback { display: inline-block; margin: .5rem auto 0; color: var(--berry); font-size: .95rem; }
.shelf-register { padding: .85rem 0 0; border-top: 1px dotted #a7808b; }
.fun-shelf > .shelf-register { grid-column: 1/-1; }
.reading-register {
  width: min(100%, 24rem);
  margin: 1rem auto 0;
  padding: .25rem .85rem .35rem;
  border: 1px solid #b5979a;
  border-radius: 3px;
  background: var(--paper);
  text-align: start;
}
.shelf-register summary { width: fit-content; padding: .35rem 0; color: var(--plum-dark); font-weight: 700; cursor: pointer; }
.reading-register > summary { width: 100%; padding-block: .55rem; }
.shelf-register summary:focus-visible, .player-fallback:focus-visible { outline: 3px solid var(--berry); outline-offset: 2px; }
.shelf-log, .credit-list { list-style: none; margin: .6rem 0 0; padding: 0; }
.shelf-log { margin: 0; }
.shelf-log li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px dotted #b5979a; }
.shelf-log img { flex: none; width: 2.65rem; height: 4rem; object-fit: contain; }
.shelf-log li > div { display: grid; min-width: 0; gap: .15rem; overflow-wrap: anywhere; }
.shelf-log small { font-size: .88rem; color: var(--plum); }
.credit-list li { max-width: 72ch; margin: .65rem 0; font-size: .95rem; line-height: 1.5; }
.credit-list a { color: var(--berry); }
.log-form { max-width: 32rem; margin-top: 1rem; }
.log-form select { font: inherit; padding: .5rem; margin-bottom: .65rem; color: var(--ink); background: var(--paper); }
.log-form .save-note { margin: .4rem 0 0; font-size: .92rem; line-height: 1.4; }
