/*
Theme Name: 水月舎文庫
Theme URI: https://note.com/sayofkt
Author: 水月さよ
Description: 文庫本の佇まいの小説サイト用テーマ。作品は本棚の背表紙として並び、縦書きで読めます。管理画面の「作品」から書き足すと、叢書番号・背表紙・新着が自動で更新されます。
Version: 1.2.2
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: suigetsu-bunko
*/

/* 水月さよ 作品集 — 文庫本の佇まい */
:root {
  --paper: #F3EEE3;      /* 地（目録） */
  --desk: #E9E2D3;       /* 地（閲覧） */
  --page: #F8F4EA;       /* 本文の紙 */
  --cover: #FBF8F1;      /* 表紙 */
  --ink: #2B2723;        /* 墨 */
  --ink-2: #3A342E;
  --ink-3: #4A433B;
  --muted: #5F574D;
  --rule: #CBBFA8;
  --rule-2: #D8CDB8;
  --accent: #2F737B;     /* 青磁：ロゴの水色を、文字に使える深さにした色 */
  --accent-soft: #5EB1B9; /* 水：ロゴの色そのまま（飾り用） */
  --essay: #5F574D;
  --mincho: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', 'Noto Serif JP', 'Noto Serif CJK JP', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--mincho); line-height: 1.8; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: rgba(94, 177, 185, .32); color: inherit; }
h1, h2, h3 { font-weight: 600; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; }
.wrap.wide { max-width: 1140px; }

/* ヘッダー */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 24px 0 16px; border-bottom: 1px solid var(--rule); }
.wordmark { text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: .3em; }
.hd-spacer, .toc-toggle, .toc-head, .toc-num, .toc-leader { display: none; }
.toc-list { display: flex; flex-wrap: wrap; gap: 0 28px; margin: 0; padding: 0; list-style: none; font-size: 14px; letter-spacing: .15em; }
.toc-list a { text-decoration: none; padding: 12px 0; display: inline-block; }

/* 扉 */
.tobira { padding: 72px 0 88px; display: flex; justify-content: center; }
.tobira-frame { border: 1px solid var(--ink); padding: 6px; }
.tobira-inner { border: 1px solid var(--accent-soft); padding: 56px 48px; display: flex; justify-content: center; }
.tobira-text { writing-mode: vertical-rl; height: 440px; display: flex; flex-direction: column; gap: 36px; align-items: flex-start; }
/* 扉の題：文庫の表紙のように一行で「水月舎文庫〈水月さよ作品集〉」。左に細い罫 */
.tobira .tobira-imprint { margin: 0; padding-left: .7em; border-left: 1px solid var(--accent-soft); font-size: 20px; font-weight: 600; line-height: 1.5; letter-spacing: .3em; color: var(--accent); }
.tobira-sub { font-size: .7em; font-weight: 500; letter-spacing: .18em; color: var(--ink); }
.tobira h1 { margin: 0; font-size: 60px; letter-spacing: .35em; line-height: 1; }
.tobira-tag { margin: 0; padding-top: 3em; font-size: 16px; line-height: 2.2; letter-spacing: .18em; color: var(--ink-3); }

/* 章見出し */
.sec { display: flex; flex-direction: column; gap: 36px; padding-bottom: 104px; scroll-margin-top: 16px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.sec-num { font-size: 14px; color: var(--accent); letter-spacing: .2em; }
.sec-head h2 { margin: 0; font-size: 22px; letter-spacing: .3em; }
.sec-aside { margin-left: auto; font-size: 12px; color: var(--muted); letter-spacing: .15em; }

/* 新着 */
.latest { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: stretch; }
.latest-meta { flex: 1 1 260px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.latest-kind { margin: 0 0 12px; font-size: 12px; letter-spacing: .2em; color: var(--muted); }
.latest h3 { margin: 0 0 14px; font-size: 30px; letter-spacing: .2em; line-height: 1.4; }
.latest-summary { margin: 0; font-size: 14px; line-height: 2; color: var(--ink-3); }
.latest-page { flex: 2 1 480px; min-width: 0; background: #FAF7F0; border: 1px solid var(--rule-2); padding: 40px 36px; overflow-x: auto; writing-mode: vertical-rl; }
.latest-text { height: 300px; font-size: 16px; line-height: 2; letter-spacing: .06em; }
.latest-text p { margin: 0; text-indent: 1em; }
.latest-text p.dlg { text-indent: 0; }
.latest-text .more { color: var(--muted); padding-top: 1em; }

.btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 22px; border: 1px solid var(--ink); text-decoration: none; font-size: 14px; letter-spacing: .25em; }
.btn:hover { background: var(--ink); color: var(--page); }
.textlink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; letter-spacing: .15em; }

/* 目録：手に取った一冊 */
.pick { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: center; }
.pick-cover { flex: 0 0 196px; }
.pick-info { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pick-label { margin: 0; font-size: 12px; letter-spacing: .3em; color: var(--accent); }
.pick-meta { margin: 0; font-size: 12px; letter-spacing: .15em; color: var(--muted); }
.pick-info h3 { margin: 0; font-size: 28px; letter-spacing: .2em; line-height: 1.4; }
.pick-lead { margin: 0; font-size: 14px; line-height: 2; color: var(--ink-3); }
.pick-len { margin: 0 0 8px; font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.pick.is-changing .cover { animation: pull-out .5s cubic-bezier(.2,.7,.3,1); }
.pick.is-changing .pick-info { animation: fade-in .5s ease; }
@keyframes pull-out { from { transform: translateY(28px) rotate(-4deg) scaleX(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 目録：本棚 */
.bookcase { background: #E2D7C1; border: 12px solid #6B5442; border-bottom-width: 0; padding: 0 12px; box-shadow: inset 0 14px 22px -16px rgba(0,0,0,.45); }
.bookcase-hint { margin: 0; padding: 14px 2px 0; font-size: 12px; color: #5A4B3C; letter-spacing: .15em; text-align: right; }
.shelf { display: flex; flex-direction: row-reverse; flex-wrap: wrap; align-content: flex-start;
  background: repeating-linear-gradient(to bottom, transparent 0 296px, rgba(0,0,0,.12) 296px 298px, #6B5442 298px 310px); margin: 0 -12px; padding: 0 12px; }
.slot { height: 310px; padding: 24px 1px 12px; display: flex; align-items: flex-end; }
.spine { position: relative; display: flex; flex-direction: column; align-items: center; width: var(--w); height: var(--h); padding: 22px 0 14px; text-decoration: none; color: #F6F0E4; background: var(--c);
  border-radius: 2px 2px 1px 1px; box-shadow: inset 2px 0 0 rgba(255,255,255,.14), inset -3px 0 0 rgba(0,0,0,.2), 0 1px 1px rgba(0,0,0,.2);
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease; }
.spine::before, .spine::after { content: ''; position: absolute; left: 5px; right: 5px; height: 1px; background: currentColor; opacity: .4; }
.spine::before { top: 12px; }
.spine::after { bottom: 70px; }
.spine.light { color: var(--ink); }
.spine:hover, .spine:focus-visible { transform: translateY(-10px); color: #F6F0E4; }
.spine.light:hover, .spine.light:focus-visible { color: var(--ink); }
.spine.is-picked { transform: translateY(-24px); box-shadow: inset 2px 0 0 rgba(255,255,255,.14), inset -3px 0 0 rgba(0,0,0,.2), 0 16px 18px -10px rgba(0,0,0,.4); }
.spine { border: 0; margin: 0; font: inherit; line-height: normal; text-align: center; cursor: pointer; -webkit-appearance: none; appearance: none; }
.spine-no, .spine-title, .spine-author { flex-shrink: 0; }
.shelf-noscript { margin: 0; padding: 16px 0 16px 1.4em; columns: 2; font-size: 14px; line-height: 2; }
.spine-no { writing-mode: vertical-rl; font-size: 10px; letter-spacing: .1em; opacity: .85; }
.tcy { text-combine-upright: all; }
.spine-title { writing-mode: vertical-rl; margin: auto 0; font-size: var(--fs); font-weight: 600; letter-spacing: .12em; line-height: 1; white-space: nowrap; }
.spine-author { writing-mode: vertical-rl; margin-top: 18px; font-size: 10px; letter-spacing: .2em; opacity: .9; white-space: nowrap; }

.cover { aspect-ratio: 105 / 148; background: var(--cover); border: 1px solid var(--rule-2); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 22px 30px -24px rgba(43,39,35,.55); }
.cover-body { flex: 1; min-height: 0; display: flex; flex-direction: row-reverse; justify-content: space-between; padding: 20px 16px 14px; }
.cover-title { writing-mode: vertical-rl; font-weight: 600; letter-spacing: .16em; line-height: 1.3; }
.t-l { font-size: 24px; } .t-m { font-size: 19px; } .t-s { font-size: 15px; letter-spacing: .08em; }
.cover-side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.cover-no { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.cover-author { writing-mode: vertical-rl; font-size: 12px; letter-spacing: .25em; }
.obi { height: 22%; background: var(--ink); color: var(--cover); padding: 0 12px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; letter-spacing: .12em; }
.obi.accent { background: var(--accent); }
.obi.essay { background: var(--essay); }
.obi-date { font-size: 10.5px; letter-spacing: .05em; }

/* 著者紹介 */
.bio { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; }
.bio-photo { flex: 0 0 160px; margin: 0; }
.bio-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; padding: 6px; background: var(--cover); border: 1px solid var(--rule-2); }
.bio-body { flex: 1 1 420px; min-width: 0; display: flex; flex-wrap: wrap; gap: 24px 64px; }
.bio-name { flex: 0 1 200px; display: flex; flex-direction: column; gap: 8px; }
.bio-author { font-size: 26px; font-weight: 600; letter-spacing: .3em; }
.bio-kana { font-size: 12px; color: var(--muted); letter-spacing: .2em; }
.bio-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; line-height: 2.1; color: var(--ink-2); }
.bio-text p { margin: 0; }

/* 奥付 */
.okuduke { display: flex; flex-direction: column; align-items: flex-end; gap: 28px; padding: 0 0 72px; }
.okuduke-box { width: 100%; max-width: 360px; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: 24px 4px; display: flex; flex-direction: column; gap: 14px; }
.okuduke-title { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: .25em; }
.okuduke hr { border: 0; border-top: 1px solid var(--rule); margin: 0; width: 100%; }
.okuduke dl { margin: 0; display: grid; grid-template-columns: 5em 1fr; gap: 10px 12px; font-size: 13px; letter-spacing: .08em; }
.okuduke dt { color: var(--muted); }
.okuduke dd { margin: 0; }
.copyright { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .15em; }

/* ── 閲覧ページ ─────────────────────────────── */
.reader-body { background: var(--desk); }
.reader-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 20px 0 14px; border-bottom: 1px solid #C4B79E; margin-bottom: 28px; }
.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-size: 14px; letter-spacing: .15em; }
.reader-title { margin: 0; font-size: 14px; letter-spacing: .25em; }
.reader-title span { color: var(--muted); }
.controls { display: flex; align-items: center; gap: 6px; }
.controls .sep { width: 1px; height: 24px; background: #C4B79E; margin: 0 6px; }
.controls button { min-width: 44px; min-height: 44px; background: transparent; border: 1px solid #C4B79E; font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.controls button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--page); }

.book { background: var(--page); border: 1px solid #D3C7B0; box-shadow: 0 1px 0 #D3C7B0, 0 18px 40px -28px rgba(43,39,35,.35); padding: 24px 40px 18px; display: flex; flex-direction: column; gap: 20px; }
.hashira { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .3em; color: var(--muted); }
.text-scroll { overflow-x: auto; overflow-y: hidden; }
.text { --fs: 17px; font-size: var(--fs); line-height: 2; letter-spacing: .06em; font-feature-settings: "palt" 0; }
.book[data-size="s"] .text { --fs: 15px; }
.book[data-size="l"] .text { --fs: 20px; }
.text p { margin: 0; text-indent: 1em; }
.text p.dlg { text-indent: 0; }
.text p.break { text-indent: 0; text-align: center; }
.text h1 { margin: 0; font-size: 1.55em; letter-spacing: .3em; line-height: 1.4; }
.text .byline { text-indent: 0; font-size: .82em; letter-spacing: .3em; color: var(--ink-3); }
.text .ryo, .text .shoshutsu { text-indent: 0; color: var(--muted); }
.text .shoshutsu { font-size: .72em; letter-spacing: .15em; }
.hint { margin: 0; font-size: 12px; color: var(--muted); text-align: center; letter-spacing: .15em; }

/* 縦書き */
.book[data-mode="tate"] .text-scroll { writing-mode: vertical-rl; height: 600px; height: clamp(420px, calc(100vh - 260px), 640px); height: clamp(420px, calc(100svh - 260px), 640px); }
.book[data-mode="tate"] .text h1 { margin-left: 1.2em; padding-top: 3em; }
.book[data-mode="tate"] .text .byline { margin-left: 3em; padding-top: 14em; }
.book[data-mode="tate"] .text p.break { margin: 0 1em; }
.book[data-mode="tate"] .text .ryo { margin-right: 2em; padding-top: 20em; }
.book[data-mode="tate"] .text .shoshutsu { margin: 0 1.5em 0 2em; padding-top: 6em; }

/* 横書き */
.book[data-mode="yoko"] .text-scroll { writing-mode: horizontal-tb; overflow: visible; }
.book[data-mode="yoko"] .text { max-width: 36em; margin: 0 auto; padding: 24px 0 8px; }
.book[data-mode="yoko"] .text h1 { margin-bottom: .4em; }
.book[data-mode="yoko"] .text .byline { margin-bottom: 2.5em; }
.book[data-mode="yoko"] .text p.break { margin: 1em 0; }
.book[data-mode="yoko"] .text .ryo { text-align: right; margin-top: 2em; }
.book[data-mode="yoko"] .text .shoshutsu { text-align: right; }
.book[data-mode="yoko"] .hint { display: none; }

.works-nav { display: flex; flex-direction: row-reverse; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0 72px; }
.work-nav { display: inline-flex; flex-direction: column; gap: 2px; min-height: 44px; justify-content: center; padding: 8px 20px; border: 1px solid var(--ink); text-decoration: none; }
.work-nav:hover { background: var(--ink); color: var(--page); }
.work-nav:hover .work-nav-label { color: inherit; }
.work-nav-label { font-size: 11px; color: var(--muted); letter-spacing: .2em; }
.work-nav-title { font-size: 14px; letter-spacing: .15em; }
.work-nav-empty { min-width: 1px; }
.to-index { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 14px; letter-spacing: .2em; color: var(--accent); text-decoration: none; }

/* 共通の小物 */
body { -webkit-tap-highlight-color: transparent; }
.tobira { flex-direction: column; align-items: center; gap: 28px; }
.tobira-next { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; font-size: 12px; letter-spacing: .3em; color: var(--muted); text-decoration: none; }
.hint-short { display: none; }

/* 扉：写真・動画（口絵のように、右端に叢書名と一文） */
.tobira.has-media .tobira-frame { width: min(100%, 476px); }
.tobira.has-media .tobira-inner { padding: 0; height: 620px; justify-content: flex-start; align-items: stretch; }
.tobira-media { position: relative; flex: 1 1 auto; min-width: 0; margin: 10px 0 10px 10px; overflow: hidden; background: var(--desk); }
.tobira-slide, .tobira-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tobira-slide { opacity: 0; transition: opacity 1.6s ease; }
.tobira-slide.is-active { opacity: 1; }
.tobira.has-media .tobira-text { flex: 0 0 auto; height: auto; padding: 22px 14px 22px 12px; gap: 18px; }
.tobira.has-media .tobira-imprint { font-size: 18px; }
.tobira.has-media .tobira-tag { padding-top: 3.2em; font-size: 13px; line-height: 2; letter-spacing: .2em; color: var(--muted); }
/* 文字だけの扉（名前なし） */
.tobira:not(.has-media) .tobira-text { gap: 40px; }
.tobira:not(.has-media) .tobira-tag { padding-top: 4em; font-size: 17px; line-height: 2.3; letter-spacing: .3em; color: var(--ink-3); }
@media (prefers-reduced-motion: reduce) { .tobira-slide { transition: none; } }
.text-scroll { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }

/* スマートフォン：文庫一冊を片手で読む寸法に */
@media (max-width: 640px) {
  .wrap { padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right)); }

  /* ヘッダー：一行に収める */
  body { overflow-x: hidden; }
  .site-header { flex-wrap: wrap; padding: 10px 0 8px; gap: 0 12px; }
  .wordmark { font-size: 15px; letter-spacing: .25em; white-space: nowrap; }
  /* ロゴを中央に、右に「目次」 */
  .site-header { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 0; padding: 6px 0; }
  .hd-spacer { display: block; }
  .wordmark { justify-self: center; }
  .toc { grid-column: 1 / -1; }
  .toc-list { justify-content: center; gap: 0 14px; font-size: 12.5px; letter-spacing: .1em; }
  .toc-list a { white-space: nowrap; padding: 10px 0; }
  .js .toc-toggle { display: inline-flex; justify-self: end; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 48px; min-height: 48px; padding: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 10.5px; letter-spacing: .25em; cursor: pointer; }
  .toc-icon { display: flex; flex-direction: column; gap: 5px; width: 22px; }
  .toc-icon span { display: block; height: 1px; background: currentColor; }
  .js .toc { display: none; }
  .js .toc.is-open { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 1000; overflow-y: auto; background: var(--paper);
    padding: calc(12px + env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: toc-in .25s ease; }
  .admin-bar .toc.is-open { top: 46px; }
  .js .toc-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
  .toc-title { font-size: 20px; font-weight: 600; letter-spacing: .5em; }
  .toc-close { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0; background: none; border: 0; color: var(--ink); font: inherit; font-size: 13px; letter-spacing: .2em; cursor: pointer; }
  .toc-close span { font-size: 22px; line-height: 1; }
  .js .toc .toc-list { flex-direction: column; flex-wrap: nowrap; gap: 0; font-size: 17px; letter-spacing: .2em; }
  .js .toc .toc-list a { display: flex; align-items: baseline; gap: 18px; padding: 20px 4px; border-bottom: 1px solid var(--rule); }
  .js .toc .toc-num { display: inline-block; width: 1.4em; font-size: 14px; color: var(--accent); }
  @keyframes toc-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

  /* 扉：最初の一画面を、文庫の扉一頁に */
  .tobira { min-height: calc(100vh - 64px); min-height: calc(var(--vh0, 100svh) - 64px); justify-content: center; padding: 16px 0 8px; gap: 12px; }
  .tobira-frame { width: 100%; max-width: 400px; }
  .tobira-inner { padding: 0; align-items: center; justify-content: center; height: 470px; height: clamp(400px, calc(var(--vh0, 100svh) - 220px), 540px); }
  .tobira-text { height: auto; max-height: calc(100% - 48px); gap: 26px; }
  .tobira:not(.has-media) .tobira-text { height: calc(100% - 80px); max-height: none; }
  .tobira h1 { font-size: 48px; }
  .tobira.has-media .tobira-frame { width: 100%; max-width: 420px; }
  .tobira.has-media .tobira-inner { height: 520px; height: clamp(420px, calc(var(--vh0, 100svh) - 200px), 620px); }
  .tobira-media { margin: 8px 0 8px 8px; }
  .tobira.has-media .tobira-text { padding: 18px 10px 18px 8px; gap: 14px; }
  .tobira.has-media .tobira-tag { font-size: 12px; }
  .tobira.has-media .tobira-imprint { font-size: 17px; }
  .tobira-tag { font-size: 15px; }

  .sec { padding-bottom: 72px; gap: 24px; scroll-margin-top: 8px; }
  .sec-head h2 { font-size: 20px; }
  .sec-aside { margin-left: 0; width: 100%; }

  /* 新着：はみ出す行は霞ませる */
  .latest { gap: 24px; }
  .latest h3 { font-size: 26px; }
  .latest-page { padding: 24px 18px; overflow: hidden; -webkit-mask-image: linear-gradient(to left, #000 68%, transparent); mask-image: linear-gradient(to left, #000 68%, transparent); }
  .latest-text { height: 280px; font-size: 15px; }

  /* 手に取った一冊 */
  .pick { gap: 20px; align-items: flex-start; flex-wrap: nowrap; }
  .pick-cover { flex: 0 0 38%; max-width: 150px; }
  .pick-info { flex: 1 1 auto; gap: 8px; }
  .pick-label { font-size: 11px; }
  .pick-meta { font-size: 11px; letter-spacing: .1em; }
  .pick-date { display: block; text-indent: -1.1em; }
  .pick-info h3 { font-size: 21px; letter-spacing: .12em; }
  .pick-lead { font-size: 13px; line-height: 1.9; }
  .pick-len { font-size: 11px; }
  .pick .btn { padding: 0 16px; letter-spacing: .18em; font-size: 13px; }
  .cover-body { padding: 12px 10px 8px; }
  .t-l { font-size: 17px; } .t-m { font-size: 14px; } .t-s { font-size: 12px; }
  .obi { padding: 0 8px; font-size: 10.5px; }
  .obi-date { display: none; }

  /* 本棚 */
  .bookcase { border-width: 8px 8px 0; margin: 0 -8px; padding: 0 6px; }
  .bookcase-hint { text-align: center; padding-top: 12px; }
  .hint-long { display: none; }
  .hint-short { display: inline; }
  .shelf { margin: 0 -6px; padding: 0 6px; }
  .spine { width: calc(var(--w) * .82); }
  .spine-title { font-size: min(var(--fs), calc(var(--w) * .82 - 16px)); }

  /* 著者紹介・奥付 */
  .bio { gap: 16px 20px; flex-wrap: nowrap; }
  .bio-photo { flex-basis: 112px; }
  .bio-photo img { padding: 4px; }
  .bio-body { flex: 1 1 auto; gap: 10px; }
  .bio.has-photo { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 20px 20px; align-items: center; }
  .bio.has-photo .bio-body { display: contents; }
  .bio.has-photo .bio-photo { grid-column: 1; grid-row: 1; }
  .bio.has-photo .bio-name { grid-column: 2; grid-row: 1; gap: 6px; }
  .bio.has-photo .bio-text { grid-column: 1 / -1; grid-row: 2; }
  .bio-name { flex-direction: column; gap: 2px; flex-basis: 100%; }
  .bio-author { white-space: nowrap; }
  .bio-author { font-size: 22px; }
  .bio-text { font-size: 14px; line-height: 2; }
  .okuduke { align-items: stretch; padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .okuduke-box { max-width: none; }

  /* 閲覧ページ：見出しは一行、操作は親指の届く下に */
  .reader-body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .reader-header { flex-wrap: nowrap; padding: 6px 0; margin-bottom: 0; border-bottom: 0; gap: 0; }
  .back { min-width: 44px; justify-content: center; font-size: 18px; }
  .back-label { display: none; }
  .reader-title { flex: 1; min-width: 0; padding-right: 44px; text-align: center; font-size: 13px; letter-spacing: .2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .reader-title span { display: none; }
  .controls { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; justify-content: center; gap: 6px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: rgba(233, 226, 211, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid #C4B79E; }
  .controls button { min-width: 48px; }
  .book { margin: 0 -16px; padding: 14px 18px 10px; gap: 14px; border-left: 0; border-right: 0; box-shadow: none; }
  .book[data-mode="tate"] .text-scroll { height: 520px; height: max(320px, calc(var(--vh0, 100svh) - 250px - env(safe-area-inset-bottom))); }
  .book[data-size="l"] .text { --fs: 19px; }
  .book[data-mode="yoko"] .text { padding-top: 12px; }
  .hint { font-size: 11px; }
  .works-nav { flex-direction: column; align-items: stretch; gap: 10px; margin: 24px 0 48px; }
  .work-nav { width: 100%; }
  .work-nav.next { order: 1; }
  .work-nav.prev { order: 2; }
  .to-index { order: 3; justify-content: center; }
  .work-nav-empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spine { transition: none; }
  .pick.is-changing .cover, .pick.is-changing .pick-info { animation: none; }
}

/* ── WordPress 用の追記 ─────────────────────── */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.okuduke dd a { color: inherit; }

/* ヘッダーのロゴ（外観 → カスタマイズ → サイト基本情報 → ロゴ） */
.wordmark.has-logo { display: inline-flex; align-items: center; min-height: 44px; letter-spacing: 0; line-height: 0; }
.site-logo { display: block; height: 40px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 640px) {
  .site-logo { height: 30px; max-width: 150px; }
}
.text a { color: inherit; }

/* ブログ記事・固定ページなど */
.plain { max-width: 38em; width: 100%; margin: 0 auto; padding: 64px 0 96px; font-size: 16px; line-height: 2.1; }
.plain-title { font-size: 26px; letter-spacing: .2em; line-height: 1.5; margin: 0 0 12px; }
.plain-date { margin: 0 0 32px; font-size: 12px; color: var(--muted); letter-spacing: .15em; }
.plain-body p { margin: 0 0 1em; }
.plain-body img { max-width: 100%; height: auto; }
.plain-list { list-style: none; margin: 32px 0; padding: 0; border-top: 1px solid var(--rule); }
.plain-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.plain-list span { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* 管理バーが出ているとき（ログイン中） */
@media (max-width: 640px) {
  .admin-bar .controls { bottom: 0; }
}

/* 古いブラウザ（縦横比の指定が効かない場合）の表紙 */
@supports not (aspect-ratio: 1 / 1) {
  .pick-cover .cover { height: 276px; }
  @media (max-width: 640px) { .pick-cover .cover { height: 190px; } }
}
