:root {
  --paper: #fff;
  --ink: #29323a;
  --cyan: #19bed0;
  --pale: #d7e2e7;
  --muted: #71818d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
}

img { max-width: 100%; }

button,
a { font: inherit; }

.cover {
  display: grid;
  place-content: center;
  width: min(1060px, calc(100% - 48px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 48px 0;
}

.brand {
  width: min(760px, 78vw);
  margin: 0 auto clamp(48px, 8vh, 84px);
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
}

.entrances {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  border-top: 1px solid var(--pale);
  border-bottom: 1px solid var(--pale);
}

.entrance {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94px;
  padding: 20px 12px;
  color: var(--ink);
  text-decoration: none;
}

.entrance + .entrance {
  border-left: 1px solid var(--pale);
}

.entrance::before {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  content: "";
  border: 1px solid var(--cyan);
  border-radius: 50%;
  background: var(--paper);
  transform: translateX(-50%);
  transition: background-color 150ms ease, transform 150ms ease;
}

.entrance::after {
  position: absolute;
  right: 22%;
  bottom: 24px;
  left: 22%;
  height: 1px;
  content: "";
  background: var(--cyan);
  transform: scaleX(0) rotate(-1deg);
  transform-origin: left;
  transition: transform 180ms ease;
}

.entrance span {
  position: relative;
  z-index: 1;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  letter-spacing: .16em;
  text-indent: .16em;
  transition: color 150ms ease, transform 150ms ease;
}

.entrance__status {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 400;
  letter-spacing: .12em;
  transform: rotate(-2deg);
}

.entrance:nth-child(odd) span { transform: rotate(-.35deg); }
.entrance:nth-child(even) span { transform: rotate(.35deg); }

.entrance:hover,
.entrance:focus-visible {
  color: var(--cyan);
  outline: none;
}

.entrance:hover::before,
.entrance:focus-visible::before {
  background: var(--cyan);
  transform: translateX(-50%) scale(1.25);
}

.entrance:hover::after,
.entrance:focus-visible::after { transform: scaleX(1) rotate(-1deg); }
.entrance:hover span,
.entrance:focus-visible span { transform: translateY(-2px) rotate(0); }

.notice {
  width: min(390px, calc(100% - 36px));
  padding: 36px 32px 32px;
  color: var(--ink);
  text-align: center;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--cyan);
}

.notice::backdrop { background: rgb(41 50 58 / 24%); }

.notice img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.notice h2 {
  margin: 12px 0 10px;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-indent: .14em;
}

.notice p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: .95rem;
}

.notice__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.notice__return {
  padding: 10px 22px;
  color: var(--ink);
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.notice__close:hover,
.notice__close:focus-visible,
.notice__return:hover,
.notice__return:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  outline: 1px dotted var(--cyan);
  outline-offset: 4px;
}

@media (max-width: 680px) {
  .cover {
    width: min(520px, calc(100% - 32px));
    padding: 40px 0;
  }

  .brand {
    width: 100%;
    margin-bottom: 48px;
  }

  .entrances { grid-template-columns: repeat(2, 1fr); }

  .entrance { min-height: 82px; }
  .entrance + .entrance { border-left: 0; }
  .entrance:nth-child(even) { border-left: 1px solid var(--pale); }
  .entrance:nth-child(n + 3) { border-top: 1px solid var(--pale); }
  .entrance:nth-child(n + 3)::before { display: none; }
}

@media (max-width: 380px) {
  .cover { width: calc(100% - 24px); }
  .entrance span { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
  }
}

/* tools / 道具目録 */
.catalog-page {
  min-height: 100svh;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;
}

.catalog-header,
.catalog-main,
.catalog-footer {
  width: min(1040px, calc(100% - 48px));
  margin-inline: auto;
}

.catalog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 32px 0 22px;
  border-bottom: 1px solid var(--ink);
}

.catalog-home {
  display: block;
  width: 190px;
  line-height: 0;
}

.catalog-home img { width: 100%; height: auto; }

.back-link,
.catalog-index,
.tool-number,
.tool-links,
.catalog-footer {
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
}

.back-link {
  margin-top: 8px;
  color: var(--ink);
  font-size: .9rem;
  letter-spacing: .08em;
  text-decoration: none;
}

.back-link::before { content: "← "; color: var(--cyan); }
.back-link:hover,
.back-link:focus-visible { color: var(--cyan); outline: none; }

.catalog-intro {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(280px, 1.25fr);
  gap: clamp(48px, 9vw, 116px);
  align-items: end;
  padding: clamp(68px, 10vw, 118px) 0 clamp(88px, 13vw, 150px);
}

.catalog-title {
  margin: 0;
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .08em;
}

.catalog-title span {
  display: block;
  margin: 14px 0 0 6px;
  color: var(--cyan);
  font-size: clamp(.72rem, 1.4vw, .95rem);
  letter-spacing: .24em;
  transform: rotate(-.5deg);
}

.catalog-lead {
  max-width: 34em;
  margin: 0 0 4px;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 2;
  letter-spacing: .045em;
}

.catalog-index {
  display: flex;
  gap: 20px;
  margin: 0 0 28px 12%;
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .12em;
}

.catalog-index::before {
  width: clamp(42px, 8vw, 96px);
  height: 1px;
  margin-top: .65em;
  content: "";
  background: var(--cyan);
  transform: rotate(-1deg);
}

.tool-list { padding-bottom: 100px; }

.tool-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1.12fr) minmax(270px, .88fr);
  gap: clamp(42px, 8vw, 100px);
  align-items: center;
  padding: clamp(54px, 8vw, 92px) 0;
  border-top: 1px solid var(--pale);
}

.tool-entry:nth-child(even) {
  grid-template-columns: minmax(270px, .88fr) minmax(260px, 1.12fr);
}

.tool-entry:nth-child(even) .tool-visual { order: 2; }
.tool-entry:nth-child(even) .tool-copy { order: 1; padding-left: 8%; }
.tool-entry:nth-child(3) .tool-copy { transform: translateY(13px); }

.tool-visual {
  position: relative;
  margin: 0;
}

.tool-visual::after {
  position: absolute;
  right: -13px;
  bottom: -12px;
  width: 46%;
  height: 42%;
  content: "";
  border-right: 1px solid var(--cyan);
  border-bottom: 1px solid var(--cyan);
  pointer-events: none;
}

.tool-entry:nth-child(even) .tool-visual::after {
  right: auto;
  left: -13px;
  border-right: 0;
  border-left: 1px solid var(--cyan);
}

.tool-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
}

.tool-entry:nth-child(1) .tool-visual { transform: rotate(-.28deg); }
.tool-entry:nth-child(2) .tool-visual { transform: rotate(.34deg); }
.tool-entry:nth-child(3) .tool-visual { transform: rotate(-.18deg); }
.tool-entry:nth-child(4) .tool-visual { transform: rotate(.24deg); }

.tool-number {
  display: inline-block;
  margin-bottom: 13px;
  color: var(--cyan);
  font-size: .82rem;
  letter-spacing: .12em;
}

.tool-name {
  margin: 0;
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: clamp(1.7rem, 3.6vw, 2.65rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .045em;
}

.tool-description {
  max-width: 31em;
  margin: 22px 0 30px;
  color: #43505a;
  font-size: .98rem;
  line-height: 1.95;
  letter-spacing: .04em;
}

.tool-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.tool-links a {
  position: relative;
  padding: 5px 1px 7px;
  color: var(--ink);
  font-size: .92rem;
  letter-spacing: .08em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.tool-links a::after { content: " ↗"; color: var(--cyan); }
.tool-links a:hover,
.tool-links a:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }

.tool-links .tool-note {
  margin-left: 8px;
  color: var(--muted);
  border-bottom-style: dotted;
}

.catalog-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 25px 0 42px;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .08em;
  border-top: 1px solid var(--ink);
}

.catalog-footer a { color: inherit; text-decoration: none; }
.catalog-footer a:hover,
.catalog-footer a:focus-visible { color: var(--cyan); outline: none; }

.catalog-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 15px;
}

.catalog-footer__nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 1px solid var(--cyan);
}

.catalog-footer__nav > span { color: #a5aaae; }
.catalog-footer__nav small {
  margin-left: 3px;
  font-size: .55rem;
  letter-spacing: .05em;
}

.tool-greeter {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 20;
  width: min(680px, 100vw);
  height: min(520px, 82vh);
  pointer-events: none;
  opacity: 0;
  transform: translateX(105%);
  transition: opacity 220ms ease, transform 520ms cubic-bezier(.22, .72, .3, 1);
}

.tool-greeter.is-visible { opacity: 1; transform: translateX(0); }

.tool-greeter-summon {
  position: fixed;
  right: 0;
  bottom: 18px;
  z-index: 19;
  padding: 8px 11px 8px 13px;
  color: var(--muted);
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: .7rem;
  letter-spacing: .08em;
  border: 1px solid var(--ink);
  border-right: 0;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgb(25 190 208 / 25%);
  cursor: pointer;
  transform: rotate(-.4deg);
}

.tool-greeter-summon span { color: var(--cyan); }
.tool-greeter-summon:hover,
.tool-greeter-summon:focus-visible { color: var(--cyan); outline: 1px dotted var(--cyan); }

.tool-greeter__portrait {
  position: absolute;
  right: -15px;
  bottom: -12px;
  width: 330px;
  height: 495px;
  margin: 0;
  overflow: hidden;
  background: transparent;
  transform: rotate(-.3deg);
}

.tool-greeter__portrait::after {
  position: absolute;
  right: 13%;
  bottom: 0;
  left: 9%;
  height: 1px;
  content: "";
  background: var(--cyan);
}

.tool-greeter__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.tool-greeter__copy {
  position: absolute;
  right: 285px;
  bottom: 278px;
  width: 330px;
  padding: 22px 44px 20px 23px;
  pointer-events: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 5px 5px 0 rgb(25 190 208 / 30%);
  transform: rotate(-.35deg);
}

.tool-greeter__copy::after {
  position: absolute;
  right: -19px;
  bottom: 32px;
  width: 34px;
  height: 28px;
  content: "";
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  transform: skewX(-38deg) rotate(-18deg);
}

.tool-greeter__from,
.tool-greeter__next {
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
}

.tool-greeter__from {
  color: var(--cyan);
  font-size: .76rem;
  letter-spacing: .12em;
}

.tool-greeter__message {
  margin: 11px 0 15px;
  color: #43505a;
  font-size: .94rem;
  line-height: 1.8;
  letter-spacing: .035em;
}

.tool-greeter__close {
  position: absolute;
  top: 7px;
  right: 9px;
  z-index: 1;
  width: 31px;
  height: 31px;
  padding: 0;
  color: var(--muted);
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: 1rem;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tool-greeter__close:hover,
.tool-greeter__close:focus-visible { color: var(--cyan); outline: 1px dotted var(--cyan); }

.tool-greeter__next {
  padding: 3px 1px 5px;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .07em;
  border: 0;
  border-bottom: 1px dotted var(--muted);
  background: transparent;
  cursor: pointer;
}

.tool-greeter__next span { color: var(--cyan); }
.tool-greeter__next:hover,
.tool-greeter__next:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }

.tool-greeter.is-arriving .tool-greeter__portrait {
  animation: greeter-arrive 470ms 130ms ease-out both;
}

.tool-greeter.is-arriving .tool-greeter__copy {
  animation: greeter-message 360ms 70ms ease-out both;
}

@keyframes greeter-arrive {
  from { opacity: 0; transform: translateX(58px) rotate(-.3deg); }
  to { opacity: 1; transform: translateX(0) rotate(-.3deg); }
}

@keyframes greeter-message {
  from { opacity: 0; transform: translateX(7px); }
  to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 720px) {
  .catalog-header,
  .catalog-main,
  .catalog-footer { width: min(100% - 30px, 560px); }

  .catalog-header { padding-top: 22px; }
  .catalog-home { width: 155px; }

  .catalog-intro {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 62px 0 84px;
  }

  .catalog-lead { max-width: 26em; }
  .catalog-index { margin-left: 0; }

  .tool-entry,
  .tool-entry:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 58px 0 70px;
  }

  .tool-entry:nth-child(even) .tool-visual,
  .tool-entry:nth-child(even) .tool-copy { order: initial; }
  .tool-entry:nth-child(even) .tool-copy { padding-left: 7%; }
  .tool-entry:nth-child(odd) .tool-copy { padding-right: 5%; }
  .tool-entry:nth-child(3) .tool-copy { transform: none; }

  .tool-description { margin-top: 17px; }
  .catalog-footer { flex-wrap: wrap; gap: 18px; }

  .tool-greeter {
    width: min(590px, 100vw);
    height: min(455px, 76vh);
  }

  .tool-greeter__portrait { width: 280px; height: 420px; }
  .tool-greeter__copy { right: 235px; bottom: 250px; width: 300px; }
}

@media (max-width: 390px) {
  .catalog-home { width: 135px; }
  .back-link { font-size: .8rem; }
  .catalog-title { font-size: 2.55rem; }
  .tool-name { font-size: 1.62rem; }
  .catalog-footer { display: grid; }
  .catalog-footer__nav { justify-content: start; }
  .tool-greeter-summon { bottom: 12px; }
  .tool-greeter {
    width: 100%;
    height: 365px;
  }
  .tool-greeter__portrait {
    right: -28px;
    bottom: -16px;
    width: 220px;
    height: 330px;
  }
  .tool-greeter__copy {
    right: auto;
    bottom: 212px;
    left: 12px;
    width: calc(100% - 78px);
    padding: 17px 37px 15px 17px;
  }
  .tool-greeter__copy::after { right: 23px; bottom: -16px; transform: skewX(-38deg) rotate(72deg); }
  .tool-greeter__message { margin: 8px 0 10px; font-size: .84rem; }
}

/* novels / 小さな本棚 */
.library-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.library-controls .catalog-index { margin-bottom: 0; }

.shelf-lottery {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-right: 3%;
  transform: rotate(.3deg);
}

.shelf-lottery__button {
  padding: 8px 13px 9px;
  color: var(--ink);
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: .82rem;
  letter-spacing: .09em;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgb(25 190 208 / 24%);
  cursor: pointer;
}

.shelf-lottery__button::before { content: "?　"; color: var(--cyan); }
.shelf-lottery__button:hover,
.shelf-lottery__button:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  outline: 1px dotted var(--cyan);
  outline-offset: 4px;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgb(25 190 208 / 24%);
}

.shelf-lottery__result {
  min-width: 13em;
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  letter-spacing: .035em;
}

[data-book] .book-title,
[data-book] .side-book-title {
  width: fit-content;
  transition: background-size 420ms ease;
  background-image: linear-gradient(transparent 74%, rgb(25 190 208 / 25%) 74%);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0 100%;
}

[data-book].is-picked .book-title,
[data-book].is-picked .side-book-title { background-size: 100% 100%; }

.library-profile {
  display: inline-block;
  margin-top: 23px;
  padding-bottom: 4px;
  color: var(--muted);
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-size: .86rem;
  letter-spacing: .08em;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

.library-profile::after { content: " ↗"; color: var(--cyan); }
.library-profile:hover,
.library-profile:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }

.shelf-label,
.book-number,
.book-links,
.side-shelf-heading h2,
.single-shelf-heading h2 {
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
}

.shelf-label {
  margin: 0 0 24px 5%;
  color: var(--muted);
  font-size: .76rem;
  letter-spacing: .15em;
}

.main-shelf {
  position: relative;
  display: grid;
  grid-template-columns: minmax(340px, 1.35fr) minmax(260px, .65fr);
  column-gap: clamp(42px, 7vw, 88px);
  align-items: end;
  padding: 0 0 clamp(90px, 13vw, 150px);
  border-top: 1px solid var(--pale);
}

.main-shelf .shelf-label {
  grid-column: 1 / -1;
  margin-top: 25px;
}

.main-book-visual,
.side-book-visual,
.single-book-visual { margin: 0; }

.main-book-visual {
  position: relative;
  transform: rotate(-.18deg);
}

.main-book-visual::before {
  position: absolute;
  top: -11px;
  left: -10px;
  width: 52px;
  height: 25px;
  content: "";
  background: rgb(25 190 208 / 14%);
  transform: rotate(-4deg);
  z-index: 1;
}

.main-book-visual img,
.side-book-visual img,
.single-book-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
}

.main-book-copy { padding: 0 0 5% 2%; }

.book-number {
  display: inline-block;
  margin-bottom: 13px;
  color: var(--cyan);
  font-size: .78rem;
  letter-spacing: .13em;
}

.book-title,
.side-book-title {
  margin: 0;
  font-family: "DotGothic16", "Hiragino Kaku Gothic ProN", monospace;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .045em;
}

.book-title { font-size: clamp(1.65rem, 3.5vw, 2.65rem); }
.side-book-title { font-size: clamp(1.28rem, 2.4vw, 1.85rem); }

.book-description {
  max-width: 32em;
  margin: 20px 0 28px;
  color: #43505a;
  font-size: .96rem;
  line-height: 1.95;
  letter-spacing: .035em;
}

.book-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.book-links a {
  padding: 4px 1px 6px;
  color: var(--ink);
  font-size: .87rem;
  letter-spacing: .07em;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.book-links a::after { content: " ↗"; color: var(--cyan); }
.book-links a:hover,
.book-links a:focus-visible { color: var(--cyan); border-color: var(--cyan); outline: none; }
.book-links .book-note { color: var(--muted); border-bottom-style: dotted; }

.side-shelf {
  position: relative;
  padding: clamp(72px, 11vw, 120px) 0 clamp(110px, 15vw, 170px);
  border-top: 1px solid var(--ink);
}

.side-shelf::before {
  position: absolute;
  top: 0;
  left: 9%;
  width: 1px;
  height: calc(100% - 82px);
  content: "";
  background: var(--pale);
}

.side-shelf-heading,
.single-shelf-heading {
  position: relative;
  margin-bottom: clamp(55px, 8vw, 92px);
}

.side-shelf-heading { width: max-content; max-width: 80%; padding: 0 25px 0 5%; }

.side-shelf-heading h2,
.single-shelf-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  font-weight: 400;
  letter-spacing: .08em;
}

.side-shelf-heading p,
.single-shelf-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.8;
}

.side-book {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, .92fr) minmax(260px, .7fr);
  gap: clamp(38px, 7vw, 78px);
  align-items: center;
  width: 85%;
  margin-bottom: clamp(68px, 10vw, 112px);
  margin-left: 9%;
  padding-left: 5%;
}

.side-book:last-child { margin-bottom: 0; }
.side-book:nth-of-type(3) { width: 76%; margin-left: 20%; }
.side-book:nth-of-type(4) { width: 82%; margin-left: 13%; }

.side-book::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5%;
  height: 1px;
  content: "";
  background: var(--cyan);
}

.side-book:nth-of-type(2) .side-book-visual { transform: rotate(.22deg); }
.side-book:nth-of-type(3) .side-book-visual { transform: rotate(-.3deg); }
.side-book:nth-of-type(4) .side-book-visual { transform: rotate(.16deg); }

.side-book-copy { background: var(--paper); }
.side-book .book-description { margin: 15px 0 23px; font-size: .92rem; }

.single-shelf {
  padding: clamp(78px, 11vw, 126px) 0 112px;
  border-top: 1px solid var(--ink);
}

.single-shelf-heading { margin-left: 12%; }

.single-book {
  display: grid;
  grid-template-columns: minmax(300px, 1.12fr) minmax(260px, .7fr);
  gap: clamp(44px, 8vw, 96px);
  align-items: center;
  margin-bottom: clamp(100px, 15vw, 168px);
}

.single-book:last-child { margin-bottom: 0; }
.single-book--summer { width: 93%; }
.single-book--summer .single-book-visual { transform: rotate(-.22deg); }

.single-book--sentinel {
  grid-template-columns: minmax(260px, .72fr) minmax(300px, 1.08fr);
  width: 88%;
  margin-left: 12%;
}

.single-book--sentinel .single-book-visual { order: 2; transform: rotate(.18deg); }
.single-book--sentinel .single-book-copy { order: 1; }

.single-book--echo {
  grid-template-columns: minmax(300px, 1.2fr) minmax(250px, .62fr);
  width: 95%;
  margin-left: 3%;
}

.single-book--echo .single-book-visual { transform: rotate(-.12deg); }

@media (max-width: 760px) {
  .library-controls {
    display: grid;
    justify-items: start;
    gap: 31px;
    margin-bottom: 40px;
  }

  .shelf-lottery { margin-left: 8%; }

  .main-shelf {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .main-book-copy { width: 89%; margin-left: 7%; padding: 0; }

  .side-shelf::before { left: 4%; }
  .side-shelf-heading { max-width: 94%; padding-left: 0; }

  .side-book,
  .side-book:nth-of-type(3),
  .side-book:nth-of-type(4) {
    grid-template-columns: 1fr;
    gap: 32px;
    width: 92%;
    margin-left: 4%;
    padding-left: 7%;
  }

  .side-book::before { top: 26%; width: 7%; }
  .side-book-copy { width: 94%; }

  .single-shelf-heading { margin-left: 5%; }

  .single-book,
  .single-book--sentinel,
  .single-book--echo {
    grid-template-columns: 1fr;
    gap: 36px;
    width: 94%;
    margin-left: 0;
  }

  .single-book--summer { margin-left: 5%; }
  .single-book--sentinel { margin-left: 0; }
  .single-book--echo { margin-left: 4%; }
  .single-book--sentinel .single-book-visual,
  .single-book--sentinel .single-book-copy { order: initial; }
  .single-book-copy { width: 91%; margin-left: 5%; }
}

@media (max-width: 390px) {
  .shelf-lottery {
    display: grid;
    gap: 11px;
    margin-left: 3%;
  }

  .shelf-lottery__result { min-width: 0; }
  .library-profile { font-size: .8rem; }
  .shelf-label { margin-left: 0; }
  .book-title { font-size: 1.55rem; }
  .side-book-title { font-size: 1.25rem; }
  .book-description { font-size: .91rem; }
  .book-links { gap: 9px 16px; }
  .book-links a { font-size: .8rem; }
}
