/* マモレコ — 画面モック v0.3 のトークンを移植 */
:root {
  --bg:#F4F6F7; --surface:#FFFFFF; --surface2:#EDF1F3;
  --ink:#1C2B33; --muted:#5B6B74; --line:#D9E0E4;
  --accent:#17546E; --accent-ink:#FFFFFF; --accent-soft:#E3EDF2;
  --ok:#2E7D5B; --ok-soft:#E2F0EA; --warn:#B07817; --warn-soft:#F7EEDA;
  --crit:#B03A3A; --crit-soft:#F6E4E4;
  --radius:10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:#10181D; --surface:#18232A; --surface2:#1F2C34;
    --ink:#E4EBEE; --muted:#8FA1AA; --line:#2B3A43;
    --accent:#6FB3D2; --accent-ink:#0E1A21; --accent-soft:#1D3542;
    --ok:#5FBF97; --ok-soft:#173328; --warn:#D9A94E; --warn-soft:#332A15;
    --crit:#D97B7B; --crit-soft:#361B1B;
  }
  /* ロゴは濃色の文字を含む透過PNGのため、暗背景では白の下地を敷いて視認性を確保する */
  .brand-logo { background:#fff; border-radius:10px; padding:8px 10px; }
}
* { box-sizing: border-box; }
/* 縦スクロールバーの領域を常に確保し、ページ内容の高さが変わっても
   中央寄せレイアウト（設定タブ等）が横にずれないようにする。 */
html { scrollbar-gutter: stable; }
body {
  margin:0; background:var(--bg); color:var(--ink);
  font-family:"Hiragino Kaku Gothic ProN","Yu Gothic UI",Meiryo,sans-serif;
  font-size:14px; line-height:1.65;
}
a { color:var(--accent); }

/* レイアウト */
.app-layout { display:flex; min-height:100vh; align-items:flex-start; }
.sidebar {
  width:220px; flex:none; background:var(--surface); border-right:1px solid var(--line);
  display:flex; flex-direction:column; padding:18px 14px;
  /* 本文が長くてもサイドバーは画面高さのまま（スクロールに追従して固定） */
  position:sticky; top:0; height:100vh; height:100dvh; overflow-y:auto;
}
.sidebar-brand { padding:6px 8px 18px; border-bottom:1px solid var(--line); margin-bottom:12px; }
.brand-name { display:block; font-size:18px; font-weight:700; letter-spacing:.04em; }
.brand-sub { display:block; font-size:10.5px; color:var(--muted); letter-spacing:.1em; }
.brand-logo { display:block; height:auto; }
.sidebar-brand .brand-logo { width:100%; max-width:164px; }
.sidebar-nav { display:flex; flex-direction:column; gap:2px; }
.nav-item { display:flex; align-items:center; gap:8px; padding:9px 12px; border-radius:8px; color:var(--ink); text-decoration:none; font-size:13.5px; }
.nav-item:hover { background:var(--surface2); }
.nav-item.active { background:var(--accent-soft); color:var(--accent); font-weight:700; }
.nav-ico { width:17px; height:17px; flex-shrink:0; display:inline-flex; }
.nav-ico svg { width:100%; height:100%; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.sidebar-bottom { margin-top:auto; display:flex; flex-direction:column; gap:2px; }
.sidebar-foot { padding:14px 12px 0; margin-top:12px; border-top:1px solid var(--line); }
.sidebar-user { font-size:13px; font-weight:600; }
.sidebar-role { font-size:11px; color:var(--muted); }
.main-content { flex:1; min-width:0; }
.content-inner { max-width:1240px; margin:0 auto; padding:20px 22px 60px; }

.topbar { display:flex; align-items:center; margin-bottom:18px; }
.topbar-title { font-size:19px; font-weight:700; }
.topbar-meta { margin-left:auto; display:flex; align-items:center; gap:12px; }
.topbar-company { font-size:12.5px; color:var(--muted); }
.avatar-circle {
  width:28px; height:28px; border-radius:50%; background:var(--accent); color:var(--accent-ink);
  display:inline-flex; align-items:center; justify-content:center; font-size:13px; font-weight:700;
}

/* カード・グリッド */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px; margin-bottom:14px; }
.card-title { font-size:14.5px; margin:0 0 14px; font-weight:700; }
.card-title .hint { font-weight:400; font-size:12px; color:var(--muted); margin-left:8px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start; }
@media (max-width:760px) { .grid2 { grid-template-columns:1fr; } .sidebar { display:none; } }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; margin-bottom:16px; }
.stat .stat-label { font-size:11.5px; color:var(--muted); }
.stat .stat-value { font-size:30px; font-weight:700; line-height:1.2; margin-top:4px; }
.stat .stat-value small { font-size:14px; font-weight:400; color:var(--muted); margin-left:2px; }
.card.alert { border-color:var(--crit); }
.card.alert .stat-value { color:var(--crit); }
.empty { color:var(--muted); font-size:13px; }

/* テーブル */
.table { border-collapse:separate; border-spacing:0; width:100%; font-size:13px; }
.table th { font-size:11.5px; color:var(--muted); text-align:left; font-weight:600; border-bottom:1px solid var(--line); padding:6px 10px; white-space:nowrap; }
.table td { border-bottom:1px solid var(--line); padding:9px 10px; vertical-align:top; }
.table tr:last-child td { border-bottom:none; }
.table td.num, .table th.num { text-align:right; }
/* 一覧のヘッダをスクロール時も上部に固定（項目名が常に見える） */
.table-sticky thead th { position:sticky; top:0; z-index:5; background:var(--surface);
  box-shadow:inset 0 -1px 0 var(--line); }
/* 行数が多い一覧用の縦スクロール枠（ヘッダは枠内で sticky） */
.table-scroll { max-height:min(70vh, 640px); overflow:auto; margin:0 -4px; padding:0 4px; }
.table-scroll--tall { max-height:min(75vh, 720px); }
.rowlink { cursor:pointer; }
.rowlink:hover td { background:var(--surface2); }
/* 列ヘッダのソートリンク */
.th-sort {
  color:inherit; text-decoration:none; display:inline-flex; align-items:center; gap:4px;
  cursor:pointer;
}
.th-sort:hover { color:var(--accent); }
.th-sort.active { color:var(--accent); }
.th-sort-mark { font-size:10px; line-height:1; }
.table th.num .th-sort { justify-content:flex-end; width:100%; }

/* バー */
.bar-row { display:grid; grid-template-columns:9em 1fr 2.5em; gap:10px; align-items:center; margin-bottom:9px; font-size:13px; }
.bar-track { background:var(--surface2); border-radius:4px; height:14px; overflow:hidden; }
.bar-fill { display:block; height:100%; background:var(--accent); }
.bar-pct { text-align:right; color:var(--muted); }

/* pill / tag */
.pill { display:inline-block; font-size:11.5px; padding:2px 10px; border-radius:99px; font-weight:600; white-space:nowrap; }
.pill.ok { background:var(--ok-soft); color:var(--ok); }
.pill.warn { background:var(--warn-soft); color:var(--warn); }
.pill.crit { background:var(--crit-soft); color:var(--crit); }
.pill.acc { background:var(--accent-soft); color:var(--accent); }
.pill.neutral { background:var(--surface2); color:var(--muted); }
.tag { display:inline-block; font-size:11px; padding:1px 8px; border-radius:6px; background:var(--surface2); color:var(--muted); margin:1px 2px 1px 0; }

/* ボタン */
.btn { appearance:none; font:inherit; font-size:13px; padding:8px 16px; border-radius:8px; cursor:pointer; border:1px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none; display:inline-block; }
.btn-primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:700; }
.btn-ghost { background:transparent; }
.btn-sm { padding:6px 12px; font-size:12.5px; }
.btn-block { width:100%; }
.btn-google { width:100%; border:1px solid var(--line); background:var(--surface); padding:10px; text-align:center; box-sizing:border-box; }
.btn:disabled { opacity:.55; cursor:not-allowed; }

/* フォーム */
.toolbar { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.toolbar .btn { margin-left:auto; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { border:1px solid var(--line); background:var(--surface); border-radius:99px; padding:5px 13px; font-size:12.5px; text-decoration:none; color:var(--ink); }
.chip.sel { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:700; }
.form-frame { max-width:520px; margin:0 auto; }
.field { margin-bottom:16px; }
.field > label { display:block; font-size:12.5px; font-weight:700; margin-bottom:6px; }
.field .req { color:var(--crit); font-size:11px; margin-left:4px; }
.field input, .field select, .field textarea { width:100%; font:inherit; font-size:13.5px; padding:9px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.field-inline { display:flex; gap:18px; flex-wrap:wrap; margin-bottom:16px; }
.followup-block { margin-bottom:16px; padding-top:4px; border-top:1px solid var(--line); }
.followup-check { font-weight:600; }
.followup-title { font-size:14px; font-weight:700; margin:0 0 12px; }
.followup-question { display:block; font-size:13px; font-weight:600; margin:0 0 8px; }
.radio-group-stack { flex-direction:column; align-items:flex-start; gap:8px; }
.followup-name { margin-top:0; margin-bottom:0; }
.reporter-block { margin-bottom:16px; padding-top:4px; border-top:1px solid var(--line); }
.reporter-hint { margin:4px 0 10px; }
.radio-group { display:flex; flex-wrap:wrap; gap:8px 14px; margin-bottom:12px; }
.radio-item { display:flex; align-items:center; gap:6px; font-size:13px; cursor:pointer; }
.radio-item input { width:auto; }
.victim-field { margin-top:0; margin-bottom:0; }
.checks { display:flex; flex-wrap:wrap; gap:8px 16px; }
.check { display:flex; align-items:center; gap:6px; font-size:13px; font-weight:400; cursor:pointer; }
.check input { width:auto; }
.pii-note { background:var(--warn-soft); border:1px solid var(--warn); border-radius:8px; padding:10px 14px; font-size:12.5px; margin-bottom:16px; }
.scope-note { background:var(--accent-soft); border-radius:8px; padding:10px 14px; font-size:12.5px; margin:0 0 12px; line-height:1.7; color:var(--ink); }
.locked-location { font-size:14px; font-weight:700; background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:9px 12px; }
.toolbar-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.csv-import { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:16px 18px; margin-bottom:14px; }
.csv-import-body { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.csv-import-body input[type=file] { font-size:13px; }
.csv-import-body .login-note { flex-basis:100%; margin:4px 0 0; }
/* 承認ワークフロー */
.approval-panel .approval-actions { display:flex; gap:10px; align-items:flex-start; }
.reject-box { display:inline-block; }
.reject-box summary { list-style:none; }
.reject-box[open] { display:block; margin-top:8px; }
.reject-box textarea { display:block; width:100%; max-width:420px; margin:8px 0; font:inherit; font-size:13px;
  padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.approval-step { border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:12px; }
.approval-step-head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.step-order { font-weight:700; background:var(--accent-soft); color:var(--accent); border-radius:99px; padding:2px 12px; font-size:12.5px; white-space:nowrap; }
.step-name { flex:1; font:inherit; font-size:13.5px; font-weight:700; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.approval-step-body { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:640px){ .approval-step-body { grid-template-columns:1fr; } }
.mini-label { font-size:11.5px; font-weight:700; color:var(--muted); margin-bottom:6px; }
.approval-step-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; flex-wrap:wrap; }
.report-field { margin-top:14px; }
.stat-sub { font-size:11px; color:var(--muted); margin-top:2px; }
.binder-item { break-inside:avoid; }
.binder-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; padding-bottom:8px; border-bottom:1px solid var(--line); }
.binder-no { background:var(--accent); color:#fff; border-radius:99px; min-width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.report-field-label { font-size:12.5px; font-weight:700; color:var(--accent); margin-bottom:4px; }
.sidebar-link { display:inline-block; margin-top:6px; font-size:11.5px; color:var(--muted); text-decoration:underline; }
/* 使い方ガイド */
.manual-lead { font-size:13.5px; color:var(--muted); margin:0 0 18px; line-height:1.8; }
.manual-toc { columns:2; column-gap:24px; margin:0; padding:0; list-style:none; }
@media (max-width:640px){ .manual-toc { columns:1; } }
.manual-toc li { margin:0 0 8px; break-inside:avoid; }
.manual-toc a { color:var(--accent); text-decoration:none; font-size:13.5px; }
.manual-toc a:hover { text-decoration:underline; }
.manual-sec { scroll-margin-top:16px; }
.manual-sec h2.card-title { font-size:16px; }
.manual-sec h3 { font-size:13.5px; margin:16px 0 6px; }
.manual-sec p, .manual-sec li { line-height:1.85; font-size:13.5px; }
.manual-sec ol, .manual-sec ul { margin:6px 0 10px; padding-left:1.4em; }
.manual-sec ol li, .manual-sec ul li { margin-bottom:4px; }
.manual-steps { counter-reset:mstep; list-style:none; padding-left:0; }
.manual-steps > li { position:relative; padding-left:34px; margin-bottom:12px; }
.manual-steps > li::before { counter-increment:mstep; content:counter(mstep);
  position:absolute; left:0; top:0; width:22px; height:22px; border-radius:50%;
  background:var(--accent); color:#fff; font-size:12px; font-weight:700;
  display:flex; align-items:center; justify-content:center; }
.manual-note { background:var(--surface2); border:1px solid var(--line); border-radius:8px;
  padding:10px 14px; font-size:12.5px; color:var(--muted); margin:10px 0; line-height:1.8; }
.manual-note b { color:var(--ink); }
.manual-shot { border:1.5px dashed var(--line); border-radius:10px; background:var(--surface2);
  padding:22px 16px; text-align:center; color:var(--muted); font-size:12px; margin:12px 0; line-height:1.7; }
.manual-shot b { display:block; color:var(--ink); font-size:12.5px; margin-bottom:2px; }
.manual-flow { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:10px 0; }
.manual-flow .pill { font-size:12.5px; }
.manual-flow .arr { color:var(--muted); }
.manual-back { display:inline-block; margin-top:8px; font-size:12px; color:var(--muted); text-decoration:none; }
.manual-back:hover { text-decoration:underline; }
.csv-import-inline { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.csv-import-inline input[type=file] { font-size:13px; }
.searchbar { display:flex; gap:8px; align-items:center; margin-bottom:14px; flex-wrap:wrap; }
.searchbar input[type=search] { flex:1; min-width:220px; font:inherit; font-size:13px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.searchbar select { font:inherit; font-size:13px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.result-count { font-size:12px; color:var(--muted); margin:0 0 10px; }
.list-controls { display:flex; justify-content:flex-end; margin:14px 0 6px; }
.perpage-form { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--muted); }
.perpage-form select { font:inherit; font-size:13px; padding:5px 8px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
/* 期間レンジピッカー */
.daterange { position:relative; display:inline-block; }
.daterange-trigger { font:inherit; font-size:13px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); cursor:pointer; white-space:nowrap; }
.daterange-pop { position:absolute; top:calc(100% + 4px); left:0; z-index:50; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 28px rgba(0,0,0,.18); padding:12px; width:266px; }
.dr-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.dr-title { font-size:13px; font-weight:700; }
.dr-nav { appearance:none; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:6px; width:28px; height:28px; cursor:pointer; font-size:16px; line-height:1; }
.dr-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:2px; }
.dr-wd { text-align:center; font-size:11px; color:var(--muted); padding:2px 0; }
.dr-day { appearance:none; border:none; background:none; font:inherit; font-size:12.5px; color:var(--ink); height:30px; border-radius:6px; cursor:pointer; }
.dr-day:hover { background:var(--surface2); }
.dr-day.in-range { background:var(--accent-soft); }
.dr-day.sel-edge { background:var(--accent); color:var(--accent-ink); font-weight:700; }
.dr-foot { display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:8px; border-top:1px solid var(--line); }
.dr-hint { font-size:11px; color:var(--muted); flex:1; }
.dr-foot button { appearance:none; border:1px solid var(--line); background:var(--surface); color:var(--ink); font:inherit; font-size:12px; padding:4px 10px; border-radius:6px; cursor:pointer; }
.binder-link { color:var(--accent); }
.bulk-locs { display:flex; flex-wrap:wrap; gap:6px 16px; }
/* 一括出力: 各事案レポートを改ページ区切りに（画面では点線で区切り） */
.report-doc { margin-bottom:28px; padding-bottom:20px; border-bottom:2px dashed var(--line); }
.report-doc:last-child { border-bottom:none; }
.pager { display:flex; gap:10px; align-items:center; justify-content:center; margin-top:14px; }
.pager-info { font-size:12.5px; color:var(--muted); font-variant-numeric:tabular-nums; }
.field-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:480px) { .field-pair { grid-template-columns:1fr; } }
.hint-inline { font-weight:400; font-size:11px; color:var(--muted); margin-left:4px; }
.cat-list { display:flex; flex-direction:column; gap:8px; }
.cat-item { display:flex; gap:10px; align-items:flex-start; border:1px solid var(--line); border-radius:8px; padding:11px 13px; cursor:pointer; }
.cat-item:hover { background:var(--surface2); }
.cat-item input { width:auto; margin-top:3px; flex:none; }
.cat-item:has(input:checked) { border-color:var(--accent); background:var(--accent-soft); }
.cat-body { display:flex; flex-direction:column; gap:2px; }
.cat-title { font-size:13.5px; font-weight:700; }
.cat-example { font-size:11.5px; color:var(--muted); }

/* alert */
.alert { padding:9px 14px; border-radius:8px; font-size:13px; margin-bottom:12px; }
.alert-success { background:var(--ok-soft); color:var(--ok); }
.alert-error { background:var(--crit-soft); color:var(--crit); }
.alert-warning { background:var(--warn-soft); color:var(--warn); }

/* stepper */
.stepper { display:flex; gap:0; margin-bottom:18px; overflow-x:auto; }
.step { flex:1; min-width:80px; text-align:center; position:relative; font-size:12px; color:var(--muted); padding-top:32px; }
.step::before { content:""; position:absolute; top:0; left:50%; transform:translateX(-50%); width:24px; height:24px; border-radius:50%; background:var(--surface2); border:2px solid var(--line); }
.step::after { content:""; position:absolute; top:11px; left:calc(50% + 14px); right:calc(-50% + 14px); height:2px; background:var(--line); }
.step:last-child::after { display:none; }
.step.done { color:var(--ok); } .step.done::before { background:var(--ok); border-color:var(--ok); }
.step.now { color:var(--accent); font-weight:700; } .step.now::before { background:var(--surface); border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-soft); }

/* kv / timeline */
.kv { display:grid; grid-template-columns:minmax(7em, max-content) 1fr; gap:6px 16px; font-size:13px; margin:0; }
.kv dt { color:var(--muted); margin:0; white-space:nowrap; } .kv dd { margin:0; }
.kv dd.pre { white-space:pre-wrap; }
.nextaction { background:var(--accent-soft); border:1px solid var(--accent); border-radius:8px; padding:12px 16px; font-size:13px; margin-bottom:14px; }
.nextaction ul { margin:8px 0 0; padding-left:18px; }
.timeline { list-style:none; margin:0 0 14px; padding:0; }
.timeline li { position:relative; padding:0 0 16px 20px; border-left:2px solid var(--line); margin-left:6px; }
.timeline li:last-child { padding-bottom:2px; }
.timeline li::before { content:""; position:absolute; left:-6px; top:4px; width:10px; height:10px; border-radius:50%; background:var(--accent); }
.t-when { font-size:11.5px; color:var(--muted); }
.t-body { margin-top:2px; }
.advance-form, .note-form { display:flex; gap:8px; margin-bottom:8px; }
.advance-form input[type=text], .note-form textarea { flex:1; font:inherit; font-size:13px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }

/* countdown / progress / checklist */
.countdown { display:flex; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--crit); border-radius:var(--radius); padding:14px 20px; margin-bottom:16px; flex-wrap:wrap; }
.countdown-big { font-size:26px; font-weight:700; color:var(--crit); }
.countdown.done-all { border-color:var(--ok); }
.countdown.done-all .countdown-big { color:var(--ok); }
.countdown-desc { font-size:12.5px; color:var(--muted); }
.countdown-note { font-size:12.5px; color:var(--muted); }
.progressline { display:flex; align-items:center; gap:12px; margin-bottom:18px; }
.progress-track { flex:1; height:10px; background:var(--surface2); border-radius:99px; overflow:hidden; }
.progress-fill { display:block; height:100%; background:var(--ok); }
.progress-num { font-size:13px; font-weight:700; }
.clist { list-style:none; margin:0; padding:0; }
.clist li { display:flex; align-items:center; gap:10px; padding:9px 0; border-bottom:1px solid var(--line); font-size:13px; }
.clist li:last-child { border-bottom:none; }
.clist-title { flex:1; }
.clist-actions select { font:inherit; font-size:12px; padding:4px 8px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--ink); }

/* login */
.login-body { display:flex; align-items:flex-start; justify-content:center; padding-top:8vh; }
.login-frame { width:100%; max-width:380px; padding:0 16px; }
.login-logo { text-align:center; margin-bottom:18px; }
.login-logo .brand-name { font-size:24px; }
.login-logo .brand-logo { width:250px; max-width:80%; margin:0 auto; }
.divider { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:11.5px; margin:16px 0; }
.divider::before, .divider::after { content:""; flex:1; height:1px; background:var(--line); }
.login-note { font-size:11.5px; color:var(--muted); margin:12px 0 0; }
.login-foot { text-align:center; font-size:11px; color:var(--muted); margin-top:14px; }

/* 設定 */
.set-form .set-label { display:block; font-size:12.5px; font-weight:700; margin-bottom:8px; }
.set-inline { display:flex; gap:8px; align-items:center; }
.set-inline select { font:inherit; font-size:13px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); }
.sub-title { font-size:13px; font-weight:700; margin:18px 0 10px; padding-top:14px; border-top:1px solid var(--line); }
.invite-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
@media (max-width:600px) { .invite-grid { grid-template-columns:1fr; } }
.invite-form .field { margin-bottom:0; }
.temp-pw { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:14px; font-weight:700; background:var(--surface); padding:2px 8px; border-radius:6px; border:1px solid var(--ok); }
.url-box { font-family:ui-monospace,Menlo,Consolas,monospace; font-size:12.5px; background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:10px 12px; word-break:break-all; user-select:all; }
.grant-row { display:flex; gap:14px; align-items:center; flex-wrap:wrap; padding:10px 0; border-bottom:1px solid var(--line); }
.grant-row:last-of-type { border-bottom:none; }
.grant-office { font-size:13.5px; font-weight:700; min-width:14em; }
.scope { display:inline-block; font-size:11px; padding:2px 9px; border-radius:99px; background:var(--accent-soft); color:var(--accent); font-weight:600; white-space:nowrap; margin:1px 2px; }
.scope.off { background:var(--surface2); color:var(--muted); text-decoration:line-through; font-weight:400; }
.miniprog { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; }
.miniprog .bar-track { height:9px; }

/* チェックリスト詳細 */
.breadcrumb { font-size: 12.5px; margin: 0 0 12px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.item-title { font-size: 18px; margin: 0; }
.item-completed { font-size: 12px; color: var(--muted); }
.guide-box { border-left: 4px solid var(--accent); margin-bottom: 14px; }
.guide-what { font-size: 13.5px; margin: 0 0 10px; line-height: 1.8; }
.guide-evidence { font-size: 12.5px; color: var(--muted); background: var(--surface2);
                  border-radius: 8px; padding: 8px 12px; }
.clist-link { text-decoration: none; color: var(--ink); }
.clist-link:hover { color: var(--accent); text-decoration: underline; }
.clist-meta { display: inline-flex; gap: 4px; }
.meta-chip { font-size: 11px; color: var(--muted); background: var(--surface2);
             border-radius: 99px; padding: 1px 7px; white-space: nowrap; }
.doc-loc { max-width: 200px; overflow-wrap: break-word; font-size: 12px; }
.doc-loc a { color: var(--accent); }
.doc-note { max-width: 200px; font-size: 12px; color: var(--muted); white-space: pre-line; }
.doc-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.guide-sample-box { margin-top: 12px; }
.guide-sample-box summary { font-size: 12.5px; font-weight: 700; color: var(--accent); cursor: pointer; }
.guide-sample { white-space: pre-line; font-size: 12.5px; line-height: 1.9; background: var(--surface2);
                border-radius: 8px; padding: 12px 16px; margin-top: 8px; }

.linklike { appearance:none; border:none; background:none; padding:0; font:inherit;
  color:var(--accent); text-decoration:underline; cursor:pointer; }

/* モーダル */
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:1000;
  display:flex; align-items:flex-start; justify-content:center; padding:5vh 16px; overflow-y:auto; }
.modal-overlay[hidden] { display:none; }
body.modal-open { overflow:hidden; }
.modal-box { position:relative; background:var(--surface); border-radius:12px;
  max-width:480px; width:100%; padding:28px; box-shadow:0 12px 40px rgba(0,0,0,.3); }
/* 掲示ポスター用（A4想定でやや広め） */
.modal-box--poster { max-width:720px; padding:36px 40px; }
.modal-close { position:absolute; top:10px; right:14px; border:none; background:none;
  font-size:24px; line-height:1; color:var(--muted); cursor:pointer; }
.modal-actions { display:flex; gap:8px; justify-content:center; margin-top:18px; }
.assignee-cell { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; }
.assignee-cell .btn { flex:none; }
.poster-print { text-align:center; }
.poster-h1 { font-size:24px; margin:0 0 8px; line-height:1.45; }
.poster-lead { font-size:14px; color:var(--muted); margin:0 0 20px; }
.poster-qr { width:260px; height:260px; background:#fff; padding:12px;
  border:1px solid var(--line); border-radius:12px; }
.poster-notes { text-align:left; font-size:13px; color:var(--muted);
  max-width:36em; margin:18px auto 0; padding-left:1.3em; line-height:1.85; }

/* 印刷時はポスターモーダルだけを出す（モーダルは body 直下へ移動済み） */
@media print {
  body.modal-open { background:#fff !important; color:#1C2B33 !important; }
  body.modal-open > *:not(.modal-overlay) { display:none !important; }
  body.modal-open .modal-overlay {
    position:static !important; inset:auto !important; background:none !important;
    padding:0 !important; display:block !important; overflow:visible !important;
  }
  body.modal-open .modal-box,
  body.modal-open .modal-box--poster {
    box-shadow:none !important; max-width:none !important; width:100% !important;
    padding:12mm !important; border-radius:0 !important; background:#fff !important;
  }
  body.modal-open .modal-close,
  body.modal-open .modal-actions { display:none !important; }
  body.modal-open .poster-h1 { color:#1C2B33 !important; }
  body.modal-open .poster-lead,
  body.modal-open .poster-notes { color:#5B6B74 !important; }
  body.modal-open .poster-qr { border-color:#D9E0E4 !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  body.modal-open .url-box { color:#1C2B33 !important; border-color:#D9E0E4 !important; }
}

/* 設定タブ */
.settings-tabs {
  display:flex;
  gap:8px;
  margin:0 0 18px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--line);
  padding-bottom:6px;
  overflow-x:auto;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.settings-tabs::-webkit-scrollbar { display:none; }  /* タブ帯のスクロールバーは隠す */
.stab {
  appearance:none;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:10px 10px 0 0;
  background:var(--surface);
  color:var(--muted);
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  white-space:nowrap;
}
.stab:hover { color:var(--ink); background:var(--surface2); }
.stab.active {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}
.tab-pane { display:none; }
.tab-pane.active { display:block; }

/* 権限マトリクス */
.perm-table .perm-col { text-align: center; width: 7.5em; }
.perm-table input[type=checkbox] { width: 16px; height: 16px; }

/* 変更履歴 */
.history-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.history-list li { display: flex; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.history-list li:last-child { border-bottom: none; }
.history-when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-actor { font-weight: 700; white-space: nowrap; min-width: 6em; }
.history-what { flex: 1; min-width: 12em; }

/* 月次レポート */
.report-head { margin-bottom:16px; }
.report-title { font-size:18px; margin:0 0 2px; }
.report-meta { font-size:12px; color:var(--muted); }
.report-foot { font-size:11.5px; color:var(--muted); margin-top:8px; }

/* レポート切替タブ */
.report-tabs {
  display:flex;
  gap:8px;
  margin:0 0 14px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--line);
  padding-bottom:6px;
}
.report-tab {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-bottom:none;
  border-radius:10px 10px 0 0;
  background:var(--surface);
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  font-size:13px;
}
.report-tab.active {
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
}

/* 印刷（PDF保存）: レポート本文だけを白背景で出す */
@media print {
  body { background:#fff; color:#1C2B33; font-size:12px; }
  .sidebar, .topbar, .report-actions, .report-tabs, .alert, .no-print { display:none !important; }
  .content-inner { max-width:none; padding:0; }
  .card { border-color:#ccc; break-inside:avoid; box-shadow:none; }
  .grid2 { grid-template-columns:1fr 1fr; }
  a { color:inherit; text-decoration:none; }

  /* 事案レポート一括出力: 1案件=1ページ（案件間で改ページ・先頭は空ページを作らない）。
     カードの枠を外してコンパクト化し、通常量の案件は1ページに収まるようにする。 */
  .report-doc + .report-doc { break-before:page; }
  .report-doc { break-inside:avoid; border-bottom:none; margin-bottom:0; padding-bottom:0; }
  .report-doc .card { border:none; box-shadow:none; padding:0; margin:0 0 8px; }
  .report-doc .card-title { font-size:13px; margin:0 0 4px; }
  .report-doc .report-head { margin-bottom:6px; }
  .report-doc .report-title { font-size:15px; }
  .report-doc .kv { gap:2px 12px; font-size:11px; }
  .report-doc .report-field { margin-top:6px; }
  .report-doc .pre { font-size:11px; }
  .report-doc .timeline li { padding:2px 0 2px 14px; }
  .report-doc .timeline .t-when { font-size:10px; }
  .report-doc .timeline .t-body { font-size:10.5px; }
}
