/* ===== merged from dict_sheet.css (2026-05-11) ===== */
/* ===============================
   Dictionary Bottom Sheet
=============================== */

/* 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-meaning-en{
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
}

.dict-meaning-ja{
  font-size: 14px;
  color: #444;
}

.dict-examples{
  padding-left: 18px;
  margin: 0;
}

.dict-examples li{
  margin-bottom: 6px;
  font-size: 14px;
}

/* Actions */
.dict-actions{
  margin-top: 12px;
  text-align: right;
}

.dict-study-btn{
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  font-size: 14px;
  cursor: pointer;
  background: #111;
  color: #fff;
  transition: opacity 0.15s ease;
}
.dict-study-btn{
  display:flex;
  align-items:center;
  gap:8px;
}

.dict-study-ico{
  width:16px;
  height:16px;
  flex:0 0 16px;
  opacity:.9;
}
.dict-study-btn:hover{
  opacity: 0.85;
}

.dict-study-btn.added{
  background: #2f80ed;
}

/* 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;
}

/* ===== CEFR badge（pack_manageと同じ） ===== */

/* もし :root に変数が無い場合のフォールバック */
:root{
  --unk-bg: rgba(255,255,255,.10);
  --unk-bd: rgba(255,255,255,.18);
  --unk-tx: rgba(255,255,255,.85);

  --a1-bg: rgba(120, 220, 140, .18);
  --a1-bd: rgba(120, 220, 140, .35);
  --a1-tx: rgba(10, 60, 25, .95);

  --a2-bg: rgba(90, 200, 250, .18);
  --a2-bd: rgba(90, 200, 250, .35);
  --a2-tx: rgba(10, 45, 70, .95);

  --b1-bg: rgba(255, 210, 90, .18);
  --b1-bd: rgba(255, 210, 90, .35);
  --b1-tx: rgba(70, 45, 0, .95);

  --b2-bg: rgba(255, 150, 90, .18);
  --b2-bd: rgba(255, 150, 90, .35);
  --b2-tx: rgba(80, 30, 10, .95);

  --c1-bg: rgba(190, 140, 255, .18);
  --c1-bd: rgba(190, 140, 255, .35);
  --c1-tx: rgba(40, 20, 80, .95);

  --c2-bg: rgba(255, 110, 160, .18);
  --c2-bd: rgba(255, 110, 160, .35);
  --c2-tx: rgba(80, 10, 35, .95);
}

/* pack_manageのcefrBadgeをそのまま移植 */
.cefrBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 6px;
  border-radius:999px;
  font-size:10px;
  font-weight:900;
  border:1px solid var(--unk-bd, rgba(0,0,0,.15));
  background:var(--unk-bg);
  color:var(--unk-tx);
  white-space: nowrap;
}

.cefrBadge[data-cefr="A1"]{background:var(--a1-bg);border-color:var(--a1-bd);color:var(--a1-tx);}
.cefrBadge[data-cefr="A2"]{background:var(--a2-bg);border-color:var(--a2-bd);color:var(--a2-tx);}
.cefrBadge[data-cefr="B1"]{background:var(--b1-bg);border-color:var(--b1-bd);color:var(--b1-tx);}
.cefrBadge[data-cefr="B2"]{background:var(--b2-bg);border-color:var(--b2-bd);color:var(--b2-tx);}
.cefrBadge[data-cefr="C1"]{background:var(--c1-bg);border-color:var(--c1-bd);color:var(--c1-tx);}
.cefrBadge[data-cefr="C2"]{background:var(--c2-bg);border-color:var(--c2-bd);color:var(--c2-tx);}
.cefrBadge[data-cefr="UNK"]{background:var(--unk-bg);border-color:var(--unk-bd);color:var(--unk-tx);}
.cefrBadge[data-cefr="UNK"]{
  background: rgba(180,180,180,.18) !important;
  border-color: rgba(180,180,180,.35) !important;
  color: rgba(60,60,60,.95) !important;
}
/* divider under header */
.dict-divider{
  display:block;
  height: 1px;
  margin: 10px 0 12px;
  background: rgba(0,0,0,.14);
  opacity: 1;
}

/* ===== resultページ風：見出しだけ色（チップ） ===== */
.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;
}

/* Meaning / Examples を色分け */
.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;
}
/* ===== /merged from dict_sheet.css ===== */
/* ===== merged from reading/reading_base.css (2026-05-11) ===== */
:root{
  --header-h: 44px;
  --header-gap: 0px;
  --page-bg: #faf7f2;
  --page-text: #1a1108;
  --panel-bg: rgba(120,120,120,.92); /* 添付のようなグレー */
  --panel-text: #fff;
  --panel-line: rgba(255,255,255,.55);
  --panel-hover: rgba(255,255,255,.12);
}
body{
  margin: 0;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: Georgia, "Times New Roman", serif;
}
body.no-highlight .vocab{
  border-bottom: none;
  background: transparent;
}
/* 学習モードOFF */
body.no-highlight .reading-text .vocab{
  background:transparent;
  border-bottom-color:transparent;
}
/* Study Later アイコン非表示 */
body.no-saved-icons .reading-text .vocab.saved-word::after{
  content:none;
}
body.theme-black .reading-progress{
  background: var(--page-bg);
}

body.theme-black .reading-progress__bar{
  background:rgba(255,255,255,.16);
}

body.theme-black .reading-progress__label,
body.theme-black .reading-progress__value{
  color:rgba(255,255,255,.82);
}
.reading-wrap{
  max-width: 760px;
  margin: 0 auto;
  padding-top: 116px;
  padding-left: 16px;
  padding-right: 16px;
}
.reading-shell{
  display: flex;
  align-items: flex-start;
}
    .reading-text{
      line-height: 1.9;          /* CLS 対策：segmented .para と一致（旧 2.0） */
      font-size: 16px;           /* CLS 対策：JS の FONT_SIZES[2]=16px と一致（旧 17px） */
      background: transparent;
      border-radius: 0;
      /* padding: 7px 16px; */
      padding-left: 28px;        /* CLS 対策：segmented 後の .para padding-left と本文 X 座標を揃える */
      border: none;   /* ← 枠線削除 */
    }
    /* segmented 化された後は .para 側で padding-left:28px を持つため、
       親の padding-left を 0 に戻して二重インデントを防ぐ。 */
    .reading-text--segmented{
      padding-left: 0;
    }
    @media (max-width: 480px){
      .reading-text{
        padding-left: 20px;      /* segmented モバイル値と一致 */
      }
    }
.reading-subtitle{
  text-align: center;
  font-size: 13px;
  color: #666;
  margin: 6px 0 14px;
}
.reading-progress__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.reading-progress__label{
  font-size:12px;
  font-weight:700;
  color:#666;
}

.reading-progress__value{
  font-size:12px;
  font-weight:800;
  color:#666;
}

.reading-progress__bar{
  width:100%;
  height:8px;
  background:rgba(0,0,0,.08);
  border-radius:999px;
  overflow:hidden;
}

.reading-progress__fill{
  width:0%;
  height:100%;
  background:#c8862a;
  border-radius:999px;
  transition:width .12s ease;
}
/* ヘッダー直下に固定 */
.reading-topbar{
  position: sticky;
  top: calc(44px + 49px); /* header 44 + subbar高さ分 */
  z-index: 195;

  display: block;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0 16px 12px;

  background: #fff;
  box-sizing: border-box;

  transition: top .22s ease;
}
.reading-topbar.is-header-hidden{
  top: 44px; /* subbarが最上部に来たら、そのすぐ下へ */
}
    .toast{
      position: fixed;
      left: 50%;
      bottom: 18px;
      transform: translateX(-50%);
      background: rgba(0,0,0,.82);
      color: #fff;
      padding: 10px 12px;
      border-radius: 10px;
      font-size: 13px;
      opacity: 0;
      pointer-events: none;
      transition: opacity .18s ease;
    }
    .toast.show{ opacity: 1; }
    .vocab{
      cursor: pointer;
      padding: 0 2px;
      border-bottom: 2px solid rgba(255,165,0,.9);
      background: rgba(255,165,0,.12);
      border-radius: 4px;
    }
    .vocab.saved{
      border-bottom-color: rgba(0,160,80,.95);
      background: rgba(0,160,80,.14);
    }

.theme-black .vocab{
  background: rgba(255,165,0,.22);
}
.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;
}

.reading-text .vocab:hover{
  background:rgba(255,165,0,.18);
}

/* 既知語 */
.reading-text .vocab.known-word{
  border-bottom-color:rgba(120,120,120,.55);
  background:rgba(120,120,120,.10);
  color:inherit;
}

.reading-text .vocab.known-word:hover{
  background:rgba(120,120,120,.16);
}
.reading-text .vocab{
  position:relative;
}

.reading-text .vocab.saved-word::after{
  content:"";
  position:absolute;
  top:-7px;
  right:-6px;
  width:12px;
  height:12px;
  background-image:url("/static/icons/study-later.svg");
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
}
.dict-wordline{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.text-switch-line{
  border:none !important;
  background:transparent !important;
  padding:0 !important;
  margin-bottom:16px;
}
.text-switch-speaker{
  color:#666;
  font-weight:800;
  margin-bottom:8px;
}
/* speaker name */
.text-switch-speaker{
  font-weight:700;
  font-size:13px;
  margin-bottom:4px;
}
.text-switch-body{
  font-size:16px;
  line-height:1.7;
}
.speaker-john{
  color:#3b82f6;
}
.speaker-cale{
  color:#10b981;
}
.reading-text--segmented .para{
  position: relative;
  margin: 0 0 14px 0;
  line-height: 1.9;
  padding-left: 28px;
}
.reading-text--explain{
  line-height: 1.95;
  font-size: 16px;
}

  .reading-text--explain .para{
    margin: 0 0 20px;
    padding: 0;
  }

  .reading-text--explain .para:last-child{
    margin-bottom: 0;
  }
  @media (max-width: 640px){
  .reading-text--explain{
    font-size: 15px;
    line-height: 1.9;
  }

  .reading-text--explain .para{
    margin-bottom: 18px;
  }
}
.dict-status-icon{
  width:18px;
  height:18px;
  object-fit:contain;
  display:inline-block;
}

/* 管理画面と同じレベルバッジ */
.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[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); }
.reading-progress{
  position: fixed;
  top: calc(44px + 48px + 1px);
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  z-index: 899;
  pointer-events: none;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
}
  .reading-text--text-switch{
  display:flex;
  flex-direction:column;
  gap:14px;
  color:#111 !important;
}

/* ===== ストーリータイトル ===== */
.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;
}

/* ===== 目次 (TOC) ===== */
.reading-toc {
  max-width: 680px;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 40px;
  padding: 24px 16px;
  background: #f0ebe2;
  border: 1px solid #e8e0d4;
  border-radius: 4px;
}
.reading-toc__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 16px;
}
.reading-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.reading-toc__item {
  border-bottom: 0.5px solid rgba(0,0,0,.08);
  padding-bottom: 16px;
}
.reading-toc__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.reading-toc__link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 6px;
}
.reading-toc__marker {
  font-size: 13px;
  font-weight: 700;
  color: #c8862a;
  min-width: 28px;
  flex-shrink: 0;
}
.reading-toc__title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  transition: color .15s;
}
.reading-toc__link:hover .reading-toc__title {
  color: #c8862a;
}
.reading-toc__desc {
  font-size: 13px;
  color: #6e6e73;
  line-height: 1.65;
  margin: 0;
  padding-left: 38px;
}
.reading-anchor {
  display: block;
  height: 0;
  margin-top: -116px;
  padding-top: 116px;
}

/* ─── スマホ：段落の左余白を縮小 ─── */
@media (max-width: 480px) {
  .reading-text--segmented .para {
    padding-left: 20px;
  }
}
/* ===== /merged from reading/reading_base.css ===== */
/* ===== merged from reading/reading_bookmark.css (2026-05-11) ===== */
.bm-rail{
  width: 34px;
  position: sticky;
  top: 18px; /* ヘッダーがないページならこれでOK */
  height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bm-rail--ghost{
  visibility:hidden;
}
.bm-slot{
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.18);
  background: transparent;
  cursor: pointer;
}

.bm-slot.is-filled{
  border-color: rgba(0,0,0,.12);
}

/* 左：ブックマーク本体（空/色付き） */
.bm-left{
  position: absolute;
  left: 0;
  top: calc(50% + 56px);
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.bm-left img{ width: 22px; height: 22px; display:block; }
@media (max-width: 640px) {
  .bm-left {
    left: -8px;
    width: 18px;
    height: 18px;
  }
  .bm-left img{ width: 22px; height: 22px; }
}

/* 右：badge（色 or off） */
.bm-badge-right{
  display: none !important;
}
.bm-badge-right img{ width: 22px; height: 22px; display:block; }
/* ===== Modal ===== */
.bm-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999999;
}
.bm-modal.is-open{
  display: block !important;  /* 何かに上書きされても強制表示 */
}

/* 背景は暗くしない（外クリック検知だけに使う） */
.bm-modal__backdrop{
  position: fixed;
  inset: 0;
  background: transparent;
}

/* “画面中央”ではなく、JSで top/left を入れる */
.bm-modal__panel{
  position: fixed;
  left: 0;
  top: 0;
  transform: none;

  background: rgba(35,35,35,.96);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  padding: 8px 10px;
}

.bm-modal__title{
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

/* 添付っぽい横並び */
.bm-modal__dots{
  display: flex;
  align-items: center;
  gap: 10px;
}
.bm-modal__footer{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
/* ドット */
.bm-dot{
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.bm-dot[data-bm-color="red"]{ background:#ff4d4f; }
.bm-dot[data-bm-color="orange"]{ background:#ff8a34; }
.bm-dot[data-bm-color="yellow"]{ background:#ffd84a; }
.bm-dot[data-bm-color="green"]{ background:#2ecc71; }
.bm-dot[data-bm-color="blue"]{ background:#3b82f6; }

/* off（削除）アイコン：小さめ・右寄り */
.bm-off{
  margin-left: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.bm-off img{
  width: 18px;
  height: 18px;
  display:block;
}
/* 右端の× */
.bm-x{
  margin-left: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.92);
  border-radius: 6px;
  cursor: pointer;
  line-height: 18px;
  font-size: 14px;
  padding: 0;
}
.bm-x:hover{ background: rgba(255,255,255,.14); }
.bm-close{
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor:pointer;
}
/* ===== /merged from reading/reading_bookmark.css ===== */
/* ===== merged from reading/reading_drawer.css (2026-05-11) ===== */
/* ===== Overlay ===== */
.cfg-overlay{
  position: fixed;
  inset: calc(var(--header-h) + var(--header-gap)) 0 0 0;
  background: rgba(0,0,0,.12); /* 本文側に薄グレー */
  z-index: 1100;
}
/* ===== Drawer ===== */
.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;
}
/* ===== Toggle ===== */
.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;
}
/* ===== Font slider ===== */
.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);
}
/* ===== Background buttons ===== */
.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-bm-list{ display: flex; flex-direction: column; gap: 8px; }
.cfg-bm-item{
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
}
.cfg-bm-item:hover{ background: var(--panel-hover); }
.cfg-bm-empty{ opacity: .85; font-size: 13px; }
.cfg-stat-row{
  display:flex;
  align-items:baseline;
  justify-content:flex-start;
  gap:6px;
  font-size:14px;
}
.cfg-stat-row--clickable{
  cursor:pointer;
  user-select:none;
}

.cfg-stat-row--clickable:hover{
  opacity:.9;
}
.cfg-stat-value{
  font-weight:800;
  font-size:18px;
  line-height:1;
}
.cfg-study-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
}
.cfg-study-item{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
}

.cfg-study-item:hover{
  background: var(--panel-hover);
}
.cfg-study-ico{
  width:16px;
  height:16px;
  object-fit:contain;
  flex:0 0 auto;
}
.cfg-study-word{
  font-size:14px;
  font-weight:700;
  line-height:1.2;
}
.cfg-study-meta{
  margin-left:auto;
  font-size:11px;
  opacity:.85;
  white-space:nowrap;
}
.cfg-review-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:12px;
  padding:10px 14px;
  border-radius:12px;
  text-decoration:none;
  font-size:14px;
  font-weight:800;
  color:#fff;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.18);
}

.cfg-review-btn:hover{
  background:rgba(255,255,255,.20);
}

.cfg-review-btn.is-disabled{
  opacity:.45;
  pointer-events:none;
}
/* 設定バー全体 */
.reading-tools{
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
/* ===== Settings button (fixed top-right) ===== */
.cfg-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  min-height: 40px;
  padding: 0 14px;

  border: none;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}

.cfg-btn--inline{
  position: static;
  width: auto;
  height: 40px;
}

.cfg-btn img{
  width: 18px;
  height: 18px;
  display: block;
}
.cfg-btn--inline span{
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.cfg-btn:hover{
  background: rgba(0,0,0,0.06);
}

.cfg-btn:active{
  background: rgba(0,0,0,0.12);
}
.cfg-bm-ico{ width: 26px; height: 26px; display:block; }
.cfg-bm-text{
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cfg-a{ font-weight: 800; opacity: .95; }
.cfg-a--big{ font-size: 20px; }

/* 左の表示設定ボタン */
.cfg-app-btn{
  flex: 0 0 auto;

  width: 56px;
  height: 56px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: #fff;
  border-radius: 16px;
  cursor: pointer;

  transition: background .15s ease;
}

.cfg-app-btn:hover{
  background: rgba(0,0,0,0.06);
}

.cfg-app-btn:active{
  background: rgba(0,0,0,0.12);
}

.cfg-app-btn img{
  width: 32px;
  height: 32px;
  display: block;
}
.cfg-app-btn--subbar,
.reading-back-btn{
  width: 44px;
  height: 44px;
}
/* ===== /merged from reading/reading_drawer.css ===== */

/* === Reading sentence sync highlight (Phase 3a, 2026-05-16) === */
.reading-cue {
    transition: background-color 0.25s ease, color 0.25s ease;
    border-radius: 3px;
    padding: 1px 2px;
    margin: -1px -2px;
}
.reading-cue.active {
    background-color: rgba(200, 134, 42, 0.18);
}
/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
    .reading-cue {
        transition: none;
    }
}
