:root {
  --ink: #111;
  --muted: #555;
  --rule: #d4d4d0;
  --band: #f3f3f1;
  --body: 'Arimo', 'Noto Sans JP', Arial, 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  --head: 'Inter', 'Arimo', 'Noto Sans JP', sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  font-weight: 400;
  line-height: 2;
  font-feature-settings: 'palt';
  overflow-wrap: anywhere;
}

h1, h2, h3, .brand {
  font-family: var(--head);
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 640px; }

.small { font-size: 14px; line-height: 1.8; color: var(--muted); }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand { font-size: 20px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav { display: flex; flex-wrap: wrap; column-gap: 20px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-size: 15px; }
.nav a:hover { text-decoration: underline; }

/* セクション */
.section { padding: clamp(40px, 7vw, 72px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section h2 { font-size: clamp(20px, 2.4vw, 24px); margin-bottom: clamp(20px, 3vw, 32px); }
.band { background: var(--band); }
.section.band, .band + .section { border-top: 0; }

/* 刊行物 */
.books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px clamp(16px, 2.5vw, 32px);
}
@media (min-width: 700px) { .books { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .books { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.book { display: flex; flex-direction: column; min-width: 0; }
.cover {
  aspect-ratio: 5 / 8;
  background: var(--band);
  border: 1px solid var(--rule);
  margin-bottom: 14px;
  overflow: hidden;
}
.cover img { width: 100%; height: 100%; object-fit: contain; }
.cover-blank { display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-family: var(--head); font-weight: 500; line-height: 1.6; }
.book .series { font-size: 14px; line-height: 1.6; color: var(--muted); }
.book h3 { font-size: 17px; margin: 2px 0 6px; }
.book .summary { line-height: 1.8; }
.book .format { margin-top: 4px; }
.status { margin-top: 12px; font-family: var(--head); font-weight: 500; }
.buy { margin-top: 12px; border-top: 1px solid var(--rule); }
.buy a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 8px;
  min-height: 44px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
  text-decoration: none;
}
.buy a:hover .fmt { text-decoration: underline; }
.buy .price { font-variant-numeric: tabular-nums; }
.buy-label { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 12px; }
.tm { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.books-note { margin-top: 40px; }

/* 音声の帯 */
.audio-rows { border-top: 1px solid var(--rule); }
.audio-rows a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 16px;
  min-height: 56px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.audio-rows a:hover .t { text-decoration: underline; }
.audio-rows .t { font-family: var(--head); font-weight: 500; }
.audio-rows .m { color: var(--muted); font-size: 15px; }

/* 正誤表と運営者 */
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 768px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 80px); } }
.pair h2 { margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 20px; }
.facts dt { color: var(--muted); }

/* フッター */
.site-footer { border-top: 1px solid var(--rule); padding: 28px 0 40px; }
.site-footer p + p { margin-top: 8px; }

/* 音声サイト */
.audio-head { display: flex; gap: 18px; align-items: flex-start; padding: 28px 0 24px; }
.audio-head .thumb { flex: 0 0 auto; width: clamp(80px, 22vw, 112px); aspect-ratio: 5 / 8; background: var(--band); border: 1px solid var(--rule); overflow: hidden; }
.audio-head .thumb img { width: 100%; height: 100%; object-fit: contain; }
.audio-head .kicker { font-size: 14px; line-height: 1.6; color: var(--muted); }
.audio-head h1 { font-size: clamp(26px, 6vw, 32px); margin: 2px 0 6px; }
.audio-head .sub { line-height: 1.7; }

.meta { padding: 16px 0; border-top: 1px solid var(--rule); }
.zips { display: grid; gap: 10px; }
.btn {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--head);
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.btn:hover { background: #333; }
.btn .size { font-family: var(--body); font-weight: 400; opacity: 0.85; }
.note { margin-top: 12px; }

.chapters { margin-top: 32px; border-top: 1px solid var(--ink); }
.chapter { padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.chapter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 12px; }
.chapter-name { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; min-width: 0; }
.chapter-name .no { font-family: var(--head); font-weight: 500; }
.chapter-name .range { color: var(--muted); font-variant-numeric: tabular-nums; }
.save { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; column-gap: 6px; text-decoration: none; }
.save .v { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.save:hover .v { text-decoration-thickness: 2px; }
.save .size { color: var(--muted); font-size: 14px; }
.chapter audio { display: block; width: 100%; height: 44px; margin-top: 6px; }

.book-list { border-top: 1px solid var(--rule); }
.book-list a { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; min-height: 44px; }
.book-list a:hover .t { text-decoration: underline; }
.book-list .thumb { flex: 0 0 auto; width: 64px; aspect-ratio: 5 / 8; background: var(--band); border: 1px solid var(--rule); overflow: hidden; }
.book-list .thumb img { width: 100%; height: 100%; object-fit: contain; }
.book-list .t { display: block; font-family: var(--head); font-weight: 500; font-size: 18px; line-height: 1.5; }
.book-list .m { display: block; color: var(--muted); font-size: 15px; line-height: 1.6; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: 24px; }
