/* Shilpa — 綴じ込みファイルと見出しシール。紙の白地に藍の文字、5つの領域(設計・進行・品質・お金・運用)を見出しシールの色で分ける。折り返しはブラウザ標準のまま */
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 600; font-display: swap; src: url("/fonts/jetbrains-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #f3f4f7; --surface: #ffffff; --surface2: #eff1f5; --line: #e0e3ea; --line2: #c9ced9;
  --fg: #151a36; --muted: #555c74; --accent: #2a3a9e; --accent-ink: #ffffff; --accent-soft: #e7eaf8; --accent-hover: #1e2b80;
  --shell: #1b2350; --shell-2: #242d61; --shell-fg: #eef0fa; --shell-muted: #aab1d6; --shell-line: rgba(255, 255, 255, .1);
  /* 見出しシール(領域)の色 */
  --a-design: #2f43b0; --a-design-soft: #e6e9f8; --a-flow: #17805b; --a-flow-soft: #def2e9; --a-quality: #9a6100; --a-quality-soft: #fbefd6;
  --a-money: #c2421d; --a-money-soft: #fbe5dd; --a-ops: #6545ab; --a-ops-soft: #ece6f8;
  --area: var(--a-design); --area-soft: var(--a-design-soft);
  --ok: #17733f; --ok-soft: #dff3e6; --warn: #8a5300; --warn-soft: #fff0d2; --bad: #b42323; --bad-soft: #fde4e4; --violet: #5a32b8; --violet-soft: #efe8ff;
  --shadow: 0 1px 2px rgba(21, 26, 54, .05), 0 4px 14px rgba(21, 26, 54, .05);
  --shadow-lg: 0 18px 48px rgba(21, 26, 54, .18);
  --f-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", "Yu Gothic UI", "Yu Gothic", "Meiryo", "BIZ UDPGothic", "Noto Sans JP", "Noto Sans CJK JP", "Source Han Sans JP", system-ui, -apple-system, sans-serif;
  --f-display: var(--f-body);
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans CJK JP", monospace;
  --r: 10px; --r-sm: 7px;
  /* 入力欄: 置き場の面より一段沈めた色と、はっきりした枠。押すとアクセント色の枠と薄い光 */
  --field: #ffffff; --field-line: #c3c9d8; --field-hover: #a2abc2; --field-focus: #ffffff; --label: #2f3554; --sec: #f6f7fa;
  --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5' fill='none' stroke='%23555c74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1326; --surface: #171c35; --surface2: #1d2340; --line: #2a3156; --line2: #39416b;
    --fg: #eceefa; --muted: #a7aecb; --accent: #9aa8ff; --accent-ink: #0f1326; --accent-soft: #252d5c; --accent-hover: #b6c0ff;
    --shell: #0b0e1d; --shell-2: #161b36; --shell-fg: #eceefa; --shell-muted: #9ca3c6; --shell-line: rgba(255, 255, 255, .08);
    --a-design: #9aa8ff; --a-design-soft: #232b5a; --a-flow: #5fcf9f; --a-flow-soft: #15362a; --a-quality: #f0b452; --a-quality-soft: #3a2b10;
    --a-money: #ff8f6b; --a-money-soft: #44200f; --a-ops: #c0a8ff; --a-ops-soft: #2c2252;
    --ok: #5fd394; --ok-soft: #133624; --warn: #f3b85a; --warn-soft: #3a2b10; --bad: #ff8a8a; --bad-soft: #451b1b; --violet: #bba2ff; --violet-soft: #2a2050;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25); --shadow-lg: 0 20px 60px rgba(0, 0, 0, .5);
    --field: #222a4d; --field-line: #434d82; --field-hover: #5a65a3; --field-focus: #262f57; --label: #c9cee8; --sec: #131830;
    --sel-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5' fill='none' stroke='%23a7aecb' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
/* 領域ごとの色(見出しシール) */
.area-design, .area-dev { --area: var(--a-design); --area-soft: var(--a-design-soft); } .area-flow { --area: var(--a-flow); --area-soft: var(--a-flow-soft); }
.area-quality { --area: var(--a-quality); --area-soft: var(--a-quality-soft); } .area-money { --area: var(--a-money); --area-soft: var(--a-money-soft); }
.area-ops { --area: var(--a-ops); --area-soft: var(--a-ops-soft); } .area-tasks { --area: var(--a-flow); --area-soft: var(--a-flow-soft); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.75 var(--f-body); overflow-wrap: break-word; caret-color: var(--accent); font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); color: var(--fg); }
* { scrollbar-color: var(--line2) transparent; scrollbar-width: thin; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.35; margin: 0 0 .5em; letter-spacing: 0; }
h1 { font-size: 2.05rem; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; } h2 { font-size: 1.22rem; font-weight: 750; } h3 { font-size: 1.04rem; font-weight: 700; } h4 { font-size: .95rem; }
p { margin: 0 0 .8em; }
img, svg { max-width: 100%; }
code, .mono { font-family: var(--f-mono); font-size: .92em; }
.ic { flex: none; vertical-align: -3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.pad { padding: 14px 4px; }
.pre { white-space: pre-wrap; }
/* 見出しの上の小見出しは置かない。補足は見出しの下に出す */
.proj-title, .page-head > div { display: flex; flex-direction: column; }
.eyebrow { order: 2; font: 600 .92rem/1.5 var(--f-body); color: var(--muted); margin: 6px 0 0; }
.proj-title .lead { order: 3; margin-top: 4px; }
.lead { color: var(--muted); font-size: 1.05rem; }
.lead.small { font-size: .95rem; }
.hint { color: var(--muted); font-size: .86rem; margin: 6px 0 0; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 12px 14px; border-radius: var(--r-sm); }

/* ---- ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 18px; border-radius: 9px; border: 1px solid var(--line2);
  background: var(--surface); color: var(--fg); font: 600 .95rem/1.3 var(--f-body); cursor: pointer; text-decoration: none; transition: background .16s, border-color .16s, transform .12s, box-shadow .16s; }
.btn:hover { border-color: var(--accent); color: var(--fg); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(21, 26, 54, .18), 0 3px 8px rgba(42, 58, 158, .18); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.danger { color: #1a0b0b; } }
.btn.danger-ghost { background: transparent; color: var(--bad); border-color: transparent; }
.btn.danger-ghost:hover { background: var(--bad-soft); border-color: var(--bad-soft); color: var(--bad); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .88rem; }
.btn.big { min-height: 50px; padding: 12px 26px; font-size: 1.02rem; }
.btn:disabled, .btn.is-busy { opacity: .7; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--fg); cursor: pointer; }
.icon-btn:hover { background: var(--surface2); border-color: var(--line); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.row-end, .row-start, .row-between { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.row-end { justify-content: flex-end; } .row-between { justify-content: space-between; }
.tool-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.toolbar input[type="search"] { max-width: 340px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); flex-wrap: wrap; max-width: 100%; }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 .9rem/1.3 var(--f-body); padding: 8px 14px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.seg button.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.seg button:not(.on):hover { color: var(--fg); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.seg.small button { padding: 5px 10px; min-height: 30px; font-size: .84rem; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 6px; font-size: .78rem; font-weight: 600; line-height: 1.6; background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); } .chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.mute { background: var(--surface2); color: var(--muted); } .chip.violet { background: var(--violet-soft); color: var(--violet); }
.badge { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--bad); color: #fff; font-size: .75rem; font-weight: 700; text-align: center; line-height: 22px; }
@media (prefers-color-scheme: dark) { .badge { color: #1a0b0b; } }

/* ---- 入力 */
.field { display: grid; gap: 6px; margin: 0 0 14px; min-width: 0; align-content: start; }
.field label, .field > .label, legend { font-weight: 600; font-size: .9rem; color: var(--label); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="date"], input[type="month"], input[type="datetime-local"], input[type="number"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--field-line); background: var(--field); color: var(--fg); font: 1rem/1.5 var(--f-body); transition: border-color .14s, background .14s, box-shadow .14s; }
input[type="text"]:hover:not(:disabled):not(:focus), input[type="email"]:hover:not(:disabled):not(:focus), input[type="password"]:hover:not(:disabled):not(:focus), input[type="search"]:hover:not(:disabled):not(:focus), input[type="url"]:hover:not(:disabled):not(:focus), input[type="number"]:hover:not(:disabled):not(:focus), input[type="date"]:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: var(--field-hover); }
::placeholder { color: var(--muted); opacity: .75; }
textarea { resize: vertical; }
/* iPhone の日付・月の欄は、そのままだと中身の幅で広がり画面からはみ出す */
input[type="date"], input[type="month"], input[type="datetime-local"] { -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
/* どこかが広がっても、画面全体が横にずれないように */
html, body { overflow-x: clip; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background-color: var(--field-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface2); color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--accent); flex: none; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 12px; margin: 0 0 14px; min-width: 0; }
.link-pick { max-height: 360px; overflow: auto; }
.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
details > summary { cursor: pointer; font-weight: 600; }
.links-box { margin: 6px 0 4px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); }

/* ---- 枠 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); margin: 0 0 18px; min-width: 0; }
.card.flush { padding: 0; }
.card.narrow { max-width: 520px; width: 100%; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); margin: 0 0 16px; text-decoration: none; font-weight: 600; }
.banner .ic { margin-top: 3px; }
.banner.ok { background: var(--ok-soft); color: var(--ok); } .banner.warn { background: var(--warn-soft); color: var(--warn); } .banner.bad { background: var(--bad-soft); color: var(--bad); }
a.banner:hover { filter: brightness(.97); }
.alert-banner { flex-wrap: wrap; }
.alert-banner > a { color: inherit; flex: 1 1 260px; text-decoration: underline; text-underline-offset: 3px; }
.alert-banner > .btn { flex: none; color: inherit; }
.empty { text-align: center; padding: 48px 20px; border: 1.5px dashed var(--line2); border-radius: var(--r); background: var(--surface); }
.empty p { color: var(--muted); margin: 0 auto 18px; }
.empty-art { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--area-soft); color: var(--area); margin-bottom: 14px; }
.progress { height: 10px; border-radius: 5px; background: var(--surface2); overflow: hidden; margin: 8px 0 10px; }
.progress span { display: block; height: 100%; background: var(--area); border-radius: 5px; transition: width .5s cubic-bezier(.16, 1, .3, 1); }
.progress.thin { height: 6px; margin: 12px 0 0; }
/* 読み込み中: ゆっくり回す(1回転 2.4秒、速さに緩急を付けて落ち着かせる) */
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 12px; align-items: center; color: var(--muted); padding: 40px 0; }
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--shell); }
.center-page > .card { box-shadow: var(--shadow-lg); border-color: transparent; }
.login .brand { margin-bottom: 18px; }
.login .btn { width: 100%; margin: 6px 0 14px; }

/* ---- 通知・シート */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; width: min(440px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--shell); color: var(--shell-fg); box-shadow: var(--shadow-lg); font-weight: 600; animation: up .22s ease-out; transition: opacity .3s, transform .3s; }
.toast.error { background: #9b1c1c; }
@media (prefers-color-scheme: dark) { .toast { background: #e8edf8; color: #14213a; } .toast.error { background: #ffc9c9; color: #4a0d0d; } }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast.nudge { font-weight: 500; display: grid; gap: 10px; }
.toast.nudge p { margin: 0; }
.nudge-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }
.sheet-wrap { position: fixed; inset: 0; background: rgba(12, 19, 34, .45); z-index: 60; display: flex; justify-content: flex-end; animation: fade .18s; }
.sheet-wrap.center { align-items: center; justify-content: center; padding: 16px; z-index: 80; }
.sheet-wrap.top { align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(560px, 100vw); height: 100%; background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .24s ease-out; }
.sheet.wide { width: min(1040px, 100vw); }
.sheet.full { width: min(1400px, 100vw); }
@keyframes slide { from { transform: translateX(40px); opacity: .4; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: 22px; overflow: auto; flex: 1; }
.confirm { background: var(--surface); border-radius: var(--r); padding: 24px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }
.confirm p { font-size: 1.02rem; }

/* ---- 外枠(左のメニュー) */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--shell) 252px, transparent 252px); }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--shell); color: var(--shell-fg); padding: 18px 14px; --line: var(--shell-line); --fg: var(--shell-fg); --muted: var(--shell-muted); --surface: var(--shell-2); --surface2: var(--shell-2); scrollbar-color: rgba(255, 255, 255, .18) transparent; display: flex; flex-direction: column; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.3rem/1 var(--f-display); color: var(--fg); text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--fg); }
.side > .brand { padding: 4px 8px; }
.org-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); color: var(--fg); cursor: pointer; text-align: left; font: inherit; }
.org-switch:hover { border-color: rgba(255, 255, 255, .28); }
.org-av { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; flex: none; }
.side .org-av { background: #f06a43; color: #fff; }
.org-av.big { width: 46px; height: 46px; border-radius: 12px; font-size: 1.2rem; }
.org-name { display: grid; min-width: 0; flex: 1; line-height: 1.4; }
.org-name small { color: var(--muted); }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; }
.search-btn:hover { border-color: rgba(255, 255, 255, .28); color: var(--fg); }
.search-btn kbd { margin-left: auto; font: 600 .72rem var(--f-mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); }
.nav { display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--fg); text-decoration: none; font-weight: 600; }
.nav-link:hover { background: var(--surface2); color: var(--fg); }
.nav-link.on { background: var(--shell-fg); color: var(--shell); }
.side-sec { border-top: 1px solid var(--line); padding-top: 12px; flex: 1; }
.side-h { font: 700 .78rem/1 var(--f-display); letter-spacing: .04em; color: var(--muted); padding: 0 12px; margin-bottom: 8px; }
.side-projects { display: grid; gap: 1px; }
.side-p { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px; color: var(--fg); text-decoration: none; font-size: .93rem; }
.side-p:hover { background: var(--surface2); color: var(--fg); }
.side-p.on { background: var(--surface2); font-weight: 700; }
.p-dot { width: 7px; height: 12px; border-radius: 2px; background: #f06a43; flex: none; }
.side-foot { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 12px 8px 0; }
.me-name { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; }
.home-top .me-name { flex: 0 1 auto; min-width: 3em; }
.av { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.topbar { display: none; }
.main { padding: 32px clamp(16px, 3.4vw, 44px) 80px; min-width: 0; }
.side-back { display: none; }

/* ---- 組織を選ぶ */
.home { min-height: 100vh; }
.home-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px clamp(16px, 4vw, 44px); flex-wrap: wrap; }
.home-main { max-width: 860px; margin: 0 auto; padding: 30px 16px 80px; }
.org-grid { display: grid; gap: 12px; margin-bottom: 8px; }
.org-card { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: border-color .16s, transform .16s; }
.org-card:hover { border-color: var(--accent); color: var(--fg); transform: translateY(-1px); }

/* ---- ページ共通 */
.page { max-width: 1240px; }
.narrow-page { max-width: 760px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.client-groups { display: grid; gap: 36px; }
.client-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 1.2rem; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pick-group { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.pick-group:first-of-type { border-top: 0; }
.pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.p-card { display: block; padding: 22px 20px 20px; margin-top: 9px; border-radius: 0 var(--r) var(--r) var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; transition: border-color .18s, transform .18s, box-shadow .18s; position: relative; }
/* 綴じ込みの見出しシール */
.p-card::before { content: ""; position: absolute; left: -1px; top: -10px; width: 72px; height: 10px; border-radius: 6px 6px 0 0; background: var(--pc, var(--accent)); }
.p-card.archived::before { background: var(--line2); }
.p-card:hover { border-color: var(--pc, var(--accent)); color: var(--fg); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.p-card.archived { opacity: .75; }
.p-card h3 { margin: 12px 0 2px; font-size: 1.15rem; }
.p-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: .84rem; }
.p-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.p-counts { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font: .86rem var(--f-body); margin-top: 6px; }
.archived-box { margin-top: 28px; }
.archived-box > summary { margin-bottom: 14px; color: var(--muted); }

/* ---- メンバー */
.member-list, .pend-list, .sess-list, .recent, .doc-states, .steps, .comments, .ver-list, .block-notes { list-style: none; margin: 0; padding: 0; }
.member { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.member-main { display: grid; flex: 1; min-width: 0; line-height: 1.5; }
.member-main b { display: flex; gap: 6px; flex-wrap: wrap; }
.member-main .muted { font-size: .88rem; }
.member-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pend-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pend-list li:first-child { border-top: 0; }
.pend-list p { margin: 2px 0 0; font-size: .9rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .93rem; }
thead th { background: var(--surface2); font-weight: 700; font-size: .84rem; color: var(--muted); }
.role-table { min-width: 620px; }
.role-table tbody th { font-weight: 600; }
/* 招待: 1つの欄に名前・チーム・メールアドレスを入れて候補から選ぶ */
.who-wrap { position: relative; }
.who-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--field-line); border-radius: var(--r-sm); background: var(--field); cursor: text; transition: border-color .14s, background .14s; }
.who-box:hover { border-color: var(--field-hover); } .who-box.off { background: var(--surface2); cursor: default; }
.who-box:focus-within { border-color: var(--accent); background: var(--field-focus); box-shadow: 0 0 0 3px var(--accent-soft); }
.who-box input[type="text"]:focus { background: transparent; box-shadow: none; }
.who-chips { display: contents; }
.who-box input[type="text"] { flex: 1 1 180px; border: 0; background: transparent; box-shadow: none; padding: 6px 4px; min-height: 0; outline: none; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: .9rem; max-width: 100%; }
.who-chip > span { overflow-wrap: anywhere; }
.who-chip.e { background: var(--accent-soft); }
.who-chip button { border: 0; background: transparent; color: var(--muted); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.who-chip button:hover { background: var(--line); color: var(--fg); }
.who-list { position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); max-height: 320px; overflow: auto; }
.who-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.who-list li .muted { margin-left: auto; }
.who-list li.on, .who-list li:hover { background: var(--surface2); }
.invite-url { display: grid; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.invite-url h3 { margin: 0; font-size: 1rem; }
.invite-out { margin-top: 18px; padding: 16px; border-radius: var(--r-sm); background: var(--ok-soft); }
.copy-row { display: flex; gap: 8px; margin: 6px 0 10px; }
.copy-row input { font-family: var(--f-mono); font-size: .85rem; }
.copy-row > .btn { flex: none; }
.invite-mail .copy-row { margin-top: 0; }
.invite-mail .copy-row input { font-family: inherit; font-size: .93rem; }
.join-mail { margin: 6px 0 14px; }
.join-mail .field { margin-top: 10px; }
.hint-list { margin: 0; padding-left: 1.2em; font-size: .9rem; }
.sess-list li { display: grid; padding: 10px 0; border-top: 1px solid var(--line); }
.sess-list li:first-child { border-top: 0; }

/* ---- 監査ログ */
table.audit { min-width: 760px; }
table.audit .audit-who { min-width: 7em; }
table.audit .audit-act { min-width: 12em; }
table.audit .audit-what { min-width: 14em; overflow-wrap: anywhere; }
table.audit .audit-level { min-width: 5.5em; }
table.audit th:last-child, table.audit .audit-level { width: 1%; }
table.audit .chip { white-space: nowrap; }
table.audit td:first-child { min-width: 11em; font-family: var(--f-mono); font-size: .84rem; }
.verify-out .banner { margin-bottom: 14px; }

/* ---- 検索 */
.search-box { width: min(680px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .18s; }
.search-in { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.search-in input { border: 0; box-shadow: none; padding: 10px 0; font-size: 1.08rem; background: transparent; }
.search-in input:focus { box-shadow: none; }
.search-res { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.search-res button { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.search-res button.on, .search-res button:hover { background: var(--accent-soft); }
.search-res .muted { font-size: .84rem; }
.search-foot { border-top: 1px solid var(--line); padding: 10px 18px 12px; }
.google-link { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }

/* ---- 案件 */
/* 案件の概要(書いたときの改行のまま。長いときは4行で畳む) */
.about-card { display: grid; gap: 10px; margin-bottom: 18px; }
.about-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.about-head h2 { margin: 0; }
.about-text { overflow-wrap: anywhere; line-height: 1.85; color: var(--fg); }
.about-text p { margin: 0 0 .6em; white-space: pre-wrap; }
.about-text p:last-child { margin-bottom: 0; }
/* 畳んでいるときは5行ほどまで。下を薄くして続きがあることを見せる */
.about-text.clamped { max-height: 9.3em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent); }
.about-more { display: inline-flex; align-items: center; gap: 6px; justify-self: center; min-height: 40px; padding: 8px 22px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 .95rem/1.4 var(--f-body); cursor: pointer; transition: background .15s, color .15s; }
.about-more:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.about-more .more-ic { display: inline-flex; transition: transform .15s; }
.about-more[aria-expanded="true"] .more-ic { transform: rotate(180deg); }
.about-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn.link { justify-self: start; padding: 0; min-height: 0; border: 0; background: none; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.about-card .hint { margin: 0; }
.client-pick { display: grid; gap: 8px; }
.pick-new { display: grid; gap: 8px; }
.grp-rows { display: grid; gap: 8px; margin: 12px 0; }
.grp-row { display: flex; align-items: center; gap: 12px; }
.grp-row input { flex: 1; }
.grp-row .muted { flex: none; }
.empty-hint { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin: 0 0 14px; border: 1px dashed var(--line2); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }
.empty-hint > svg { flex: none; color: var(--accent); }
.empty-hint p { margin: 0; flex: 1 1 280px; }
.repo-gains { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.repo-gains li { display: flex; gap: 8px; align-items: flex-start; }
.repo-gains li svg { flex: none; margin-top: 4px; color: var(--ok, var(--accent)); }
.overview > .repo-nudge:empty { display: none; }
.proj-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.proj-title h1 { margin: 0 0 4px; }
.proj-title .lead { margin: 0; }
.proj-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2.5px solid transparent; margin-bottom: -1px; flex: none; }
.tab:hover { color: var(--fg); }
.tab.on { color: var(--area); border-bottom-color: var(--area); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 12px; align-items: center; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--fg); text-decoration: none; }
.stat:hover { border-color: var(--area); color: var(--fg); }
.stat-ic { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--area-soft); color: var(--area); }
.stat-n { font: 800 1.75rem/1.1 var(--f-display); letter-spacing: -.01em; }
.stat-l { color: var(--muted); font-size: .88rem; }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.alert-line { display: flex; gap: 8px; align-items: center; color: var(--bad); font-weight: 600; margin: 6px 0 12px; }
.doc-state { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 7px 0; }
.step-dot { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); color: var(--accent-ink); flex: none; }
.steps li.ok .step-dot { background: var(--ok); border-color: var(--ok); }
.steps li.ok a { color: var(--muted); text-decoration: line-through; }
@media (prefers-color-scheme: dark) { .steps li.ok .step-dot { color: #0c1322; } }
.recent li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.recent li:first-child { border-top: 0; }
.recent a { display: flex; gap: 8px; align-items: baseline; color: var(--fg); text-decoration: none; min-width: 0; }
.recent a:hover span:last-child { text-decoration: underline; }
.recent .chip { flex: none; }
.recent time { color: var(--muted); font-size: .84rem; flex: none; }
.settings > summary { display: block; }
/* summary 自体は flex にしない(古い iPhone の Safari で開かなくなるため)。中身を .sum-row で並べる */
.sum-row { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; vertical-align: middle; }
.settings .form-grid { margin-top: 16px; }

.group-h { display: flex; gap: 10px; align-items: baseline; font-size: 1.05rem; margin: 22px 0 10px; }
.group-h:first-child { margin-top: 0; }
.count { color: var(--muted); font: 600 .84rem var(--f-body); }
.rows { display: grid; gap: 8px; }
.row-card { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: start; width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: border-color .16s, box-shadow .16s; }
button.row-card:hover { border-color: var(--area); box-shadow: var(--shadow); }
.row-card.static { cursor: default; }
.code { font: 600 .84rem/1.6 var(--f-mono); color: var(--area); }
.row-main { display: grid; gap: 2px; min-width: 0; }
.row-sub { color: var(--muted); font-size: .9rem; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cover { font-size: .8rem; color: var(--ok); font-weight: 600; }
.cover.none { color: var(--warn); }
.trace { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.trace-sec { margin-bottom: 12px; }
.trace-sec ul { margin: 0; padding-left: 1.1em; }
.trace-task { display: inline-flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.comment-box { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment.internal { background: var(--warn-soft); margin: 4px -10px; padding: 10px; border-radius: 8px; }
.c-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; font-size: .88rem; }
.c-head span { color: var(--muted); }
.c-body { margin: 2px 0 0; white-space: pre-wrap; }
.comment-form { margin-top: 10px; }
.comment-form .row-between { margin-top: 8px; }

/* ER図 */
.er-wrap { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px;
  background: var(--surface2); }
.er-svg { display: block; max-width: none; color: var(--muted); font-family: var(--f-mono); }
.er-box { fill: var(--surface); stroke: var(--line2); stroke-width: 1.2; filter: drop-shadow(0 4px 10px rgba(20, 33, 58, .08)); }
.er-head { fill: var(--accent); }
.er-title { fill: var(--accent-ink); font: 600 13px var(--f-mono); }
.er-logical { fill: var(--accent-ink); font: 500 11px var(--f-body); opacity: .9; }
.er-col { fill: var(--fg); font-size: 12px; }
.er-col.pk { font-weight: 600; fill: var(--accent); }
.er-col.fk { fill: var(--violet); }
.er-type { fill: var(--muted); font-size: 11px; }
.er-edge { fill: none; stroke: var(--muted); stroke-width: 1.4; }
.er-table.movable { cursor: grab; }
.er-table:focus-visible .er-box { stroke: var(--accent); stroke-width: 2.4; }
.code-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.code-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--surface2); flex-wrap: wrap; }
pre.code { margin: 0; padding: 18px; overflow: auto; max-height: 70vh; font: .86rem/1.65 var(--f-mono); white-space: pre; }
.col-scroll { margin: 6px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.col-grid { display: grid; }
.col-item { border-top: 1px solid var(--line); }
.col-item.open { background: var(--surface2); }
.col-row { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1.1fr) 132px 120px 52px 84px minmax(170px, 1.3fr) 88px 78px; gap: 8px; align-items: center; padding: 8px 10px; }
.col-head { font-size: .8rem; font-weight: 600; color: var(--muted); padding-top: 10px; padding-bottom: 6px; }
.col-row input, .col-row select { min-height: 36px; padding: 6px 8px; font-size: .9rem; }
.cb-cell { display: flex; justify-content: center; }
.col-head .ch-c { text-align: center; }
.cb-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.col-more { gap: 6px; width: 100%; justify-content: center; }
.col-more-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 700; }
.col-ops { display: flex; gap: 4px; justify-content: flex-end; }
.col-detail { display: grid; gap: 10px; padding: 4px 10px 14px; }
.col-flags { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.col-detail .cb { display: inline-flex; align-items: center; gap: 6px; }
.col-detail .cb-l { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: .9rem; }
.col-detail-f { display: grid; grid-template-columns: 1fr 1.4fr 2fr; gap: 10px; }
.col-detail .cf-l { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.col-head { border-top: 0; background: var(--surface2); font-size: .8rem; font-weight: 700; color: var(--muted); }
.cb { display: grid; place-items: center; }
.cb input { width: 18px; height: 18px; accent-color: var(--accent); }
.col-ops { display: flex; gap: 2px; }
.arrow-up { width: 0; height: 0; border: 6px solid transparent; border-bottom: 8px solid currentColor; margin-top: -6px; }
.def { margin: 22px 0; }
.def h3 { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.def-table { min-width: 640px; }
.def-table td.mono { font-family: var(--f-mono); }

/* 画面設計 */
.scr-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.scr-list { display: grid; gap: 4px; align-content: start; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.scr-side-h, .scr-sec-h { margin: 0 0 6px; font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
.scr-side-h { padding: 2px 4px 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.scr-main { display: grid; gap: 16px; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.scr-main-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.scr-main-head h2 { margin: 0; font-size: 1.25rem; }
.scr-main-head .saved-mark { margin-left: auto; }
.wf-area { display: grid; gap: 6px; min-width: 0; align-content: start; }
.scr-item { display: grid; gap: 2px; padding: 8px 10px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.scr-meta { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.scr-meta .code { font-size: .74rem; line-height: 1.4; }
.scr-dev { font-size: .72rem; color: var(--muted); font-weight: 600; }
.scr-name { font-size: .9rem; line-height: 1.45; font-weight: 600; }
.scr-item:hover { background: var(--surface); border-color: var(--line); }
.scr-item.on { background: var(--surface); border-color: var(--accent); box-shadow: var(--shadow); }
.wf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 18px; margin-bottom: 16px; }
.wf-canvas { padding: 12px; border-radius: var(--r); border: 1px solid var(--line); min-width: 0;
  background: var(--surface2); }
.wf-panel { display: grid; gap: 14px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); }
/* 右の欄は画面に貼りつける(部品を選んだら、その設定がスクロールなしで見える) */
@media (min-width: 1101px) { .wf-panel { align-self: start; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; } }
.wf-layout.mock { grid-template-columns: minmax(0, 1fr); } .wf-layout.mock .wf-panel { display: none; }
.wf-panel { scroll-margin-top: 72px; }
.be-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.be-head h3 { margin: 0; }
.be-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.palette h3, .block-edit h3 { font-size: .95rem; }
.palette-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.palette-btns .btn.small { padding: 5px 10px; min-height: 32px; font-size: .84rem; }
.block-edit { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.wf-frame { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 8px; margin: 0 auto; padding: 14px; background: var(--surface); border: 2px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); }
.wf-frame.pc { max-width: 760px; }
.wf-frame.tablet { max-width: 560px; border-radius: 20px; padding: 20px 16px; border-width: 5px; }
.wf-frame.sp { max-width: 340px; border-radius: 26px; padding: 22px 14px; border-width: 6px; }
.wf-b { position: relative; display: grid; gap: 2px; justify-items: start; align-content: start; padding: 8px 10px 10px; min-height: 46px; border-radius: 8px; border: 1.5px dashed var(--line2); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.wf-b:hover { border-color: var(--accent); }
.wf-b.sel { border-style: solid; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wf-no { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 .72rem var(--f-mono); }
.wf-kind { font-size: .72rem; color: var(--muted); font-weight: 600; }
.wf-label { font-weight: 600; font-size: .92rem; }
.wf-b.t-header, .wf-b.t-footer { background: var(--surface2); }
.wf-b.t-title .wf-label { font-size: 1.1rem; font-family: var(--f-display); }
.wf-b.t-button { background: var(--accent-soft); border-color: var(--accent); }
.wf-b.t-image { min-height: 96px; background-image: linear-gradient(135deg, transparent 49.5%, var(--line2) 50%, transparent 50.5%), linear-gradient(45deg, transparent 49.5%, var(--line2) 50%, transparent 50.5%); }
.wf-b.t-note { background: var(--warn-soft); }
.wf-b.t-table, .wf-b.t-list { min-height: 92px; }
.wf-lines { display: grid; gap: 5px; width: 100%; margin-top: 6px; }
.wf-lines i { display: block; height: 7px; border-radius: 3px; background: var(--surface2); }
.wf-field { display: block; width: 100%; height: 22px; margin-top: 4px; border-radius: 5px; border: 1px solid var(--line2); }
.wf-empty { grid-column: 1 / -1; padding: 28px 12px; color: var(--muted); text-align: center; }
.next-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 0 14px; }
.next-box legend { padding: 0 4px; }
.scr-read .wf-frame { margin: 12px 0; }
.block-notes li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.block-notes .pre { flex-basis: 100%; color: var(--muted); font-size: .92rem; }

/* タスク */
/* ボードは毎日開く画面。列は画面の下まで伸ばして、どこに落としても入るようにする */
.board { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(216px, 1fr)); gap: 14px; align-items: stretch; min-height: calc(100vh - 300px); overflow-x: auto; padding-bottom: 6px; }
/* 状態を自分で決める画面 */
.st-list { display: grid; grid-template-columns: 10px minmax(0, 1fr) minmax(120px, 34%) auto auto auto; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.st-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; }
.st-row .dot { flex: none; }
.st-head { color: var(--muted); font-size: .85rem; font-weight: 600; }
.st-head > :nth-child(3) { grid-column: 3 / -1; }
@media (max-width: 640px) { .st-list { grid-template-columns: 10px minmax(0, 1fr) auto auto auto; } .st-row select { grid-column: 2 / -1; grid-row: 2; } .st-head { display: none; } .st-list { row-gap: 14px; } .st-row { row-gap: 6px; } }
.col { display: flex; flex-direction: column; background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 160px; transition: border-color .16s, background .16s; }
.col.over { border-color: var(--accent); background: var(--accent-soft); }
.col-h { display: flex; gap: 8px; align-items: center; font-size: .95rem; margin: 2px 4px 10px; }
.col-h .count { margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.s-todo { --s: var(--muted); } .s-doing { --s: var(--warn); } .s-review { --s: var(--violet); } .s-done { --s: var(--ok); }
.dot { background: var(--s); }
.col-body { display: grid; gap: 8px; align-content: start; flex: 1; }
.col-add { display: flex; gap: 6px; align-items: center; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px dashed var(--line2); border-radius: 10px; background: transparent; color: var(--muted); font: 600 .88rem/1.3 var(--f-body); cursor: pointer; transition: color .14s, border-color .14s, background .14s; }
.col-add:hover, .col-add:focus-visible { color: var(--fg); border-color: var(--accent); background: var(--surface); }
.col-quick { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--accent); border-radius: 10px; background: var(--surface); }
.col-quick textarea { min-height: 0; resize: vertical; font-size: .95rem; }
.col-quick-btns { display: flex; gap: 8px; justify-content: flex-end; }
.task-card { display: grid; gap: 6px; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: grab; box-shadow: 0 1px 2px rgba(20, 33, 58, .05); transition: transform .14s, box-shadow .14s, border-color .14s; }
.task-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.task-card.dragging { opacity: .5; transform: rotate(1.5deg); }
.task-top { display: flex; justify-content: space-between; align-items: center; }
.pr { display: inline-flex; gap: 4px; align-items: center; font-size: .76rem; font-weight: 700; color: var(--violet); }
.task-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .82rem; }
.late { color: var(--bad); font-weight: 700; }
.gantt { display: grid; grid-template-columns: 170px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.g-names { border-right: 1px solid var(--line); }
.g-name { display: flex; gap: 8px; align-items: center; height: 40px; padding: 0 12px; border-top: 1px solid var(--line); font-size: .86rem; overflow: hidden; }
.g-name.h { border-top: 0; height: 34px; font-weight: 700; color: var(--muted); background: var(--surface2); }
.g-scroll { overflow-x: auto; }
.g-head { display: flex; height: 34px; background: var(--surface2); }
.g-day { flex: 0 0 30px; display: grid; place-items: center; font: .7rem var(--f-mono); color: var(--muted); border-left: 1px solid var(--line); }
.g-day.we { background: rgba(127, 127, 127, .07); }
.g-day.today { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.g-body { position: relative; }
.g-body::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--today); width: 2px; background: var(--accent); opacity: .6; pointer-events: none; }
.g-row { position: relative; height: 40px; border-top: 1px solid var(--line); background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 30px 100%; }
.g-bar { position: absolute; top: 7px; height: 26px; border-radius: 6px; border: 0; background: var(--s); color: #fff; font: 600 .76rem/26px var(--f-body); text-align: left; padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: clip; cursor: pointer; }
@media (prefers-color-scheme: dark) { .g-bar { color: #0c1322; } }

/* 提出と承認 */
.ver-card h2 { margin: 0; }
.ver-list { margin-top: 14px; }
.ver-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 12px 10px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; text-align: left; cursor: pointer; border-radius: 0; }
.ver-row:hover { background: var(--surface2); }
.ver-no { font: 700 1rem var(--f-mono); color: var(--accent); }
.ver-txt { display: grid; gap: 2px; font-size: .92rem; }
.client-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 18px; }
.client-bar h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }

/* ---- 印刷(PDF) */
.print-doc { display: none; }
@media print {
  body.printing > *:not(.print-doc) { display: none !important; }
  body.printing .print-doc { display: block; color: #000; font-size: 10.5pt; }
  .print-doc h1 { font-size: 16pt; } .print-doc h2 { font-size: 12.5pt; margin-top: 14pt; }
  .print-sheet { break-before: page; } .print-sheet:first-of-type { break-before: auto; }
  .print-doc table { border-collapse: collapse; width: 100%; } .print-doc th, .print-doc td { border: .5pt solid #888; padding: 3pt 5pt; font-size: 9pt; }
  .print-doc th { background: #eef2f8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-meta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2pt 10pt; margin: 0 0 8pt; } .print-meta dd { margin: 0; }
  @page { size: A4 landscape; margin: 12mm; }
}

/* ---- 幅が狭いとき */
@media (max-width: 1100px) {
  .wf-layout { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(280px, 42%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .board > .col { scroll-snap-align: start; }
}
@media (max-width: 920px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .side { position: fixed; z-index: 70; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .22s ease-out, visibility 0s .22s; visibility: hidden; }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); visibility: visible; transition: transform .22s ease-out; } /* 閉じているときは影も出さない(左の端ににじまない)・Tab でも入らない */
  body.side-open .side-back { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(12, 19, 34, .45); }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 40; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .top-brand { font-size: 1.1rem; }
  .main { padding: 22px 16px 80px; }
  .ov-grid, .scr-layout { grid-template-columns: minmax(0, 1fr); }
  .scr-list { grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; position: static; max-height: none; }
  .scr-list .scr-side-h { display: none; }
  .scr-main { padding: 14px; }
  .form-grid.three, .link-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  h1 { font-size: 1.55rem; }
  .card { padding: 18px 16px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; gap: 0 10px; }
  .stat-ic { width: 36px; height: 36px; }
  .board { grid-auto-columns: 86%; min-height: calc(100vh - 260px); }
  .row-card { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .row-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .page-head > .btn, .page-head .tool-btns, .row-end > .btn, .empty .btn { width: 100%; }
  .page-head .tool-btns .btn { flex: 1 0 auto; justify-content: center; }
  .row-end { justify-content: center; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input[type="search"] { max-width: none; }
  .toolbar .tool-btns > .btn, .toolbar .tool-btns > select { flex: 1 1 auto; max-width: 100%; }
  .toolbar .tool-btns > .seg { flex: 1 1 100%; justify-content: center; }
  .toolbar .seg button { flex: 1 0 auto; }
  .gantt { grid-template-columns: 110px minmax(0, 1fr); }
  .sheet-body { padding: 18px 16px; }
  .sheet-head { padding: 12px 16px; }
  .member { flex-wrap: wrap; }
  .member-side { width: 100%; justify-content: flex-start; padding-left: 48px; }
  .copy-row { flex-direction: column; }
  .search-res button { grid-template-columns: auto minmax(0, 1fr); }
  .search-res .code, .search-res .muted { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* スピナーだけは、動きを減らす設定でも同じ速さ(5秒で1回転)で回す。端末やブラウザで速さが変わらないように */
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 5s !important; } }
.loading.center { justify-content: center; min-height: 60vh; }
.loading.boot-slow { flex-direction: column; text-align: center; }

/* ---------------------------------------------------------------- 第1段の追加分(書類・お金・設定・お知らせ) */
.side-tools { display: flex; gap: 8px; align-items: center; }
.side-tools .search-btn { flex: 1; min-width: 0; }
.bell { position: relative; }
.bell .badge { position: absolute; top: -4px; right: -6px; margin: 0; min-width: 18px; line-height: 18px; padding: 0 5px; font-size: .68rem; background: var(--muted); }
.bell .badge.bad { background: var(--bad); }
.pnav { margin-bottom: 22px; }
/* 見出しシール: 5つの領域を色で分け、選んだ領域の下に中の一覧が続く */
.pgroups { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; padding: 0 2px; }
.pgroup { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 9px 9px 0 0; background: var(--area-soft); color: var(--area); font-weight: 750; text-decoration: none; transition: padding .2s cubic-bezier(.16, 1, .3, 1), background .2s; }
.pgroup:hover { color: var(--area); padding-bottom: 11px; }
.pgroup.on { background: var(--area); color: #fff; padding: 12px 20px 11px; }
@media (prefers-color-scheme: dark) { .pgroup.on { color: var(--bg); } }
.pnav .tabs { flex-wrap: wrap; overflow: visible; margin-bottom: 0; background: var(--surface); border: 1.5px solid var(--area); border-radius: 0 var(--r) var(--r) var(--r); padding: 4px 10px 0; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .field.full { grid-column: 1 / -1; }
.field .label, p.label { font-weight: 700; font-size: .9rem; margin: 0 0 6px; }
.plain-field .plain-val { margin: 0; } .plain-title { margin: 4px 0 12px; overflow-wrap: anywhere; }
textarea.mono, .mono { font-family: var(--f-mono); font-size: .88rem; }
.seg.wrap { flex-wrap: wrap; }
.items .toolbar input[type=search] { min-width: 220px; }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.totals { grid-column: 1 / -1; display: grid; gap: 4px; justify-items: end; margin: 4px 0 12px; }
.tot-line { display: flex; gap: 16px; color: var(--muted); }
.tot-line b { color: var(--fg); }
.tot-line.big { font-size: 1.15rem; color: var(--fg); }
.rows-ed .table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: .8rem; color: var(--muted); padding: 8px; background: var(--surface2); }
table.grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.grid td input, table.grid td textarea { width: 100%; min-width: 4em; }
table.grid td select { width: 100%; min-width: 7em; }
table.grid td.rm { width: 40px; }
.rows-ed > .btn { margin-top: 8px; }
.kind-actions { display: grid; gap: 12px; margin: 16px 0; }
.decide-box, .answer { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; background: var(--surface2); display: grid; gap: 10px; }
.decide-box h3, .answer h3 { margin: 0; }
.pre { white-space: pre-wrap; }
.file-line code { font-family: var(--f-mono); font-size: .85rem; }
.mini-log { margin: 0; padding-left: 1.2em; color: var(--muted); font-size: .88rem; }
.checklist { display: grid; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.runbook summary { cursor: pointer; font-weight: 700; }
.btn.ai { border-color: var(--violet-soft); color: var(--violet); }
.danger-text { color: var(--bad); }
.prop-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.prop { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.prop.done { opacity: .6; }
.prop-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
/* 試験の実行 */
.run:focus { outline: none; }
.run-top { margin-bottom: 12px; }
.run-body { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 20px; }
.run-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; align-content: start; max-height: 60vh; overflow-y: auto; }
.run-list li { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--f-mono); font-size: .85rem; }
.run-list li.on { background: var(--accent-soft); }
.dot.r-none { background: var(--line2); } .dot.r-ok { background: var(--ok); } .dot.r-ng { background: var(--bad); } .dot.r-skip { background: var(--muted); }
.run-one { display: grid; gap: 10px; align-content: start; }
.run-sec .pre { margin: 0; padding: 10px 12px; background: var(--surface2); border-radius: var(--r-sm); }
.run-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.run-btns kbd { font-family: var(--f-mono); font-size: .75rem; opacity: .8; margin-right: 6px; }
/* お金 */
.money, .deps, .client-home { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 44%), 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; background: var(--surface); }
.kpi-l { color: var(--muted); font-size: .85rem; }
.kpi-v { font-size: 1.25rem; font-weight: 750; letter-spacing: -.01em; }
.kpi.bad .kpi-v { color: var(--bad); }
.meter { margin-top: 10px; }
.progress.warn span { background: var(--warn); } .progress.bad span { background: var(--bad); }
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.plan li b { margin-left: auto; }
.findings { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.findings li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; border-top: 1px solid var(--line); padding-top: 10px; }
.f-main { display: grid; gap: 2px; }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok); margin: 8px 0 0; }
.warn-line { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); margin: 8px 0 0; }
.warn-line svg { flex: none; margin-top: 3px; }
.client-home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.client-home .wide { grid-column: 1 / -1; }
.client-home .attn { border-color: var(--warn); }
.pay-list li { flex-wrap: wrap; align-items: baseline; }
.pay-list .pay-amt { flex: none; margin-left: auto; }
/* お客さまが読む見積・請求書・検収(public/client-docs.js) */
.client-doc { display: grid; gap: 16px; }
.client-doc .item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.doc-sum { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.doc-sum p { margin: 0; }
.doc-big { font-size: 1.8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.doc-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 8px 0 0; }
.doc-kv dt { color: var(--muted); }
.doc-kv dd { margin: 0; }
.doc-lines { list-style: none; margin: 0; padding: 0; }
.doc-lines li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line); }
.doc-lines li:first-child { border-top: 0; }
.dl-main { display: grid; gap: 2px; min-width: 0; }
.dl-check { display: flex; gap: 12px; align-items: flex-start; width: 100%; cursor: pointer; } .dl-check input { margin-top: 4px; flex: none; width: 18px; height: 18px; } /* 検収: 基準ごとのチェック */
.dl-amt { flex: none; font-variant-numeric: tabular-nums; }
.doc-foot { display: grid; gap: 4px; }
.doc-from h3 { margin: 8px 0 0; font-size: 1rem; }
.big-n { font-family: var(--f-display); font-size: 2.4rem; font-weight: 700; line-height: 1.1; }
/* 設定・お知らせ */
.hook-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 8px; }
.hook { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hook > input, .hook > select, .hook > span { flex: 1 1 110px; width: auto; min-width: 0; }
.hook > .icon-btn { flex: 0 0 40px; }
.settings-more { display: grid; gap: 16px; margin-top: 20px; }
.inbox { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.notice-row { display: flex; gap: 10px; align-items: center; border-radius: var(--r-sm); padding: 10px 12px; }
.notice-row a { display: grid; gap: 2px; flex: 1; color: var(--fg); text-decoration: none; }
.notice-row.unread { background: var(--accent-soft); }
.notice-row.block { background: var(--warn-soft); } .notice-row.urgent { background: var(--bad-soft); }
.terms-card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 16px 0; background: var(--surface2); }
.terms-card dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0 0 12px; }
.terms-card dt { color: var(--muted); }
.terms-card dd { margin: 0; }
.invoice .inv-top { display: flex; justify-content: space-between; gap: 24px; }
.invoice .inv-total { font-size: 1.3rem; font-weight: 700; border-bottom: 2px solid #000; padding-bottom: 6px; }
.invoice .inv-sum { text-align: right; }
@media (max-width: 640px) {
  /* 見出しシールは5つを1列に並べ、アイコンの下に名前 */
  /* スマホ: 見出しシールの数(概要を含め6つ)を必ず1列に収める。選んでいないものは地の色にして軽く */
  .pgroups { display: grid; grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 2px; padding: 0; border-bottom: 1px solid var(--line); }
  .pgroup, .pgroup:hover, .pgroup.on { flex-direction: column; gap: 3px; padding: 8px 0 8px; font-size: .74rem; text-align: center; line-height: 1.2; white-space: nowrap; border-radius: 10px 10px 0 0; }
  .pgroup { background: transparent; color: var(--muted); }
  .pgroup .ic { color: var(--area); }
  .pgroup.on, .pgroup.on:hover { background: var(--area-soft); color: var(--area); box-shadow: inset 0 -3px 0 var(--area); }
  .pgroup.on .ic { color: var(--area); }
  .form-grid.two, .client-home, .run-body { grid-template-columns: minmax(0, 1fr); }
  .run-list { flex-direction: row; display: flex; flex-wrap: wrap; max-height: none; }
  .run-btns > .btn { flex: 1 1 0; min-width: 0; } /* 試験・受け入れ試験の OK / NG は同じ幅 */
  .items .toolbar input[type=search] { min-width: 0; width: 100%; }
  .findings li { grid-template-columns: minmax(0, 1fr); }
}
.repo-out { margin-top: 18px; }
.drift { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.drift li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.drift li:first-child { border-top: 0; }
.drift .chip { flex: none; }
/* 顧客マスタ */
.c-list { display: grid; gap: 10px; }
.c-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); color: var(--fg); text-decoration: none; transition: border-color .16s, box-shadow .16s; }
.c-card:hover { border-color: var(--line2); box-shadow: var(--shadow-sm, 0 1px 3px rgb(0 0 0 / .06)); }
.c-main { display: grid; gap: 2px; min-width: 0; }
.c-main b { font-size: 1.05rem; }
.c-side { text-align: right; font-size: .88rem; }
.c-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.c-detail .card, .page > .card { margin-bottom: 16px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; }
.c-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); white-space: pre-wrap; }
.c-contacts, .c-rows { list-style: none; margin: 0; padding: 0; }
.c-contacts li, .c-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.c-contacts li:first-child, .c-rows li:first-child { border-top: 0; }
.c-contacts li { display: grid; justify-content: stretch; gap: 2px; }
.terms-pick { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 4px; margin: 0 0 16px; }
.terms-pick legend { font-weight: 700; font-size: .9rem; padding: 0 4px; }
.field > .label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.card > h2 .count { margin-left: 8px; }
@media (max-width: 760px) {
  .c-detail { grid-template-columns: minmax(0, 1fr); }
  .c-card { grid-template-columns: auto minmax(0, 1fr); }
  .c-side { grid-column: 2; text-align: left; }
}
.page-head > .head-btns { flex-direction: row; flex-wrap: wrap; align-items: center; }

/* ---- メンバー: チーム・招待・棚卸し・空き具合・案件のメンバー欄 */
.member-body { margin-top: 16px; }
.member-body > .stack, .member-body > .card { display: grid; gap: 16px; }
.stack { display: grid; gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.team-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface2); color: var(--muted); flex: none; }
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check.small { font-size: .86rem; color: var(--muted); }
.add-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-row select { flex: 1; min-width: 12rem; }
.load-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; }
.load-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.load-list li:first-child { border-top: 0; }
.load-main { display: grid; flex: 1; min-width: 0; }
.load-main .progress.thin { margin: 6px 0; }
.load-main .muted { font-size: .88rem; }
.project-people { margin-top: 16px; }
@media (max-width: 640px) {
  .add-row { flex-direction: column; }
  .add-row select, .add-row .btn { width: 100%; }
  .card-head .head-btns { width: 100%; justify-content: center; }
  .card-head .head-btns .btn { flex: 1 0 auto; justify-content: center; }
}
.route-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; max-width: 28rem; }
.route-list li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); align-items: center; gap: 12px; }

/* ---- 2段階認証(public/security.js・public/mfa-verify.js) ここから ---- */
.mfa-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mfa-sec { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.mfa-sec h3 { font-size: 1rem; margin: 0 0 4px; }
.mfa-list { list-style: none; margin: 12px 0 0; padding: 0; }
.mfa-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.mfa-list li:first-child { border-top: 0; }
.mfa-item { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.mfa-item .ic { flex: none; margin-top: 3px; color: var(--muted); }
.mfa-item p { margin: 2px 0 0; }
.mfa-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mfa-codes { list-style: none; margin: 14px 0 0; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; background: var(--surface2); border-radius: var(--r-sm); }
.mfa-codes code { font-size: 1rem; }
.qr { display: flex; justify-content: center; margin: 14px 0; }
.qr svg { width: 200px; height: 200px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); }
.totp-steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.totp-key { display: grid; gap: 4px; justify-items: center; text-align: center; margin: 0 0 12px; }
.totp-key code { font-size: 1.05rem; letter-spacing: .04em; }
.totp-uri code { overflow-wrap: anywhere; font-size: .82rem; }
.mfa-page h1 { margin-top: 12px; }
.mfa-verify { display: grid; gap: 4px; margin-top: 12px; }
.mfa-pk { display: flex; }
.mfa-pk .btn { width: 100%; }
.mfa-or { text-align: center; color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.mfa-code .field { margin-bottom: 0; }
.mfa-code .row-end { margin-top: 10px; }
.mfa-recovery { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.mfa-setup { width: 100%; max-width: 640px; }
.mfa-next p { margin: 0; }
@media (max-width: 760px) {
  .mfa-btns { width: 100%; }
  .mfa-btns .btn { flex: 1 1 0; }
  .mfa-next .row-end > .btn, .mfa-code .row-end > .btn { width: 100%; }
  .mfa-codes { grid-template-columns: minmax(0, 1fr); }
}
/* ---- 2段階認証 ここまで ---- */
.my-inbox { margin-top: 24px; }
.my-list li a { display: grid; gap: 2px; padding: 10px 0; color: inherit; text-decoration: none; }
.my-list li a:hover b { text-decoration: underline; }

/* ---- 発注先・SLA・稟議・引き継ぎ・選んだ文から質問・証跡の塗りつぶし・透かし(public/biz.js ほか) */
.vendor-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.vendor-list > li { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.vendor-list .vendor-projects { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.vendor-list .vendor-projects a { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: inherit; }
.sla-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sla-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask-pop { position: absolute; z-index: 60; }
.shot-edit { display: grid; gap: 10px; }
.shot-edit canvas { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; cursor: crosshair; touch-action: none; background: #fff; }
.ringi-preview, .handover-view { display: grid; gap: 14px; }
.ringi-preview dl, .handover-view dl, .print-doc dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.ringi-preview dd, .handover-view dd, .print-doc dl.kv dd { margin: 0; }
.handover-view ul.recent li { display: block; }
.handover-view ul.recent li .pre { margin: 4px 0 0; }
.regress-box { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.print-wm { display: none; }
/* 無料プランの組織だけ: お客さまの画面の下と、印刷・PDF の最後に小さく1行 */
.shell-main:has(> .made-with) { display: flex; flex-direction: column; }
.shell-main:has(> .made-with) > .main { flex: 1 0 auto; }
.made-with { display: flex; justify-content: center; margin: -52px 0 0; padding: 0 16px 24px; font-size: .78rem; }
.made-with a { padding: 3px 10px; border-radius: 999px; background: var(--surface); color: var(--muted); text-decoration: none; }
.made-with a:hover, .made-with a:focus-visible { color: var(--fg); text-decoration: underline; }
.print-credit { display: none; }
@media print {
  .made-with { display: none; }
  .print-credit { display: block; margin: 14pt 0 0; text-align: right; font-size: 7.5pt; color: #6b7486; }
  .print-credit a { color: inherit; text-decoration: none; }
  .print-wm { display: flex; flex-wrap: wrap; gap: 48pt 64pt; align-content: space-around; justify-content: space-around; position: fixed; inset: 0; pointer-events: none; opacity: .13; transform: rotate(-24deg); font-size: 11pt; color: #000; overflow: hidden; }
}
@media (max-width: 640px) {
  .vendor-list .row-end, .shot-edit .row-end { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* ---- 楽観更新(public/optimistic.js)とキーボード(public/keys.js) */
.saving-pill { position: fixed; right: 16px; bottom: 16px; z-index: 85; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); color: var(--muted); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .86rem; font-weight: 600; animation: fade .2s; }
.spinner.small { width: 14px; height: 14px; border-width: 2px; }
.comment.sending { opacity: .62; }
[aria-busy="true"].row-card, [aria-busy="true"].task-card { opacity: .62; cursor: progress; }
.row-card:focus-visible, .task-card:focus-visible, .scr-item:focus-visible, .p-card:focus-visible, .ver-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 6px var(--accent-soft); }
kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--surface2); color: var(--fg); font: 600 .76rem/1.5 var(--f-mono); text-align: center; }

.cmd-box, .keys-box { width: min(680px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: up .18s; }
.cmd-in { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmd-in .cmd-input { flex: 1; min-width: 0; border: 0; box-shadow: none; padding: 10px 0; font-size: 1.08rem; background: transparent; color: var(--fg); }
.cmd-in .cmd-input:focus { box-shadow: none; outline: none; }
.cmd-list { max-height: min(56vh, 520px); overflow: auto; padding: 6px; }
.cmd-group + .cmd-group { margin-top: 4px; }
.cmd-gh { margin: 0; padding: 8px 12px 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.cmd-opt { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--fg); }
.cmd-opt > .ic { color: var(--muted); }
.cmd-opt:not(:has(.code)) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.cmd-opt.on { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; }
.cmd-opt.on > .ic { color: var(--accent); }
.cmd-label { font-weight: 600; min-width: 0; }
.cmd-sub { color: var(--muted); font-size: .84rem; min-width: 0; text-align: right; }
.cmd-empty { padding: 16px 12px; margin: 0; color: var(--muted); }
.cmd-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.cmd-foot > span { display: inline-flex; align-items: center; gap: 4px; }

.keys-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px 22px; }
.keys-head h2 { margin: 0; }
.keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; padding: 6px 22px 8px; }
.keys-sec h3 { font-size: .9rem; color: var(--muted); margin: 12px 0 6px; }
.keys-sec dl { margin: 0; }
.keys-row { display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--line); }
.keys-row dt { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.keys-row dd { margin: 0; font-size: .92rem; }
.keys-or { color: var(--muted); font-size: .8rem; margin: 0 2px; }
.keys-pref { padding: 12px 22px 18px; border-top: 1px solid var(--line); background: var(--surface2); }
.keys-pref .hint { margin: 4px 0 0; }
@media (max-width: 640px) {
  .keys-grid { grid-template-columns: minmax(0, 1fr); }
  .cmd-opt, .cmd-opt:not(:has(.code)) { grid-template-columns: auto minmax(0, 1fr); }
  .cmd-opt { gap: 2px 10px; }
  .cmd-opt > :not(.ic) { grid-column: 2; justify-self: start; text-align: left; }
  .cmd-opt > .ic { grid-row: 1 / span 4; align-self: start; margin-top: 5px; }
  .saving-pill { left: 50%; right: auto; transform: translateX(-50%); bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) { .cmd-box, .keys-box, .saving-pill { animation: none; } }

/* 料金プラン(public/plan.js)。案内の帯は静かな色にする(注意や警告ではない) */
.banner.calm { background: var(--surface2); color: var(--fg); font-weight: 500; border: 1px solid var(--line); }
a.banner.calm:hover { border-color: var(--area); }
.plan-card .kv { margin: 4px 0 14px; }
.plan-notes li { margin: 4px 0; }
.plan-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 18px 0 10px; }
.plan-pick-head h3 { margin: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 12px; margin-bottom: 14px; }
.plan-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.plan-tile.current { border-color: var(--area); box-shadow: 0 0 0 1px var(--area) inset; }
.plan-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.plan-tile-head h3 { margin: 0; font-size: 1.05rem; }
.plan-tile p { margin: 0; }
.plan-people { color: var(--muted); font-size: .9rem; }
.plan-price b { font-size: 1.4rem; font-variant-numeric: tabular-nums; margin-right: 4px; }
.plan-price span { color: var(--muted); font-size: .85rem; }
.plan-ai { font-size: .82rem; color: var(--muted); }
.plan-ai { display: flex; flex-direction: column; gap: 2px; }
.plan-ai-n { color: var(--ink, inherit); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-ai-u { list-style: none; margin: 0; padding: 0; line-height: 1.5; }
.plan-save { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: .85rem; }
.plan-save b { color: var(--ok, var(--area)); font-size: .95rem; font-variant-numeric: tabular-nums; }
.plan-was { color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.plan-save-m { color: var(--muted); flex-basis: 100%; }
.plan-save-note { margin: -4px 0 12px; }
.plan-tile > .btn, .plan-tile > .hint { margin-top: auto; }
.plan-tile > .btn { width: 100%; justify-content: center; }
@media (max-width: 640px) {
  .plan-btns { flex-direction: column; align-items: stretch; gap: 8px; } .plan-btns > .btn { width: 100%; }
  .plan-card .kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .plan-card .kv dd { margin-bottom: 10px; }
}
/* ログインの入口: Google・Microsoft のボタンを同じ幅で縦に並べる(public/app.js・join.js) */
.login-btns { display: grid; gap: 8px; margin: 6px 0 14px; }
.login-btns > .btn, .login .login-btns > .btn { width: 100%; margin: 0; justify-content: center; }
.hook > .check, .hook > .hook-note { flex: 1 1 100%; grid-column: 1 / -1; margin: 0; }
/* スマホ: お客さまの承認・検収のボタンは中央に同じ幅で縦に並べ、間は 8px */
@media (max-width: 640px) {
  .row-end { gap: 8px; }
  .client-bar > div { width: 100%; }
  .client-bar .tool-btns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .client-bar .tool-btns > .btn { width: 100%; justify-content: center; }
  .comment-form .row-between { flex-direction: column; align-items: stretch; gap: 8px; }
  .comment-form .row-between > .btn { width: 100%; justify-content: center; }
}
.rows-ed td.ro { padding: 10px 12px; vertical-align: top; }
@media (max-width: 640px) {
  .hook { display: grid; grid-template-columns: minmax(0, 1fr) 40px; }
  .hook > :not(.icon-btn) { grid-column: 1; }
  .hook > .icon-btn { grid-column: 2; grid-row: 1; }
}

/* ---- 毎日の仕事まわり(public/daily.js) */
.page-head > .tool-btns { flex-direction: row; }
.lp input[type="search"] { margin: 4px 0 6px; }
.link-pick.lp { max-height: none; overflow: visible; }
.lp-list { display: grid; gap: 2px; } /* 枠の中でスクロールさせない(途中で切れて見えるので)。多いときは「ほかに N件を見る」と絞り込みで */
.lp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.lp-chips:empty { display: none; }
.lp-chip { gap: 2px; padding-right: 2px; }
.lp-x { border: 0; background: transparent; color: inherit; font: 600 1rem/1 var(--f-body); min-width: 28px; min-height: 28px; cursor: pointer; border-radius: 6px; }
.lp-x:hover { background: var(--surface); }
.qt { display: grid; gap: 6px; margin: 4px 0 12px; }
.qt-help { margin: 0; }
.qt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qt-row .qt-day { width: auto; flex: 0 1 180px; min-height: 40px; padding: 6px 10px; }
.qt-label { font-weight: 600; font-size: .92rem; }
.qt-note { font-size: .86rem; }
.task-from { margin: -4px 0 10px; }
.ms-sum { margin: -6px 0 14px; display: grid; gap: 2px; }
.ms-line { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .9rem; color: var(--muted); }
.ms-line b { color: var(--fg); }
.done-more { width: 100%; margin-top: 6px; }
.p-health { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 0 0; font-size: .84rem; color: var(--muted); }
.p-health .h-bad { color: var(--bad); font-weight: 600; } .p-health .h-warn { color: var(--warn); font-weight: 600; }
.wk-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.wk td.num, .wk th.num { text-align: right; font-variant-numeric: tabular-nums; }
.wk th[scope="row"] { font-weight: 600; }
.wk-tasks { display: block; font-weight: 400; font-size: .8rem; color: var(--muted); }
.field.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.field.inline label { min-width: 8em; margin: 0; }
.field.inline select { width: auto; flex: 1 1 160px; }
.copy-setup .link-pick { max-height: none; }
@media (max-width: 640px) {
  .qt-row > .btn { flex: 1 1 0; } .qt-h { flex: 1 1 0; } .qt-h > .qt-hours { width: auto; flex: 1 1 0; min-width: 0; }
  .qt-row .qt-day { flex: 1 1 100%; }
  .wk-nav { justify-content: center; }
  .wk-nav > .btn { flex: 1 1 0; }
}
.task-codes { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-right: auto; }
.task-top > .chip { margin-right: 6px; }
@media (min-width: 641px) { .toolbar .tool-btns > select { width: auto; max-width: 280px; } }

/* 画面設計: 部品をつかんで並べ替える */
.wf-frame.movable .wf-b { cursor: grab; touch-action: manipulation; }
.wf-grip { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: var(--muted); touch-action: none; cursor: grab; }
.wf-grip .ic { stroke-width: 3.2; }
.wf-b:hover .wf-grip, .wf-b.sel .wf-grip { color: var(--accent); }
.wf-frame.is-dragging, .wf-frame.is-dragging .wf-b { cursor: grabbing; user-select: none; }
.wf-b.dragging { opacity: .55; transform: scale(.98); }
.wf-b.drop-before { box-shadow: 0 -4px 0 var(--accent); }
.wf-b.drop-after { box-shadow: 0 4px 0 var(--accent); }
@media (prefers-reduced-motion: no-preference) { .wf-b { transition: transform .12s, opacity .12s, box-shadow .12s; } }

/* AIの提案: 選んでまとめて採用 */
.prop-bar { position: sticky; top: -18px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 0; margin-bottom: 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.prop-bar p { margin: 0; }
.prop-group + .prop-group { margin-top: 18px; }
.prop-pick { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -6px 0 -6px -6px; cursor: pointer; }
.prop-pick input { width: 18px; height: 18px; }
@media (max-width: 640px) { .prop-bar .tool-btns { width: 100%; } .prop-bar .tool-btns > .btn { flex: 1 1 0; } }

/* 画面を作る: 型の一覧とラフの読み取り */
.tpl-head { margin-top: 22px; }
.tpl-head h3 { margin: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.tpl { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.tpl:hover, .tpl:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl-pv { display: block; height: 150px; overflow: hidden; border-radius: 8px; background: var(--surface2); pointer-events: none; }
.tpl-pv .wf-frame { width: 250%; max-width: none; transform: scale(.4); transform-origin: 0 0; box-shadow: none; }
.tpl-pv .wf-frame.sp { width: 340px; margin: 0; transform: scale(.42); transform-origin: 50% 0; margin-left: calc(50% - 170px); }
.tpl-pv.blank { display: grid; place-items: center; color: var(--muted); }
.sketch { padding: 16px; border: 1.5px dashed var(--accent); border-radius: var(--r); background: var(--accent-soft); }
.sketch.over { background: var(--surface2); }
.sketch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sketch-head { display: flex; gap: 8px; align-items: center; color: var(--accent); }
.sketch-head h3 { margin: 0; color: var(--fg); }
.sketch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sketch-row input { flex: 1 1 220px; }
.sketch-out:not(:empty) { margin-top: 14px; }
.sketch-res { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; align-items: start; }
.sketch-src { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
@media (max-width: 640px) {
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tpl-pv { height: 120px; }
  .sketch-res { grid-template-columns: minmax(0, 1fr); }
  .sketch-row > .btn { flex: 1 1 100%; justify-content: center; }
}

/* Backlog からの移行と料金の比べ(public/backlog.js) */
.bl-list { display: grid; gap: 8px; margin: 8px 0 14px; }
.bl-proj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 220px); gap: 8px 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.bl-proj .check { padding: 0; }
.bl-log { display: grid; gap: 6px; margin-top: 12px; }
.bl-log p { margin: 0; display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
@media (max-width: 640px) { .bl-proj { grid-template-columns: minmax(0, 1fr); } }
.bl-conn { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; color: var(--ok); }
.bl-conn .btn { flex: 0 0 auto; }
/* 予定表から工数(public/calendar.js) */
.cal-rows { display: grid; gap: 8px; margin: 8px 0 14px; }
.cal-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 8px 12px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }
.cal-row.off { opacity: .6; }
.cal-row .check { padding: 0; }
.cal-row .chip { margin-left: 6px; }
.cal-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
@media (max-width: 640px) { .cal-row { grid-template-columns: minmax(0, 1fr); } }
/* 案件の一覧の上の「今日」(public/mywork.js の todayBoard) */
.today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 20px; }
.td-half { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 10px; align-content: start; }
.td-half h2 { font-size: 1rem; margin: 0; }
.td-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.td-line > span { flex: 1 1 12em; }
.td-line > .btn { flex: 0 0 auto; }
.td-line.ok { color: var(--ok); }
.td-line.warn > .ic { color: var(--warn); }
.td-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 10px; }
.td-tile { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--fg); cursor: pointer; font: inherit; }
.td-tile b { font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.td-tile span { font-size: .84rem; color: var(--muted); }
.td-tile.bad b { color: var(--bad); } .td-tile.warn b { color: var(--warn); }
.td-tile:hover { border-color: var(--line2); }
.td-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); background: var(--accent-soft); }
.td-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.td-calm { display: flex; gap: 8px; align-items: center; color: var(--ok); margin: 0; }
.td-half > .btn { justify-self: start; }
@media (max-width: 760px) { .today { grid-template-columns: minmax(0, 1fr); } .td-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.td-next h3 { font-size: .84rem; color: var(--muted); margin: 4px 0 6px; font-weight: 600; }
.td-next ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.td-next a { display: flex; gap: 10px; color: var(--fg); text-decoration: none; padding: 4px 0; }
.td-next a:hover span { text-decoration: underline; }
.td-next time { font-variant-numeric: tabular-nums; color: var(--muted); flex: 0 0 auto; min-width: 3.2em; }
/* 記録からの工数の推測(public/timeguess.js) */
.tg-list { display: grid; gap: 8px; margin: 12px 0; }
.tg-row { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tg-row.off { color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.tg-by { list-style: none; margin: 0; padding: 0 0 0 28px; display: grid; gap: 2px; }
.tg-by li { display: flex; justify-content: space-between; gap: 12px; }
.tg-by b { font-variant-numeric: tabular-nums; }
.np-guess:not(:empty) { margin: 4px 0 16px; padding: 12px 14px; border-radius: 8px; background: var(--surface2); display: grid; gap: 8px; }
.np-guess h3 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 1rem; }
.np-guess .hint { margin: 0; }
.np-gl { display: grid; gap: 6px; }
.np-gr { display: grid; grid-template-columns: minmax(0, 1fr) 6em auto; gap: 8px; align-items: center; }
.np-gr input { text-align: right; font-variant-numeric: tabular-nums; }
.np-week { width: 100%; font: inherit; line-height: 1.7; }
.np-hrs { font-variant-numeric: tabular-nums; }
/* 議事録を貼るだけ(public/minutes-auto.js) */
.ma-out h3, .ma-view h3 { font-size: 1rem; margin: 16px 0 6px; }
.ma-sum { white-space: pre-wrap; margin: 0; }
.ma-ok { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; }
.ma-tasks { display: grid; gap: 8px; }
.ma-tasks .gone { opacity: .5; text-decoration: line-through; }
.ma-view { margin: 12px 0; padding: 12px 14px; border-radius: 8px; background: var(--surface2); }
.ma-view h3:first-child { margin-top: 0; }
/* テスト結果報告書(test-report.js) */
.tr-sec { margin-top: 18px; }
.tr-sec h3 { font-size: 1rem; margin: 0 0 8px; }
.tr-curve { width: 100%; max-width: 760px; height: auto; display: block; }
.tr-grid { stroke: var(--line); stroke-width: 1; }
.tr-ax { fill: var(--muted); font-size: 12px; }
.tr-curve polyline { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tr-plan { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.tr-run { stroke: var(--accent); fill: var(--accent); } .tr-curve polyline.tr-run { fill: none; }
.tr-ng { stroke: var(--bad); fill: var(--bad); } .tr-curve polyline.tr-ng { fill: none; stroke-dasharray: 2 4; }
.tr-open { stroke: var(--warn); fill: var(--warn); } .tr-curve polyline.tr-open { fill: none; }
.tr-fixed { stroke: var(--ok); fill: var(--ok); } .tr-curve polyline.tr-fixed { fill: none; }
.tr-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.tr-k { display: inline-flex; align-items: center; gap: 6px; }
.tr-key { display: inline-block; width: 18px; height: 0; border-top: 3px solid; }
.tr-key.tr-plan { border-top-style: dashed; border-top-width: 2px; border-color: var(--muted); }
.tr-key.tr-run { border-color: var(--accent); } .tr-key.tr-ng { border-color: var(--bad); border-top-style: dotted; } .tr-key.tr-open { border-color: var(--warn); } .tr-key.tr-fixed { border-color: var(--ok); }
.tr-checks, .tr-trace { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tr-checks li, .tr-trace li { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.tr-checks .chip, .tr-trace .chip { flex: none; }
.tr-checks li > span, .tr-trace li > span { flex: 1 1 12em; min-width: 0; }
@media (max-width: 600px) {
  .tr-ax { font-size: 24px; }
  .tr-curve polyline { stroke-width: 4; }
  .tr .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* 障害報告書の時系列(incident-report.js) */
.inc-rep { margin-top: 16px; display: grid; gap: 8px; }
.inc-rep h3 { font-size: 1rem; margin: 8px 0 0; }
.inc-tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.inc-tl li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.inc-tl time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
/* 保守の月次報告(maint-report.js) */
.mr-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 14px; }
.mr-top .field { flex: 1 1 12em; max-width: 20em; margin: 0; }
.mr .hint { margin: 0 0 12px; }

/* いまボールはどちらか(public/ball.js) */
.ov-grid .ball { grid-column: 1 / -1; }
.ball h2 { margin: 0 0 12px; }
.ball-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ball-col { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); }
.ball-col h3 { display: flex; align-items: center; gap: 8px; font-size: .9rem; margin: 0 0 8px; color: var(--muted); }
.ball-n { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .8rem; text-align: center; font-variant-numeric: tabular-nums; }
.ball-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ball-list a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; color: var(--fg); text-decoration: none; min-width: 0; }
.ball-list a:hover { background: var(--surface); }
.ball-list .chip { flex: none; }
.ball-name { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.ball-days { color: var(--muted); font-size: .82rem; flex: none; font-variant-numeric: tabular-nums; }
.ball-foot { margin: 10px 0 0; }
.ball-days.late { color: var(--warn); font-weight: 650; }
@media (max-width: 720px) { .ball-cols { grid-template-columns: minmax(0, 1fr); } }
/* 委託先セキュリティ確認の1枚(public/sec-sheet.js) */
.home-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.sec-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sec-list li { display: flex; gap: 10px; align-items: flex-start; }
.sec-list li > div { display: grid; gap: 2px; min-width: 0; }
.sec-mark { flex: none; width: 1.4em; text-align: center; color: var(--muted); font-weight: 700; }
.sec-list li.ok .sec-mark { color: var(--ok); }
.maint-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* AI が作成中の幕(public/ai-wait.js) */
.ai-wait { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(2px); cursor: progress; }
.ai-wait-box { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm, 10px); box-shadow: var(--shadow-lg); padding: 22px 20px; display: grid; gap: 12px; outline: none; }
.ai-wait-title { margin: 0; font-weight: 700; font-size: 1.1rem; }
.ai-wait-bar { height: 8px; margin: 0; }
.ai-wait-bar > span { background: var(--accent); }
.ai-wait-bar > span { transition: width .45s ease-out; }
.ai-wait-info { margin: 0; font-variant-numeric: tabular-nums; }
.ai-wait-note { margin: 0; color: var(--muted); font-size: .88rem; }
@media (prefers-reduced-motion: reduce) { .ai-wait-bar > span { transition: none; } }
/* 契約台帳(public/contracts-view.js) */
.ct-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ct-list li.ct-child { padding-left: 18px; border-left: 2px solid var(--line); margin-left: 8px; }
.ct-row { display: grid; gap: 4px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.ct-row:hover { border-color: var(--accent); }
.ct-top { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ct-gaps { list-style: none; margin: 8px 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); display: grid; gap: 6px; }
.ct-gaps li { display: flex; gap: 8px; align-items: flex-start; }
.ct-gaps svg { flex: none; margin-top: 3px; }

/* Wiki とテーブル定義: 横にページの一覧、右に本文。スマホでは一覧を選ぶ欄に替える */
.wiki { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; align-items: start; }
.wiki-side { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); }
.wiki-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.wiki-folder + .wiki-folder { margin-top: 12px; }
.wiki-folder-name { margin: 0 8px 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.wiki-link { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--fg); font: 500 .92rem/1.45 var(--f-body); text-align: left; cursor: pointer; }
.wiki-link:hover { background: var(--surface); }
.wiki-link.on { background: var(--surface); color: var(--accent); font-weight: 700; box-shadow: var(--shadow); }
.wiki-page { min-width: 0; padding: 22px 26px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.wiki-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.wiki-head h2 { margin: 0 0 4px; font-size: 1.45rem; line-height: 1.35; }
.wiki-head p { margin: 0; }
.wiki-pick { margin-bottom: 14px; }
.wiki-pick select { width: 100%; }
.tdef-link { display: grid; gap: 1px; }
.tdef-link .mono { font-size: .88rem; }
.tdef-logical { font-size: .78rem; color: var(--muted); font-weight: 500; }
.tdef-note { margin: 0 0 14px; color: var(--muted); white-space: pre-line; }
.tdef-table td.mid { text-align: center; }
.look-bar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
@media (max-width: 860px) {
  .wiki { grid-template-columns: minmax(0, 1fr); }
  .wiki-page { padding: 16px; }
}

/* マークダウンの本文(Wiki)。書いた記号は見た目にして出す */
.md { font-size: 1rem; line-height: 1.85; }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 1em; white-space: pre-line; }
.md h2, .md h3, .md h4, .md h5 { line-height: 1.4; margin: 1.6em 0 .6em; }
.md h2 { font-size: 1.3rem; padding-bottom: .3em; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 1.12rem; } .md h4 { font-size: 1rem; } .md h5 { font-size: .94rem; color: var(--muted); }
.md ul, .md ol { margin: 0 0 1em; padding-left: 1.5em; }
.md li { margin: .2em 0; }
.md li > ul, .md li > ol { margin: .2em 0 0; }
.md li.task { list-style: none; margin-left: -1.4em; display: flex; gap: 8px; align-items: baseline; }
.md li.task input { margin: 0; flex: none; }
.md blockquote { margin: 0 0 1em; padding: 10px 16px; border-radius: 8px; background: var(--surface2); color: var(--muted); }
.md blockquote > :last-child { margin-bottom: 0; }
.md code { font-family: var(--f-mono); font-size: .88em; padding: 1px 6px; border-radius: 5px; background: var(--surface2); }
.md pre { margin: 0 0 1em; padding: 14px 16px; border-radius: 10px; background: var(--surface2); border: 1px solid var(--line); overflow-x: auto; }
.md pre code { padding: 0; background: none; font-size: .86rem; line-height: 1.6; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
.md a { color: var(--accent); }
.md-table { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 10px; }
.md-table table { border-collapse: collapse; width: 100%; font-size: .92rem; }
.md-table th, .md-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.md-table th { background: var(--surface2); font-weight: 700; }
.md-table tr:last-child td { border-bottom: 0; }
@media print {
  .print-doc .md p { white-space: pre-line; }
  .print-doc .md pre, .print-doc .md code { background: #f3f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-doc .md blockquote { background: #f3f5f9 !important; color: #333; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-doc .md-table { border: 0; overflow: visible; }
}

/* 要件: まとまりごとに開け閉めする */
.req-tools { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.req-hint { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; color: var(--muted); font-size: .9rem; }
.req-grp { margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); }
.req-grp > summary { display: flex; gap: 10px; align-items: baseline; padding: 10px 14px; cursor: pointer; list-style: none; font-weight: 700; }
.req-grp > summary::-webkit-details-marker { display: none; }
.req-grp > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .16s; align-self: center; flex: none; }
.req-grp[open] > summary::before { transform: rotate(45deg); }
.req-grp-high { margin-left: auto; color: var(--bad); font-size: .8rem; font-weight: 600; }
.req-grp > .rows { padding: 0 10px 10px; }
.tdef-table { min-width: 760px; }
.tdef-table th { min-width: 4.5em; }
.tdef-cons { display: flex; gap: 4px; flex-wrap: wrap; }
/* プロフィールの写真 */
img.av-img { display: inline-block; border-radius: 50%; object-fit: cover; flex: none; background: var(--surface2); }
.prof-photo { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; align-items: center; margin-bottom: 16px; }
.prof-photo > p { grid-column: 1 / -1; margin: 0; }
.prof-photo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* 担当の顔ぶれ(タスクのボードの絞り込み) */
.faces { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.face { display: inline-grid; place-items: center; padding: 2px; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: border-color .14s, transform .14s; }
.face:hover { transform: translateY(-1px); }
.face.on { border-color: var(--accent); }
.faces:has(.face.on) .face:not(.on) { opacity: .5; }
.row-main b .av, .row-main b img.av-img { vertical-align: -5px; margin-right: 8px; }
.ms-pick { display: grid; gap: 8px; }
.qt-h { display: inline-flex; flex: none; align-items: center; gap: 6px; }
.qt-hours { width: 110px; flex: none; min-height: 40px; }
.qt-h > span { flex: none; }
.qt-h > .qt-hours { width: 110px; }

/* タスクの GitHub のつながり */
.git-box { display: grid; gap: 6px; margin: 4px 0 12px; }
.git-box .qt-label { display: inline-flex; align-items: center; gap: 6px; }
.git-box p { margin: 0; }
.git-copy { display: flex; flex-wrap: wrap; gap: 8px; }
.git-copy > .btn { flex: 1 1 200px; max-width: 280px; }
@media (max-width: 640px) { .git-copy > .btn { max-width: none; } }
.pr-area { margin-top: 10px; }
.pr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pr-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface2); }
.pr-list li > a { flex: 1 1 200px; min-width: 0; font-weight: 600; }
.pr-list li > .btn { flex: none; margin-left: auto; }
.pr-branch { font: 600 .82rem/1.5 var(--f-mono); color: var(--area); }
.git-rules { display: grid; gap: 8px; margin-top: 8px; }
.git-rules .field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(160px, 55%); align-items: center; gap: 8px; margin: 0; }
.git-rules .field label { margin: 0; }
.git-refs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.git-refs li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.git-refs a { min-width: 0; }
.git-kind { font-family: var(--f-mono); font-size: .84rem; color: var(--muted); }
.st-sub { font-size: 1rem; margin: 20px 0 4px; }
.st-tools { margin-bottom: 4px; }

/* 設定: まとまりごとに分ける。広い画面は左に種類の一覧、スマホは上に折り返して並べる */
.set-page { max-width: 1040px; }
.set-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 6px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.45; }
.set-nav a svg { flex: none; }
.set-nav a:hover { background: var(--surface2); color: var(--fg); }
.set-nav a.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: var(--accent); }
.set-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-width: 760px; }
.set-body > .card { margin: 0; }
.set-title { font-size: 1.15rem; margin: 2px 0 0; }
@media (max-width: 760px) {
  .set-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .set-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .set-nav a { padding: 7px 12px; border: 1px solid var(--line); background: var(--surface); font-size: .86rem; }
  .set-nav a.on { border-color: var(--accent); }
  .set-title { display: none; }
}
.plan-more { margin: 12px 0; border-top: 1px solid var(--line); padding-top: 10px; }
.plan-more > summary { color: var(--muted); font-size: .9rem; }
.plan-more[open] > summary { margin-bottom: 8px; }
.card h3 { margin: 20px 0 6px; }
.card .row-end + h3, .card .row-end + .int-policy { margin-top: 24px; }
.row-card.no-code { grid-template-columns: minmax(0, 1fr) auto; }
.sess-list li b { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sess-more summary { color: var(--muted); font-size: .9rem; }
.sess-more .sess-list { margin-top: 6px; }
/* テーブル定義の列: 広い画面は横の表、狭い画面は1列ずつの札(欄の名前を上に) */
.col-row .cf { display: block; min-width: 0; }
.col-row .cf > :is(input, select) { width: 100%; }
.cf-l { display: none; }
@media (max-width: 900px) {
  .col-head { display: none; }
  .col-item { border: 1px solid var(--line); border-radius: var(--r-sm); margin: 8px; }
  .col-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
  .col-row .cf-l { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .cb-cell { justify-content: flex-start; }
  .cb-cell .cb { display: inline-flex; align-items: center; gap: 6px; }
  .cb-cell .cb-l { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: .9rem; }
  .col-row .col-ops { grid-column: 1 / -1; justify-content: flex-end; }
  .col-detail-f { grid-template-columns: 1fr; }
  .col-scroll { border: 0; }
}
@media (max-width: 480px) { .kpi { padding: 10px 12px; } .kpi-v { font-size: 1.05rem; } }

/* 2026-11-26 総点検: スマホでボタンを中央・同じ幅に、案件の中のタブは1段で横に流す、select の文字の見切れ */
@media (max-width: 760px) {
  .row-between { flex-direction: column; align-items: stretch; }
  .row-between > .btn, .row-between > .tool-btns > .btn { flex: 1 1 auto; justify-content: center; }
  .row-between > .tool-btns { display: flex; }
  .td-line > .btn { flex: 1 1 100%; justify-content: center; }
  .pnav .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pnav .tabs::-webkit-scrollbar { display: none; }
  .pnav .tabs > * { flex: 0 0 auto; }
}
select { min-width: 5em; }
/* スマホのSafariは選択欄の幅を「いちばん長い選択肢」で決め、1fr の列や flex を押し広げて画面ごと横にずらす。
   入力欄は親の幅を超えない・列は中身で広がらない(minmax(0, 1fr))・長い語は折り返す */
input, select, textarea { max-width: 100%; }
input, textarea { min-width: 0; }
.field { grid-template-columns: minmax(0, 1fr); }
.field > * { min-width: 0; }
main, .sheet-body { overflow-wrap: anywhere; }
main table, .sheet-body table { overflow-wrap: break-word; }
@media (max-width: 640px) {
  .sheet-body { overflow-x: hidden; overscroll-behavior-x: none; }
}
/* 複数列の入力欄: 文章欄(textarea)は1段まるごと使い、隣の欄と高さがちぐはぐにならないように */
.form-grid.two > .field:has(> textarea), .form-grid.three > .field:has(> textarea) { grid-column: 1 / -1; }

/* タスクの種別・状態・優先度の色(public/daily.js の typeTone・STATUS_TONE・PRI_TONE)。選択欄も選んだ値の色にする */
.chip.blue { background: var(--a-design-soft); color: var(--a-design); } .chip.teal { background: var(--a-flow-soft); color: var(--a-flow); } .chip.pink { background: var(--a-money-soft); color: var(--a-money); }
select.tone-ok { background-color: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
select.tone-warn { background-color: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
select.tone-bad { background-color: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
select.tone-violet { background-color: var(--violet-soft); color: var(--violet); border-color: color-mix(in srgb, var(--violet) 35%, transparent); }
select.tone-blue { background-color: var(--a-design-soft); color: var(--a-design); border-color: color-mix(in srgb, var(--a-design) 35%, transparent); }
select.tone-teal { background-color: var(--a-flow-soft); color: var(--a-flow); border-color: color-mix(in srgb, var(--a-flow) 35%, transparent); }
select.tone-pink { background-color: var(--a-money-soft); color: var(--a-money); border-color: color-mix(in srgb, var(--a-money) 35%, transparent); }
select[class*="tone-"] { font-weight: 600; }
select[class*="tone-"] option { background: var(--surface); color: var(--fg); font-weight: 400; }
.opt-fields:not(:has(> :not([hidden]))) { display: none; }
.opt-fields { margin-top: 12px; }
.add-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 20px; }
.add-fields > .muted { font-size: .85rem; margin-right: 4px; }
.task-codes .chip { font-size: .72rem; }
@media (max-width: 640px) { .form-grid.three.task-main, .form-grid.three.opt-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- アプリとの連携の許可(/oauth)。上にアプリ ⇄ Shilpa の印、範囲は選べる札、許可は下に同じ幅で */
#oauth { max-width: 460px; padding: 28px 26px 22px; }
.oa-head { text-align: center; margin: 0 0 20px; }
.oa-marks { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 18px; }
.oa-logo { width: 44px; height: 44px; display: block; }
.oa-app { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--surface2); border: 1px solid var(--line); color: var(--fg); font: 700 1.1rem/1 var(--f-display); }
.oa-app svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.oa-app.code { color: #2b8fe8; } .oa-app.claude { color: #d97757; }
.oa-link { display: inline-flex; gap: 5px; }
.oa-link i { width: 5px; height: 5px; border-radius: 50%; background: var(--line2); animation: oa-pulse 1.8s ease-in-out infinite; }
.oa-link i:nth-child(2) { animation-delay: .2s; } .oa-link i:nth-child(3) { animation-delay: .4s; }
@keyframes oa-pulse { 0%, 100% { background: var(--line2); } 40% { background: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .oa-link i { animation: none; } }
.oa-title { font-size: 1.3rem; font-weight: 750; line-height: 1.4; margin: 0 0 6px; letter-spacing: 0; }
.oa-sub { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.7; }
.oa-step { font-size: 1.05rem; margin: 0 0 6px; }
.oa-lead { font-size: .95rem; line-height: 1.75; margin: 0 0 16px; }
.oa-dest { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: -6px 0 14px; font-size: .86rem; color: var(--muted); }
.oa-host { font-family: var(--f-mono); font-size: .84rem; background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px 8px; color: var(--fg); overflow-wrap: anywhere; }
.oa-warn { font-size: .86rem; line-height: 1.7; color: var(--warn); background: var(--warn-soft); border-radius: var(--r-sm); padding: 10px 12px; margin: 0 0 16px; }
#oauth .field { margin-bottom: 18px; }
.oa-scopes { display: grid; gap: 8px; }
.field .oa-scope, .oa-scope { font-weight: 400; font-size: inherit; display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: border-color .15s, background-color .15s; }
.oa-scope:hover { border-color: var(--line2); }
.oa-scope:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.oa-scope input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.oa-scope-text { display: grid; gap: 2px; min-width: 0; }
.oa-scope-title { font-weight: 650; font-size: .95rem; }
.oa-scope-hint { color: var(--muted); font-size: .84rem; line-height: 1.6; }
.oa-safe { list-style: none; margin: 4px 0 20px; padding: 14px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.oa-safe li { position: relative; padding-left: 24px; font-size: .84rem; line-height: 1.65; color: var(--muted); }
.oa-safe li::before { content: ""; position: absolute; left: 3px; top: .42em; width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.oa-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oa-actions.one { grid-template-columns: 1fr; margin-top: 4px; }
.oa-actions > .btn { width: 100%; margin: 0; justify-content: center; }
.oa-meta { text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.6; margin: 14px 0 0; }
#oauth .login-btns { margin-bottom: 0; }
@media (max-width: 480px) { #oauth { padding: 24px 18px 18px; } }
.oa-note { color: var(--muted); font-size: .84rem; line-height: 1.65; margin: -6px 0 18px; }

/* 2026-11-27 案件の中のメニュー: 左のメニューの「案件」一覧で、開いている案件の下に画面を並べる(上の2段の色タブはやめた)。
   狭い画面(左のメニューが引き出しになる幅)では、画面の上に「今の画面 ▾」を置き、押すと同じ一覧をシートで開く */
.side-sub { margin: 2px 0 10px 17px; padding: 4px 0 2px 8px; border-left: 1px solid var(--line); }
.side .prail-g.area-design, .side .prail-g.area-dev { --area: #9aa8ff; } .side .prail-g.area-flow, .side .prail-g.area-tasks { --area: #5fcf9f; } .side .prail-g.area-quality { --area: #f0b452; }
.side .prail-g.area-money { --area: #ff8f6b; } .side .prail-g.area-ops { --area: #c0a8ff; } .side .prail-g.area-home { --area: var(--shell-fg); }
.prail-list { display: grid; gap: 10px; }
.prail-g { display: grid; gap: 1px; }
.prail-h { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; padding: 0 10px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.prail-item { display: flex; align-items: center; gap: 9px; padding: 5px 10px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 550; line-height: 1.35; }
.prail-item .ic { flex: none; opacity: .85; }
.prail-item:hover { background: var(--surface2); color: var(--fg); }
.prail-item.on { background: var(--surface2); color: var(--fg); font-weight: 750; }
.prail-item.on .ic { color: var(--area); opacity: 1; }
.prail-item:focus-visible, .prail-more:focus-visible, .pnav-m:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.prail-more { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 0; background: none; border-radius: 7px; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; text-align: left; opacity: .85; }
.prail-more:hover { background: var(--surface2); color: var(--fg); opacity: 1; }
.pnav-m { display: none; }
@media (max-width: 920px) {
  .pnav-m { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 18px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
  .pnav-m > .ic { color: var(--area); flex: none; }
  .pnav-m-l { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .pnav-m-g { font-size: .76rem; color: var(--muted); }
  .pnav-m-ic { color: var(--muted); display: flex; }
}
.prail.in-sheet { display: block; }
.prail.in-sheet .prail-list { gap: 16px; }
.prail.in-sheet .prail-item { padding: 11px 12px; font-size: 1rem; color: var(--fg); }
.prail.in-sheet .prail-item.on { background: var(--area-soft); color: var(--area); }
.prail.in-sheet .prail-more { font-size: .88rem; padding: 8px 12px; }

.feat-row { padding: 10px 0; border-top: 1px solid var(--line); }
.feat-row:first-of-type { border-top: 0; }
.feat-row .muted { margin: 2px 0 0 28px; font-size: .88rem; }

/* プルダウン: ブラウザ任せの矢印をやめ、どの画面でも右12px・上下中央の山形にそろえる(明るい・暗い表示とも --muted の色) */
select { -webkit-appearance: none; appearance: none; background-image: var(--sel-arrow); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; padding-right: 36px; text-overflow: ellipsis; }
select[multiple], select[size]:not([size="1"]) { background-image: none; padding-right: 12px; }
table.grid td select, .col-row select, .rows-ed table.grid td > select { background-position: right 8px center; padding-right: 28px; }
/* 並んだ .seg(ボード/リスト)と高さをそろえる */
.toolbar select { min-height: 44px; }
/* 今日やること(public/mywork.js): 1行 = 案件・何か・どれくらい。押すとその画面へ */
.card.today { display: block; margin-bottom: 20px; }
.card.today h2 { font-size: 1.05rem; margin: 0 0 6px; }
.td-list { list-style: none; margin: 0; padding: 0; }
.td-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.td-row:first-child { border-top: 0; }
.td-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 4px; color: var(--fg); text-decoration: none; background: none; border: 0; font: inherit; text-align: left; cursor: pointer; border-radius: 8px; }
.td-main:hover { background: var(--surface2); }
.td-main > .ic { flex: none; color: var(--muted); }
.td-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.td-proj { color: var(--muted); font-size: .8rem; }
.td-title { overflow-wrap: anywhere; }
.td-when { flex: none; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.td-when.bad { color: var(--bad); font-weight: 600; } .td-when.warn { color: var(--warn); font-weight: 600; }
.td-row > .btn { flex: none; }
.td-empty { display: flex; align-items: center; gap: 8px; padding: 10px 4px; color: var(--muted); }
.td-empty .ic { color: var(--ok); }
/* この案件にメンバーを追加(public/members.js): 検索とチェックの一覧 */
.pick-people { display: grid; gap: 10px; }
.pick-people h3 { font-size: .9rem; color: var(--muted); margin: 6px 0 0; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 40vh; overflow: auto; }
.check-list li { padding: 6px 4px; border-radius: 8px; }
.check-list li:hover { background: var(--surface2); }
.check-list .check { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check-list .check .muted { font-size: .85rem; }
/* チャットへの通知(public/settings.js): 送信先ごとのカード。欄は全幅・ラベルは上 */
.hook-cards { display: grid; gap: 12px; margin-bottom: 12px; }
.hook-card { display: grid; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); min-width: 0; }
.hook-card .field { margin: 0; min-width: 0; }
.hook-card .label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.hook-card .hint { margin: 6px 0 0; }
.hook-saved { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hook-ev { display: grid; gap: 6px; }
.hook-card .seg { max-width: 100%; }
/* AIの提案: 変更の案は「今」と「案」を並べて見比べる */
.prop-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 6px; }
@media (max-width: 640px) { .prop-diff { grid-template-columns: minmax(0, 1fr); } }
.prop-was, .prop-now { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.prop-was { background: var(--surface2); color: var(--muted); }
.prop-now { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.prop-diff p { margin: 4px 0 0; overflow-wrap: anywhere; }
.prop-tag { font-size: .75rem; font-weight: 700; color: var(--muted); }
.prop-now .prop-tag { color: var(--ok); }
/* 資料の AI 更新: 今と案の行ごとの違い(public/doc-ai.js) */
.df { list-style: none; margin: 8px 0 14px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: .88rem; max-height: 60vh; overflow-y: auto; }
.df li { display: flex; gap: 8px; padding: 2px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.df .df-m { flex: none; width: 1ch; color: var(--muted); font-family: var(--f-mono, monospace); }
.df .df-add { background: var(--ok-soft); } .df .df-add .df-m { color: var(--ok); }
.df .df-del { background: var(--bad-soft); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 55%, transparent); } .df .df-del .df-m { color: var(--bad); }
.df .df-gap { color: var(--muted); font-size: .8rem; justify-content: center; background: var(--surface2); }
.df-new { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.crumbs a { color: inherit; }
.crumb-sep { color: var(--muted); }

/* 左メニューの案件モード(案件を開いている間): 組織のメニューの代わりに、上で案件を切り替え、その下に案件の画面 */
.side-top { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--muted); text-decoration: none; font-size: .84rem; font-weight: 600; min-width: 0; }
.side-top span { min-width: 0; overflow-wrap: anywhere; }
.side-top:hover { color: var(--fg); }
.p-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); color: var(--fg); cursor: pointer; text-align: left; font: 700 .95rem/1.35 var(--f-body); }
.p-switch:hover { border-color: rgba(255, 255, 255, .28); }
.p-switch .p-switch-n { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.p-switch .ic { flex: none; color: var(--muted); }
.side.in-project { gap: 10px; }
.side-pnav { flex: 1; }
.side-pnav .prail-list { gap: 8px; }
.side-pnav .prail-h { font-size: .7rem; margin-bottom: 1px; }
.side-pnav .prail-item { padding: 4px 10px; }
.side-pnav .prail-more { font-size: .76rem; padding: 2px 10px; }
.side-all { display: block; padding: 6px 12px; color: var(--muted); font-size: .84rem; text-decoration: none; }
.side-all:hover { color: var(--fg); }
.switcher { display: grid; gap: 10px; }
.switch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 55vh; overflow: auto; }
.switch-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.switch-item > span:last-child { display: grid; min-width: 0; }
.switch-item:hover, .switch-item.on { background: var(--surface2); }
.switch-item .p-dot, .p-switch .p-dot { width: 8px; height: 8px; border-radius: 2px; background: #f06a43; flex: none; }
.side:not(.in-project) .nav-link { padding: 7px 12px; }
.side:not(.in-project) { gap: 12px; }

/* はじめの1本道(public/start.js)・見本の案件 */
.welcome { display: grid; gap: 14px; }
.welcome h1 { margin: 4px 0 0; }
.st .lead { margin-top: 6px; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.st-form { display: grid; gap: 14px; }
.st-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.st-label label { margin: 0; }
.st-ex { display: grid; gap: 12px; background: var(--surface2); box-shadow: none; }
.st-ex-g ul { margin: 4px 0 0; padding-left: 1.1em; display: grid; gap: 2px; font-size: .92rem; }
.st-ex-h { margin: 0; font-weight: 700; font-size: .86rem; color: var(--muted); }
.st-out:empty { display: none; }
.st-out { margin-top: 18px; }
.st-preview { display: grid; gap: 14px; }
.st-g h3 { display: flex; gap: 8px; align-items: baseline; margin: 0 0 6px; font-size: 1rem; }
.stp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.stp-list > li { display: block; min-width: 0; margin: 0; }
.st-ex-title { margin: 0; font-weight: 750; font-size: .95rem; }
.st-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.st-item:hover { background: var(--surface2); }
.st-item input { margin-top: 3px; flex: none; }
.st-item > span { display: grid; gap: 2px; min-width: 0; flex: 1; }
.st-item input[type=checkbox] { width: 18px; height: 18px; }
.st-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.st-skip { display: flex; flex-wrap: wrap; gap: 10px 18px; justify-content: center; margin-top: 18px; font-size: .92rem; }
.start-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--fg); margin-bottom: 18px; }
.start-link > span { display: grid; gap: 2px; flex: 1; min-width: 0; }
.start-link > .ic:first-child { color: var(--accent); }
.p-card h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sample-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.sample-banner > div:nth-child(2) { flex: 1; min-width: 200px; }
.sample-banner p { margin: 2px 0 0; }
@media (max-width: 760px) { .st-grid { grid-template-columns: minmax(0, 1fr); } }

/* 2026-11-27 案件の左メニューをすっきり: 文字を大きく、見出しは文字だけ、選択中だけをはっきり(なぞったときは薄く)。「画面を追加」は一番下に1つ */
.side-pnav .prail-list { gap: 14px; }
.side-pnav .prail-g { gap: 2px; }
.side-pnav .prail-h { margin: 0 0 2px; padding: 0 12px; font-size: .78rem; font-weight: 650; letter-spacing: .03em; color: var(--muted); }
.side-pnav .prail-item { gap: 11px; padding: 6px 12px; border-radius: 8px; font-size: .97rem; font-weight: 550; color: rgba(255, 255, 255, .78); }
.side-pnav .prail-item .ic { opacity: .8; }
.side-pnav .prail-item:hover { background: rgba(255, 255, 255, .035); color: #fff; }
.side-pnav .prail-item.on { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 700; }
.side-pnav .prail-item.on .ic { color: inherit; opacity: 1; }
.side-pnav .prail-more { gap: 11px; padding: 6px 12px; font-size: .9rem; color: var(--muted); opacity: 1; }
.side-pnav .prail-more:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.prail-h { font-size: .8rem; }
.later-g + .later-g { margin-top: 16px; }
.later-h { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.side-pnav .prail-g.plain + .prail-g.plain { margin-top: -12px; }
/* 2026-11-27 タスクの詳細(Linear 型): 左に題名・説明・子タスク・時系列、右に属性(変えたらその場で保存) */
.tdx { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.tdx-main { display: grid; gap: 18px; min-width: 0; }
.tdx-title { width: 100%; border: 0; background: none; padding: 2px 0; font: 750 1.45rem/1.35 var(--f-body); color: var(--fg); resize: none; overflow: hidden; }
.tdx-title:focus { outline: none; box-shadow: 0 2px 0 var(--accent); }
.tdx-body { min-height: 120px; }
.tdx-props { position: sticky; top: 0; display: grid; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface2); }
.tdx-prop { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 8px; }
.tdx-prop > label { font-size: .84rem; color: var(--muted); font-weight: 600; }
.tdx-prop .field { margin: 0; }
.tdx-prop select, .tdx-prop input { min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: .92rem; }
.tdx-prop-foot { display: grid; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.tdx-watch.on { border-color: var(--accent); color: var(--accent); }
.tdx-saved { margin: 0; }
.tdx-sec h3 { margin: 0 0 8px; font-size: 1rem; }
.tdx-kids { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.tdx-kids li { display: flex; align-items: center; gap: 8px; }
.tdx-kids li.done a { color: var(--muted); text-decoration: line-through; }
.tdx-acts { gap: 8px; }
.comment-box .hist { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0 4px 6px; font-size: .86rem; color: var(--muted); list-style: none; }
.hist-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; margin-right: 10px; }
@media (max-width: 860px) {
  .tdx { grid-template-columns: 1fr; }
  /* スマホ: タイトル→説明→子タスク→属性→そのほか(ひも付け・GitHub・アクティビティ) */
  .tdx { gap: 18px; }
  .tdx-main { display: contents; }
  .tdx-props { position: static; order: 1; }
  .tdx-kidbox ~ * { order: 2; }
}
/* 案件メニュー: まとまりごとに折りたたむ(同時に開くのは1つ) */
.prail-fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 11px; margin: 0; padding: 7px 12px; border-radius: 8px; font-size: .97rem; font-weight: 650; letter-spacing: 0; color: var(--fg); user-select: none; }
.prail-fold > summary::-webkit-details-marker { display: none; }
.prail-fold > summary .ic { flex: none; opacity: .75; }
.prail-fold > summary .prail-h-l { flex: 1; min-width: 0; }
.prail-fold > summary .prail-chev { display: inline-flex; opacity: .55; transition: transform .18s ease; transform: rotate(-90deg); }
.prail-fold[open] > summary .prail-chev { transform: none; }
.prail-fold > summary:hover { background: var(--surface2); }
.prail-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.prail-kids { display: grid; gap: 2px; padding: 2px 0 6px 18px; }
.prail-list { gap: 4px; }
.side-pnav .prail-list { gap: 4px; }
.side-pnav .prail-g.plain { margin-bottom: 8px; }
.side-pnav .prail-fold > summary { color: rgba(255, 255, 255, .9); }
.side-pnav .prail-fold > summary:hover { background: rgba(255, 255, 255, .05); }
.side-pnav .prail-fold > .prail-kids .prail-item { font-size: .93rem; }
.prail.in-sheet .prail-fold > summary { padding: 12px; font-size: 1.02rem; }
.prail.in-sheet .prail-kids { padding-left: 14px; }
@media (prefers-reduced-motion: reduce) { .prail-fold > summary .prail-chev { transition: none; } }
.side-pnav .prail-fold > summary.prail-h { margin: 0; padding: 7px 12px; font-size: .97rem; font-weight: 650; letter-spacing: 0; color: rgba(255, 255, 255, .9); }
.prail.in-sheet .prail-fold > summary.prail-h { padding: 12px; font-size: 1.02rem; color: var(--fg); }
.prail.in-sheet .prail-list { gap: 2px; }
.prail.in-sheet .prail-g.plain { margin-bottom: 10px; }
.tdx-prop input.overdue { color: var(--bad); font-weight: 700; border-color: var(--bad); }
.member-auto { opacity: .92; }
.member-auto-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface2); color: var(--muted); flex: none; }
/* 書類の一覧: 列のそろった表(PC)・1件1枚(スマホ) */
.itab { display: grid; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.itab-head, .itab-row { display: grid; grid-template-columns: var(--itab); gap: 14px; align-items: center; padding: 0 16px; }
.itab-head { min-height: 38px; font-size: .78rem; font-weight: 650; color: var(--muted); background: var(--surface2); border-bottom: 1px solid var(--line); }
.itab-row { min-height: 52px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.itab-row:last-of-type { border-bottom: 0; }
.itab-row:hover { background: var(--surface2); }
.itab-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.itab-row > * { min-width: 0; padding: 10px 0; }
.itab-title { display: grid; gap: 2px; }
.itab-title b { font-weight: 650; overflow-wrap: anywhere; }
.itab-c { font-size: .9rem; overflow-wrap: anywhere; }
.itab-head .num, .itab-c.num { text-align: right; font-variant-numeric: tabular-nums; }
.itab-st { display: flex; flex-wrap: wrap; gap: 4px; }
.itab-up { display: grid; font-size: .8rem; line-height: 1.35; }
.itab-late { color: var(--bad); font-weight: 650; }
.itab-code { font: 500 .84rem/1.4 var(--f-mono, ui-monospace, monospace); background: var(--surface2); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.itab-none { padding: 18px 16px; margin: 0; }
.seg .seg-n { margin-left: 6px; font-size: .8em; opacity: .7; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .itab { border: 0; background: none; gap: 8px; }
  .itab-head { display: none; }
  .itab-row { grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .itab-row:last-of-type { border-bottom: 1px solid var(--line); }
  .itab-row > * { padding: 0; }
  .itab-no { grid-column: 1; }
  .itab-st { grid-column: 2; justify-content: flex-end; grid-row: 1; }
  .itab-title { grid-column: 1 / -1; margin: 4px 0 2px; }
  .itab-c, .itab-up { grid-column: 1 / -1; display: flex; gap: 8px; font-size: .86rem; }
  .itab-c::before, .itab-up::before { content: attr(data-h); color: var(--muted); min-width: 6.5em; }
  .itab-c.num { text-align: left; }
}
/* 同じ内容の要件(まとめる) */
.req-dup { color: var(--text); margin-bottom: 8px; }
.req-dup svg { color: var(--warn); flex: none; }
.dup-warn { display: flex; gap: 4px 8px; flex-wrap: wrap; color: var(--warn); margin: 6px 0 4px; }
.dup-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 14px; }
.dup-pair { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.dup-side p { margin: 4px 0 0; }
/* 決まったこと(要件・タスクの横) */
.decided-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.decided-list li { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ok-soft); }
.decided-list .code { font-weight: 600; }
.decided-list p { margin: 0; }
.sub-switch { margin: 0 0 16px; }
.seg a { display: inline-flex; align-items: center; color: var(--muted); font: 600 .9rem/1.3 var(--f-body); padding: 8px 14px; border-radius: 8px; min-height: 36px; text-decoration: none; }
.seg a.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.seg a:hover { color: var(--fg); }
/* タスクの詳細の依頼の欄(変更依頼・障害・要望) */
.req-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; display: grid; gap: 10px; }
.req-box-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.req-box-h h3 { margin: 0; }
.req-box .form-grid.two { gap: 12px; }
.req-box-f { flex-wrap: wrap; gap: 8px; }
.req-box input[type="number"] { max-width: 12rem; }
/* 見積の自動の下書き(est-draft.js) */
.est-plan { display: grid; gap: 12px; margin: 16px 0; }
.est-plan .seg { justify-self: start; }
.est-plan-rows { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.est-plan-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.est-plan-row:first-child { border-top: 0; }
.est-plan-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.est-plan-h { font-variant-numeric: tabular-nums; flex: none; }
.est-plan-sum { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 4px 20px; margin: 0; }
.est-plan-sum dt { color: var(--muted); }
.est-plan-sum dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
/* 画面の頭の AI の案(project.js propBar) */
.prop-inline { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.prop-inline > svg { flex: none; color: var(--accent, currentColor); }
.prop-inline-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.prop-inline .btn { flex: none; }
@media (max-width: 640px) { .prop-inline { flex-wrap: wrap; } .prop-inline .btn { width: 100%; } }
.prop-group { scroll-margin-top: 140px; } /* 上に貼り付く「選んだ○件を採用」の下に見出しが隠れないように */
/* 開発 > 環境: 技術構成とリポジトリの Docker 構成(env-stack.js) */
.env-top { display: grid; gap: 16px; margin-bottom: 16px; }
.stack-rows { display: grid; gap: 4px; margin: 12px 0; }
.stack-row { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.stack-row:first-child { border-top: 0; }
.stack-row > label { font-weight: 600; padding-top: 10px; }
.stack-val { display: grid; gap: 8px; min-width: 0; }
.stack-chip { position: relative; padding: 0 2px 0 0; gap: 0; }
.stack-name, .who-chip button.stack-name { width: auto; height: auto; font-size: inherit; line-height: 1.3;
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 4px 8px 4px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--fg); font: inherit; cursor: pointer; }
.stack-name.static { cursor: default; padding-right: 12px; }
.who-chip button.stack-name:hover { background: var(--line); color: var(--fg); }
.who-chip button.stack-name[aria-expanded="true"] { background: var(--accent-soft); }
.stack-n { font-weight: 600; }
.stack-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.stack-v.none { font-size: .85rem; }
.stack-name svg { color: var(--muted); flex: none; transform: rotate(90deg); }
.who-chip button.stack-rm { width: 26px; height: 26px; color: var(--muted); opacity: .7; }
.who-chip button.stack-rm:hover, .who-chip button.stack-rm:focus-visible { opacity: 1; background: var(--line); color: var(--fg); }
.stack-pop { position: absolute; z-index: 6; top: calc(100% + 6px); left: 0; width: max-content; max-width: min(320px, 80vw); padding: 10px; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-sm); box-shadow: 0 12px 32px rgba(0, 0, 0, .22); display: grid; gap: 10px; }
.stack-v-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-v-opt, .who-chip button.stack-v-opt { width: auto; height: auto; line-height: 1.3; min-height: 34px; min-width: 3.2rem; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); color: var(--fg); font: inherit; font-size: .92rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.who-chip button.stack-v-opt:hover { border-color: var(--field-hover); background: var(--surface2); color: var(--fg); }
.who-chip button.stack-v-opt.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.stack-v-other { display: flex; gap: 6px; }
.who-chip .stack-v-other button { width: auto; height: auto; border-radius: 8px; padding: 4px 12px; font-size: .9rem; border: 1px solid var(--line2); background: var(--surface2); color: var(--fg); }
.stack-v-other input.stack-ver { flex: 1 1 auto; width: 8rem; min-height: 34px; padding: 4px 10px; }
.stack-pick .who-list li .muted { font-variant-numeric: tabular-nums; }
.stack-tag { padding-top: 10px; }
.repo-files { display: grid; gap: 8px; }
.repo-file { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.repo-file summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.repo-file pre { margin: 10px 0 0; max-height: 360px; overflow: auto; padding: 10px 12px; border-radius: 8px; background: var(--surface2); font: .85rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.dock-pr { align-items: center; gap: 12px; margin-top: 12px; }
@media (max-width: 640px) { .stack-row { grid-template-columns: minmax(0, 1fr) auto; } .stack-row > label { grid-row: 1; grid-column: 1; padding-top: 0; } .stack-tag { grid-row: 1; grid-column: 2; padding-top: 0; } .stack-val { grid-row: 2; grid-column: 1 / -1; } }
.repo-link h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.stack-card > .row-between { margin-top: 0; }
.stack-card > .row-between h3, .repo-dock > h3 { margin-top: 0; }

/* 入力のまとまり(試験項目の「ひも付け」「内容」「結果」など)。作るときに要らない欄は畳む */
.form-secs { display: grid; gap: 14px; margin: 4px 0 16px; }
.form-sec { border: 1px solid var(--line); border-radius: var(--r); background: var(--sec); padding: 14px 18px 2px; min-width: 0; }
.form-sec > h4, .form-sec > summary { margin: 0 0 12px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.form-sec > summary { list-style: none; display: flex; align-items: center; gap: 8px; margin: -2px 0 12px; }
.form-sec > summary::-webkit-details-marker { display: none; }
.form-sec > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.form-sec[open] > summary::before { transform: rotate(45deg); }
.form-sec > summary .muted { font-weight: 400; letter-spacing: 0; }
details.form-sec:not([open]) { padding-bottom: 0; }

/* 自動保存の印(設定など、保存ボタンを置かない欄) */
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.saved-mark { font-size: .84rem; color: var(--muted); min-height: 1.2em; }
.saved-mark.done { color: var(--ok); }
.saved-mark.done::before { content: "✓ "; }
.row-tags { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 案件の色と印(public/pmark.js)。左のメニュー・案件のカード・切り替えで同じもの */
.pmark { display: inline-grid; place-items: center; flex: none; border-radius: 28%; background: var(--pc); color: #fff; font-weight: 700; line-height: 1; overflow: hidden; }
.pmark-img { object-fit: cover; background: var(--surface2); }
.side-pn { min-width: 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pm-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.pm-prev { flex: none; }
.pm-ctl { display: grid; gap: 12px; flex: 1 1 280px; min-width: 0; }
.pm-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pm-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: var(--pc); cursor: pointer; box-shadow: inset 0 0 0 2px var(--surface); }
.pm-sw.on { border-color: var(--fg); }
.pm-auto { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--fg); font: 600 .85rem var(--f-body); cursor: pointer; }
.pm-auto.on { border-color: var(--accent); background: var(--accent-soft); }
.pm-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pm-line input[type="text"] { width: 7em; }
.pm-sw:focus-visible, .pm-auto:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.p-card .progress span { background: var(--pc, var(--accent)); }
/* 案件メニュー: 概要・Wiki も大メニュー(開発・進行管理…)と同じ行の高さ・文字にそろえ、その下に細い区切り */
.side-pnav .prail-g.plain { gap: 6px; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side-pnav .prail-fold > summary.prail-h { line-height: 1.4; }
.side-pnav .prail-g.plain > .prail-item { line-height: 1.4; padding: 7px 12px; font-size: .97rem; font-weight: 650; color: rgba(255, 255, 255, .9); }
.side-pnav .prail-g.plain > .prail-item.on { color: #fff; font-weight: 700; }
.side-pnav .prail-g.plain > .prail-item .ic { opacity: .75; }
.prail.in-sheet .prail-g.plain { gap: 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.prail.in-sheet .prail-g.plain > .prail-item { padding: 12px; font-size: 1.02rem; font-weight: 650; }
/* 監査ログの絞り込み */
.audit-filter-card { display: grid; gap: 14px; margin-bottom: 16px; }
.audit-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px 14px; }
.audit-f { display: grid; gap: 4px; min-width: 0; }
.audit-f > span { font-size: .8rem; font-weight: 650; color: var(--label); }
.audit-f :is(select, input) { width: 100%; min-width: 0; }
.audit-period { grid-column: span 2; }
.audit-dates { display: flex; align-items: center; gap: 8px; }
.audit-dates input { flex: 1 1 0; min-width: 0; }
@media (max-width: 400px) { .audit-dates { flex-direction: column; align-items: stretch; } .audit-dates input { flex: none; width: 100%; } }
.audit-sub { flex-wrap: wrap; gap: 10px; }
.audit-count { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .audit-period { grid-column: auto; } .audit-dates input { padding-left: 8px; padding-right: 6px; font-size: .92rem; } }
/* 背景の画像(個人設定)。本文の後ろに固定し、置き場の色を重ねてぼかす */
html { background: var(--bg); }
#bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#bg-layer::before { content: ""; position: absolute; inset: calc(var(--bg-blur, 0px) * -2); background: var(--bg-img) center / cover no-repeat; filter: blur(var(--bg-blur, 0px)); }
#bg-layer > i { position: absolute; inset: 0; background: var(--bg); opacity: var(--bg-dim, .7); }
body.has-bg { background: transparent; }
/* 背景の画像の上に直接置かれるもの: 線だけのボタンにも面を付けて透けないようにする(11-27 Hiroshi さん「透けてしまう箇所」) */
body.has-bg .btn.ghost { background: var(--surface); }
/* 見た目の設定 */
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.th-opt { display: grid; gap: 8px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--fg); font: inherit; text-align: left; cursor: pointer; }
.th-opt:hover { border-color: var(--line2); }
.th-opt[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.th-opt > b { font-size: .9rem; font-weight: 650; padding: 0 4px 2px; }
.th-mini { display: grid; grid-template-columns: 26% 1fr; height: 76px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(127, 127, 127, .25); }
.th-mini.auto { background: linear-gradient(135deg, #f3f4f7 50%, #0f1326 50%); grid-template-columns: 1fr; }
.th-mini > .s { display: grid; align-content: start; gap: 5px; padding: 8px 6px; }
.th-mini > .s i { display: block; height: 4px; border-radius: 2px; opacity: .7; }
.th-mini > .m { display: grid; align-content: center; padding: 8px; }
.th-mini .c { display: grid; gap: 5px; padding: 8px; border-radius: 4px; }
.th-mini .c i { display: block; height: 5px; border-radius: 3px; }
.th-mini .c i.a { width: 40%; height: 9px; border-radius: 5px; }
.ac-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ac-sw { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line2); background: var(--pc); cursor: pointer; padding: 0; }
.ac-sw[aria-checked="true"] { box-shadow: 0 0 0 3px var(--fg); }
.ac-auto, .ac-custom { min-height: 36px; padding: 4px 14px; border: 1.5px solid var(--line2); border-radius: 999px; background: var(--surface); color: var(--fg); font: inherit; font-size: .9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ac-auto[aria-checked="true"], .ac-custom.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); font-weight: 650; }
.ac-custom input[type="color"] { width: 26px; height: 26px; padding: 0; border: 0; background: none; cursor: pointer; }
.bg-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px 20px; align-items: start; }
.bg-prev { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center; color: var(--muted); font-size: .85rem; }
.bg-prev > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bg-prev > i { position: absolute; inset: 0; background: var(--bg); }
.bg-prev > b { position: relative; padding: 6px 10px; border-radius: 6px; background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: var(--shadow); }
.bg-ctl { display: grid; gap: 12px; }
.bg-ctl label { display: grid; gap: 4px; font-size: .9rem; font-weight: 600; color: var(--label); }
.bg-ctl input[type="range"] { width: 100%; accent-color: var(--accent); padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; }
@media (max-width: 640px) { .bg-row { grid-template-columns: 1fr; } .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 案件の一覧: 保守・運用中のまとまり */
.p-stage { margin-top: 28px; }
.p-stage-h { display: flex; align-items: baseline; gap: 10px; font-size: 1.05rem; margin: 0 0 12px; }
.p-stage-h .muted { font-size: .9rem; font-weight: 600; }
.stage-seg { margin-right: auto; }
.stage-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-right: auto; }
.stage-l { font-size: .9rem; font-weight: 650; color: var(--label); }
.done-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; background: var(--surface2); border: 1px solid var(--line); color: var(--fg); }
.done-bar > span { flex: 1; min-width: 0; }

/* 左メニュー: 概要・Wiki・大メニュー・サブ項目の行の高さをそろえる(どの行も同じ高さ・同じ間隔) */
.side-pnav .prail-list { gap: 2px; }
.side-pnav .prail-g.plain { gap: 2px; margin: 0 0 6px; padding-bottom: 6px; }
.side-pnav .prail-g.plain > .prail-item, .side-pnav .prail-fold > summary.prail-h, .side-pnav .prail-item { padding-top: 6px; padding-bottom: 6px; line-height: 20px; }
.side-pnav .prail-kids { gap: 2px; padding: 2px 0 4px 18px; }
.side-pnav .prail-fold:not([open]) { gap: 0; }

/* 左下の自分: 押すと個人設定へ */
.side-foot .side-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 8px; margin: -6px 0 -6px -8px; border-radius: 8px; color: inherit; text-decoration: none; }
.side-foot .side-me:hover { background: rgba(255, 255, 255, .05); }
.side-foot .side-me:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-foot .side-me .me-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* 資料の日本語・英語の版の切り替え(同じページの中) */
.wiki-lang-note { margin-top: 6px !important; }
.lang-seg button { min-width: 4.8rem; }
.tool-btns > .lang-seg { align-self: center; }
.doc-tr { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.doc-tr > summary { cursor: pointer; font-weight: 650; }

/* 画面の切り替え: 読み込みが短いときは「読み込み中」を出さない(0.35秒たっても終わらないときだけ出す)。前の中身は少し薄くして残す */
.loading { animation: ld-in .2s ease .35s both; }
@keyframes ld-in { from { opacity: 0; } to { opacity: 1; } }
#main.is-loading { opacity: .55; transition: opacity .2s ease .25s; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .loading { animation: none; } #main.is-loading { transition: none; } }

/* マークダウンの入力(Wiki の本文。md-editor.js) */
.md-editor { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.md-tb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--surface2); }
.md-mode { padding: 2px; }
.md-mode button { min-height: 30px; padding: 4px 12px; font-size: .85rem; }
.md-tb-g { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.md-tb-b { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: 700 .85rem/1 var(--f-body); cursor: pointer; }
.md-tb-b:hover { background: var(--surface); color: var(--fg); }
.md-tb-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.md-tb-t { font-family: var(--f-mono, ui-monospace, monospace); font-size: .8rem; }
.md-tb-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--line); }
.md-editor .md-ta { border: 0; border-radius: 0; box-shadow: none; min-height: 18rem; font-family: var(--f-mono, ui-monospace, monospace); font-size: .92rem; line-height: 1.7; resize: vertical; }
.md-editor .md-ta:focus { box-shadow: none; outline: none; }
.md-editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.md-preview { padding: 14px 16px; overflow: auto; }
.md-hint { margin: 0; padding: 6px 12px 8px; border-top: 1px solid var(--line); }
.md .md-img { display: inline-block; max-width: 100%; }
.md .md-img img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }

/* リポジトリから始める(概要の頭・DB 設計が空のとき・初期構成の PR) */
.overview > .repo-start:empty, .schema-slot:empty { display: none; }
.repo-start-card { display: grid; gap: 10px; }
.repo-start-card p { margin: 0; }
.repo-start-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.repo-start-h .mono { font-weight: 500; color: var(--accent); overflow-wrap: anywhere; }
.repo-start-card .row-start { margin-top: 4px; }
.schema-slot { display: grid; gap: 8px; justify-items: start; margin: 0 0 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.schema-slot p { margin: 0; }
.init-files { display: grid; gap: 12px; }
.init-files > p { margin: 0; }
.init-file { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
.init-file p { margin: 0; }
.init-file-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.init-file-h input { width: 18px; height: 18px; accent-color: var(--accent); }
.init-file-h code { font: 600 .92rem/1.4 var(--f-mono); }
.init-pre { max-height: 320px; margin-top: 6px; padding: 12px; border-radius: 8px; background: var(--surface2); font-size: .8rem; }
.st-skip .btn.link { font-weight: 500; font-size: inherit; }
/* GitHub の Issue から取り込む */
.gh-issues { display: grid; gap: 12px; }
.gh-issues > p { margin: 0; }
.gh-issue-list { display: grid; gap: 2px; max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.gh-issue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.gh-issue:hover { background: var(--surface2); }
.gh-issue input { width: 18px; height: 18px; accent-color: var(--accent); }
.gh-issue-t { flex: 1 1 200px; min-width: 0; }
.gh-all { font-weight: 600; padding-left: 14px; }
.pr-empty { display: grid; gap: 6px; }
.pr-empty p, .pr-empty .row-start { margin: 0; }
.repo-vuln:empty { display: none; }
.repo-vuln { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--muted); }
.repo-vuln.bad { color: var(--bad, #b42318); }

/* 画面設計: 見る端末・見え方の切り替え、並べ方の設定、余白の部品 */
.wf-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; }
.wf-viewbar .muted { flex: 1 1 220px; }
.wf-b.t-space { min-height: 32px; padding: 4px 40px 4px 8px; background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface2) 6px 12px); border-style: dotted; }

.wf-layout-opts { display: grid; gap: 10px; margin: 4px 0 10px; }
.wf-layout-opts .seg { flex-wrap: wrap; }
.wf-hide-f { margin: 0; padding: 0; border: 0; }
.wf-hide-f legend { margin-bottom: 6px; font-weight: 600; font-size: .86rem; }
.wf-hide { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tpl-pv .wf-frame.tablet { width: 560px; max-width: none; margin: 0; transform: scale(.36); transform-origin: 50% 0; margin-left: calc(50% - 280px); }

/* モックアップ: ワイヤーの部品を本物らしい見た目で */
.mk-frame { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 12px; align-items: start; margin: 0 auto; padding: 0 0 18px; background: #fff; color: #1b1f2a; border: 1px solid #d9dce3; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; font-size: .92rem; font-family: var(--mk-font, inherit); }
.mk-frame.pc { max-width: 760px; }
.mk-frame.tablet { max-width: 560px; border-radius: 20px; border: 5px solid #2b2f3a; }
.mk-frame.sp { max-width: 340px; border-radius: 26px; border: 6px solid #2b2f3a; }
.mk-frame > * { margin-left: 16px; margin-right: 16px; min-width: 0; }
.mk-frame > .mk-header, .mk-frame > .mk-footer, .mk-frame > .mk-tabs { margin-left: 0; margin-right: 0; }
.mk-header { container-type: inline-size; background: var(--mk-c, #1f2a5a); color: var(--mk-on, #fff); }
.mk-hin { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.mk-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-logo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-logo-img { display: block; height: 28px; width: auto; max-width: 160px; object-fit: contain; flex: none; }
.mk-nav { display: flex; align-items: center; gap: 14px; font-size: .84rem; opacity: .85; flex: none; }
.mk-nav span { flex: none; white-space: nowrap; }
.mk-ph { display: inline-block; width: 40px; height: 8px; border-radius: 4px; background: currentColor; opacity: .22; vertical-align: middle; }
.mk-nav .mk-ph { opacity: .35; }
.mk-burger { display: none; }
@container (max-width: 420px) { .mk-nav { display: none; } .mk-burger { display: grid; } }
.mk-avatar { width: 26px; height: 26px; border-radius: 50%; background: #cfd6ff; flex: none; }
.mk-frame.branded .mk-avatar { background: color-mix(in srgb, var(--mk-on) 35%, transparent); }
.mk-burger { gap: 3px; width: 18px; flex: none; } .mk-burger i { display: block; height: 2px; background: var(--mk-on, #fff); border-radius: 2px; }
.mk-title { margin: 6px 16px 0; font-size: 1.3rem; line-height: 1.4; color: #11152a; font-family: var(--mk-font, var(--f-display)); }
.mk-text p { margin: 0 0 6px; }
.mk-line { display: block; height: 8px; margin-top: 6px; border-radius: 4px; background: #e8ebf1; }
.mk-field { display: grid; gap: 6px; font-weight: 600; font-size: .84rem; color: #3b4152; }
.mk-input { display: block; padding: 10px 12px; border: 1px solid #c9ceda; border-radius: 8px; background: #fff; color: #9aa1b2; font-weight: 400; font-size: .9rem; }
.mk-select { position: relative; padding-right: 30px; } .mk-select::after { content: "▾"; position: absolute; right: 12px; color: #6b7283; }
.mk-btn { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 16px; border-radius: 8px; background: var(--mk-c, #2d3aa8); color: var(--mk-on, #fff); font-weight: 700; text-align: center; font: inherit; font-weight: 700; border: 0; }
.mk-btn.ghost { background: #fff; color: var(--mk-ink, #2d3aa8); border: 1px solid #c9ceda; }
button.mk-go { cursor: pointer; } button.mk-go:hover { filter: brightness(1.08); } button.mk-go:focus-visible { outline: 3px solid var(--mk-ink, #2d3aa8); outline-offset: 2px; }
.mk-cap { display: block; margin-bottom: 6px; font-size: .86rem; }
.mk-table { overflow-x: auto; } .mk-table table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.mk-table th { padding: 8px 10px; background: #f3f5f9; color: #4a5164; text-align: left; font-weight: 600; border-bottom: 1px solid #e1e4eb; }
.mk-table td { padding: 8px 10px; border-bottom: 1px solid #eceef3; } .mk-table td .mk-line { margin: 0; }
.mk-list { display: grid; gap: 0; } .mk-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eceef3; }
.mk-dot { width: 28px; height: 28px; border-radius: 50%; background: #e3e7ff; flex: none; } .mk-row-t { flex: 1; } .mk-row-t .mk-line:first-child { margin-top: 0; } .mk-chev { color: #9aa1b2; font-size: 1.2rem; }
.mk-card { display: grid; gap: 4px; padding: 14px; border: 1px solid #e1e4eb; border-radius: 10px; background: #fafbfd; }
.mk-card-h { font-size: .8rem; color: #5b6275; } .mk-card-v { font-size: 1.4rem; }
.mk-image { display: grid; place-items: center; gap: 6px; min-height: 120px; border-radius: 10px; background: #eef1f6; color: #7a8194; font-size: .84rem; }
.mk-tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid #e1e4eb; overflow-x: auto; }
.mk-tabs span { padding: 10px 12px; color: #5b6275; font-size: .86rem; white-space: nowrap; } .mk-tabs span.on { color: var(--mk-ink, #2d3aa8); font-weight: 700; box-shadow: inset 0 -2px 0 var(--mk-ink, #2d3aa8); }
.mk-frame.branded .mk-dot { background: color-mix(in srgb, var(--mk-c) 18%, #fff); }
.mk-footer { padding: 14px 16px; background: #f3f5f9; color: #6b7283; font-size: .8rem; text-align: center; }
.mk-note { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fff6e0; color: #7a4d00; font-size: .82rem; }
.mk-frame > .mk-header:first-child { margin-top: 0; }
.mk-frame > :first-child:not(.mk-header):not(.mk-tabs) { margin-top: 16px; }

.wf-h { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 22px; }
.wf-frame.movable .wf-h { padding-right: 28px; }
.mk-btn { align-self: end; }
.mk-frame > .mk-footer:last-child { margin-bottom: -18px; }
.wf-layout-opts .seg button { padding-left: 10px; padding-right: 10px; }
.gh-hint:empty { display: none; }
.pr-made { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0 0 8px; color: var(--ok); }
.pr-made .muted { flex-basis: 100%; }
.st-repo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); }
.st-repo .btn.link { font-size: inherit; }
/* VS Code 拡張の案内(タスクの画面の頭) */
.vsc-promo { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: start; margin: 0 0 14px; padding: 14px 44px 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.vsc-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #e7f1fb; color: #0065a9; }
.vsc-txt { display: grid; gap: 2px; }
.vsc-btns { grid-column: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.vsc-x { position: absolute; top: 8px; right: 8px; }
@media (min-width: 900px) { .vsc-promo { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; } .vsc-btns { grid-column: 3; } }

/* モックアップを大きく見る(public/mock-view.js) */
.mkv { display: grid; gap: 14px; }
.mkv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mkv-bar select { min-width: 0; max-width: 100%; flex: 1 1 220px; }
.mkv-bar .btn.done { color: var(--ok, #2f9e6d); }
.mkv-stage { padding: 24px 16px; border-radius: var(--r); background: var(--surface2); overflow-x: auto; }
.mkv-stage .mk-frame.pc { max-width: 1040px; }
.mkv-stage .mk-frame.tablet { max-width: 720px; }
.mkv-stage .mk-frame.sp { max-width: 375px; }
.mkv-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mkv-note { margin: 0; }
/* ファイルの中身(Docker 構成など)は等幅で折り返さない */
textarea.code-ta { font: .86rem/1.55 var(--f-mono); white-space: pre; overflow-x: auto; min-height: 12em; tab-size: 2; }
.mkv-next .btn.pulse { animation: mkv-pulse 1.2s ease-out 2; }
@keyframes mkv-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #2d3aa8) 55%, transparent); } 100% { box-shadow: 0 0 0 12px transparent; } }
@media (prefers-reduced-motion: reduce) { .mkv-next .btn.pulse { animation: none; outline: 3px solid var(--accent, #2d3aa8); } }
/* モックアップの見た目(案件ごと。public/mock-look.js) */
.ml-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .ml-grid { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; } }
.ml-sw { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ml-sw button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ml-sw button.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--surface) inset; }
.ml-sw .ml-auto { width: auto; padding: 0 12px; border-radius: 17px; background: var(--surface2); color: var(--fg); font: inherit; font-size: .86rem; }
.ml-sw input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.ml-logo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ml-logo img { height: 36px; width: auto; max-width: 180px; object-fit: contain; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ml-prev { padding: 16px; border-radius: var(--r); background: var(--surface2); min-width: 0; }
.ml-prev .mk-frame { max-width: 100%; }
/* GitHub の PR を選ぶ(public/auto-ui.js prFetchBar) */
.prpick { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.prpick-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.prpick-row:hover, .prpick-row:focus-visible { border-color: var(--accent); }
.prpick-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.prpick-main b { overflow-wrap: anywhere; }
/* モックアップだけのページ(/mock、public/mock-page.js) */
html:has(body.mkp), body.mkp { background: var(--surface2); min-height: 100vh; }
.mkp-main { max-width: 1180px; margin: 0 auto; padding: 16px 16px 40px; }
.mkp .mkv-stage { padding: 20px 0; background: transparent; }
.mkp .mkv-bar { position: sticky; top: 0; z-index: 5; padding: 10px 0; background: var(--surface2); }
.mkp-msg { margin: 10vh auto 0; display: grid; gap: 12px; }
.mkp-msg h1 { font-size: 1.3rem; margin: 0; }
.mkp-msg p { margin: 0; }
.mkp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.mkp-head .brand { display: flex; flex: none; }
.mkp-head p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; flex: 1 1 200px; min-width: 0; }
