@charset "UTF-8";

/* 雲亭の書架 / 色と文字の設定はここで編集します。 */
:root {
  --cc-crimson: #A92D3E;
  --cc-green: #31574D;
  --cc-white: #FAF9F6;
  --cc-ink: #292D30;
  --ink: var(--cc-ink);
  --red: var(--cc-crimson);
  --paper: var(--cc-white);
  --muted: #404641;
  --line: #BBC4BC;
  --blue: #EEF2EC;
  --sans: "BIZ UDPGothic", "Meiryo", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --home-body-weight: 400;
  --home-heading-weight: 700;
  --home-label-weight: 700;
  --home-width: 1160px;
}
html { scroll-behavior: auto; }
body { background: var(--cc-white); font-family: var(--sans); }

/* 共通ヘッダー。深緑を使った細めの帯です。 */
.masthead { min-height: 78px; padding: 13px max(5%, calc((100% - var(--home-width)) / 2)); gap: 30px; background: var(--cc-green); color: var(--cc-white); border: 0; }
.brand { gap: 17px; flex-shrink: 0; }
.brand-name { font: 700 2.1rem/1.25 var(--serif); letter-spacing: .15em; }
.brand-sub { font-size: .8125rem; color: var(--cc-white); line-height: 1.6; letter-spacing: .06em; }
nav { gap: 25px; }
nav a { font-size: .9375rem; font-weight: 700; padding: 10px 0; }
nav a[aria-current="page"] { border-color: var(--cc-white); }
.edition { color: var(--cc-white); border-color: #92AAA0; font-size: .8125rem; white-space: nowrap; }
.masthead a:focus-visible { outline-color: var(--cc-white); }
footer { align-items: center; padding: 30px max(5%, calc((100% - var(--home-width)) / 2)); font-size: .9375rem; color: var(--cc-green); }
.footer-identity { display: flex; align-items: center; gap: 21px; }
.footer-name { font: 700 2rem/1.4 var(--serif); letter-spacing: .15em; color: var(--cc-crimson); }
.footer-identity > span:last-child { font-size: .875rem; line-height: 1.75; }
.footer-motto { font: 700 .9375rem/1.7 var(--serif); }

/* TOP全体 */
body.is-home main { max-width: calc(var(--home-width) + 10%); padding: 0 5% 60px; }
.home-page { font-weight: var(--home-body-weight); font-size: 1.0625rem; }
.home-page h1, .home-page h2, .home-page h3 { font-weight: var(--home-heading-weight); }
.home-page h2 { font-size: 2.1rem; line-height: 1.6; }
.home-page a:focus-visible, .home-page input:focus-visible, .home-page summary:focus-visible, footer a:focus-visible, .skip:focus-visible { outline-color: var(--cc-green); }
.home-kicker { color: var(--cc-green); font-size: .875rem; font-weight: var(--home-label-weight); line-height: 1.8; letter-spacing: .09em; margin-bottom: 16px; }
.nowrap { white-space: nowrap; }

/* 紹介と年代図。大きな写真より、作品を選ぶ入口を優先します。 */
.library-intro { display: grid; grid-template-columns: 1.15fr 1fr; gap: 66px; align-items: center; padding: 62px 0 58px; }
.intro-copy { min-width: 0; }
.intro-copy .home-kicker > span[aria-hidden] { padding: 0 6px; color: #7B827B; }
.intro-copy h1 { font-size: clamp(2.3rem, 3.65vw, 3.25rem); line-height: 1.6; letter-spacing: .035em; margin-bottom: 25px; }
.intro-copy h1 > span { color: var(--cc-crimson); }
.intro-description { font-size: 1.125rem; line-height: 2; margin-bottom: 28px; }
.intro-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 13px 23px; min-height: 52px; font-size: 1rem; font-weight: 700; color: var(--cc-white); background: var(--cc-crimson); border: 1px solid var(--cc-crimson); border-radius: 28px; text-decoration: none; }
.home-button:hover { background: #882232; }
.home-text-link { display: inline-flex; align-items: center; gap: 15px; min-height: 44px; font-size: .9375rem; font-weight: 700; text-decoration-thickness: 1px; }
.home-text-link:hover { color: var(--cc-crimson); }
.intro-note { margin: 20px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.85; }
.era-map { border-left: 1px solid var(--line); padding-left: 42px; min-width: 0; }
.era-heading { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.era-heading .home-kicker { margin: 0 0 8px; }
.era-heading > span { color: var(--muted); font-size: .8125rem; }
.era-map h2 { font-size: 1.5rem; margin-bottom: 23px; }
.era-list { list-style: none; margin: 0 0 27px; padding-left: 22px; border-left: 1px solid var(--line); }
.era-list li { position: relative; padding: 0 0 17px 4px; }
.era-list li:last-child { padding-bottom: 0; }
.era-list li::before { content: ""; position: absolute; width: 8px; height: 8px; background: var(--cc-crimson); border-radius: 50%; top: 8px; left: -26px; }
.era-date { display: block; font-size: .875rem; color: var(--muted); line-height: 1.6; margin-bottom: 2px; }
.era-date span { padding-left: 8px; color: var(--cc-green); }
.era-list a { font: 700 1.125rem/1.7 var(--serif); text-decoration: none; }
.era-list a:hover { text-decoration: underline; color: var(--cc-crimson); }
.era-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-top: 17px; }
.era-bottom > span { color: var(--muted); font-size: .875rem; }
.era-bottom strong { padding: 0 6px; font: 700 1.75rem/1.4 var(--serif); color: var(--cc-ink); }

/* 書架。PCでは4冊、スマートフォンでは2冊ずつ並べます。 */
.book-collection { border-top: 1px solid var(--line); scroll-margin-top: 24px; padding-top: 39px; }
.collection-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.collection-heading .home-kicker { margin-bottom: 5px; }
.collection-heading h2 { margin: 0; }
.collection-heading > p { color: var(--muted); font-size: 1rem; line-height: 1.85; margin: 0; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0 30px; }
.catalog-toolbar .search-row { margin: 0; gap: 15px; flex: 1; }
.search-row label { font-size: .9375rem; font-weight: 700; white-space: nowrap; }
.catalog-toolbar input { width: min(370px, 100%); min-width: 0; min-height: 48px; padding: 10px 14px; font-size: 1rem; border-color: #89968C; background: white; }
.catalog-toolbar input::placeholder { color: #535C55; opacity: 1; }
.catalog-count { margin: 0; font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 32px; }
.book-card { min-width: 0; }
.book-link { display: block; text-decoration: none; }
.book-image { position: relative; aspect-ratio: 2 / 3; margin: 0 0 19px; background: #E9E5DB; border: 1px solid #D3CDC0; border-radius: 2px; box-shadow: 0 5px 13px rgb(41 45 48 / 12%); overflow: hidden; }
.book-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 撮影時の余白を除いて書影を表示。画像ファイルは未加工です。 */
.book-image img[data-book-cover="shinkokin"] { position: absolute; width: 220%; max-width: none; height: auto; left: -57%; top: -23%; }
.book-image img[data-book-cover="noin"] { position: absolute; width: 250%; max-width: none; height: auto; left: -31%; top: -1%; }
.book-date { color: var(--cc-green); font-size: .875rem; font-weight: 700; line-height: 1.65; margin-bottom: 8px; }
.book-date > span { color: var(--muted); font-weight: 400; margin-left: 7px; }
.book-card h3 { font-size: 1.5rem; letter-spacing: .035em; line-height: 1.65; margin-bottom: 7px; }
.book-author { font-size: .9375rem; line-height: 1.85; color: var(--muted); margin-bottom: 11px; }
.book-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; font-size: .875rem; line-height: 1.7; color: var(--muted); }
.selection-tag { border: 1px solid #BB8B92; color: var(--cc-crimson); background: #FCF4F4; font-size: .8125rem; font-weight: 700; padding: 1px 7px; border-radius: 12px; }
.book-link:hover h3 { color: var(--cc-crimson); text-decoration: underline; }
.book-link:hover .book-image { border-color: var(--cc-crimson); }
.book-grid > .empty { grid-column: 1 / -1; margin: 0; }
.collection-notes { font-size: .875rem; color: var(--muted); line-height: 1.85; margin-top: 34px; }
.collection-notes > p { margin-bottom: 10px; }
.collection-notes summary { width: fit-content; cursor: pointer; text-decoration: underline; }
.collection-notes details p { max-width: 60em; margin-top: 12px; }

/* 定家葛と、雲亭での読書を紹介する小さな欄 */
.library-about { display: grid; grid-template-columns: 245px 1fr; align-items: center; gap: 46px; margin-top: 55px; padding: 34px; background: #EDF1EB; border-top: 1px solid var(--line); }
.about-botanical { margin: 0; }
.about-botanical img { display: block; width: 100%; height: 210px; object-fit: cover; object-position: 55% 50%; }
.about-botanical figcaption { font-size: .8125rem; color: var(--cc-green); margin-top: 9px; }
.about-reading-copy .home-kicker { margin-bottom: 9px; }
.about-reading-copy h2 { font-size: 1.75rem; margin-bottom: 14px; }
.about-reading-copy > p:not(.home-kicker) { font-size: 1.0625rem; line-height: 1.95; margin-bottom: 12px; }
.library-resources { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 30px; }
.library-resources > a { padding: 20px 0; border-top: 1px solid var(--line); text-decoration: none; }
.resource-label { display: block; color: var(--muted); font-size: .875rem; margin-bottom: 6px; }
.library-resources > a > span:last-child { color: var(--cc-green); font-size: 1.0625rem; font-weight: 700; }
.library-resources > a:hover > span:last-child { text-decoration: underline; }
.file-type { display: inline-block; font-size: .75rem; border: 1px solid #90A99E; padding: 1px 5px; margin: 0 9px; vertical-align: middle; }

/* タブレット */
@media (max-width: 1100px) {
  .edition { display: none; }
  .masthead { gap: 22px; }
  nav { gap: 20px; }
  .library-intro { gap: 36px; grid-template-columns: 1.1fr 1fr; }
  .intro-copy h1 { font-size: 2.6rem; }
  .intro-description { font-size: 1.0625rem; }
  .desktop-break { display: none; }
  .era-map { padding-left: 28px; }
  .era-map h2 { font-size: 1.25rem; }
  .book-grid { gap: 42px 24px; }
  .book-card h3 { font-size: 1.25rem; }
  .book-date > span { display: block; margin-left: 0; }
  .library-about { grid-template-columns: 220px 1fr; gap: 30px; padding: 28px; }
}
@media (max-width: 850px) {
  .library-intro { grid-template-columns: 1fr; gap: 35px; padding: 38px 0 40px; }
  .intro-copy h1 { font-size: 2.7rem; }
  .era-map { border-left: 0; border-top: 1px solid var(--line); padding: 27px 0 0; }
  .era-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 30px; }
  .era-list li { padding-bottom: 0; }
  .era-bottom { margin-top: 22px; }
  .collection-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 35px 28px; }
  .book-card h3 { font-size: 1.5rem; }
  .book-date > span { display: inline; margin-left: 7px; }
  .library-about { grid-template-columns: 180px 1fr; padding: 25px; }
  .about-reading-copy h2 { font-size: 1.5rem; }
  .about-reading-copy br { display: none; }
}
/* スマートフォン。文字を小さくし過ぎず、書架は2列を維持します。 */
@media (max-width: 700px) {
  .masthead { padding: 15px 6% 10px; flex-wrap: wrap; gap: 9px; }
  .brand-name { font-size: 1.9rem; }
  .brand-sub { font-size: .8125rem; }
  nav { margin: 0; width: 100%; gap: 8px 12px; }
  nav a { font-size: .9375rem; }
  body.is-home main { max-width: none; padding: 0 6% 35px; }
  .home-kicker { font-size: .8125rem; letter-spacing: .035em; }
  .intro-copy h1 { font-size: clamp(1.9rem, 7.5vw, 2.5rem); line-height: 1.65; margin-bottom: 20px; }
  .intro-description { font-size: 1.0625rem; line-height: 1.95; }
  .intro-actions { gap: 12px; }
  .intro-note { font-size: .875rem; }
  .era-map h2 { font-size: 1.375rem; }
  .era-list { display: block; }
  .era-list li { padding-bottom: 14px; }
  .era-list a { font-size: 1.0625rem; }
  .era-list li:last-child { padding-bottom: 0; }
  .book-collection { padding-top: 28px; }
  .collection-heading { padding-bottom: 18px; }
  .collection-heading h2 { font-size: 1.875rem; }
  .collection-heading > p { font-size: .9375rem; }
  .catalog-toolbar { align-items: flex-end; gap: 12px; padding: 18px 0 25px; }
  .catalog-toolbar .search-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .catalog-count { font-size: .875rem; padding-bottom: 10px; }
  .search-row label { font-size: .875rem; }
  .catalog-toolbar input { font-size: 1rem; width: 100%; }
  .book-grid { gap: 32px 18px; }
  .book-image { margin-bottom: 14px; }
  .book-date { font-size: .875rem; margin-bottom: 6px; }
  .book-date > span { display: block; margin-left: 0; }
  .book-card h3 { font-size: 1.1875rem; line-height: 1.6; }
  .book-author { font-size: .875rem; }
  .book-meta { font-size: .875rem; gap: 6px; }
  .selection-tag { font-size: .8125rem; padding: 1px 5px; }
  .collection-notes { font-size: .875rem; margin-top: 28px; }
  .library-about { grid-template-columns: 1fr; gap: 24px; padding: 23px; margin-top: 35px; }
  .about-botanical img { height: 180px; }
  .about-reading-copy h2 { font-size: 1.5rem; }
  .library-resources { grid-template-columns: 1fr; gap: 0; margin-top: 20px; }
  footer { padding: 25px 6%; gap: 24px; }
  .footer-identity { width: 100%; }
}
@media (max-width: 360px) {
  .book-grid { gap: 28px 14px; }
  .book-card h3 { font-size: 1.0625rem; }
  .home-button { padding: 12px 18px; }
}
@media print {
  .masthead nav, .intro-actions, .catalog-toolbar, .library-resources { display: none; }
  .masthead { color: var(--cc-ink); background: white; }
  .brand-sub { color: var(--cc-ink); }
  .library-intro { padding: 20px 0; }
  .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .book-card { break-inside: avoid; }
}

/* つながりの説明。理由・本文の手がかり・読みどころを順に示します。 */
.connection-jump { margin: -12px 0 22px; }
.connection-jump button { padding: 5px 0; background: transparent; border: 0; border-bottom: 1px solid currentColor; color: var(--cc-green); font-size: 1rem; font-weight: 700; }
.connections { margin: 38px 0 25px; }
.connections > .eyebrow { margin-bottom: 7px; }
.connections > h2 { font-size: 1.65rem; font-weight: 700; line-height: 1.65; margin-bottom: 20px; scroll-margin-top: 24px; }
.connection-card { border: 1px solid var(--line); border-top: 3px solid var(--cc-green); background: white; padding: 28px; margin: 0 0 24px; }
.connection-card > h3 { font-size: 1.4rem; font-weight: 700; line-height: 1.65; margin: 15px 0; }
.connection-card .tag { font-size: .875rem; }
.connection-summary { font-size: 1rem; line-height: 1.95; }
.connection-label { margin: 23px 0 10px; color: var(--cc-green); font-size: .9375rem; font-weight: 700; }
.connection-label > span { display: block; color: var(--muted); font-size: .875rem; font-weight: 400; }
.connection-excerpts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.connection-excerpts figure { min-width: 0; margin: 0; padding: 20px; background: #F1F4EF; border-left: 2px solid var(--cc-green); }
.connection-excerpts figcaption { font-size: .875rem; line-height: 1.8; }
.connection-excerpts figcaption > span { display: block; color: var(--muted); }
.connection-excerpts figcaption > b { display: block; margin-top: 5px; font-size: 1rem; }
.connection-excerpts blockquote { margin: 15px 0; font: 1.125rem/2 var(--serif); overflow-wrap: anywhere; }
.connection-excerpts mark { background: #F5E1BD; color: #292D30; font-weight: 700; text-decoration: underline; text-decoration-color: var(--cc-crimson); text-underline-offset: 5px; }
.connection-excerpts figure > p { font-size: .9375rem; line-height: 1.85; margin: 0; }
.connection-insight { font-size: 1rem; line-height: 1.95; margin: 22px 0 14px; }
.connection-insight > b { display: block; color: var(--cc-green); margin-bottom: 5px; }
.connection-qualification { font-size: .9375rem; color: var(--muted); line-height: 1.85; }
.connection-details { border-top: 1px solid var(--line); padding-top: 16px; font-size: .9375rem; line-height: 1.9; }
.connection-details summary { cursor: pointer; font-weight: 700; color: var(--cc-green); }
.connection-details > p:first-of-type { margin-top: 16px; }
.connection-details ul { padding-left: 1.4em; }
.connection-details li { margin: 8px 0; overflow-wrap: anywhere; }
.connection-details .connection-review { font-size: .875rem; color: var(--muted); }
.connection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 22px; margin-top: 22px; font-size: .9375rem; }
.connection-actions .action { background: var(--cc-green); border-color: var(--cc-green); font-size: .9375rem; }
.connection-note { padding: 28px; }
.connection-note .connection-excerpts { max-width: 1000px; }
.reading-rail .chapter-index { border-left: 2px solid var(--line); padding-left: 20px; }
.reading-rail .chapter-index h2 { font-weight: 700; }
.reading-rail .chapter-index p { font-size: .9375rem; }
@media(max-width:700px) {
  .connection-card, .connection-note { padding: 20px 16px; }
  .connections > h2 { font-size: 1.45rem; }
  .connection-card > h3 { font-size: 1.25rem; }
  .connection-excerpts { grid-template-columns: 1fr; }
  .connection-excerpts figure { padding: 17px; }
  .connection-excerpts blockquote { font-size: 1.125rem; }
  .connection-actions { align-items: stretch; flex-direction: column; }
  .connection-actions > a { padding: 10px 0; }
  .connection-actions .action { padding: 12px; }
}

/* 0.6.0 通読画面：色・余白・目次の表示をここで編集できます。 */
.chapter-navigation { margin: 18px 0 26px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; padding: 14px 0; border-block: 1px solid var(--line); }
.chapter-navigation a { border: 0; min-height: 60px; padding: 8px 12px; display: flex; flex-direction: column; justify-content: center; text-decoration: none; font-size: 1rem; line-height: 1.65; }
.chapter-navigation a:hover { background: #e9eeeb; }
.chapter-navigation a span { font-size: .875rem; color: var(--muted); }
.chapter-navigation .chapter-next { background: #31574D; color: #fff; text-align: right; }
.chapter-navigation .chapter-next span { color: #fff; }
.chapter-navigation .chapter-next:hover { background: #234238; }
.chapter-navigation .chapter-toc-link { text-align: center; min-width: 66px; }
.chapter-boundary { align-self: center; font-size: .875rem; color: var(--muted); padding: 8px; }
.chapter-boundary:last-child { text-align: right; }
.book-finish { background: #e9eeeb; padding: 30px; margin-top: 28px; border-left: 4px solid #31574D; }
.book-finish h2 { font-size: 1.6rem; }
.book-finish p:last-child { margin: 0; }
.return-panel,.home-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; background: #f5e8e9; border-left: 4px solid #A92D3E; padding: 18px 22px; margin: 0 0 30px; font-size: 1rem; }
.return-panel > span,.home-resume > span { font-weight: 700; }
.return-panel a,.home-resume a { min-height: 36px; display: inline-flex; align-items: center; }
.book-description { max-width: 48em; }
.book-start { margin: 28px 0; padding: 26px; background: #e9eeeb; border-top: 3px solid #31574D; }
.book-start > p { margin: 16px 0; }
.book-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.book-toc { list-style: none; padding: 0; margin: 18px 0 36px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0 24px; }
.book-toc li { min-width: 0; border-bottom: 1px solid var(--line); }
.book-toc a { display: flex; align-items: baseline; gap: 12px; padding: 15px 10px; min-height: 54px; text-decoration: none; line-height: 1.65; }
.book-toc a:hover { background: #e9eeeb; }
.book-toc a[aria-current] { background: #31574D; color: #fff; font-weight: 700; }
.toc-number { font-variant-numeric: tabular-nums; font-size: .875rem; min-width: 24px; }
.reading-rail { min-width: 0; }
.reading-rail .chapter-index { padding: 16px; border: 1px solid var(--line); background: #fff; }
.chapter-index summary { cursor: pointer; font-weight: 700; padding: 5px 0; }
.chapter-index .book-toc { display: block; max-height: 60vh; overflow-y: auto; margin: 15px 0; }
.chapter-index .book-toc a { font-size: .9375rem; }
.reading-save-note { font-size: .875rem; line-height: 1.9; margin-top: 18px; }
.reading-layout { grid-template-columns: minmax(0,1fr) 225px; gap: 26px; }
.text-columns { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.text-block { min-width: 0; }
.text-columns.text-only { display: block; }
@media (max-width: 1100px) { .reading-layout { grid-template-columns: minmax(0,1fr); } .reading-rail { display: block; } .book-toc { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .book-toc { grid-template-columns: minmax(0,1fr); } .chapter-navigation { gap: 3px; } .chapter-navigation a { font-size: .9375rem; padding: 8px; } .chapter-boundary { font-size: .8125rem; } .return-panel,.home-resume { padding: 16px; gap: 8px; } .return-panel > span,.home-resume > span { width: 100%; } .book-start,.book-finish { padding: 20px; } .text-columns { display: block; } .text-block+.text-block { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 26px; margin-top: 26px; } }
