@media (max-width: 900px) {
  header {
    padding-inline: 12px;
    gap: 12px;
  }
  nav {
    gap: 15px;
  }
  nav button {
    font-size: 12px;
  }
  .brand strong {
    font-size: 17px;
  }
  .tools {
    gap: 3px;
  }
}
@media (max-width: 680px) {
  header {
    gap: 7px;
    padding-inline: 8px;
    height: 52px;
  }
  .brand strong {
    display: none;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  nav {
    flex: 1;
    gap: 14px;
  }
  nav button {
    font-size: 12px;
    letter-spacing: 0;
  }
  .tools button {
    min-width: 23px;
  }
  .tools #clock {
    padding-inline: 3px;
  }
  .tools b {
    font-size: 12px;
  }
  .tools svg {
    width: 15px;
    height: 15px;
  }
  #drawer {
    left: 6px;
    right: 6px;
    top: auto;
    bottom: max(6px, env(safe-area-inset-bottom));
    height: min(48dvh, 440px);
    width: auto;
    transform: translateY(calc(100% + 12px));
  }
  #drawer[data-place="journal"][data-book-view="novel"] {
    height: 65dvh;
  }
  .drawer-head {
    padding: 10px 15px 8px;
  }
  .drawer-head h1 {
    font-size: 20px;
    margin: 1px 0;
  }
  .drawer-body {
    padding: 11px 15px 18px;
  }
  .drawer-head small {
    font-size: 9px;
  }
  .readtools {
    top: -11px;
  }
  #enter {
    font-size: 14px;
    bottom: 10vh;
  }
  .product {
    padding: 6px 0;
  }
  .product img {
    width: 48px;
    height: 42px;
  }
  #cakeArt {
    max-height: 100px;
  }
  .clock-tool small {
    right: -28px;
  }
  .night .brand img {
    outline: 1px solid #bda276;
  }
  .tools #mode {
    font-size: 10px;
    padding-inline: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.shelf-choice {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px 4px;
}
.shelf-choice strong {
  display: block;
  font: 600 18px/1.6 var(--serif);
}
.shelf-choice small,
.leaf-meta {
  color: var(--muted);
  font-size: 12px;
}
.shelf-choice > span:last-child {
  margin-left: auto;
  color: var(--green);
}
.bound-spine {
  width: 18px;
  margin-inline: 7px;
  height: 45px;
  background: var(--binding);
  border-radius: 3px 1px 1px 3px;
  border-inline-start: 3px double #eadcbb96;
  position: relative;
  box-shadow: 2px 1px 0 #bfb79e;
}
.bound-spine:after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 8px;
  height: 25px;
  border-block: 1px solid #f2e3c199;
}
.shelf-choice[data-book="novel"] .bound-spine {
  width: 32px;
  margin-inline: 0;
  border: 0;
  background: url("assets/cover.webp") center / contain no-repeat;
}
.shelf-choice[data-book="novel"] .bound-spine::after {
  content: none;
}
.book-return {
  margin: 0 0 12px;
}
#mapPage {
  margin: 0;
}
#mapPage img {
  width: 100%;
  display: block;
}
#mapPage figcaption {
  font: 14px/1.9 var(--serif);
  margin-top: 12px;
}
#notesPage {
  border-top: 1px solid var(--line);
  padding: 12px 4px;
  font: 17px/1.95 var(--serif);
}

#flatNotice {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translateX(-50%);
  width: min(80vw, 370px);
  color: #e7dfca;
  text-align: center;
  font: 16px/1.85 var(--serif);
}
