/* 色とフォントは 2026.10.05_daily_review.docx の実測値をそのまま使う */
:root {
  --title: #84C9EF;      /* タイトル */
  --heading: #B4D2ED;    /* テーマ・文・表現の見出し */
  --key: #E3B1D2;        /* 重要語(太字) */
  --th: #E8EEF4;         /* 表の見出し行の背景 */
  --th-gram: #E8F1FA;    /* 表の「文法・語形」列の背景 */
  --line: #D9D9D9;       /* 罫線 */
  --text: #000000;
  --muted: #5a5a5a;
  --bg: #ffffff;
  --bar-h: 3.25rem;
  /* Cambria が無い端末(iPhone・Android)では Caladea。和文は Noto Sans JP(= Noto Sans CJK JP と同系統) */
  --font: Cambria, Caladea, "Noto Sans JP", "Noto Sans CJK JP", "Hiragino Sans", "Yu Gothic", Meiryo, serif;
  --fs: 1rem;
}
html[data-fs="s"] { --fs: 0.9rem; }
html[data-fs="l"] { --fs: 1.15rem; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) * 2 + 0.5rem); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs); line-height: 1.7;
  padding-bottom: env(safe-area-inset-bottom);
}
body.sheet-open { padding-bottom: calc(15rem + env(safe-area-inset-bottom)); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #4a90c4; outline-offset: 2px; }
[hidden] { display: none !important; }
main { max-width: 52rem; margin: 0 auto; padding: 1rem 16px 4rem; }

/* ---- 上部バー ---- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: 0.25rem; padding: 0 12px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; color: var(--title); text-decoration: none; margin-right: auto; font-size: 1.05rem; white-space: nowrap; }
.topbar nav { display: flex; gap: 0.15rem; }
.topbar nav a { padding: 0.45rem 0.6rem; border-radius: 6px; text-decoration: none; font-size: 0.92rem; min-height: 2.5rem; display: inline-flex; align-items: center; }
.topbar nav a[aria-current="page"] { background: var(--th); font-weight: 700; }
#banner { background: var(--th-gram); border-bottom: 1px solid var(--line); padding: 0.5rem 16px; font-size: 0.9rem; }
#banner button { margin-left: 0.5rem; }

/* ---- 見出し(docx と同じ配色・段階) ---- */
h1.doc-title { color: var(--title); font-size: 1.9rem; line-height: 1.3; margin: 0.4rem 0 1rem; }
h2.theme-h { color: var(--heading); font-size: 1.45rem; margin: 2.2rem 0 0.6rem; }
h3.sent-h { color: var(--heading); font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }
h4.expr-h { color: var(--heading); font-size: 1rem; margin: 0.9rem 0 0.3rem; }
h2.page-h { color: var(--heading); font-size: 1.35rem; margin: 1.2rem 0 0.6rem; }
.meta { margin: 0.1rem 0; font-weight: 700; }
.meta span { font-weight: 400; }
.muted { color: var(--muted); font-size: 0.9rem; }

/* ---- ボタン・部品 ---- */
button { cursor: pointer; }
.btn {
  border: 1px solid var(--line); background: var(--bg); border-radius: 8px;
  padding: 0.45rem 0.85rem; min-height: 2.5rem; line-height: 1.2;
}
.btn:hover { background: var(--th); }
.btn.primary { background: var(--heading); border-color: var(--heading); font-weight: 700; }
.btn.primary:hover { filter: brightness(0.96); }
.btn.small { min-height: 2.1rem; padding: 0.25rem 0.6rem; font-size: 0.9rem; }
.btn[aria-pressed="true"] { background: var(--th); border-color: #9bbbd6; font-weight: 700; }
.btn:disabled { opacity: 0.45; cursor: default; }
.chip {
  border: 1px solid var(--line); background: var(--th-gram); border-radius: 999px;
  padding: 0.25rem 0.8rem; min-height: 2.1rem; font-size: 0.95rem;
}
.chip[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); font-weight: 700; }
.chip:disabled { opacity: 0.4; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--bg); padding: 0.35rem 0.7rem; min-height: 2.1rem; font-size: 0.9rem; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--heading); font-weight: 700; }
input[type="search"], input[type="text"], select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.75rem; background: var(--bg); min-height: 2.6rem;
}
label.check { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.2rem; }
label.check input { width: 1.1rem; height: 1.1rem; }

/* ---- ホーム ---- */
.lesson-list { display: grid; gap: 0.75rem; margin: 0.8rem 0 1.4rem; padding: 0; list-style: none; }
.lesson-card { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; text-decoration: none; background: var(--bg); }
.lesson-card:hover { background: var(--th-gram); }
.lesson-card .date { color: var(--heading); font-weight: 700; font-size: 1.15rem; }
.lesson-card .course { font-weight: 700; }
.lesson-card .stats { color: var(--muted); font-size: 0.88rem; }
.badge { display: inline-block; font-size: 0.75rem; padding: 0 0.45rem; border: 1px solid var(--line); border-radius: 999px; background: var(--th); margin-left: 0.4rem; vertical-align: middle; }
.review-box { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; background: var(--th-gram); margin: 0.8rem 0; }
.review-box strong { font-size: 1.1rem; }
.drop {
  border: 2px dashed var(--line); border-radius: 10px; padding: 1rem; text-align: center; background: var(--bg); margin: 0.6rem 0;
}
.drop.over { background: var(--th-gram); border-color: var(--heading); }
.report { border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; margin: 0.6rem 0; }
.report ul { margin: 0.4rem 0; padding-left: 1.2rem; max-height: 14rem; overflow: auto; }
.report li.error { font-weight: 700; }
.report li.info { color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* 検索結果 */
.results h3 { color: var(--heading); font-size: 1.05rem; margin: 1rem 0 0.3rem; }
.hit { display: block; border-bottom: 1px solid var(--line); padding: 0.55rem 0.2rem; text-decoration: none; }
.hit:hover { background: var(--th-gram); }
.hit .where { color: var(--muted); font-size: 0.82rem; }
mark { background: var(--th); color: inherit; padding: 0 1px; }

/* ---- リーダー ---- */
.reader-bar {
  position: sticky; top: var(--bar-h); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line);
  margin: 0 -16px; padding: 0.4rem 16px; display: flex; gap: 0.6rem; align-items: center;
}
.theme-nav { display: flex; gap: 0.35rem; overflow-x: auto; flex: 1; scrollbar-width: none; padding: 2px; }
.theme-nav::-webkit-scrollbar { display: none; }
.theme-nav .chip { flex: none; text-decoration: none; display: inline-flex; align-items: center; padding: 0.25rem 0.65rem; }
.summary-box { border: 1px solid var(--line); border-radius: 10px; padding: 0.4rem 0.9rem 0.7rem; }
.summary-box > summary { cursor: pointer; min-height: 2.2rem; display: flex; align-items: center; color: var(--muted); }
.summary-box .chips { display: flex; gap: 0.4rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.summary-box p { margin: 0; white-space: pre-line; }
.sent { font-size: var(--sent-fs, 1.3rem); line-height: 2.1; margin: 0.2rem 0 0.6rem; }
.sent-block { scroll-margin-top: calc(var(--bar-h) * 2 + 0.5rem); border-radius: 8px; }
.sent-block.flash { animation: flash 2s ease-out; }
@keyframes flash { from { background: var(--th); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .sent-block.flash { animation: none; background: var(--th); } }
.sent-tools { display: flex; gap: 0.4rem; align-items: center; }

.tok { cursor: pointer; border-bottom: 1px dotted #cfcfcf; border-radius: 3px; padding: 0 1px; transition: background 0.1s; }
.tok:hover { background: var(--th); }
.tok.active { background: var(--th); border-bottom: 2px solid #4a90c4; outline: 2px solid #4a90c4; outline-offset: 1px; }
.tok.key { color: var(--key); font-weight: 700; border-bottom: 2px solid var(--key); }
.tok.known { color: inherit; font-weight: 400; border-bottom-color: #b8b8b8; }
.tok.inert { cursor: default; border-bottom-color: transparent; }
.tok.inert:hover { background: transparent; }
.tok.blank { color: transparent; background: var(--th-gram); border-bottom: 2px solid var(--key); user-select: none; display: inline-block; vertical-align: baseline; }
.hl { background: var(--th); box-shadow: 0 2px 0 #4a90c4; }
.exprs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0; }
.expr-detail { border-left: 3px solid var(--heading); background: var(--th-gram); padding: 0.4rem 0.7rem; margin: 0.4rem 0; border-radius: 0 6px 6px 0; }
.expr-detail div + div { color: var(--muted); }

details.tbl { margin: 0.6rem 0; }
details.tbl summary { cursor: pointer; padding: 0.35rem 0; min-height: 2.2rem; color: var(--muted); }
.tbl-wrap { overflow-x: auto; }
table.words { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
table.words th, table.words td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
table.words th { background: var(--th); }
table.words th.gram, table.words td.gram { background: var(--th-gram); }
table.words td.k { color: var(--key); font-weight: 700; }

/* ---- 文と単語リスト(PC は左に文・右にリスト、スマホは文の下にリスト) ---- */
body.wide-main main { max-width: 80rem; }
.sent-words { margin-top: 0.3rem; }
details.wl > summary { cursor: pointer; padding: 0.35rem 0; min-height: 2.2rem; color: var(--muted); }
.wl-list { list-style: none; margin: 0; padding: 0; position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.wl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem; padding: 0.4rem 0.6rem; min-height: 3rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.wl-row:last-child { border-bottom: 0; }
.wl-row[hidden] { display: none; }
.wl-row:hover { background: var(--th-gram); }
.wl-row.active { background: var(--th); box-shadow: inset 4px 0 0 #4a90c4; outline: 2px solid #4a90c4; outline-offset: -2px; }
.wl-row.nomatch { cursor: default; color: var(--muted); }
.wl-line { display: flex; flex-wrap: wrap; gap: 0 0.7rem; align-items: baseline; }
.wl-it { font-weight: 700; font-size: 1.08rem; }
.wl-ja { font-size: 1rem; }
.wl-row.key .wl-it { color: var(--key); }
.wl-row.known .wl-it { color: inherit; font-weight: 400; }
.wl-row.masked .wl-it { color: transparent; background: var(--th-gram); border-radius: 3px; user-select: none; min-width: 5ch; border-bottom: 2px solid var(--key); }
.wl-sub { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.wl-btns { display: flex; gap: 0.25rem; align-items: center; }
.wl-btns button { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; min-width: 2.1rem; height: 2.1rem; font-size: 0.85rem; padding: 0; }
.wl-btns button:hover { background: var(--th); }
.wl-row.known .wl-btns button[data-act="known"] { background: var(--heading); border-color: var(--heading); font-weight: 700; }
@media (min-width: 960px) {
  .sent-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 1fr); gap: 1.6rem; align-items: start; }
  .sent-words { margin-top: 0; }
  details.wl > summary { pointer-events: none; list-style: none; padding-top: 0; }
  details.wl > summary::-webkit-details-marker { display: none; }
  /* リストは長くても全部出し、文章のほうを画面に固定する。リストを見ている間も文章が見える */
  .sent-main { position: sticky; top: calc(var(--bar-h) * 2 + 0.6rem); }
  .wl-row { scroll-margin-top: calc(var(--bar-h) * 2 + 0.6rem); scroll-margin-bottom: 1rem; }
}

/* ---- 単語カード(シート) ---- */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0 auto; max-width: 40rem;
  background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12); padding: 0.8rem 1rem calc(0.8rem + env(safe-area-inset-bottom));
}
.sheet .head { display: flex; align-items: center; gap: 0.5rem; }
.sheet .surface { font-size: 1.7rem; font-weight: 700; line-height: 1.2; margin-right: auto; word-break: break-word; }
.sheet .surface.key { color: var(--key); }
.sheet .ja { font-size: 1.25rem; margin-top: 0.2rem; }
.sheet .en { color: var(--muted); }
.sheet .gram { background: var(--th-gram); border-radius: 6px; padding: 0.3rem 0.6rem; margin: 0.5rem 0; font-size: 0.92rem; }
.sheet .foot { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.sheet .foot .spacer { margin-left: auto; }
.sheet .more { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.sheet .more a { margin-right: 0.8rem; }
.iconbtn { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; width: 2.5rem; height: 2.5rem; font-size: 1.1rem; }
.iconbtn:hover { background: var(--th); }

/* ---- 単語帳 ---- */
.filters { display: grid; gap: 0.5rem; margin: 0.6rem 0; }
.wlist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.wrow { border-bottom: 1px solid var(--line); }
.wrow > button.line { display: grid; grid-template-columns: 1fr auto; width: 100%; text-align: left; border: 0; background: none; padding: 0.55rem 0.2rem; gap: 0 0.5rem; min-height: 2.8rem; }
.wrow > button.line:hover { background: var(--th-gram); }
.wrow .w { font-weight: 700; }
.wrow .w.key { color: var(--key); }
.wrow .w.known { color: inherit; font-weight: 400; }
.wrow .m { color: var(--muted); font-size: 0.92rem; grid-column: 1; }
.wrow .n { grid-row: 1; grid-column: 2; color: var(--muted); font-size: 0.85rem; }
.wrow .detail { padding: 0.2rem 0.4rem 0.8rem; }
.wrow .detail ul { margin: 0.3rem 0; padding-left: 1.1rem; }
.grp > summary { cursor: pointer; padding: 0.5rem 0; min-height: 2.5rem; font-weight: 700; color: var(--heading); }
.grp > summary span { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.grp ul { margin: 0 0 0.8rem; padding-left: 1.2rem; }

/* ---- フラッシュカード ---- */
.fc { max-width: 34rem; margin: 1rem auto; }
.fc-card {
  border: 1px solid var(--line); border-radius: 14px; min-height: 15rem; padding: 1.2rem; text-align: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0.4rem; background: var(--bg); width: 100%;
}
.fc-card .front { font-size: 2.2rem; font-weight: 700; color: var(--key); word-break: break-word; }
.fc-card .ja { font-size: 1.5rem; }
.fc-card .en { color: var(--muted); }
.fc-card .gram { background: var(--th-gram); border-radius: 6px; padding: 0.3rem 0.6rem; font-size: 0.92rem; }
.fc-card .ex { font-size: 0.95rem; color: var(--muted); margin-top: 0.4rem; }
.fc-card .ex b { color: var(--text); }
.fc-actions { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.fc-actions .btn { flex: 1; min-height: 3rem; font-size: 1.05rem; }
.progress { height: 6px; background: var(--th); border-radius: 3px; overflow: hidden; margin-bottom: 0.6rem; }
.progress > div { height: 100%; background: var(--heading); }

/* ---- 設定 ---- */
.setting { border-bottom: 1px solid var(--line); padding: 0.8rem 0; display: grid; gap: 0.4rem; }
.setting > label, .setting > .lbl { font-weight: 700; }

/* ---- 読解のUX(2026-10-09 のFBで追加) ---- */
.reader-opts { display: flex; flex-wrap: wrap; gap: 0.6rem 0.9rem; align-items: center; margin: 0.5rem 0; }
.read-progress { color: var(--muted); font-size: 0.9rem; margin-left: auto; }
.hint { display: flex; gap: 0.6rem; align-items: flex-start; background: var(--th-gram); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.7rem; font-size: 0.92rem; margin: 0.4rem 0; }
.hint span { flex: 1; }
.hint .iconbtn { width: 2.2rem; height: 2.2rem; flex: none; }
.meta-box { margin-bottom: 0.4rem; }
.sent-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; margin: 1.4rem 0 0.3rem; }
.sent-head .sent-h { margin: 0; }
.sent-block.is-read .sent-h::after { content: " ✓"; color: #4a90c4; }
.sent-tools { flex-wrap: wrap; }
.sent-tools .btn[aria-pressed="true"] { background: var(--heading); border-color: var(--heading); }
.theme { scroll-margin-top: calc(var(--bar-h) * 2 + 0.5rem); }
/* 1文ずつ表示: 文を大きく、余計な情報を減らす */
.reader-root.one .meta-box, .reader-root.one .hint { display: none; }
.reader-root.one .theme-h { margin-top: 1rem; }
.reader-root.one .sent { font-size: calc(var(--sent-fs, 1.3rem) * 1.15); }
.focus-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: flex; gap: 0.5rem; align-items: center; justify-content: center;
  background: var(--bg); border-top: 1px solid var(--line); padding: 0.5rem 12px calc(0.5rem + env(safe-area-inset-bottom));
}
.focus-nav .btn { min-height: 2.9rem; white-space: nowrap; }
.focus-nav select { flex: 1; min-width: 0; max-width: 28rem; }
body.has-focus-nav { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
body.has-focus-nav .sheet { bottom: calc(4.1rem + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 14px; }
body.has-focus-nav.sheet-open { padding-bottom: calc(19rem + env(safe-area-inset-bottom)); }

/* ---- 範囲の選択・単語帳・頻出表現 ---- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scope { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0.6rem 0 0.9rem; display: grid; gap: 0.5rem; }
.scope-detail { display: grid; gap: 0.4rem; }
.lesson-picks { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pick { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.6rem; min-height: 2.4rem; background: var(--th-gram); cursor: pointer; }
.pick input { width: 1.1rem; height: 1.1rem; }
.pick small { color: var(--muted); }
.pos-box { display: grid; gap: 0.3rem; }
.lbl { font-weight: 700; }
.pos-checks { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.3rem 0; }
details.pos-detail > summary { cursor: pointer; min-height: 2.2rem; color: var(--muted); display: flex; align-items: center; }
.v-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.5rem; min-width: 0; }
.rank { color: var(--muted); font-size: 0.8rem; min-width: 1.6rem; text-align: right; }
.pos-badge { font-size: 0.72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 0.4rem; background: var(--th); }
.wrow > button.line .n { color: var(--muted); font-size: 0.85rem; align-self: center; white-space: nowrap; }
.wrow > button.line .n b { font-size: 1.15rem; color: var(--text); }
.wrow > button.line .m { grid-column: auto; }
.progress-line { margin: 0.5rem 0; color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.phrase { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.7rem 0.2rem; border-bottom: 1px solid var(--line); align-items: start; }
.phrase.done { background: var(--th-gram); }
.phrase.done .phrase-it { color: var(--muted); }
.phrase-check { display: inline-flex; padding: 0.2rem; }
.phrase-check input { width: 1.5rem; height: 1.5rem; }
.phrase-it { font-size: 1.2rem; font-weight: 700; word-break: break-word; }
.phrase-ja { margin-top: 0.1rem; }
.phrase-ex { margin-top: 0.3rem; color: var(--muted); font-size: 0.92rem; }
.phrase-meta { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; align-items: center; margin-top: 0.3rem; font-size: 0.85rem; }
.phrase-meta .count b { font-size: 1.05rem; }
.phrase-btns { display: grid; gap: 0.3rem; }
@media (max-width: 520px) {
  .phrase { grid-template-columns: auto minmax(0, 1fr); }
  .phrase-btns { grid-column: 2; display: flex; }
  .topbar .brand { display: none; }
  .topbar nav { margin-left: auto; width: 100%; justify-content: space-between; }
  .topbar nav a { padding: 0.45rem 0.4rem; font-size: 0.88rem; }
}

/* 絞り込み部品を横に並べ、一覧を画面の上のほうに出す */
.row select { width: auto; flex: 1 1 9rem; min-width: 0; }
.filters { gap: 0.4rem; margin: 0.4rem 0; }
.filters .row { gap: 0.4rem 0.8rem; }
.scope { padding: 0.5rem 0.7rem; gap: 0.35rem; }
.scope .muted { margin: 0; }
.pos-box .row { gap: 0.4rem 0.7rem; }
details.pos-detail > summary { min-height: 1.8rem; font-size: 0.9rem; }

/* ---- プロジェクトごとの授業一覧 ---- */
.project { margin: 0 0 1.4rem; }
.project-h { color: var(--heading); font-size: 1.2rem; margin: 0.8rem 0 0.2rem; }
.project-h .muted { font-weight: 400; }
.pick-group { display: grid; gap: 0.3rem; margin-bottom: 0.3rem; }
.pick-title { font-weight: 700; color: var(--muted); font-size: 0.9rem; }

/* ---- プロジェクトの管理 ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem; }
.add-row { display: flex; gap: 0.5rem; margin: 0.6rem 0; }
.add-row input { flex: 1; }
.proj-card { border: 1px solid var(--line); border-radius: 10px; padding: 0.4rem 0.9rem 0.7rem; margin: 0.7rem 0; }
.proj-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.8rem; }
.proj-head input { flex: 1; min-width: 12rem; }
.proj-head .project-h { margin: 0.4rem 0; }
.proj-lessons { list-style: none; margin: 0; padding: 0; }
.proj-lessons li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; justify-content: space-between; padding: 0.35rem 0; border-top: 1px solid var(--line); }
.proj-lessons select { width: auto; min-width: 9rem; }

/* ---- 音読: 訳を隠す / イタリア語を隠す ---- */
.plist .it-ph { display: none; color: var(--muted); font-size: 0.9rem; }
.plist .peek-btn { display: none; }
.plist[data-view="hideTr"] .peek-btn, .plist[data-view="hideIt"] .peek-btn { display: inline-flex; align-items: center; }
.plist[data-view="hideTr"] .phrase:not(.peek) .tr { display: none; }
.plist[data-view="hideIt"] .phrase:not(.peek) .it-part { display: none; }
.plist[data-view="hideIt"] .phrase:not(.peek) .it-ph { display: block; }
.phrase-exja { color: var(--muted); font-size: 0.88rem; margin-top: 0.1rem; }

/* ---- 読解: 日本語訳(開閉) ---- */
details.tr-box { margin: 0.2rem 0 0.4rem; }
details.tr-box > summary { cursor: pointer; min-height: 2.2rem; display: flex; align-items: center; color: var(--muted); font-size: 0.92rem; }
.tr-text { margin: 0.2rem 0; padding: 0.5rem 0.7rem; background: var(--th-gram); border-radius: 8px; }

/* ---- プロジェクト(上位フォルダ) ---- */
.back { display: inline-block; text-decoration: none; color: var(--muted); margin: 0.2rem 0; min-height: 2rem; line-height: 2rem; }
.back:hover { text-decoration: underline; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.8rem; margin: 0.8rem 0 1.6rem; }
.folder { border: 1px solid var(--line); border-radius: 12px; padding: 0.3rem 0.4rem 0.6rem; background: var(--bg); display: grid; gap: 0.2rem; align-content: start; }
.folder-main { display: flex; gap: 0.7rem; align-items: center; text-decoration: none; padding: 0.6rem 0.5rem; border-radius: 10px; }
.folder-main:hover { background: var(--th-gram); }
.folder-icon { font-size: 2rem; line-height: 1; }
.folder-text { display: grid; min-width: 0; }
.folder-name { font-weight: 700; font-size: 1.1rem; color: var(--text); word-break: break-word; }
.folder-actions { padding: 0 0.5rem; }
.rename-box { padding: 0.5rem; display: grid; gap: 0.4rem; }
.project-top { margin: 0.2rem 0 0.6rem; }
.project-top .doc-title { margin-bottom: 0.2rem; }
.lesson-tools { margin: 0.3rem 0 0.8rem; }
.lesson-tools select { width: auto; min-width: 12rem; }
.add-row { flex-wrap: wrap; }
.add-row input { min-width: 14rem; }
.report-error { color: #a33; font-weight: 700; }

/* ---- データの保存・バックアップ ---- */
.notice { display: grid; gap: 0.5rem; border: 1px solid var(--line); border-left: 4px solid var(--heading); border-radius: 10px; padding: 0.7rem 1rem; background: var(--th-gram); margin: 0.8rem 0; }
.notice-inline { background: var(--th-gram); border-radius: 8px; padding: 0.5rem 0.7rem; margin: 0.4rem 0; }
.status-list { margin: 0.4rem 0; padding-left: 1.2rem; font-size: 0.92rem; }

/* ---- 使用説明書 ---- */
.site-footer { text-align: center; padding: 1rem 16px calc(2rem + env(safe-area-inset-bottom)); }
.site-footer a { color: var(--muted); font-size: 0.92rem; }
.help-toc { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 1rem; }
.help-toc .chip { text-decoration: none; display: inline-flex; align-items: center; }
.help-section { margin: 1.4rem 0; }
.help-list { padding-left: 1.4rem; }
.help-list li { margin: 0.45rem 0; }
.ng-list { list-style: none; padding: 0; margin: 0.4rem 0; }
.ng-list li { border: 1px solid var(--line); border-left: 4px solid var(--key); border-radius: 8px; padding: 0.6rem 0.8rem; margin: 0.6rem 0; background: var(--bg); }
.ng-list li .muted { margin-top: 0.2rem; }
.qa details { border: 1px solid var(--line); border-radius: 8px; padding: 0 0.8rem; margin: 0.5rem 0; }
.qa summary { cursor: pointer; min-height: 2.6rem; display: flex; align-items: center; font-weight: 700; }
.qa details p { margin: 0 0 0.7rem; }
body.has-focus-nav .site-footer { display: none; }
