/* 日報アプリの見た目。画面の下書き（mock/2026-10-08_日報アプリ_画面下書き.html v7）の配色・部品をそのまま使う */
:root {
  --bg: #F3F5F8;
  --surface: #FFFFFF;
  --ink: #1B2430;
  --muted: #5E6B7A;
  --line: #DFE4EA;
  --accent: #1F5FA8;
  --accent-ink: #FFFFFF;
  --accent-soft: #E5EDF8;
  --warn: #8A4E00;
  --warn-soft: #FFF2DE;
  --danger: #B3261E;
  --danger-soft: #FCE8E6;
  --ok: #2E7D4F;
  --shadow: 0 1px 2px rgba(20, 35, 55, .06), 0 4px 14px rgba(20, 35, 55, .06);
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-head: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --read-size: 17px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F141A; --surface: #171E27; --ink: #E7ECF2; --muted: #9AA7B6; --line: #2A3440;
    --accent: #7FAEEA; --accent-ink: #0F141A; --accent-soft: #1C2A3B;
    --warn: #F0B262; --warn-soft: #33260F; --danger: #F2B8B5; --danger-soft: #3A1715; --ok: #7BC79A;
    --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F141A; --surface: #171E27; --ink: #E7ECF2; --muted: #9AA7B6; --line: #2A3440;
  --accent: #7FAEEA; --accent-ink: #0F141A; --accent-soft: #1C2A3B;
  --warn: #F0B262; --warn-soft: #33260F; --danger: #F2B8B5; --danger-soft: #3A1715; --ok: #7BC79A;
  --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.6; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.stage { display: flex; gap: 32px; justify-content: center; align-items: flex-start; padding-inline: 16px; padding-block: 16px 40px; }
.app { width: 100%; max-width: 480px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
@media (max-width: 860px) {
  .stage { flex-direction: column; align-items: stretch; padding-inline: 0; padding-block: 0 24px; gap: 0; }
  .app { max-width: none; border: 0; border-radius: 0; box-shadow: none; }
}


/* ヘッダー */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 52px; }
.top h1 { font-family: var(--font-head); font-size: 19px; font-weight: 700; margin: 0; flex: 1; min-width: 0; text-wrap: balance; }
.icon-btn { border: 0; background: transparent; padding: 8px; border-radius: 10px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }
.search { margin: 0 12px 10px; display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 8px 12px; color: var(--muted); }
.search input { border: 0; background: transparent; outline: none; flex: 1; min-width: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; margin-left: 4px; font-weight: 700; }

/* 受信箱 */
.group-label { font-size: 12px; letter-spacing: .08em; color: var(--muted); padding: 14px 16px 6px; }
.row { display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 10px; padding: 12px 16px 14px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; }
.row:hover { background: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; }
.row.unread .dot { background: var(--accent); }
.row-from { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.unread .row-from { font-weight: 700; }
.row-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-meta { grid-column: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.row-preview { grid-column: 2 / 4; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.unread .row-preview { color: var(--ink); }
.tag { font-size: 11px; padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.lock { background: var(--danger-soft); color: var(--danger); }

.fab { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); margin: 16px 16px 0 auto; display: flex; align-items: center; gap: 6px; border: 0; background: var(--accent); color: var(--accent-ink); padding: 14px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }
.fab svg { width: 20px; height: 20px; }
.list-end { height: 24px; }

/* 状態（空・読み込み・エラー） */
.state { padding: 48px 24px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.state h2 { font-family: var(--font-head); font-size: 18px; color: var(--ink); margin: 0; }
.state p { margin: 0; max-width: 26em; }
.state .btn { margin-top: 6px; }
.skel { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.skel i { display: block; height: 12px; border-radius: 6px; background: var(--line); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* 読む画面 */
.read { padding: 20px 16px 32px; }
.read-head { display: grid; gap: 6px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.read-from { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0; }
.read-sub { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.readers { border: 0; background: transparent; color: var(--accent); padding: 0; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.readers-box { background: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.readers-box b { color: var(--ink); }
.notice { border-radius: 10px; padding: 10px 14px; font-size: 13px; background: var(--warn-soft); color: var(--warn); }
.mod { padding-top: 22px; display: grid; gap: 8px; }
.mod h3 { font-family: var(--font-head); font-size: 13px; letter-spacing: .08em; color: var(--muted); margin: 0; font-weight: 700; }
.prose { font-size: var(--read-size); line-height: 1.9; max-width: 34em; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.fig { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.fig span { display: block; font-size: 12px; color: var(--muted); }
.fig b { font-size: 22px; font-variant-numeric: tabular-nums; font-family: var(--font-head); }
.fig small { font-size: 13px; color: var(--muted); margin-left: 2px; }
.interview { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
.interview-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.interview-head b { font-size: 16px; }
.meta-line { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.read-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 28px; }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 14px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn.primary:hover { color: var(--accent-ink); filter: brightness(1.07); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* 書く画面 */
.compose { padding: 16px 16px 120px; display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-family: var(--font-head); font-weight: 700; font-size: 14px; }
.hint { font-size: 12px; color: var(--muted); }
.to-box { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: grid; gap: 8px; }
select, .input, textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; }
textarea { min-height: 140px; resize: vertical; font-size: 16px; line-height: 1.8; field-sizing: content; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.input { font-variant-numeric: tabular-nums; }
.mod-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.mod-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.savebar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(env(safe-area-inset-bottom, 0px) + 10px); display: flex; align-items: center; gap: 10px; }
.savebar .hint { flex: 1; min-width: 0; }

/* 送信前の確認シート */
.sheet-bg { position: absolute; inset: 0; background: rgba(15, 20, 26, .45); display: flex; align-items: flex-end; z-index: 20; }
.sheet { background: var(--surface); width: 100%; border-radius: 16px 16px 0 0; padding: 20px 16px calc(env(safe-area-inset-bottom, 0px) + 16px); display: grid; gap: 14px; }
.sheet h2 { font-family: var(--font-head); margin: 0; font-size: 18px; }
.sheet dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.sheet dt { color: var(--muted); }
.sheet dd { margin: 0; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* 設定 */
.settings { padding: 16px 16px 32px; display: grid; gap: 20px; }
.settings h2 { font-family: var(--font-head); font-size: 16px; margin: 0 0 4px; }
.mod-list { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mod-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.mod-item:last-child { border-bottom: 0; }
.mod-item-text { flex: 1; min-width: 0; }
.mod-item-text b { display: block; font-size: 15px; }
.mod-item-text span { font-size: 12px; color: var(--muted); }
.switch { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--line); position: relative; flex: none; border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch:checked { background: var(--accent); }
.switch:checked::after { left: 21px; }
.order { display: flex; flex-direction: column; }
.order button { border: 0; background: transparent; color: var(--muted); padding: 0 4px; font-size: 12px; line-height: 1.3; }
.order button:disabled { opacity: .3; }
.state-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* 簡易書式（見出し・太字・箇条書き） */
.md { font-size: var(--read-size); line-height: 1.9; max-width: 34em; overflow-wrap: anywhere; display: grid; gap: .35em; }
.md p { margin: 0; }
.md h4 { font-family: var(--font-head); font-size: 1.08em; margin: .5em 0 0; padding-left: 10px; border-left: 3px solid var(--accent); line-height: 1.5; }
.md ul { margin: 0; padding-left: 1.3em; }
.md strong { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); }
.md .gap { height: .4em; }
.tools { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.tool { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 3px 10px; font-size: 13px; }
.tool:hover { border-color: var(--accent); color: var(--accent); }
.tool.b { font-weight: 700; }
.tools .sp { flex: 1; }
.tool.copy { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.preview-box { border: 1px dashed var(--line); border-radius: 10px; padding: 10px 12px; }
.preview-box .md { font-size: 15px; }

/* 懸案事項 */
.issues { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.issue { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.issue-text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.6; }
.issue.done .issue-text { text-decoration: line-through; color: var(--muted); }
.tag.new { background: var(--accent); color: var(--accent-ink); }
.tag.done { background: transparent; color: var(--ok); border: 1px solid var(--ok); }
.issue-add { display: flex; gap: 8px; }
.issue-add .input { flex: 1; min-width: 0; }
.carry { font-size: 12px; color: var(--muted); }

/* VIP・エゴサ */
.chip { display: inline-flex; align-items: center; gap: 4px; }
.chip svg { width: 13px; height: 13px; }
.chip.vip { border-color: var(--warn); color: var(--warn); }
.chip.word { border-style: dashed; }
.chip.vip[aria-pressed="true"], .chip.word[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); border-style: solid; }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 4px 2px; }
.vip-star { color: var(--warn); display: inline-flex; vertical-align: -2px; margin-right: 4px; }
.vip-star svg { width: 15px; height: 15px; }
mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 14px; }
.pill button { border: 0; background: transparent; color: var(--muted); padding: 0 6px; font-size: 16px; line-height: 1; border-radius: 999px; }
.pill button:hover { color: var(--danger); }
.mod-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tool.ghost { border-color: transparent; background: transparent; color: var(--muted); font-size: 12px; }
.tool.ghost:hover { color: var(--accent); border-color: var(--line); }
.replies { margin-top: 32px; padding-top: 18px; border-top: 2px solid var(--line); display: grid; gap: 12px; }
.replies h3 { font-family: var(--font-head); font-size: 13px; letter-spacing: .08em; color: var(--muted); margin: 0; }
.reply { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; }
.reply.is-new { box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.reply-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reply .md { font-size: 15px; line-height: 1.8; }
blockquote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 13px; background: var(--surface); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.composer { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.composer textarea { min-height: 96px; }
.quote-box { display: grid; gap: 4px; }
.quote-fab { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); z-index: 25; border: 0; background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow); }
.badge { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; }
.kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.kind { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.kind:hover { border-color: var(--accent); }
.kind[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.kind small { margin-left: 6px; font-size: 11px; opacity: .85; }
.iv-card { border-top: 1px dashed var(--line); padding-top: 10px; display: grid; gap: 10px; }
.sug { display: grid; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.sug button { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); padding: 8px 12px; display: grid; gap: 2px; }
.sug button:last-child { border-bottom: 0; }
.sug button:hover, .sug button:focus-visible { background: var(--accent-soft); }
.sug b { font-size: 15px; font-weight: 700; }
.sug span { font-size: 12px; color: var(--muted); }
.sug .new b { color: var(--accent); }
.sug .hint-row { padding: 8px 12px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.sug .hint-row:last-child { border-bottom: 0; }
.person-chip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg); border-radius: 10px; padding: 8px 12px; }
.person-chip .btn { margin-left: auto; }
.wgroups { display: grid; gap: 10px; margin-bottom: 10px; }
.wgroup { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.wgroup-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.wgroup-head b { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; }
.wgroup .add-row { margin-top: 0; }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.add-row select, .add-row .input { flex: 1; min-width: 0; }

.toast { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 30; white-space: nowrap; }

/* ===== 本番で足した部品（2026-10-09） ===== */
body { margin: 0; }
.stage { padding-block: 16px 40px; }
@media (max-width: 860px) { .stage { padding-block: 0 24px; } }
.app { min-height: 60vh; }
.toast { position: fixed; }
.sheet-bg { position: fixed; }
.more { display: flex; justify-content: center; padding: 16px; }
.err-inline { color: var(--danger); font-size: 13px; }
/* K2語録 */
.goroku-picked { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.goroku-picked .prose { font-size: 15px; line-height: 1.8; }
.goroku-quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; white-space: pre-wrap; font-size: var(--read-size); line-height: 1.9; margin: 0; }
.sug button span.body { white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 出退勤 */
.time-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.time-row .input { width: 7.5em; flex: none; }
.time-row span { color: var(--muted); }
/* ログアウト */
.logout { display: inline; }
/* 送信確認シートは画面いっぱいに広げず、アプリの幅（480px）にそろえる */
.sheet-bg { justify-content: center; }
.sheet { max-width: 480px; }

/* =====================================================================
 * 3ペイン（PC）・2ペイン（タブレット）と、部品の作り直し（2026-10-09）
 * 配色・フォントは画面の下書き v7 のまま。部品の形・余白・押した感じだけを整える
 * ===================================================================== */
:root { --ring: 0 0 0 3px var(--accent-soft); --radius: 10px; --nav-bg: #ECEFF4; --hover: rgba(31, 95, 168, .06); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --nav-bg: #131920; --hover: rgba(127, 174, 234, .08); } }
:root[data-theme="dark"] { --nav-bg: #131920; --hover: rgba(127, 174, 234, .08); }

/* ---- 並べ方 ---- */
.shell { display: grid; height: 100dvh; background: var(--surface); }
.shell-wide { grid-template-columns: 252px minmax(320px, 400px) minmax(0, 1fr); }
.shell-mid { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); }
.pane { min-width: 0; overflow-y: auto; overscroll-behavior: contain; position: relative; }
.pane-nav { background: var(--nav-bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; padding: 16px 12px; }
.pane-list { border-right: 1px solid var(--line); background: var(--surface); }
.pane-main { background: var(--surface); }
.pane .top { top: 0; }
.shell .back-btn { display: none; }
.pane-main .read, .pane-main .compose, .pane-main .settings { max-width: 780px; margin-inline: auto; }
.pane-main .read { padding: 28px 40px 48px; }
.pane-main .compose { padding: 24px 40px 120px; }
.pane-main .settings { padding: 24px 40px 48px; }
.pane-main .top-row { max-width: 860px; margin-inline: auto; }
.state-main { min-height: 70vh; align-content: center; }
.state-icon svg { width: 56px; height: 56px; color: var(--line); }

/* ---- 左メニュー ---- */
.nav-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 17px; padding: 4px 8px 12px; }
.nav-brand svg { width: 28px; height: 28px; flex: none; }
.btn-block { width: 100%; justify-content: center; margin-bottom: 10px; }
.nav-group { display: grid; gap: 2px; padding-top: 6px; }
.nav-head { font-size: 11px; letter-spacing: .1em; color: var(--muted); padding: 10px 10px 4px; font-weight: 700; }
.nav-item, .nav-me { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 7px 10px; min-height: 36px; text-align: left; color: var(--ink); font-size: 14px; transition: background .12s; }
.nav-item svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.nav-item:hover, .nav-me:hover { background: var(--hover); }
.nav-item.is-active, .nav-me.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.nav-item.is-active svg { color: var(--accent); }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); background: var(--surface); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.nav-item.is-active .nav-count { background: var(--accent); color: var(--accent-ink); }
.nav-empty { padding: 4px 10px; margin: 0; }
.nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.nav-me svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

/* ---- 一覧 ---- */
.top-count { color: var(--accent); font-size: 14px; font-weight: 700; margin-left: 6px; }
.rows { display: grid; }
.row { display: grid; grid-template-columns: 8px 40px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 12px 16px 12px 8px; border: 0; border-bottom: 1px solid var(--line); background: transparent; width: 100%; text-align: left; transition: background .12s; position: relative; }
.row:hover { background: var(--hover); }
.row.is-selected { background: var(--accent-soft); }
.row.is-selected::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.row .dot { margin-top: 16px; }
.row-main { display: grid; gap: 3px; min-width: 0; }
.row-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.row-top .row-from { flex: 1; font-size: 15px; }
.row-preview { font-size: 13.5px; line-height: 1.55; }
.row-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-top: 2px; }
.row-meta .tag svg { width: 11px; height: 11px; vertical-align: -1px; margin-right: 3px; }
.group-label { background: var(--surface); font-weight: 700; }
.progress { height: 2px; margin: 0 12px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: slide 1s linear infinite; }
@keyframes slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ---- アイコン（人） ---- */
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; overflow: hidden; display: inline-grid; place-items: center; background: var(--line); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-initial { --av-h: 210; background: hsl(var(--av-h) 45% 90%); color: hsl(var(--av-h) 40% 30%); font-family: var(--font-head); font-weight: 700; font-size: 16px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av-initial { background: hsl(var(--av-h) 30% 26%); color: hsl(var(--av-h) 55% 82%); } }
:root[data-theme="dark"] .av-initial { background: hsl(var(--av-h) 30% 26%); color: hsl(var(--av-h) 55% 82%); }
.av-sm { width: 28px; height: 28px; font-size: 12px; }
.av-lg { width: 48px; height: 48px; font-size: 19px; }
.av-xl { width: 76px; height: 76px; font-size: 28px; }
.read-who { display: flex; align-items: center; gap: 12px; }
.reply-head .av { margin-right: 2px; }
.avatar-edit { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.avatar-edit-body { flex: 1; min-width: 220px; display: grid; gap: 10px; }

/* ---- ボタン ---- */
.btn { min-height: 38px; padding: 0 16px; border-radius: var(--radius); font-weight: 700; font-size: 14px; justify-content: center; transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .06s; box-shadow: 0 1px 1px rgba(20, 35, 55, .04); cursor: pointer; }
.btn:hover { background: var(--hover); border-color: var(--accent); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.btn.primary { box-shadow: 0 1px 2px rgba(20, 35, 55, .18), inset 0 1px 0 rgba(255, 255, 255, .16); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--accent); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.icon-btn { min-height: 36px; border-radius: 8px; transition: background .12s, color .12s; }
.fab { transition: transform .12s, box-shadow .12s; }
.fab:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20, 35, 55, .18); }

/* 切り替えボタン（送り先・対象日・返信の範囲）：選ぶとチェックが付く */
.kind { min-height: 34px; padding: 0 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); transition: background .12s, border-color .12s, color .12s; }
.kind:hover { border-color: var(--accent); color: var(--accent); }
.kind[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.kind[aria-pressed="true"]::before { content: ""; width: 14px; height: 14px; flex: none; background: currentColor; -webkit-mask: var(--check) center / contain no-repeat; mask: var(--check) center / contain no-repeat; }
:root { --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.kind small { opacity: .75; font-weight: 400; }
.chip { min-height: 30px; font-weight: 700; transition: background .12s, border-color .12s; }
.chip:hover { border-color: var(--accent); }
.tool { min-height: 30px; transition: background .12s, border-color .12s, color .12s; }

/* ---- 入力欄 ---- */
.search { border: 1px solid transparent; transition: border-color .12s, box-shadow .12s; }
.search:focus-within { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
select, .input, textarea { transition: border-color .12s, box-shadow .12s; }
select:focus, .input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.mod-card { background: var(--surface); box-shadow: 0 1px 2px rgba(20, 35, 55, .04); }
.to-box { border: 1px solid var(--line); background: var(--surface); }
.field > label, .field-label { font-size: 15px; }
.savebar { box-shadow: 0 -4px 14px rgba(20, 35, 55, .05); }
.row-main > * { grid-column: auto; }

/* しばらく送っていないときの知らせ（本人だけ・やわらかく） */
.nudge { margin: 12px 12px 4px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--ink); display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }
.nudge-text { flex: 1; min-width: 200px; display: grid; gap: 2px; font-size: 14px; line-height: 1.6; }
.nudge-text b { color: var(--warn); }
.nudge-actions { display: flex; gap: 6px; }
