article.reading {
  width: min(64rem, calc(100% - 2rem));
}

.disclosure {
  margin: 0.9rem 0 0;
  color: #5e584f;
  font-size: 0.82rem;
  line-height: 1.45;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: end;
  margin-top: 1.15rem;
}

.tools label {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  color: #5e584f;
  font-size: 0.82rem;
}

.tools label[hidden] {
  display: none;
}

.tools input,
.tools select {
  min-width: min(18rem, 100%);
  padding: 0.55rem 0.9rem;
  border: 1px solid #e3dbd0;
  border-radius: 999px;
  background: #fffdf9;
  color: #1c1915;
  font: inherit;
  font-size: 1rem;
}

.books {
  width: 100%;
  margin-top: 1.15rem;
  border-collapse: collapse;
}

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

.books th {
  padding: 0.35rem 0.8rem 0.5rem 0;
  border-bottom: 1px solid rgba(70, 54, 36, 0.15);
  color: #5e584f;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
}

.books td {
  padding: 0.78rem 0.8rem 0.78rem 0;
  border-bottom: 1px solid rgba(70, 54, 36, 0.1);
  vertical-align: baseline;
}

.books tr.empty td {
  padding-top: 1.05rem;
  border-bottom: 0;
  color: #5e584f;
}

button.book-title {
  padding: 0;
  border: 0;
  background: none;
  color: #243027;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  cursor: pointer;
}

.tools input:focus-visible,
.tools select:focus-visible,
button.book-title:focus-visible,
dialog.tile a:focus-visible,
dialog.tile button:focus-visible {
  outline: 2px solid #243027;
  outline-offset: 3px;
}

dialog.tile {
  width: min(40rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem - env(safe-area-inset-bottom, 0px));
  overflow: auto;
  padding: 1.35rem 1.45rem 1.5rem;
  border: 1px solid rgba(70, 54, 36, 0.15);
  border-radius: 18px;
  background: #fffdf9;
  color: #1c1915;
}

dialog.tile::backdrop {
  background: rgba(28, 25, 21, 0.35);
}

.tile-top {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

dialog.tile h2 {
  margin: 0.2rem 0 0;
  color: #1c1915;
  font-size: 1.35rem;
}

dialog.tile .by {
  margin: 0.3rem 0 0;
  color: #5e584f;
}

dialog.tile .note {
  margin-top: 0.9rem;
}

.shops {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.shops a,
.tile-top button {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border: 1px solid #e3dbd0;
  border-radius: 999px;
  background: #fffdf9;
  color: #243027;
  font: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}

.shops a:hover,
.tile-top button:hover {
  border-color: #243027;
}

.share-note {
  margin: 0.7rem 0 0;
  color: #5e584f;
  font-size: 0.82rem;
}

.site-foot {
  width: min(64rem, calc(100% - 2rem));
  margin: 0 auto 1.2rem;
  color: #5e584f;
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

.site-foot p { margin: 0; }

@media (max-width: 640px) {
  article.reading,
  .site-foot {
    width: min(64rem, calc(100% - 1.2rem));
  }

  .tools input,
  .tools select {
    min-width: 0;
    width: 100%;
  }

  .tools label { width: 100%; }
}
