/* よみかえし文庫 — モック(Claude Design)の配色・書体に準拠 */
:root {
  --bg: #F6F1E7;
  --paper: #FBF8F2;
  --paper-2: #EFE6D6;
  --ink: #2B2622;
  --ink-2: #4A433C;
  --muted: #645B52;
  --line: #DDD3C2;
  --line-2: #EDE5D8;
  --field: #CFC4B1;
  --accent: #7A3B1E;
  --accent-ink: #5A2A14;
  --ok: #1F5E3B;
  --ok-bg: #E3EFE6;
  --warn: #7E4410;
  --warn-bg: #F7E7D3;
  --neutral-bg: #E8E1D4;
  --mincho: 'Zen Old Mincho', serif;
  --sans: 'Noto Sans JP', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { font-family: var(--mincho); line-height: 1.4; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); min-height: 44px; justify-content: center; }
.brand-name { font-family: var(--mincho); font-size: 26px; font-weight: 700; letter-spacing: .08em; line-height: 1.3; }
.brand-sub { font-size: 11px; color: var(--muted); }
.gnav { display: flex; flex-wrap: wrap; gap: 0 4px; font-size: 14px; }
.gnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--ink); text-decoration: none; }
.gnav a:hover { text-decoration: underline; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); margin-top: 24px; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.site-footer p { margin: 0 0 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 8px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px 0 0; }

/* common */
main { padding-bottom: 48px; }
.crumbs { font-size: 13px; color: var(--muted); padding: 20px 0 8px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "／"; margin-right: 4px; }
.crumbs a, .crumbs [aria-current] { display: inline-block; padding: 12px 0; }
.section { padding: 28px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 24px; }
.lead { font-size: 15px; line-height: 1.9; color: var(--ink-2); max-width: 640px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.7; }
.tag { display: inline-block; font-size: 12px; background: var(--paper-2); border-radius: 4px; padding: 4px 10px; color: var(--ink); text-decoration: none; }
a.tag { display: inline-flex; align-items: center; min-height: 32px; }
.stats { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 18px; }
.stat-num { font-family: var(--mincho); font-size: 28px; font-weight: 700; line-height: 1.3; }
.stat-num small { font-size: 14px; color: var(--muted); font-weight: 400; }
.stat-label { font-size: 12px; color: var(--muted); }

/* badges */
.badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 3px 8px; white-space: nowrap; }
.badge-ok { color: var(--ok); background: var(--ok-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-neutral { color: var(--ink); background: var(--neutral-bg); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 6px; font-size: 14px; font-weight: 500; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-light { background: var(--bg); color: var(--ink); font-weight: 700; }
.btn-light:hover { background: #fff; color: var(--ink); }
.ndl { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ndl-note { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.5; }

/* color faces(表紙の代わりの色面) */
.face { position: relative; aspect-ratio: 105 / 148; border-radius: 3px; box-shadow: 0 2px 8px rgba(43,38,34,.2); display: flex; align-items: flex-end; padding: 10px; }
.face-title { font-family: var(--mincho); font-size: 14px; font-weight: 700; color: #fff; line-height: 1.4; word-break: break-word; }
.face .badge { position: absolute; top: 8px; left: 8px; font-size: 11px; padding: 2px 6px; }
.spine { width: 36px; height: 52px; border-radius: 2px; box-shadow: inset -3px 0 0 rgba(0,0,0,.12); flex: none; }
.spine.is-muted { opacity: .35; }

/* card grid */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px 20px; }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); }
.card:hover .card-title { text-decoration: underline; }
.card-title { font-size: 14px; font-weight: 500; line-height: 1.4; }
.card-sub { font-size: 12px; color: var(--muted); }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 22px; text-decoration: none; color: var(--ink); font-size: 14px; }
.chip small { color: var(--muted); font-size: 12px; }
a.chip:hover { border-color: var(--accent); }

/* list tiles(レーベル一覧など) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tile { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 14px; }
.tile small { color: var(--muted); font-size: 13px; white-space: nowrap; }
a.tile:hover { border-color: var(--accent); }
/* 上段: タイトル / 下段: レーベルと冊数 */
.tile-stack { flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; padding: 12px 16px; }
.tile-title { font-weight: 500; line-height: 1.5; }
.tile-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tile-meta small { white-space: normal; }

/* dark band */
.band { background: var(--ink); color: var(--bg); border-radius: 10px; padding: 28px; display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.band h2 { margin: 0 0 8px; font-size: 22px; }
.band p { margin: 0; font-size: 14px; line-height: 1.9; color: var(--line); }
.band > div { flex: 999 1 420px; min-width: 0; }

/* top */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding: 48px 0 32px; }
.hero > div:first-child { flex: 999 1 520px; min-width: 0; }
.hero-kicker { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; color: var(--accent); }
.hero h1 { margin: 0; font-size: 46px; line-height: 1.35; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-actions .btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
.shelf { flex: 1 1 340px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 20px; border-bottom: 6px solid #8C6A4A; min-height: 240px; }
.shelf-book { border-radius: 3px 3px 0 0; box-shadow: inset -4px 0 0 rgba(0,0,0,.12); display: flex; justify-content: center; padding-top: 12px; }
.shelf-book span { writing-mode: vertical-rl; font-family: var(--mincho); font-size: 13px; color: #fff; letter-spacing: .1em; overflow: hidden; max-height: calc(100% - 16px); }

/* series page */
.series-head { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-end; }
.series-head .face { width: 150px; flex: none; }
.series-head h1 { margin: 10px 0 0; font-size: 38px; }
.series-head .tags { display: flex; flex-wrap: wrap; gap: 8px; }
.byline { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }
.layout { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.layout > .primary { flex: 999 1 600px; min-width: 0; }
.layout > aside { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel h2 { margin: 0 0 12px; font-size: 18px; }
.panel ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.panel li a { display: inline-flex; align-items: center; min-height: 44px; }
.band.small { padding: 22px; }
.band.small h2 { font-size: 18px; }
.progress { margin-top: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.progress-num { flex: 1 1 220px; }
.progress-num .stat-num { font-size: 36px; }
.progress-body { flex: 2 1 320px; display: flex; flex-direction: column; gap: 8px; }
.progress-body p { margin: 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.bar { height: 10px; background: #E6DDCC; border-radius: 5px; overflow: hidden; }
.bar > div { height: 100%; background: var(--ok); }
.vols { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.vol { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.vol:last-child { border-bottom: 0; }
.vol-no { width: 40px; font-family: var(--mincho); font-size: 18px; font-weight: 700; text-align: center; flex: none; }
.vol-title { flex: 1 1 220px; min-width: 0; font-size: 15px; }
.vol-title small { display: block; color: var(--muted); font-size: 12px; }
.vol-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* author page */
.author-head { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-end; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.author-head > div:first-child { flex: 999 1 520px; min-width: 0; }
.author-head h1 { margin: 4px 0 0; font-size: 42px; }
.yomi { margin: 0; font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.swatches { flex: 1 1 260px; display: flex; gap: 8px; justify-content: flex-end; }
.swatches div { width: 72px; height: 104px; border-radius: 3px; box-shadow: 0 2px 8px rgba(43,38,34,.2); }
.series-row { display: flex; flex-wrap: wrap; gap: 16px 24px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
a.series-row { text-decoration: none; color: var(--ink); }
a.series-row:hover .series-name { text-decoration: underline; }
.series-row .spines { display: flex; gap: 5px; width: 170px; flex: none; }
.series-row .spines div { width: 30px; height: 44px; border-radius: 2px; box-shadow: inset -3px 0 0 rgba(0,0,0,.12); }
.series-row .info { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.series-name { font-family: var(--mincho); font-size: 20px; font-weight: 700; }
details.more { margin-top: 8px; }
details.more > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--accent); font-size: 14px; }
.series-row details.more { flex-basis: 100%; margin-top: 0; }

/* label page */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--field); background: #fff; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters[hidden] { display: none; }
.booktable { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.booktable th, .booktable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.booktable th { font-size: 12px; color: var(--muted); font-weight: 500; background: var(--paper); }
.booktable td.year { white-space: nowrap; color: var(--muted); }

/* prose(ガイド・about) */
.prose { max-width: 720px; }
.prose h1 { font-size: 36px; margin: 8px 0 16px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose p, .prose li { font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose a { display: inline; }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 32px; }
  .series-head h1, .author-head h1 { font-size: 30px; }
  .series-head .face { width: 110px; }
  .shelf { min-height: 200px; }
  .vol { padding: 12px 14px; }
  .booktable .col-author, .booktable .col-year { display: none; }
}

/* ジャンル(レーベル区分) */
.genre-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.genre-tile { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
a.genre-tile:hover { border-color: var(--accent); }
a.genre-tile:hover .genre-name { text-decoration: underline; }
.genre-sw { display: flex; gap: 4px; margin-bottom: 6px; }
.genre-sw span { width: 28px; height: 40px; border-radius: 2px; box-shadow: inset -3px 0 0 rgba(0,0,0,.12); }
.genre-name { font-family: var(--mincho); font-size: 22px; font-weight: 700; }
.genre-n { font-size: 14px; color: var(--ink-2); }
.theme-audience { font-size: 13px; color: var(--accent); letter-spacing: .04em; }
.genre-tiles.theme-tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }

/* 公開前の調整: タップ領域 44px、スマホで棚がはみ出さないように */
a.tag { min-height: 44px; padding: 0 12px; }
.section-head > a { display: inline-flex; align-items: center; min-height: 44px; }
.shelf { min-width: 0; overflow: hidden; }
@media (max-width: 640px) {
  .shelf { gap: 6px; padding: 16px 8px; }
  .shelf-book:nth-child(n+6) { display: none; }
}
