:root {
  --washi:#F5F3EA;
  --kinari:#FCFBF4;
  --sumi:#262B24;
  --usuzumi:#4E564B;
  --usuzumi2:#7C857A;
  --tokiwa:#2F5D43;
  --tokiwa-hover:#244934;
  --panel-label:#B7C9BC;
  --panel-text:#F4F7F0;
  --oitake:#6B8069;
  --border:#B9BFAE;
  --keisen:#DBD8C7;
  --men:#E7E5D6;
  --card-border:#E2DFCD;
  --list-bg:#F1EFE3;
  --mini-player-h:64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--washi); color: var(--sumi); }
body { font-family: 'Shippori Mincho','Hiragino Mincho ProN',serif; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--tokiwa); outline-offset: 2px; }
.gothic { font-family: 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.loading-error, .reader-load-state { padding: 48px 24px; color: var(--usuzumi); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; text-align: center; }
.reader-load-state { font-size: 16px; }
.reader-load-state button { margin: 8px 4px 0; }

.mobile-shell { min-height: 100vh; }
.home-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 24px 0; }
.home-actions { display: flex; align-items: center; gap: 8px; }
.app-title { margin: 0; font-size: 26px; line-height: 1.5; letter-spacing: 0.06em; }
.icon-button { display: inline-flex; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--usuzumi); }
.icon-button svg, .row-chevron { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* スマホ検索の小窓（ア案・2026-09-03 指摘62）: 幕は墨40%・窓は生成りカード・見えている範囲の中央 */
.modal-open { overflow: hidden; }
.search-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(38, 43, 36, 0.4); animation: scrim-in .15s ease-out; }
.search-dialog { position: fixed; left: 24px; right: 24px; top: 50%; z-index: 21; display: flex; flex-direction: column; max-height: calc(100vh - 48px); transform: translateY(-50%); transform-origin: top right; border: 1px solid var(--card-border); border-radius: 6px; background: var(--kinari); box-shadow: 0 8px 24px rgba(38, 43, 36, 0.18); animation: dialog-in .15s ease-out; }
.search-dialog-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 0; }
.search-dialog-head .search-input { flex: 1; min-width: 0; font-size: 16px; } /* 16px未満だとiOSがフォーカス時に拡大する */
.search-dialog-list { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 16px; }
.search-dialog-list:empty { display: none; }
.search-dialog-list .section-row { padding-left: 0; padding-right: 0; width: 100%; }
.search-dialog-list .section-row:last-child { border-bottom: 0; }
.search-hint { padding: 16px 0 8px; color: var(--usuzumi2); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.search-hint[role="alert"] { color: var(--usuzumi); font-size: 16px; }
.search-hint .search-retry { margin-left: 8px; padding: 0 16px; border-color: var(--oitake); }
.progress-save-warning { padding: 16px 0; text-align: left; font-size: 16px; }
.progress-save-warning button { margin-left: 8px; padding: 0 16px; border-color: var(--oitake); }
@keyframes scrim-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-50%) scale(0.96); } }
@media (prefers-reduced-motion: reduce) { .search-scrim, .search-dialog { animation: none; } }
.search-input { width: 100%; min-height: 44px; padding: 8px 16px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--kinari); color: var(--sumi); font: 400 14px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.search-input::placeholder { color: var(--usuzumi2); }
/* 検索枠のフォーカスは外側の輪郭を出さず、枠線そのものを常磐へ（1px枠＋0.5px影＝1.5px相当・2026-09-02 指摘35） */
.search-input:focus-visible { outline: none; border-color: var(--tokiwa); box-shadow: 0 0 0 0.5px var(--tokiwa); }

.summary-panel { padding: 4px 0 4px 24px; border-left: 3px solid var(--tokiwa); } /* A案 左罫の引用: 塗りをやめ常磐の線1本（2026-09-02 指摘39） */
.panel-label, .section-heading, .tag { color: var(--oitake); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.2em; }
.summary-panel .panel-label { margin-bottom: 8px; }
.summary-text { color: var(--sumi); font-size: 17px; font-weight: 600; line-height: 1.8; }
.primary-button, .secondary-button { min-height: 52px; border-radius: 6px; font: 700 15px/1.4 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.1em; }
.primary-button { border: 0; background: var(--tokiwa); color: var(--panel-text); }
.primary-button:hover { background: var(--tokiwa-hover); }
.secondary-button { min-height: 48px; border: 1px solid var(--border); background: transparent; color: var(--usuzumi); }
.primary-button:disabled { border: 1px solid var(--border); background: transparent; color: var(--usuzumi); cursor: default; }

.section-heading { padding: 24px 24px 8px; }
.section-list { display: flex; flex-direction: column; }
.section-row { display: flex; min-height: 64px; padding: 8px 24px; align-items: center; gap: 16px; border: 0; border-bottom: 1px solid var(--keisen); background: transparent; color: var(--sumi); text-align: left; }
.section-row:hover { background: var(--kinari); }
.section-row-text { min-width: 0; flex: 1; }
.section-row-title { display: block; overflow: hidden; font-size: 15px; font-weight: 600; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.section-state { display: block; margin-top: 0; color: var(--usuzumi2); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.section-row .section-state { display: block; margin-top: 0; line-height: 16px; }
.section-row .search-match { overflow: hidden; color: var(--usuzumi); text-overflow: ellipsis; white-space: nowrap; }
.row-chevron { width: 16px; height: 16px; flex: 0 0 auto; color: var(--border); }
.dan-mark { display: inline-flex; width: 36px; height: 36px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 4px; background: var(--men); color: var(--usuzumi2); font-size: 13.5px; }
.dan-mark.today-mark { width: 40px; height: 40px; border: 0; background: var(--tokiwa); color: var(--panel-text); font-weight: 600; }
.dan-mark.learning { border: 1px solid var(--tokiwa); background: transparent; color: var(--tokiwa); }
.dan-mark.done { background: var(--tokiwa); color: var(--panel-text); }
.home-footer { padding: 16px 24px 32px; border-top: 1px solid var(--keisen); }
.source-note { color: var(--usuzumi2); font: 400 13.5px/1.7 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }

.mobile-dan-nav { display: flex; padding: 16px 16px 0; align-items: center; justify-content: space-between; }
.dan-nav-title { color: var(--usuzumi); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.1em; }
/* 読書の段名は非操作の表示。下記ボタン装飾はWeb聴くページの戻る導線用。 */
button.dan-nav-title { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; border: 0; background: transparent; }
.dan-nav-home { border-bottom: 1px solid var(--oitake); padding-bottom: 2px; }
button.dan-nav-title:active .dan-nav-home { color: var(--tokiwa); border-bottom-color: var(--tokiwa); }
.hidden-nav { visibility: hidden; }
/* 表示の絞り込み（栓）: 枠なし・線画スイッチ26×14＋文字。ONで常磐に満ちてつまみが右へ（2026-09-02 A-2裁定） */
.view-toggles { display: flex; align-items: center; gap: 8px; }
.mobile-view-toggles { margin: 8px 16px 0; padding: 0 8px; flex-wrap: nowrap; white-space: nowrap; } /* 栓3つは常に1行（2026-09-03 指摘60） */
@media (max-width: 374px) { .mobile-view-toggles { margin: 8px 8px 0; } .mobile-view-toggles .view-toggle { padding: 0 4px; letter-spacing: 0.06em; } }
.view-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--usuzumi2); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.14em; transition: color .18s ease; }
.view-toggle:hover { color: var(--tokiwa); }
.view-toggle[aria-pressed="true"] { color: var(--sumi); font-weight: 700; }
.view-toggle .switch { position: relative; width: 26px; height: 14px; flex: 0 0 auto; border: 1.5px solid var(--border); border-radius: 7px; background: transparent; transition: background .18s ease, border-color .18s ease; }
.view-toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 7px; height: 7px; border-radius: 50%; background: var(--usuzumi2); transition: left .18s ease, background .18s ease; }
.view-toggle:hover .switch { border-color: var(--tokiwa); }
.view-toggle[aria-pressed="true"] .switch { border-color: var(--tokiwa); background: var(--tokiwa); }
.view-toggle[aria-pressed="true"] .switch::after { left: 14px; background: var(--panel-text); }
/* 休止表示（ホーム・はじめに）: 位置は不変・老竹40%・押せない（2026-09-02 監査D1） */
.view-toggle:disabled, .view-toggle:disabled:hover { color: var(--oitake); opacity: 0.4; cursor: default; }
.view-toggle:disabled .switch, .view-toggle:disabled:hover .switch { border-color: var(--oitake); }
.dan-content { padding: 16px 24px 32px; }
.dan-title { margin: 0 0 16px; font-size: 19px; line-height: 1.5; text-wrap: balance; } /* SPは19px＋balanceで2行目に3文字以上残す（2026-09-02 監査#8）。PCは26px（下で上書き） */
.original-card { margin-top: 16px; padding: 16px 24px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--kinari); }
.word-hint { margin-left: 8px; color: var(--usuzumi); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.word-hint-touch { display: none; }
.tag { display: inline-flex; padding: 4px 16px; border: 1px solid var(--tokiwa); border-radius: 4px; color: var(--tokiwa); letter-spacing: 0.14em; }
.translation .tag { border-color: var(--border); color: var(--oitake); }
.original-lines { display: flex; margin-top: 8px; flex-direction: column; gap: 16px; font-size: 17px; font-weight: 500; line-height: 36px; } /* 息つぎ間16px＝折返し行間(36)の差が見える最小の段（2026-09-02 監査#7）。行送り36pxは不変 */
/* ルビ: 読みは半分の小字・老竹。行の高さは行送りの中に収める（ruby-off は読みだけ消し、文字の位置は動かさない） */
.original-lines ruby { ruby-position: over; ruby-align: center; }
.original-lines rt { font-size: 0.5em; line-height: 1; font-weight: 500; color: var(--oitake); letter-spacing: 0; }
.original-lines.ruby-off rt { display: none; }
/* 発音（現代仮名遣い）: 練習の「行ごとの対」と同じ左罫＋左余白で、色は淡（2026-10-04）。ルビと同時に入れても行送り36pxは不変 */
.original-yomi { margin-top: 4px; padding-left: 16px; border-left: 2px solid var(--keisen); color: var(--usuzumi2); font: 400 13.5px/1.7 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.04em; }
/* 本文注の印（※N）: 行末に小さく常磐。押せる範囲は44pxを疑似要素で確保し、行送りは動かさない */
.text-note-ref { position: relative; display: inline; margin-left: 4px; padding: 0; border: 0; background: transparent; color: var(--tokiwa); font: 500 13.5px/1 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0; cursor: pointer; }
.text-note-ref::after { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.text-notes { margin-top: 16px; }
.text-note-list { margin: 8px 0 0; padding: 0; list-style: none; }
.text-note { display: flex; gap: 8px; padding: 8px 0; border-top: 1px solid var(--keisen); color: var(--usuzumi); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; scroll-margin: 96px 0; }
.text-note:last-child { border-bottom: 1px solid var(--keisen); }
.text-note:focus { outline: none; background: var(--kinari); box-shadow: inset 3px 0 0 var(--tokiwa); }
.text-note-mark { flex: 0 0 auto; padding-left: 8px; color: var(--tokiwa); font-size: 13.5px; }
.text-note-body { min-width: 0; overflow-wrap: anywhere; }
.text-note-word { margin-right: 8px; color: var(--sumi); font: 500 15px/1.95 'Shippori Mincho','Hiragino Mincho ProN',serif; }
/* 出典まわりの文字リンク（聴くページの帰属リンクと同じ語彙: 常磐＋下線・高さ44） */
.source-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--tokiwa); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 4px; }
.source-link:hover { color: var(--tokiwa-hover); }
.sources-list { margin: 16px 0 0; padding-left: 24px; color: var(--usuzumi); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.sources-text p { margin: 0; }
.sources-text p + p { margin-top: 8px; }
.sources-links { margin-top: 8px; }
/* 発音栓が入る段は栓が4つ: スマホでも1行に収める（2026-09-03 指摘60の「常に1行」を維持） */
.mobile-view-toggles.has-yomi { gap: 4px; } /* 外側の余白は3つの時と同じ＝栓の左端=題の左端を保つ */
.mobile-view-toggles.has-yomi .view-toggle { gap: 4px; padding: 0 4px; letter-spacing: 0.06em; }
@media (max-width: 374px) { .mobile-view-toggles.has-yomi { padding: 0; } .mobile-view-toggles.has-yomi .view-toggle { padding: 0 2px; letter-spacing: 0; } } /* 栓4つでも320pxで1行に収める */
.translation { margin-top: 16px; }
.translation-text { margin-top: 8px; color: var(--usuzumi); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.dan-actions { margin-top: 24px; }
.dan-actions .primary-button { width: 100%; }
.dan-actions .secondary-button { width: 100%; margin-top: 8px; }
.dan-listen { margin-top: 24px; }
.dan-listen-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.dan-listen-button { min-width: 0; min-height: 44px; }

body.has-player { padding-bottom: calc(var(--mini-player-h) + 16px); }
#persistent-player[hidden] { display: none; }
#persistent-player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--mini-player-h); background: var(--kinari); border-top: 1px solid var(--keisen); }
#persistent-player audio { display: none; }
/* ミニプレイヤー: 採用C（演出）＝帯上端に進み具合の線（デザイン正本2026-09-06） */
.mini-player { position: relative; display: flex; height: var(--mini-player-h); padding: 0 16px; align-items: center; gap: 8px; }
.mini-player::before { content: ""; position: absolute; top: 0; left: 0; height: 2px; width: var(--mini-progress, 0%); background: var(--tokiwa); }
.mini-prev, .mini-next { flex: 0 0 auto; }
.mini-play { flex: 0 0 auto; display: inline-flex; width: 44px; height: 44px; padding: 0; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--tokiwa); }
.mini-listen { flex: 0 0 auto; display: inline-flex; gap: 8px; white-space: nowrap; min-height: 44px; padding: 0 8px; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--tokiwa); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.1em; }
.mini-listen[hidden] { display: none; }
.mini-listen svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mini-play svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mini-text { display: flex; min-width: 0; flex: 1; flex-direction: column; justify-content: center; gap: 4px; }
.mini-dan, .mini-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-dan { color: var(--oitake); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.mini-player .mini-title { color: var(--sumi); font: 500 15px/1.3 'Shippori Mincho','Hiragino Mincho ProN',serif; }
/* 聴くページ: 採用B（一段引く）＝枠・面を減らし罫線1本で節を切る（デザイン正本2026-09-06） */
.listen-page { display: flex; flex-direction: column; gap: 24px; }
.listen-page .dan-title { margin-bottom: 0; }
.listen-loading { color: var(--usuzumi); font: 400 14px/1.7 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.listen-modes, .listen-controls { display: flex; flex-wrap: wrap; align-items: center; }
.listen-modes { gap: 24px; }
.listen-controls { gap: 16px 24px; justify-content: space-between; align-items: flex-end; }
.listen-speed-control { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 304px; max-width: 440px; }
.listen-speed-label { color: var(--usuzumi); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.listen-speeds { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 8px; flex: 1; max-width: 440px; }
.listen-repeat { flex: 0 0 auto; padding: 0; }
.listen-repeat .switch { order: 1; }
.listen-mode, .listen-speed { justify-content: center; padding: 0 0 4px; min-width: 44px; border-bottom: 2px solid transparent; color: var(--usuzumi); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.listen-speed { min-width: 44px; }
.listen-speed-sign { font-size: 0.8em; vertical-align: 0.06em; }
.listen-mode[aria-pressed="true"], .listen-speed[aria-pressed="true"] { color: var(--tokiwa); border-bottom: 2px solid var(--tokiwa); }
.listen-files, .listen-chapters, .listen-download { display: flex; flex-direction: column; }
.listen-files { border-top: 1px solid var(--keisen); overflow-anchor: none; }
.listen-chapters[hidden] { display: none; }
.listen-file { width: 100%; padding-left: 0; padding-right: 0; }
.listen-file > svg { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.listen-file[aria-expanded="true"] > svg { transform: rotate(90deg); }
.listen-files .listen-file.selected { background: transparent; border-bottom-color: var(--tokiwa); }
.listen-player { scroll-margin-top: 24px; display: flex; flex-direction: column; gap: 16px; padding: 24px 0; border-top: 1px solid var(--keisen); border-bottom: 1px solid var(--keisen); }
.listen-now { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.listen-now .mini-title { white-space: normal; overflow-wrap: anywhere; }
.listen-now .mini-title { font: 600 17px/1.6 'Shippori Mincho','Hiragino Mincho ProN',serif; }
/* 再生位置: 44pxの操作域の中央に4pxの罫線。色は常磐と老竹だけを使用。 */
.listen-progress { display: flex; align-items: center; width: 100%; height: 44px; }
.listen-seek { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.listen-seek::-webkit-slider-runnable-track { height: 4px; border: 0; border-radius: 2px; background: linear-gradient(to right, var(--tokiwa) var(--seek-progress, 0%), var(--oitake) var(--seek-progress, 0%)); }
.listen-seek::-moz-range-track { height: 4px; border: 0; border-radius: 2px; background: var(--oitake); }
.listen-seek::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--tokiwa); }
.listen-seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; margin-top: calc((4px - 16px) / 2); border: 2px solid var(--kinari); border-radius: 50%; background: var(--tokiwa); box-shadow: 0 0 0 1px var(--tokiwa); }
.listen-seek::-moz-range-thumb { width: 12px; height: 12px; border: 2px solid var(--kinari); border-radius: 50%; background: var(--tokiwa); box-shadow: 0 0 0 1px var(--tokiwa); }
.listen-time { font-variant-numeric: tabular-nums; color: var(--usuzumi); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; text-align: center; }
.listen-actions { display: flex; align-items: center; justify-content: center; gap: 24px; }
.listen-play { min-width: 176px; min-height: 52px; }
.listen-chapter { display: flex; min-height: 44px; padding: 8px 24px; align-items: center; justify-content: space-between; gap: 16px; border: 0; border-bottom: 1px solid var(--keisen); background: transparent; color: var(--sumi); font: 400 14px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; text-align: left; }
.listen-chapter span:first-child { min-width: 0; overflow-wrap: anywhere; }
.listen-chapter span:last-child { flex: 0 0 auto; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--usuzumi); font-weight: 400; }
.listen-chapter:hover, .listen-chapter:active { background: var(--kinari); }
.listen-chapter.playing { color: var(--tokiwa); font-weight: 700; box-shadow: inset 3px 0 0 var(--tokiwa); }
.listen-download { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.listen-download .section-heading { grid-column: 1 / -1; padding: 0 0 8px; }
.listen-download .secondary-button { display: inline-flex; justify-content: center; text-align: center; min-width: 0; min-height: 52px; padding: 0 24px; align-items: center; text-decoration: none; }
.listen-license a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tokiwa); text-decoration: underline; text-underline-offset: 4px; }
.listen-nav .dan-nav-title { gap: 8px; }
.listen-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.listen-page a:focus-visible { outline: 2px solid var(--tokiwa); outline-offset: 2px; }
.listen-actions button:disabled, .mini-next:disabled { opacity: 0.4; cursor: default; }
.listen-actions button:active, .dan-listen-button:active { background: var(--men); color: var(--tokiwa); }
.listen-file .section-state { color: var(--usuzumi); }
@media (max-width: 374px) { .listen-speeds { gap: 0; } .listen-speed-control { min-width: 264px; } }
@media (max-width: 600px) {
  .listen-speed-control { flex-basis: 100%; max-width: none; }
  .listen-speeds { max-width: none; }
  .listen-download { grid-template-columns: minmax(0, 1fr); }
  .listen-download .secondary-button { font-size: 13.5px; letter-spacing: 0.06em; }
}
@media (min-width: 768px) {
  .mini-player { max-width: 1040px; margin: 0 auto; padding: 0 32px; gap: 16px; }
}

/* 本文を離れず調整する常駐プレーヤー。色と部品は既存の聴く画面に揃える。 */
.mini-text { min-height: 44px; text-decoration: none; text-align: left; }
.mini-text .mini-dan { text-decoration: underline; text-underline-offset: 3px; }
.mini-text:hover .mini-dan { color: var(--tokiwa); }
.mini-text:focus-visible { outline: 2px solid var(--tokiwa); outline-offset: 2px; }
.mini-settings-toggle { flex: 0 0 44px; }
.mini-settings-toggle[aria-expanded="true"] { color: var(--tokiwa); background: var(--men); }
.mini-settings-toggle svg, .mini-settings-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mini-settings { position: absolute; right: max(16px, calc((100% - 976px) / 2)); bottom: calc(100% + 8px); z-index: 2; width: min(440px, calc(100% - 32px)); padding: 16px 24px; border: 1px solid var(--border); border-radius: 6px; background: var(--kinari); display: flex; flex-direction: column; align-items: stretch; gap: 16px; max-height: calc(100dvh - var(--mini-player-h) - 32px); overflow-y: auto; }
.mini-settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--sumi); font: 700 15px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.mini-settings .listen-speed-control { min-width: 0; max-width: none; flex: none; }
.mini-settings .listen-speeds { gap: 4px; max-width: none; }
.mini-settings .listen-repeat { align-self: flex-start; }
.player-feedback, .dan-audio-feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; color: var(--usuzumi); font: 400 13.5px/1.6 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.player-retry, .dan-audio-retry { min-height: 44px; padding: 8px 16px; white-space: nowrap; }
.dan-audio-feedback { margin-top: 8px; justify-content: flex-start; }
.mini-feedback { position: absolute; bottom: 100%; left: 0; right: 0; padding: 8px 16px; background: var(--kinari); border-top: 1px solid var(--keisen); }
.listen-readout { min-height: 44px; display: grid; align-items: center; }
.listen-readout > * { grid-area: 1 / 1; }
.listen-readout .player-feedback { flex-wrap: nowrap; }
.listen-readout .player-status { min-width: 0; }
.listen-readout .player-retry { flex: 0 0 auto; }
.listen-time[hidden] { display: none; }
.listen-index-retry { display: block; min-height: 44px; padding: 8px 16px; margin: 16px auto 0; }
.mini-settings[hidden], .player-feedback[hidden], .player-retry[hidden], .dan-audio-feedback[hidden], .dan-audio-retry[hidden] { display: none; }
@media (max-width: 767px) {
  :root { --mini-player-h: 112px; }
  .mini-player { display: grid; grid-template-columns: repeat(4, 44px) minmax(0, 1fr); grid-template-rows: 44px 44px; gap: 8px; padding: 8px 16px; }
  .mini-text { grid-column: 1 / -1; grid-row: 1; }
  .mini-player .mini-title { font-size: 15px; }
  .mini-listen { padding: 0; justify-self: end; gap: 4px; letter-spacing: 0; }
  .mini-settings { padding: 16px; }
}
@media (max-height: 480px) and (min-width: 768px) {
  .mini-settings { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
}

.desktop-shell { display: none; min-height: 100vh; }
/* トップバーは本文の格子を写す: 左=段一覧列（340/400・罫線は border-box で幅に含む）・右=本文列（min(880px, 100%-64px) 中央寄せ）。検索枠の右端＝本文の右端（2026-09-02 指摘32） */
.desktop-topbar { display: flex; min-height: 64px; align-items: center; border-bottom: 1px solid var(--keisen); }
.desktop-brand { display: flex; width: 340px; flex: 0 0 340px; align-items: baseline; gap: 16px; padding-left: 32px; }
.desktop-brand-title { min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--sumi); font: 700 19px/1.5 'Shippori Mincho','Hiragino Mincho ProN',serif; letter-spacing: 0.06em; cursor: pointer; }
.home-continue { margin-top: 24px; }
.continue-title { color: var(--sumi); font: 700 17px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.12em; }
.continue-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; } /* 指摘55: 1fr だと長い題でグリッド列が中身幅に広がり「…」が効かない→minmax(0,1fr) */
.continue-card { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 44px; padding: 16px 44px 16px 16px; /* 右44=矢印のタップ域（掟5・スケール外の唯一の例外） */ border: 1px solid var(--card-border); border-radius: 6px; background: var(--kinari); color: var(--sumi); text-align: left; font-family: inherit; cursor: pointer; }
.continue-card:hover { border-color: var(--tokiwa); }
.continue-kind { display: block; color: var(--tokiwa); font: 700 15px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.12em; }
.continue-hint { display: block; margin-top: 4px; color: var(--usuzumi2); font: 400 13.5px/1.6 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.continue-body { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; min-width: 0; }
.continue-body .dan-mark { flex: 0 0 auto; } /* 指摘54→55: 枠は36固定。文字側を一覧行と同じ 題1行(20)＋状態(16)=36 にして上下端を揃える（2026-09-03 リツト指摘） */
.continue-text { min-width: 0; }
.continue-dan { display: block; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; } /* 指摘54: 一覧行と同じ 題20＋状態16=36 で枠と上下端を揃える（旧: 行高36で中心合わせ 2026-09-02 ⑱） */
.continue-card-first .continue-dan { line-height: 36px; } /* 初回カードは題のみ→行高36で枠と同じ高さ */
.continue-state { display: block; color: var(--usuzumi); font: 400 13.5px/16px 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.continue-card .row-chevron { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--usuzumi2); }
.continue-card-first { padding-right: 16px; cursor: default; }
.continue-card-first .continue-body { margin-top: 0; align-items: center; }
.continue-first-button { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; margin-top: 16px; padding: 0 24px; }
.continue-first-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.continue-done { padding: 16px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--kinari); color: var(--usuzumi); font: 400 14px/1.8 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.continue-wrap { padding: 24px 24px 0; }
.home-continue .home-continue .section-row { padding-left: 0; padding-right: 0; width: 100%; }
.home-continue .empty-result { padding: 8px 0 16px; }
.guide { margin-top: 4px; }
.guide-block { margin-top: 48px; }
.guide-block:first-child { margin-top: 32px; }
.guide-block .tag { border-color: var(--border); color: var(--oitake); }
.guide-text { margin-top: 16px; color: var(--usuzumi); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.guide-block:last-child { padding-bottom: 8px; }
.guide-figure { width: 240px; margin: 16px 0 0; } /* 兼好法師の絵（イ案 文の前に一枚・左端揃え）2026-09-02 リツト裁定 */
.guide-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--keisen); border-radius: 4px; }
.guide-figure figcaption { margin-top: 4px; color: var(--oitake); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.06em; }
/* 読み方のコツ（はじめに）。C案=変わる字だけ色と下線（字側は老竹、音側は常磐）。数字札は常磐の小札(r4)、字は明朝・音はゴシック（掟4）。行高32で左右を揃える。矢印は線画SVG（掟6） */
.guide-heading { margin: 48px 0 0; color: var(--sumi); font: 700 19px/1.5 'Shippori Mincho','Hiragino Mincho ProN',serif; }
.desktop-view .guide-heading { font-size: 21px; }
.yomi-rules { margin: 16px 0 0; padding: 0; list-style: none; }
.yomi-rule { padding: 16px 0; border-top: 1px solid var(--keisen); }
.yomi-rule:last-child { border-bottom: 1px solid var(--keisen); }
.yomi-rule-head { display: block; } /* C案 小札の文字ラベル（2026-09-02 リツト裁定: 枠はtoo much→「法則 N」の文字ラベルを題の上へ） */
.yomi-num { display: block; color: var(--oitake); font: 500 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; letter-spacing: 0.2em; }
.yomi-rule-title { margin-top: 4px; color: var(--sumi); font: 500 15px/1.6 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.yomi-examples { margin-top: 8px; display: grid; grid-template-columns: max-content 24px auto; column-gap: 12px; align-items: center; } /* 字の列は法則内の最長例に合わせ、矢印との間は12px（2026-09-02 リツト指摘: 7em固定は間が空きすぎ） */
.yomi-ex { display: contents; }
.yomi-from { padding: 4px 0; color: var(--sumi); font: 500 16px/32px 'Shippori Mincho','Hiragino Mincho ProN',serif; } /* 指摘53: 字と音の大きさを16pxに統一（2026-09-03 リツト指摘） */
.yomi-arrow { display: inline-flex; padding: 4px 0; }
.yomi-arrow svg { width: 24px; height: 24px; fill: none; stroke: var(--oitake); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.yomi-to { padding: 4px 0; color: var(--sumi); font: 400 16px/32px 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.yomi-ex em { font-style: normal; color: var(--tokiwa); border-bottom: 2px solid var(--tokiwa); padding-bottom: 1px; }
/* 指摘53: 変わる部分の字と線は字・音とも常磐で統一（旧: 字側は老竹＋薄い線） */
.yomi-practice-lines { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.yomi-practice-from { color: var(--sumi); font: 500 17px/1.85 'Shippori Mincho','Hiragino Mincho ProN',serif; }
.yomi-practice-to { padding-left: 16px; border-left: 2px solid var(--keisen); color: var(--tokiwa); font: 400 14px/1.95 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.desktop-meta, .desktop-progress { color: var(--usuzumi2); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.desktop-tools { min-width: 0; flex: 1; }
.desktop-tools-inner { position: relative; display: flex; width: min(880px, calc(100% - 64px)); margin: 0 auto; align-items: center; justify-content: flex-end; gap: 24px; } /* .desktop-view と同じ margin auto 中央寄せで端数の丸めを揃える */
.search-field { position: relative; display: block; width: 208px; } /* 置き字9字(約126px)+左48+右16=190が収まる最小の8の倍数（2026-09-02 指摘33・監査#4で左48へ） */
.search-field svg { position: absolute; top: 50%; left: 14px; width: 18px; height: 18px; transform: translateY(-50%); pointer-events: none; fill: none; stroke: var(--usuzumi2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.desktop-search { width: 100%; padding-left: 48px; }
.desktop-body { display: flex; min-height: 0; flex: 1; }
.desktop-list-pane { display: flex; width: 340px; flex: 0 0 340px; flex-direction: column; border-right: 1px solid var(--keisen); background: var(--list-bg); }
.desktop-list { display: flex; flex-direction: column; overflow-y: auto; }
.desktop-list-pane .section-heading { padding-left: 32px; }
.desktop-list .section-row { min-height: 60px; padding: 8px 24px 8px 32px; }
.desktop-list .dan-mark { width: 34px; height: 34px; }
.desktop-list .section-row-title { line-height: 19.5px; }
.desktop-list .section-row .section-state { line-height: 14.5px; }
.desktop-list .section-row.selected { background: var(--kinari); }
.desktop-view-pane { min-width: 0; flex: 1; overflow-y: auto; }
.desktop-view { width: min(880px, calc(100% - 64px)); min-height: calc(100vh - 64px); margin: 0 auto; padding: 32px 0 256px; box-sizing: border-box; } /* 底本表記はさらに下へ（2026-09-02 指摘38） */
.desktop-view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.desktop-view .dan-title { margin-top: 24px; font-size: 26px; }
.desktop-view .original-lines { font-size: 18px; }
.desktop-buttons { display: flex; margin-top: 32px; gap: 16px; } /* 回数ドットはボタンの下（2026-09-02 指摘34）・主副の間は m=16（監査#3） */
.desktop-buttons .primary-button, .desktop-buttons .secondary-button { min-width: 176px; min-height: 52px; padding: 0 24px; }
.desktop-source { width: min(880px, calc(100% - 64px)); margin: 0 auto; padding: 24px 0 48px; border-top: 1px solid var(--keisen); color: var(--usuzumi2); font: 400 13.5px/1.7 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.empty-result { padding: 24px; color: var(--usuzumi2); font: 400 14px/1.8 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }

@media (min-width: 768px) {
  .mobile-shell { display: none; }
  .desktop-shell { display: flex; height: 100vh; flex-direction: column; }
  body.has-player .desktop-shell { height: calc(100vh - 64px); }
}

@media (min-width: 768px) and (max-width: 1280px) {
  .desktop-tools-inner, .desktop-view, .desktop-source { width: calc(100% - 80px); margin-left: 32px; margin-right: 48px; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .desktop-tools-inner { flex-wrap: wrap; row-gap: 8px; padding: 8px 0; }
  .desktop-tools-inner .view-toggles { flex: 0 0 100%; justify-content: flex-end; white-space: nowrap; }
  .desktop-tools-inner .search-field { flex: 0 0 208px; }
}

@media (min-width: 1280px) {
  .desktop-list-pane { width: 400px; flex: 0 0 400px; }
  .desktop-brand { width: 400px; flex: 0 0 400px; }
}

@media (max-width: 420px) {
}

.listen-download .secondary-button { flex-direction: column; gap: 8px; padding: 16px; }
.download-meta { color: var(--usuzumi); font-size: 13.5px; font-weight: 400; letter-spacing: 0.02em; }

/* Mobile listening: chapter swipes supplement the visible previous/next controls. */
@media (max-width: 767px) {
  body.on-listen { --mini-player-h: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .mobile-shell .listen-page { gap: 16px; }
  .mobile-shell .listen-player { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 0 8px; padding: 16px 0; }
  .mobile-shell .listen-swipe-viewport { grid-column: 2; grid-row: 1; overflow: hidden; }
  .mobile-shell .listen-now { min-height: 88px; justify-content: center; text-align: center; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; transition: transform 160ms ease-out; }
  .mobile-shell .listen-now.is-dragging { transition: none; }
  .mobile-shell .listen-now .mini-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mobile-shell .listen-progress { grid-column: 1 / -1; grid-row: 2; }
  .mobile-shell .listen-readout { grid-column: 1 / -1; grid-row: 3; min-height: 24px; }
  .mobile-shell .listen-actions { display: contents; }
  .mobile-shell .listen-prev { grid-column: 1; grid-row: 1; width: 48px; height: 56px; align-self: center; }
  .mobile-shell .listen-next { grid-column: 3; grid-row: 1; width: 48px; height: 56px; align-self: center; }
  .mobile-shell .listen-play { grid-column: 1 / -1; grid-row: 4; width: 100%; min-width: 0; min-height: 56px; margin-top: 8px; }
  .mobile-shell .listen-controls { gap: 8px 16px; }
  body.on-listen .mini-player { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 44px 48px; gap: 4px 8px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); }
  body.on-listen .mini-player > .icon-button, body.on-listen .mini-player > .mini-play { width: 100%; height: 48px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .mobile-shell .listen-now { transition: none; }
}

/* Mobile speed slider: the six existing rates remain discrete stops. */
.mobile-speed { display: none; }
@media (max-width: 767px) {
  .mobile-shell .listen-speed-control, .mini-settings .listen-speed-control { position: relative; min-width: 0; width: 100%; max-width: none; gap: 0; }
  .mobile-shell .listen-speed-label, .mini-settings .listen-speed-label { display: flex; align-items: center; min-height: 36px; padding-right: 88px; }
  .mobile-shell .listen-speeds, .mini-settings .listen-speeds { display: block; max-width: none; }
  .mobile-shell .listen-speed, .mini-settings .listen-speed { display: none; }
  .mobile-speed { display: block; }
  .mobile-speed-value { position: absolute; right: 0; top: 0; color: var(--tokiwa); font: 700 24px/36px 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; font-variant-numeric: tabular-nums; }
  .mobile-speed-range { display: block; width: 100%; height: 44px; margin: 0; padding: 0; accent-color: var(--tokiwa); font-size: 16px; cursor: pointer; }
  .mobile-speed-ticks { display: flex; justify-content: space-between; padding: 0 2px; color: var(--usuzumi); font: 400 13.5px/1.5 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; font-variant-numeric: tabular-nums; }
}

/* Mobile downloads: readable titles and metadata in full-width rows. */
@media (max-width: 767px) {
  .mobile-shell .listen-download { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .mobile-shell .listen-download .secondary-button { align-items: flex-start; text-align: left; gap: 4px; padding: 16px; font-size: 16px; line-height: 1.6; letter-spacing: 0.02em; }
  .mobile-shell .listen-download .secondary-button > span { max-width: 100%; overflow-wrap: anywhere; }
  .mobile-shell .listen-download .download-meta { font-size: 13.5px; line-height: 1.6; }
}

/* One audio download action, with an explicit label and familiar download mark. */
.listen-download { grid-template-columns: minmax(0, 1fr); }
.listen-download .secondary-button.audio-download { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: center; text-align: left; }
.download-icon { grid-column: 1; grid-row: 1 / 3; width: 24px; height: 24px; fill: none; stroke: var(--tokiwa); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.audio-download .download-title { grid-column: 2; font-size: 16px; line-height: 1.6; letter-spacing: 0.02em; }
.audio-download .download-meta { grid-column: 2; line-height: 1.6; }
.audio-download .download-meta { display: flex; flex-wrap: wrap; gap: 0 8px; }
.audio-download .download-meta > span { white-space: nowrap; }

/* Word lookup: a quiet paper card, anchored without reflowing the text. */
.word-popup { position:fixed; z-index:40; width:320px; padding:16px 56px 16px 24px; border:1px solid var(--border); border-radius:6px; background:var(--kinari); color:var(--sumi); overflow:auto; }
.word-popup[hidden] { display:none; }
.word-popup-word { font:600 20px/1.6 'Shippori Mincho','Hiragino Mincho ProN',serif; overflow-wrap:anywhere; }
.word-popup-reading { color:var(--usuzumi); font:400 13.5px/1.8 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; }
.word-popup-reading:empty { display:none; }
.word-popup-meaning { margin:8px 0 0; font:400 16px/1.8 'Zen Kaku Gothic New','Hiragino Sans',sans-serif; overflow-wrap:anywhere; }
.word-popup-close { position:absolute; right:8px; top:8px; width:44px; height:44px; display:grid; place-items:center; background:transparent; border:0; color:var(--usuzumi); border-radius:4px; }
.word-popup-close svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
.word-popup-close:hover { background:var(--men); }
.word-highlights { pointer-events:none; position:fixed; inset:0; z-index:19; }
.word-highlights span { position:absolute; background:rgba(47,93,67,.12); border-bottom:1px solid var(--tokiwa); }
.original-lines ::selection, .translation-text::selection, .translation-text ::selection { background:rgba(47,93,67,.18); }
@media (any-pointer:coarse) {
  .original-lines, .translation-text, .yomi-practice-from { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
  .word-hint-pointer { display: none; }
  .word-hint-touch { display: inline; }
  .desktop-search { font-size: 16px; }
}
@media (forced-colors:active) {
  .word-popup { border-color:CanvasText; }
  .word-highlights span { background:transparent; border-bottom:2px solid Highlight; }
}

/* 印刷の設定と紙面 */
.mobile-reader-tools { display: flex; justify-content: flex-end; padding: 8px 16px 0; gap: 8px; }
.print-dialog { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid #B9BFAE; border-radius: 6px; color: #262B24; background: #FCFBF4; }
.print-dialog::backdrop { background: rgba(38,43,36,.55); }
.print-settings { padding: 24px; }
.print-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.print-dialog h2 { margin: 0; font: 700 21px/1.5 'Shippori Mincho', 'Hiragino Mincho ProN', serif; }
.print-close { width: 44px; height: 44px; border: 0; background: transparent; color: #262B24; font-size: 24px; cursor: pointer; }
.print-settings > p { margin: 8px 0 16px; }
.print-range { display: flex; gap: 16px; flex-wrap: wrap; }
.print-range label { display: grid; gap: 8px; flex: 1 1 160px; }
.print-range select { min-height: 44px; padding: 8px; font: 16px/1.5 -apple-system, 'Hiragino Sans', sans-serif; border: 1px solid #B9BFAE; border-radius: 4px; background: white; color: #262B24; }
.print-settings fieldset { margin: 24px 0; padding: 8px 16px 16px; border: 1px solid #DBD8C7; }
.print-settings fieldset label { display: inline-flex; align-items: center; min-height: 44px; margin-right: 16px; gap: 8px; }
.print-settings input { width: 20px; height: 20px; accent-color: #2F5D43; }
.print-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.print-dialog-actions button { flex: 1 1 200px; }
.print-status { min-height: 1.5em; }
.print-convenience { margin: 24px 0; border-top: 1px solid #DBD8C7; padding-top: 16px; }
.print-convenience summary { display: flex; align-items: center; gap: 12px; min-height: 44px; list-style: none; color: #2F5D43; cursor: pointer; font: 700 15px/1.5 'Hiragino Sans', sans-serif; }
.print-convenience summary::-webkit-details-marker { display: none; }
.print-convenience summary::before { content: ''; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.print-convenience[open] summary::before { transform: rotate(45deg); }
.print-convenience p { margin: 8px 0 16px; font: 14px/1.8 'Hiragino Sans', sans-serif; }
.print-convenience-files { display: grid; gap: 8px; }
.print-part { display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; text-decoration: none; }
.print-retry { min-height: 44px; padding: 0 12px; }
.print-preview { padding: 24px; background: white; border: 1px solid #DBD8C7; }
.print-paper { display: none; }
.print-preview, .print-paper { color: #262B24; font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif; }
.paper-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid #6B8069; font-size: 13.5px; }
.paper-section { margin-top: 28px; }
.paper-section h2 { margin: 0 0 20px; font-size: 20px; line-height: 1.6; }
.paper-section + .paper-section h2 { border-top: 1px solid #B9BFAE; padding-top: 16px; }
.paper-section h2 span { display: block; color: #2F5D43; font: 500 13.5px/1.5 sans-serif; }
.paper-section h3 { margin: 0 0 12px; color: #2F5D43; font: 500 13.5px/1.5 sans-serif; }
.paper-original { font-size: 17px; line-height: 2.15; }
.paper-pair { margin-bottom: 12px; break-inside: avoid; }
.paper-line { line-height: 2; }
.paper-reading { margin: 2px 0 0 8px; padding-left: 12px; border-left: 1px solid #B9BFAE; color: #4E564B; font: 14px/1.8 'Hiragino Sans', sans-serif; }
.paper-original rt { font-size: .5em; }
.paper-original sup { font-size: .65em; }
.paper-translation, .paper-notes { margin-top: 24px; font: 15px/1.9 'Hiragino Sans', sans-serif; }
.paper-translation p, .paper-notes p { margin: 0; }
.paper-footer { margin-top: 32px; padding-top: 12px; border-top: 1px solid #DBD8C7; font: 13.5px/1.7 sans-serif; }
@media print {
  @page { size: A4; margin: 20mm 19mm; }
  html, body { background: white !important; }
  body.print-ready #app, body.print-ready .print-dialog { display: none !important; }
  .print-paper { display: block; }
  .paper-header { position: static; }
  .paper-section h2, .paper-section h3 { break-after: avoid; }
  .paper-pair, .paper-line, .paper-notes p { break-inside: avoid; }
  .paper-translation p { orphans: 3; widows: 3; }
  .paper-footer { break-inside: avoid; }
}
