  /* reading.css: 本文ページ専用。site.css の後に読み込む */
  /* ---- settings drawer: LITIM reading_bundle.css（reading_drawer.css 由来）---- */
  .cfg-overlay{
    position:fixed;
    inset:calc(var(--header-h) + var(--header-gap)) 0 0 0;
    background:rgba(0,0,0,.12);
    z-index:1100;
  }
  .cfg-drawer{
    position:fixed;
    top:calc(var(--header-h) + var(--header-gap));
    right:0;
    width:min(360px, 78vw);
    height:calc(100vh - var(--header-h) - var(--header-gap));
    background:var(--panel-bg);
    color:var(--panel-text);
    z-index:1150;
    transform:translateX(100%);
    transition:transform .18s ease;
    overflow:auto;
  }
  .cfg-drawer.is-open{transform:translateX(0);}
  .cfg-inner{padding:18px 16px 22px;}
  .cfg-sec{
    margin-bottom:22px;
    padding-top:30px;
  }
  .cfg-h{
    font-weight:800;
    font-size:18px;
    letter-spacing:.02em;
  }
  .cfg-hr{
    height:2px;
    background:var(--panel-line);
    margin:10px 0 12px;
    border-radius:2px;
  }
  .cfg-toggle{
    width:44px;
    height:24px;
    border-radius:20px;
    border:none;
    background:rgba(255,255,255,.35);
    position:relative;
    cursor:pointer;
    transition:background .18s ease;
  }
  .cfg-toggle-row{
    display:flex;
    align-items:center;
    gap:12px;
    font-size:14px;
  }
  .cfg-toggle-knob{
    position:absolute;
    top:3px;
    left:3px;
    width:18px;
    height:18px;
    border-radius:50%;
    background:#fff;
    transition:transform .18s ease;
  }
  .cfg-toggle.is-on .cfg-toggle-knob{transform:translateX(20px);}
  .cfg-toggle.is-on{background:#3b82f6;}
  .cfg-font-row{
    display:grid;
    grid-template-columns:18px 1fr 18px;
    gap:12px;
    align-items:center;
    padding:6px 0;
  }
  .cfg-slider{
    position:relative;
    height:30px;
  }
  .cfg-track{
    position:absolute;
    left:0; right:0;
    top:50%;
    height:3px;
    transform:translateY(-50%);
    background:rgba(255,255,255,.60);
    border-radius:3px;
  }
  .cfg-ticks{
    position:absolute;
    inset:0;
    display:grid;
    grid-auto-flow:column;
    align-items:center;
    gap:0;
  }
  .cfg-tick{
    height:16px;
    display:grid;
    place-items:center;
    cursor:pointer;
  }
  .cfg-tick::before{
    content:"";
    width:2px;
    height:10px;
    background:rgba(255,255,255,.70);
    border-radius:2px;
  }
  .cfg-knob{
    position:absolute;
    top:50%;
    left:0;
    width:18px;
    height:18px;
    transform:translate(-50%,-50%);
    background:#fff;
    border-radius:50%;
    box-shadow:0 6px 18px rgba(0,0,0,.22);
  }
  .cfg-bg-row{
    display:flex;
    gap:22px;
    align-items:center;
    padding:8px 0 0;
  }
  .cfg-bg{
    width:18px;
    height:18px;
    border-radius:50%;
    border:2px solid rgba(255,255,255,.70);
    background:transparent;
    cursor:pointer;
    opacity:.95;
  }
  .cfg-bg[data-bg="white"]{background:#fff; border-color:rgba(0,0,0,.15);}
  .cfg-bg[data-bg="gray"]{background:#cfcfcf; border-color:rgba(255,255,255,.60);}
  .cfg-bg[data-bg="black"]{background:#111; border-color:rgba(255,255,255,.70);}
  .cfg-bg.is-active{
    outline:3px solid rgba(255,255,255,.55);
    outline-offset:3px;
  }
  .cfg-a{font-weight:800; opacity:.95;}
  .cfg-a--big{font-size:20px;}

  /* ---- back to top: LITIM back_to_top.css ＋ reading_text.html の #scrollTopBtn（後者が優先） ---- */
  .scroll-top-btn{
    position:fixed;
    right:16px;
    bottom:16px;
    width:44px;
    height:44px;
    border-radius:999px;
    border:none;
    background:#111;
    color:#fff;
    font-size:18px;
    font-weight:900;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(0,0,0,.2);
    opacity:0;
    transform:translateY(10px);
    transition:all .25s ease;
    z-index:999;
  }
  .scroll-top-btn.is-show{
    opacity:1;
    transform:translateY(0);
  }
  .scroll-top-btn:hover{background:#333;}
  #scrollTopBtn{
    position:fixed;
    bottom:28px;
    right:20px;
    width:44px;
    height:44px;
    border-radius:50%;
    background:#1a1108;
    color:#faf7f2;
    border:none;
    font-size:18px;
    cursor:pointer;
    display:none;
    align-items:center;
    justify-content:center;
    box-shadow:0 2px 12px rgba(0,0,0,.2);
    transition:background .15s, opacity .2s;
    z-index:800;
  }
  #scrollTopBtn:hover{background:#2d1e0e;}
  #scrollTopBtn.is-show{display:flex;}

  /* ---- layout: LITIM .reading-wrap / .reading-shell / .reading-story-title ----
     LITIM は box-sizing 未指定（content-box）なので wrap だけ content-box に戻す。
     padding-top: LITIM と同じ 116px（固定サブバー 48px + 余白 68px）。 */
  .reading-wrap{
    box-sizing:content-box;
    max-width:760px;
    margin:0 auto;
    padding-top:116px;
    padding-left:16px;
    padding-right:16px;
    padding-bottom:80px;
  }
  .reading-shell{
    display:flex;
    align-items:flex-start;
  }
  .reading-story-title{
    font-size:clamp(24px, 4vw, 36px);
    font-weight:700;
    color:#1a1108;
    font-family:Georgia,"Times New Roman",serif;
    letter-spacing:-.02em;
    text-align:center;
    margin:0 auto 16px;
    max-width:680px;
    padding:0 24px;
  }

  /* reading body: LITIM .reading-text ＋ 日本語向け例外
     （本文フォント / 18px。行間 2.15・字間 .04em）。幅は LITIM と同じく .reading-wrap いっぱい */
  .reading-text{
    font-family:"Zen Old Mincho","Hiragino Mincho ProN","Yu Mincho",serif;
    font-size:18px;
    line-height:2.15;
    letter-spacing:.04em;
    background:transparent;
    border-radius:0;
    padding-left:0;
    border:none;
  }
  /* LITIM .reading-text--segmented .para の段落間隔 */
  .reading-text p{position:relative; margin:0 0 14px 0;}

  /* ruby / furigana */
  ruby{ruby-position:over;}
  rt.furi{
    font-size:.5em; color:#8b7355; font-weight:400; letter-spacing:0;
    user-select:none;
  }
  /* toggle: visibility (not display) so the line height never jumps */
  body.furi-off rt.furi{visibility:hidden;}

  /* vocab: LITIM .reading-text .vocab と同じ見た目 */
  .reading-text .vocab{
    cursor:pointer;
    padding:0 2px;
    border-bottom:2px solid rgba(255,165,0,.92);
    background:rgba(255,165,0,.12);
    border-radius:3px;
    transition:background .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
    position:relative;
  }
  .reading-text .vocab:hover{background:rgba(255,165,0,.18);}
  /* ハイライト OFF（設定ドロワー）: LITIM body.no-highlight */
  body.no-highlight .vocab{
    border-bottom:none;
    background:transparent;
  }
  body.no-highlight .reading-text .vocab{
    background:transparent;
    border-bottom-color:transparent;
  }
  .sent{ /* cue container — no visual style in v0 */ }

  /* credit: LITIM .gutenberg-credit（landing.css）と同じ見た目 */
  .aozora-credit{margin-top:3rem; padding:1rem 1.5rem; border-top:0.5px solid #e0ddd8;
    font-size:12px; color:#aaa; text-align:center;}
  .aozora-credit p{margin:0 0 .4em;}
  .aozora-credit a{color:#888; text-decoration:underline;}
  .aozora-credit a:hover{color:#c8862a;}


  /* ---- dictionary bottom sheet: LITIM reading_bundle.css 1-271行目（旧 dict_sheet.css）----
     ＋ components/dict_sheet.html のインライン style（.dict-word-main / .dict-word-inflections）
     ＋ reading_bundle.css の .yt-level-badge。
     値は LITIM と同じ。背景色の設定（--page-bg / --page-text）には連動しない＝黒背景でもシートは白
     （LITIM も同じ扱い）。移していないもの: .cefrBadge と --a1..--c2/--unk 変数、
     .dict-meaning-en/-ja（どちらも aozora の DOM では使われない）、.dict-status-icon
     （状態・保存アイコンはサーバー依存のため置かない）、保存ボタンの見た目（ボタンは非表示）。 */

  /* Overlay */
  .dict-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.35);
    z-index:999;
    opacity:0;
    transition:opacity 0.2s ease;
  }
  .dict-overlay.active{opacity:1;}

  /* Sheet */
  .dict-sheet{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    background:#ffffff;
    border-top-left-radius:18px;
    border-top-right-radius:18px;
    box-shadow:0 -8px 30px rgba(0,0,0,0.15);
    padding:18px 20px 24px;
    z-index:1000;
    transform:translateY(100%);
    transition:transform 0.25s ease;
    max-height:80vh;
    overflow-y:auto;
  }
  .dict-sheet.active{transform:translateY(0);}

  /* Header */
  .dict-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:14px;
  }
  .dict-word{
    font-size:20px;
    font-weight:700;
  }
  .dict-close{
    border:none;
    background:none;
    font-size:22px;
    cursor:pointer;
  }

  /* Sections */
  .dict-section{margin-bottom:16px;}
  .dict-title{
    font-size:13px;
    font-weight:600;
    color:#666;
    margin-bottom:6px;
    text-transform:none !important;
    letter-spacing:0.5px;
  }
  .dict-examples{
    padding-left:18px;
    margin:0;
  }
  .dict-examples li{
    margin-bottom:6px;
    font-size:14px;
  }

  /* Actions: standalone では保存できないのでボタンごと非表示（LITIM も HTML を無効化済み）。
     #dictStudyBtn は dict_sheet.js が参照するので DOM には残す */
  .dict-study-btn{display:none;}

  /* Toast */
  .dict-toast{
    position:fixed;
    left:50%;
    bottom:110px;
    transform:translateX(-50%);
    background:#222;
    color:#fff;
    padding:10px 16px;
    border-radius:999px;
    font-size:13px;
    z-index:1100;
    opacity:0;
    transition:opacity 0.2s ease;
  }
  .dict-toast.active{opacity:1;}

  /* header: word + level */
  .dict-wordline{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
  }
  #dictWord{min-width:0;}

  /* components/dict_sheet.html のインライン style */
  .dict-word-main{
    font-size:22px;
    font-weight:700;
    line-height:1.2;
  }
  .dict-word-inflections{
    font-size:13px;
    color:#8b7355;
    font-weight:400;
    margin-top:2px;
    line-height:1.3;
  }

  /* divider under header */
  .dict-divider{
    display:block;
    height:1px;
    margin:10px 0 12px;
    background:rgba(0,0,0,.14);
    opacity:1;
  }

  /* 見出しチップ（Meaning / Examples を色分け） */
  .dict-title{
    display:inline-flex;
    align-items:center;
    padding:4px 10px;
    border-radius:8px;
    font-size:12px;
    font-weight:900;
    letter-spacing:.2px;
    margin:0 0 8px;
  }
  .dict-title--meaning{
    background:rgba(130,53,72,1);
    color:#fff;
  }
  .dict-title--examples{
    background:rgba(37,101,134,1);
    color:#fff;
  }
  .dict-meanings{
    margin:10px 0 0;
    padding-left:18px;
  }
  .dict-meanings li{
    margin:0 0 8px;
    line-height:1.65;
    color:#111;
    font-size:15px;
  }

  /* レベルバッジ（reading_bundle.css .yt-level-badge） */
  .yt-level-badge{
    position:static !important;
    inset:auto !important;
    transform:none !important;
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:2px 8px;
    border-radius:999px;
    font-weight:900;
    font-size:10px;
    line-height:1;
    color:#fff;
    border:1px solid rgba(255,255,255,.18);
    box-shadow:none !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    white-space:nowrap;
  }
  .yt-level-badge[hidden]{display:none;}
  .yt-level-badge[data-level="A1"]{background:#2ECC71;}
  .yt-level-badge[data-level="A2"]{background:#27AE60;}
  .yt-level-badge[data-level="B1"]{background:#3498DB;}
  .yt-level-badge[data-level="B2"]{background:#2C3E90;}
  .yt-level-badge[data-level="C1"]{background:#E74C3C;}
  .yt-level-badge[data-level="C2"]{background:#8E44AD;}
  .yt-level-badge[data-level="UNK"]{background:rgba(0,0,0,.55);}
  /* aozora は全語 UNK（レベル未付与）なので UNK バッジは出さない。
     A1〜C2 の表示は LITIM のまま（JLPT レベルを付けるときに見直す） */
  .yt-level-badge[data-level="UNK"]{display:none;}

  /* 例文が無いときはセクションごと隠す（reading_ui.js が hidden を付け外しする） */
  .dict-section[hidden]{display:none;}

  /* aozora: In this story（本文で最初に出てくる文）と例文（日本語・読み・英訳）。
     見出しチップは Meaning / Examples と同じ形で、色だけ変える */
  .dict-title--story{
    background:rgba(160,104,32,1);
    color:#fff;
  }
  .dict-story{
    margin:2px 0 0;
    font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;
    font-size:15px;
    line-height:1.8;
    color:#333;
  }
  .dict-story-word{
    font-weight:700;
    color:#111;
    background:rgba(200,134,42,.18);
    border-radius:2px;
    padding:0 1px;
  }
  .dict-examples .dict-example{margin-bottom:12px; font-size:14px;}
  .dict-examples .dict-example:last-child{margin-bottom:0;}
  .dict-example-ja{font-size:15px; line-height:1.6; color:#111;}
  .dict-example-kana{font-size:12px; line-height:1.5; color:#8b7355;}
  .dict-example-en{font-size:13px; line-height:1.5; color:#555; margin-top:2px;}
