/* 建設SaaS 試用版の見た目（11/10 午後：参考の画面の尖った所を取り込んだ版）。
   色は藍 #1F4E79 の1色＋橙（遅れ・差）だけ。文字の大きさは 題34・数字44・本文16・補足14 の4段（札や区分のごく小さい字だけ例外）。
   角は箱 14px・札とボタン 10px。影は無し・線は 1px。外のフォントは読まない（端末の日本語の書体を使う）。 */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F7F6F2;
  --ink: #141413;
  --ink-2: #3D3C38;
  --sub: #55544F;
  --line: #E6E3DA;
  --line-2: #EFECE4;
  --side-bg: #FFFFFF;
  --brand: #D97757;
  --accent: #A8492A;
  --accent-ink: #FFFFFF;
  --accent-weak: #FBEDE6;
  --sel-bg: #FBEDE6;
  --on-brand: #141413;
  --mark: #D4663F;
  --price-bg: #141413;
  --price-ink: #FFFFFF;
  --chip-red-bg: #141413;
  --chip-red-ink: #FFFFFF;
  --accent-soft: #E9B7A3;
  --area: #FBEDE6;
  --dot-off: #EFEDE8;
  --quiet: #F7F6F2;
  --seg: #F7F6F2;
  --seg-on: #141413;
  --seg-on-ink: #FFFFFF;
  --late: #8A3B12;
  --late-bg: #FBEDE6;
  --late-line: #E3B59E;
  --late-dot: #8A3B12;
  --diff: #A8492A;
  --chart-2: #8A867D;
  --focus: #A8492A;
  --primary-bg: #D97757;
  --primary-ink: #141413;
  --ink-fixed: #141413;
  --ink-fixed-on: #FFFFFF;
  --bar: #2B2825;
  --bar-ink: #FFFFFF;
  --bar-line: #2B2825;
  --bar-done: #4A4540;
  --bar-l1: #B5B1A6;
  --bar-l2: #D97757;
  --bar-l3: #E9B7A3;
  --today: #D97757;
  --d1: #D97757;
  --d2: #F2B8A0;
  --d3: #141413;
  --d4: #D9D6CE;
  --red: #8A3B12;
  --serif: 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  --site-ink: #FFFFFF;
  --paper: #FFFFFF;
  --paper-ink: #1B1D21;
  --paper-gray: #3D434D;
  --paper-head: #F2F3F5;
  --paper-line: #C9CDD3;
  --paper-warn-bg: #FDF5EE;
  --paper-warn-ink: #8A3F06;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F1E1D;
    --surface: #2A2927;
    --surface-2: #252422;
    --ink: #F2F0EA;
    --ink-2: #D8D5CC;
    --sub: #C4C1B9;
    --line: #3A3835;
    --line-2: #32302D;
    --side-bg: #2A2927;
    --brand: #D97757;
    --accent: #E08A6A;
    --accent-ink: #1F1E1D;
    --accent-weak: #443029;
    --sel-bg: #443029;
    --on-brand: #141413;
    --mark: #E08A6A;
    --price-bg: #F2F0EA;
    --price-ink: #1F1E1D;
    --chip-red-bg: #F0A07F;
    --chip-red-ink: #1F1E1D;
    --accent-soft: #7A4A38;
    --area: #35291F;
    --dot-off: #4A3A33;
    --quiet: #34322F;
    --seg: #34322F;
    --seg-on: #F2F0EA;
    --seg-on-ink: #1F1E1D;
    --late: #F0A07F;
    --late-bg: #3A2A22;
    --late-line: #7A4A38;
    --late-dot: #F0A07F;
    --diff: #F0A07F;
    --chart-2: #8F8B82;
    --focus: #E08A6A;
    --primary-bg: #E08A6A;
    --primary-ink: #1F1E1D;
    --ink-fixed: #F2F0EA;
    --ink-fixed-on: #1F1E1D;
    --bar: #3A3835;
    --bar-ink: #F2F0EA;
    --bar-line: #4D4A45;
    --bar-done: #45423E;
    --bar-l1: #B5B1A6;
    --bar-l2: #E08A6A;
    --bar-l3: #E9B7A3;
    --today: #D97757;
    --d1: #E08A6A;
    --d2: #F2B8A0;
    --d3: #F2F0EA;
    --d4: #6B6862;
    --red: #8A3B12;
    --site-ink: #FFFFFF;
    --paper: #FFFFFF;
    --paper-ink: #1B1D21;
    --paper-gray: #3D434D;
    --paper-head: #F2F3F5;
    --paper-line: #C9CDD3;
    --paper-warn-bg: #FDF5EE;
    --paper-warn-ink: #8A3F06;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1F1E1D;
  --surface: #2A2927;
  --surface-2: #252422;
  --ink: #F2F0EA;
  --ink-2: #D8D5CC;
  --sub: #C4C1B9;
  --line: #3A3835;
  --line-2: #32302D;
  --side-bg: #2A2927;
  --brand: #D97757;
  --accent: #E08A6A;
  --accent-ink: #1F1E1D;
  --accent-weak: #443029;
  --sel-bg: #443029;
  --on-brand: #141413;
  --mark: #E08A6A;
  --price-bg: #F2F0EA;
  --price-ink: #1F1E1D;
  --chip-red-bg: #F0A07F;
  --chip-red-ink: #1F1E1D;
  --accent-soft: #7A4A38;
  --area: #35291F;
  --dot-off: #4A3A33;
  --quiet: #34322F;
  --seg: #34322F;
  --seg-on: #F2F0EA;
  --seg-on-ink: #1F1E1D;
  --late: #F0A07F;
  --late-bg: #3A2A22;
  --late-line: #7A4A38;
  --late-dot: #F0A07F;
  --diff: #F0A07F;
  --chart-2: #8F8B82;
  --focus: #E08A6A;
  --primary-bg: #E08A6A;
  --primary-ink: #1F1E1D;
  --ink-fixed: #F2F0EA;
  --ink-fixed-on: #1F1E1D;
  --bar: #3A3835;
  --bar-ink: #F2F0EA;
  --bar-line: #4D4A45;
  --bar-done: #45423E;
  --bar-l1: #B5B1A6;
  --bar-l2: #E08A6A;
  --bar-l3: #E9B7A3;
  --today: #D97757;
  --d1: #E08A6A;
  --d2: #F2B8A0;
  --d3: #F2F0EA;
  --d4: #6B6862;
  --red: #8A3B12;
  --site-ink: #FFFFFF;
  --paper: #FFFFFF;
  --paper-ink: #1B1D21;
  --paper-gray: #3D434D;
  --paper-head: #F2F3F5;
  --paper-line: #C9CDD3;
  --paper-warn-bg: #FDF5EE;
  --paper-warn-ink: #8A3F06;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'BIZ UDPGothic', 'Yu Gothic UI', 'Yu Gothic', Meiryo, 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  line-break: strict;
  -webkit-text-size-adjust: 100%;
}

body { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.num { text-align: right; white-space: nowrap; }
.sub { color: var(--sub); font-size: 14px; }
.late { color: var(--late); font-weight: 700; }
.muted { color: var(--sub); }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }

/* ---------- 骨組み ---------- */

.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.mainwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; }

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.view:focus { outline: none; }
/* 中身が長いとき、横に流す欄（タブの列・表）が縦に潰れないように（縮めずに縦に流す） */
.view > *, .sec-wrap > * { flex-shrink: 0; }

.side { display: none; }

.mhead {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px 8px; padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line); background: var(--surface);
}
.mhead-titles { display: flex; flex-direction: column; min-width: 0; }
.mhead-biz { font-size: 14px; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhead-title { font-size: 16px; font-weight: 700; }
.mhead-actions { display: flex; gap: 8px; }

.tabbar {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line); background: var(--surface); padding-bottom: env(safe-area-inset-bottom);
}
/* 下の切り替えの帯（11/10）：手袋の指で押せる高さ64px・絵と字の両方・親指の届く下・居る所は色と太字と上の線の3つで */
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 64px; border: 0; border-top: 3px solid transparent; background: transparent; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tabbar button svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button[aria-current="page"] { color: var(--accent); font-weight: 700; border-top-color: var(--accent); }
.tabbar .tab-new { color: var(--ink); font-weight: 700; }
.tabbar .tab-new-dot { display: grid; place-items: center; width: 40px; height: 32px; border-radius: 10px; background: var(--brand); color: var(--on-brand); }
.tabbar .tab-new-dot svg { width: 24px; height: 24px; stroke-width: 2.5; }
.mhead-icon { display: inline-flex; align-items: center; gap: 6px; }
:root:not([data-role="sagyouin"]) #mhead-more { display: none; }

/* 引き継ぎの知らせだけ（控えの知らせは左下に寄せた） */
.banner {
  margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-weak); color: var(--accent);
  font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ---------- 広い画面（768px 以上）：左のメニュー ---------- */

@media (min-width: 768px) {
  .app { flex-direction: row; }
  .tabbar, .mhead { display: none; }
  .rolebar { padding: 10px 48px; }
  .side {
    display: flex; flex-direction: column; gap: 0; flex: 0 0 264px; padding: 24px 16px 16px;
    border-right: 1px solid var(--line); background: var(--side-bg); overflow-y: auto;
  }
  .view { padding: 32px 48px 56px; gap: 40px; }
  .banner { margin: 16px 48px 0; }
}

.side-brand { font-size: 16px; font-weight: 700; padding: 0 8px 16px; letter-spacing: .02em; }
.side-biz {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.side-biz-mark { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #141413; display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.side-brand { display: flex; align-items: center; gap: 8px; }
.side-brand-icon { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.side-biz-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.side-biz-name { font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-biz-tag { font-size: 14px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { flex: none; width: 8px; height: 8px; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(45deg); margin: 0 4px 4px 0; }

.side-pills { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.side-pills button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.side-pills button:hover { background: var(--surface-2); }
.count-chip {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--brand); color: var(--on-brand);
  font-size: 14px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}
.count-chip.red { background: var(--chip-red-bg); color: var(--chip-red-ink); }
.count-chip.zero { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }

.side-group { margin: 16px 12px 4px; font-size: 14px; letter-spacing: .12em; color: var(--sub); font-weight: 700; }
.side-menu { display: flex; flex-direction: column; gap: 2px; }
.side-menu button {
  height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px;
  border: 0; border-radius: 10px; background: transparent; font-size: 16px; cursor: pointer; text-align: left; width: 100%;
}
.side-menu button:hover { background: var(--seg); }
.side-menu button[aria-current="page"] { background: var(--sel-bg); color: var(--ink); font-weight: 700; }
.side-menu .badge { font-size: 14px; color: var(--sub); font-weight: 400; }
.side-menu .badge.late { color: var(--late); font-weight: 700; }
.side-menu button[aria-current="page"] .badge { color: var(--ink); }
.side-foot { margin-top: auto; padding: 16px 4px 0; display: flex; flex-direction: column; gap: 8px; }
.side-backup { font-size: 14px; color: var(--sub); padding: 0 8px; display: flex; flex-direction: column; gap: 2px; }
.side-where { color: var(--ink); font-weight: 700; }
.side-backup.late { color: var(--late); font-weight: 700; }

/* 明るい・暗いの切り替え（左下） */
.theme-sw { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.theme-sw button { flex: 1; min-height: 40px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); cursor: pointer; font-size: 14px; }
.theme-sw button[aria-pressed="true"] { background: var(--sel-bg); color: var(--ink); font-weight: 700; }
@media (pointer: coarse) { .theme-sw button { min-height: 44px; } }

/* ---------- 部品 ---------- */

.btn {
  min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; font-size: 16px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ink { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); }
.btn-accent { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-ink); }
.btn-line { background: var(--surface); color: var(--ink); }
.btn-accent-line { background: var(--accent-weak); border-color: var(--accent-weak); color: var(--accent); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--sub); font-weight: 400; }
.btn-danger { background: var(--surface); border-color: var(--late-line); color: var(--late); }
.btn-sq { min-width: 44px; padding: 0 12px; }
.btn-wide { width: 100%; }
.btn-big { min-height: 52px; }

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-between { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

h1, h2 { word-break: auto-phrase; text-wrap: pretty; font-feature-settings: 'palt'; }
h1.page { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
@media (min-width: 768px) { h1.page { font-size: 34px; } }
h1.page.k30 { font-size: 24px; }
@media (min-width: 768px) { h1.page.k30 { font-size: 30px; } }
h2.sec { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.page-top { display: flex; flex-direction: column; gap: 4px; }
.page-date { font-size: 14px; color: var(--sub); }
.sec-wrap { display: flex; flex-direction: column; gap: 16px; }

.box { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.box-pad { padding: 20px; }
.box-late { border-color: var(--late-line); background: var(--late-bg); color: var(--late); }
.placeholder { border: 1px dashed var(--sub); border-radius: 10px; padding: 12px; font-size: 14px; color: var(--sub); line-height: 1.6; cursor: not-allowed; }
.empty { padding: 24px 16px; color: var(--sub); text-align: center; }

/* 数字の札 */
.kpis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.kpi { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); min-width: 0; }
.kpi-label { font-size: 14px; color: var(--sub); }
.kpi-mid { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 12px; min-width: 0; }
.kpi-value { font-family: var(--serif); font-size: 34px; font-weight: 700; line-height: 1.1; white-space: nowrap; letter-spacing: -.01em; }
@media (min-width: 768px) { .kpi-value { font-size: 44px; } }
@media (min-width: 1100px) and (max-width: 1499px) { .kpi-value { font-family: var(--serif); font-size: 34px; } }
.kpi-delta { font-size: 14px; color: var(--ink); font-weight: 700; }
.kpi-delta.down { color: var(--diff); }
.kpi-sub { font-size: 14px; color: var(--sub); }
.kpi-sub.late { color: var(--late); font-weight: 700; }
.spark { flex: 0 1 96px; width: 96px; min-width: 0; max-width: 100%; height: 48px; }
@media (min-width: 1100px) { .spark { width: 88px; } }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark polygon { fill: var(--area); stroke: none; }

/* 期間の切り替え（灰の丸い札・選択中は黒） */
.seg { display: inline-flex; gap: 4px; }
.seg button { min-height: 40px; min-width: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; color: var(--ink); font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--seg-on); border-color: var(--seg-on); color: var(--seg-on-ink); font-weight: 700; }
@media (pointer: coarse) { .seg button { min-height: 44px; } }

/* グラフ */
.chart { width: 100%; height: auto; max-height: 300px; display: block; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 6; }
.chart .axis { stroke: var(--line); }
.chart .area { fill: var(--area); stroke: none; }
.chart .l1 { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; }
.chart .l2 { fill: none; stroke: var(--chart-2); stroke-width: 2; stroke-dasharray: 6 5; }
.chart .p1 { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.chart .now-band { fill: var(--area); }
.chart .tip { fill: var(--seg); }
.chart .tip-t { fill: var(--ink); font-weight: 700; }
.chart text { fill: var(--sub); font-size: 14px; }
.legend { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--sub); }

/* 見積りの流れ（件数の塊・金額・状態の札） */
.stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); }
@media (min-width: 1100px) { .stages { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.stage { padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; }
.stage-name { font-size: 14px; color: var(--sub); }
.stage-count { font-size: 24px; font-weight: 700; line-height: 1.2; }
.stage-amt { font-size: 14px; color: var(--sub); white-space: nowrap; }
.tag-st { margin-top: 8px; font-size: 14px; }

/* 合計・受注・差・目標を縦の線で並べる */
.strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
@media (min-width: 900px) { .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.strip > div { padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; min-width: 0; container-type: inline-size; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
@media (max-width: 899px) { .strip > div:nth-child(3) { border-left: 0; } .strip > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.strip-k { font-size: 14px; color: var(--sub); overflow-wrap: anywhere; } /* 11/10 768px で「見積りの合計（失注を除く）」が欄からはみ出した */
.strip-v { font-size: clamp(16px, 15cqi, 24px); font-weight: 700; white-space: normal; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; } /* 11/10 1024px で4列のとき ¥1,902,922 が隣の欄へはみ出した */
.strip-v.diff { color: var(--diff); }
.strip-v.ok { color: var(--ink); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; color: var(--sub); }

/* 画面を2つに分ける（広い画面） */
.two { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1100px) { .two { flex-direction: row; } .two > * { flex: 1 1 0; min-width: 0; } .two > .w2 { flex: 2 1 0; } }
.two > .box { min-width: 0; }

/* 進行中の現場（写真のカードを横に送る） */
.sites-wrap { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nav2 { display: flex; gap: 8px; }
.nav2 button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; padding: 0; }
.nav2 button[data-on="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.arr { width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
.arr.r { transform: rotate(-135deg); margin-left: 0; margin-right: 4px; }
.sites { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.site { flex: 0 0 240px; height: 300px; border-radius: 14px; position: relative; overflow: hidden; text-align: left; border: 1px solid var(--line); padding: 0; background: var(--surface); color: var(--ink); cursor: pointer; scroll-snap-align: start; }
.site-mark { position: absolute; left: 0; right: 0; top: 0; height: 148px; background: var(--sel-bg); display: grid; place-items: center; font-family: var(--serif); font-size: 88px; line-height: 1; font-weight: 700; color: var(--mark); }
.site-price { position: absolute; top: 0; right: 0; padding: 10px 14px; background: var(--price-bg); color: var(--price-ink); font-size: 14px; font-weight: 700; border-radius: 0 13px 0 14px; white-space: nowrap; }
.site-foot { position: absolute; left: 0; right: 0; bottom: 0; height: 152px; padding: 16px 20px; background: var(--surface); display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; }
.site-name { font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.site-area { font-size: 14px; color: var(--sub); }
.site-bar { margin-top: 10px; }

/* 円グラフ */
.donut-box { display: flex; flex-direction: column; gap: 16px; }
.donut { width: 100%; max-width: 220px; height: auto; margin: 0 auto; display: block; }
.donut circle.track { stroke: var(--line-2); }
.donut text { fill: var(--ink); }
.donut .d-n { font-family: var(--serif); font-size: 44px; font-weight: 700; }
.donut .d-l { font-size: 14px; fill: var(--sub); }
.d-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.d-legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.d-legend li > b { margin-left: auto; font-size: 16px; color: var(--ink); }
.d-dot { width: 10px; height: 10px; border-radius: 5px; flex: none; }
.d-dot.c1 { background: var(--d1); } .d-dot.c2 { background: var(--d2); } .d-dot.c3 { background: var(--d3); } .d-dot.c4 { background: var(--d4); }

/* 決まり方の4行（丸の中の印・上下の矢印） */
.dec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dec li { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.dec li:last-child { border-bottom: 0; }
.dec-mark { flex: none; width: 40px; height: 40px; border-radius: 20px; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-size: 16px; font-weight: 700; }
.dec-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dec-k { font-size: 14px; color: var(--sub); }
.dec-v { font-size: 16px; font-weight: 700; white-space: nowrap; }
.dec-d { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; text-align: right; }
.dec-d.down { color: var(--diff); }

/* 表 */
.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 16px; }
table.t th { text-align: left; color: var(--sub); font-size: 14px; font-weight: 400; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; height: 48px; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--surface-2); }
table.t td.strong { font-weight: 700; }
table.t td .cell-sub { display: block; font-size: 14px; color: var(--sub); font-weight: 400; }

/* 狭い画面では表の行を縦に並べる（横に流さない） */
@media (max-width: 767px) {
  table.t.stack thead { display: none; }
  table.t.stack, table.t.stack tbody, table.t.stack tr, table.t.stack td { display: block; width: 100%; }
  table.t.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) fit-content(50%); gap: 4px 10px; }
  table.t.stack tr:last-child { border-bottom: 0; }
  table.t.stack td { padding: 0; border: 0; height: auto; }
  table.t.stack td[data-wide] { grid-column: 1 / -1; }
  table.t.stack td[data-label]::before { content: attr(data-label) '　'; color: var(--sub); font-size: 14px; }
}

/* 顔（頭文字の丸）を重ねる */
.faces { display: inline-flex; align-items: center; }
.face { width: 28px; height: 28px; border-radius: 14px; display: inline-grid; place-items: center; font-size: 14px; font-weight: 700; border: 2px solid var(--surface); margin-left: -8px; background: var(--sel-bg); color: var(--accent); flex: none; line-height: 1; }
.face:first-child { margin-left: 0; }
.face.f1 { background: var(--surface-2); color: var(--ink); }
.face.f2 { background: var(--brand); color: var(--on-brand); }
.face.lg { width: 36px; height: 36px; border-radius: 18px; }

/* 出来高の点（10個） */
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--dot-off); display: block; }
.dots i.on { background: var(--brand); }
.pct { margin-left: 8px; font-size: 14px; color: var(--sub); }

/* 契約額の帯（請求済み・承諾済みの追加・残り） */
.band { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--dot-off); min-width: 96px; }
.band i { display: block; height: 100%; }
.band i.b1 { background: var(--brand); }
.band i.b2 { background: var(--accent-soft); }
.band i.b3 { background: transparent; }
.band-cap { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14px; color: var(--sub); margin-top: 6px; }
.band-cap b { color: var(--ink); }
.key-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.key-dot.b1 { background: var(--brand); } .key-dot.b2 { background: var(--accent-soft); } .key-dot.b3 { background: var(--dot-off); }

.st { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.st::before { content: ''; width: 10px; height: 10px; border-radius: 5px; background: var(--dot-off); flex: none; }
.st.paid::before { background: var(--brand); }
.st.waiting::before { background: transparent; border: 2px solid var(--sub); }
.st.late { color: var(--late); font-weight: 700; }
.st.late::before { background: var(--late-dot); }

.tag { font-size: 14px; font-weight: 400; padding: 3px 8px; border-radius: 6px; border: 1px solid transparent; background: var(--surface); color: var(--ink); white-space: nowrap; }
.tag b { font-weight: 700; }
.tag.t-sekou { background: var(--sel-bg); color: var(--accent); font-weight: 700; }
.tag.t-draft { border-color: var(--line); color: var(--sub); }
.tag.t-wait { border-color: var(--ink); color: var(--ink); }
.tag.t-late { background: var(--ink-fixed); border-color: var(--ink-fixed); color: var(--ink-fixed-on); font-weight: 700; }
.tag.t-lost { color: var(--sub); padding-left: 0; padding-right: 0; }
.tag.t-done { border-color: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag.t-won { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.tag.t-type { color: var(--sub); padding-left: 0; padding-right: 0; }

/* 絞り込み */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select { min-height: 44px; }
.field-inline { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 10px; background: var(--seg); }
.field-inline input { border: 0; background: transparent; min-width: 0; width: 160px; font-size: 16px; }
.field-inline input:focus { outline: none; }

select, input[type="text"], input[type="date"], input[type="search"], input[type="number"], textarea {
  min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 8px 10px; font-size: 16px; /* 16px 未満だと iPhone が勝手に拡大する */ max-width: 100%;
}
textarea { min-height: 88px; }

/* 工事の画面：パンくず・題・下線のタブ */
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; color: var(--sub); }
.crumb button { border: 0; background: transparent; padding: 0; min-height: 44px; font-size: 14px; color: var(--sub); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.crumb-sep { color: var(--sub); }
.crumb-now { color: var(--ink); font-weight: 700; }
.subtabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.subtabs button { min-height: 48px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--sub); cursor: pointer; white-space: nowrap; font-size: 16px; margin-bottom: -1px; }
.subtabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

/* 見積りの明細 */
.lines { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 12px 16px; width: 100%; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line-2); cursor: pointer; min-height: 56px;
}
.line:last-child { border-bottom: 0; }
.line-name { font-size: 16px; }
.line-amt { font-size: 16px; font-weight: 700; text-align: right; white-space: nowrap; }
.line-sub { font-size: 14px; color: var(--sub); }
.totals { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); }
.totals .r { display: flex; justify-content: space-between; gap: 8px; font-size: 16px; color: var(--ink-2); }
.totals .r.big { font-size: 16px; font-weight: 700; color: var(--ink); }

/* 工程表（月と日の見出し・今日の線・暗い帯・土日は斜線） */
.gantt-wrap { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; }
.gantt { min-width: 720px; padding: 0 0 8px; position: relative; }
.g-top { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-bottom: 1px solid var(--line); }
.g-top-l { padding: 14px 16px; font-size: 14px; color: var(--sub); }
.g-scale { position: relative; height: 64px; }
.g-month { position: absolute; top: 8px; font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.g-day { position: absolute; top: 34px; transform: translateX(-50%); font-size: 14px; color: var(--sub); white-space: nowrap; text-align: center; line-height: 1.2; }
.g-day.now { color: var(--accent); font-weight: 700; }
.g-day.we { color: var(--sub); }
.g-body { position: relative; }
.g-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; min-height: 64px; position: relative; z-index: 1; }
.g-name { font-size: 16px; padding: 0 16px; min-width: 0; text-align: left; background: transparent; border: 0; cursor: pointer; display: flex; flex-direction: column; justify-content: center; min-height: 64px; }
.g-name b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.g-name span { font-size: 14px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.g-track { position: relative; height: 64px; }
.g-plot { position: absolute; top: 0; bottom: 0; left: 220px; right: 0; pointer-events: none; z-index: 0; }
.g-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.g-plot .hatch-l { stroke: var(--line); stroke-width: 1; }
.g-plot .vl { stroke: var(--line-2); stroke-width: 1; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--today); }
.g-bar {
  position: absolute; top: 8px; height: 48px; min-width: 88px; border-radius: 10px; background: var(--bar); color: var(--bar-ink);
  border: 1px solid var(--bar-line); padding: 12px 10px 0; text-align: left; cursor: pointer; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 14px;
}
.g-bar > .g-name-in { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.g-bar .face { border-color: var(--bar); width: 24px; height: 24px; border-radius: 12px; margin-left: -6px; }
.g-bar .face:first-child { margin-left: 0; }
.g-bar::before { content: ''; position: absolute; left: 10px; top: 6px; width: 24px; height: 3px; border-radius: 2px; background: var(--bar-l3); }
.g-bar.mae::before { background: var(--bar-l1); }
.g-bar.chuu::before { background: var(--bar-l2); }
.g-bar.zumi::before { background: var(--bar-l3); }
.g-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 16px 4px; font-size: 14px; color: var(--sub); }
.g-legend i { display: inline-block; width: 24px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.g-legend i.mae { background: var(--chart-2); } .g-legend i.chuu { background: var(--brand); } .g-legend i.zumi { background: var(--accent-soft); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .when { color: var(--sub); flex: 0 0 96px; font-size: 14px; }

/* 最近の見積り・請求 */
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { border-bottom: 1px solid var(--line-2); }
.recent li:last-child { border-bottom: 0; }
.recent button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.recent .r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recent .r-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent .r-amt { font-weight: 700; white-space: nowrap; }

/* ダイアログ */
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: var(--surface);
  color: var(--ink);
}
dialog::backdrop { background: rgba(10, 12, 15, .45); }
#dlg-form { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.dlg-title { margin: 0; padding: 16px 16px 8px; font-size: 18px; }
.dlg-body { padding: 4px 16px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.dlg-err { margin: 0 16px 8px; color: var(--late); font-size: 16px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 16px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.f { display: flex; flex-direction: column; gap: 4px; }
.f > span { font-size: 16px; color: var(--ink-2); }
.f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.f-check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.f-check input { width: 22px; height: 22px; }
.hint { font-size: 16px; color: var(--sub); margin: 0; }
.calc-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; }
.calc-box .r { display: flex; justify-content: space-between; gap: 8px; }
.calc-box .r.big { font-weight: 700; font-size: 16px; }

.loading, .noscript { padding: 24px; color: var(--sub); }


/* ---------- 見る立場の切り替え（画面の上） ---------- */
.rolebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rolebar-in { display: flex; align-items: center; gap: 8px; }
.rolebar-in > span { font-size: 16px; color: var(--ink-2); white-space: nowrap; }
.rolebar-in select { min-width: 0; max-width: 100%; }
.rolebar-note { font-size: 16px; color: var(--sub); }
:root[data-role="sagyouin"] .tabbar, :root[data-role="sagyouin"] #mhead-new, :root[data-role="sagyouin"] #side-save,
:root[data-role="sagyouin"] #side-backup, :root[data-role="sagyouin"] .side-biz { display: none; }

/* 選ぶだけの札 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 16px; color: var(--ink); }
.chip input { width: 22px; height: 22px; margin: 0; flex: none; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.newbox { border: 1px dashed var(--accent-soft); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.f > .btn-accent-line { align-self: flex-start; }
.pick-head { margin: 8px 0 0; font-size: 16px; color: var(--ink-2); }
.kumi-rows { display: flex; flex-direction: column; gap: 6px; }
.kumi-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 8px; align-items: center; }
.kumi-row .chip { justify-content: flex-start; }
.kumi-row .qty { width: 100%; }
.btn-pick { min-height: 44px; padding: 0 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.grow { flex: 1; min-width: 0; }
.list-plain .when.wide { flex: 0 0 118px; }
input[type="time"] { min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 8px 10px; font-size: 16px; max-width: 100%; }

/* 割り当て（人×時刻の一覧）：暗い帯・左上の短い色の線・今日の線 */
.board { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 8px 16px; display: flex; flex-direction: column; overflow-x: auto; }
.b-row { display: grid; grid-template-columns: 200px minmax(520px, 1fr); gap: 12px; align-items: center; min-height: 64px; border-bottom: 1px solid var(--line-2); padding: 8px 0; }
.b-row:last-child { border-bottom: 0; }
.b-top { min-height: 32px; }
.b-name { display: flex; flex-direction: row; align-items: center; gap: 10px; min-width: 0; font-size: 16px; }
.b-name-t { display: flex; flex-direction: column; min-width: 0; }
.b-name-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-scale { position: relative; height: 24px; }
.b-head span { position: absolute; transform: translateX(-50%); font-size: 14px; color: var(--sub); white-space: nowrap; }
.b-head span:first-child { transform: none; }
.b-head span:last-child { transform: translateX(-100%); }
.b-track { position: relative; height: 52px; background: var(--seg); border-radius: 10px; }
.b-bar { position: absolute; top: 4px; bottom: 4px; min-width: 56px; border: 1px solid var(--bar-line); border-radius: 10px; background: var(--bar); color: var(--bar-ink); font-size: 14px; padding: 10px 8px 0 10px; text-align: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.b-bar::before { content: ''; position: absolute; left: 10px; top: 5px; width: 24px; height: 3px; border-radius: 2px; background: var(--bar-l3); }
.b-bar.now::before { background: var(--bar-l2); }
.b-bar.late::before { background: #F0A07F; }
.b-bar.late { border: 2px solid #F0A07F; font-weight: 700; }
.b-bar.done { background: var(--bar-done); }
.b-bar.done::before { background: var(--bar-l3); }
.b-bar.irai { border-style: dashed; }
.b-bar.irai::before { background: var(--bar-l1); }
.b-now { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--today); pointer-events: none; }
.b-free { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--sub); }

/* 作業員の画面 */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); min-width: 0; }
.card.is-late { border-color: var(--late-line); background: var(--late-bg); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.card-time { font-size: 24px; font-weight: 700; }
.card-what { font-size: 16px; font-weight: 700; }
.card-where { font-size: 16px; }
.card-others { border-top: 1px solid var(--line-2); padding-top: 6px; }
.st-word { font-size: 14px; white-space: nowrap; color: var(--ink-2); }
.st-word.late { color: var(--late); font-weight: 700; }
.st-word.now { color: var(--accent); font-weight: 700; }
.st-word.done { color: var(--sub); }
.share-note { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); font-size: 16px; color: var(--ink-2); }

/* 現場の1枚（画面） */
.sheet-frame { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); overflow-x: auto; }
.sheet { background: var(--paper); color: var(--paper-ink); padding: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.6; min-width: 0; }
.sheet-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--paper-ink); padding-bottom: 8px; }
.sheet-label { font-size: 16px; color: var(--paper-gray); letter-spacing: .1em; }
.sheet-title { margin: 0; font-size: 24px; }
.sheet-meta { color: var(--paper-gray); }
.sheet-warn { margin: 0; border: 1px solid var(--late-line); background: var(--paper-warn-bg); color: var(--paper-warn-ink); padding: 8px 10px; border-radius: 4px; }
.sheet-h { margin: 6px 0 0; font-size: 16px; }
.sheet-t { width: 100%; border-collapse: collapse; }
.sheet-t th, .sheet-t td { border: 1px solid var(--paper-line); padding: 6px 8px; text-align: left; vertical-align: top; }
.sheet-t th { background: var(--paper-head); font-weight: 700; white-space: nowrap; width: 8em; }
.sheet-list th { width: auto; }
.sheet-t td.pre { white-space: pre-wrap; }
.sheet p { margin: 0; }
/* ---------- 請求書（画面の見本と印刷） ---------- */

.inv-frame { border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; background: var(--paper); }
.inv {
  width: 794px; min-height: 1123px; padding: 64px 64px 56px;
  background: var(--paper); color: var(--paper-ink);
  display: flex; flex-direction: column; gap: 22px;
  font-size: 9pt; line-height: 1.8;
}
.inv h1 { margin: 0; font-size: 21pt; font-weight: 700; letter-spacing: .3em; }
.inv-top { display: flex; justify-content: space-between; align-items: flex-start; }
.inv-meta { text-align: right; }
.inv-mid { display: flex; justify-content: space-between; gap: 24px; }
.inv-to { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.inv-atena { font-size: 13.5pt; font-weight: 700; border-bottom: 1px solid var(--paper-ink); padding-bottom: 4px; }
.inv-gray { color: var(--paper-gray); }
.inv-amount { border: 1px solid var(--paper-ink); padding: 10px 14px; display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.inv-amount b { font-size: 19.5pt; }
.inv-from { width: 260px; }
.inv-from .name { font-size: 10.5pt; font-weight: 700; }
.inv table { width: 100%; border-collapse: collapse; }
.inv th { background: var(--paper-head); text-align: left; padding: 6px 8px; border: 1px solid var(--paper-line); font-weight: 700; }
.inv td { padding: 6px 8px; border: 1px solid var(--paper-line); }
.inv .n { text-align: right; white-space: nowrap; }
.inv-bottom { display: flex; justify-content: space-between; gap: 24px; }
.inv-note { flex: 1; color: var(--paper-gray); font-size: 8.25pt; }
.inv-sum { width: 320px; }
.inv-sum td.total { border-color: var(--paper-ink); font-weight: 700; }
.inv-bank { border-top: 1px solid var(--paper-line); padding-top: 12px; }
.inv-warn { border: 1px solid var(--late-line); background: var(--paper-warn-bg); color: var(--paper-warn-ink); padding: 8px 10px; border-radius: 4px; }

#print-root { display: none; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { height: auto; overflow: visible; background: var(--paper); }
  .app, dialog { display: none !important; }
  #print-root { display: block; }
  #print-root .inv { width: 210mm; min-height: 297mm; padding: 16mm 15mm 14mm; }
  #print-root .inv-warn { display: none; }
  /* 現場の1枚：A4 の1枚に収める（はみ出す分は切る＝2枚目を出さない） */
  #print-root .sheet { width: 210mm; height: 297mm; overflow: hidden; padding: 14mm 14mm 12mm; font-size: 10.5pt; line-height: 1.5; gap: 3mm; }
  #print-root .sheet-title { font-size: 16pt; }
  #print-root .sheet-h { font-size: 11.5pt; margin-top: 2mm; }
  #print-root .sheet-t th, #print-root .sheet-t td { padding: 1.2mm 2mm; }
  #print-root .sheet-t td.pre { display: block; max-height: 30mm; overflow: hidden; }
  #print-root .sheet tr { break-inside: avoid; }
  /* 11/12 A組 K084：表ぜんぶを「途中で切らない」にすると、明細が多い請求書で表が丸ごと次の頁へ送られた＝行だけを切らない・2頁目にも見出しの行を出す */
  .inv tr { page-break-inside: avoid; break-inside: avoid; }
  .inv thead { display: table-header-group; }
  /* 2頁目からは紙の上下の余白が0（@page の margin 0）で、行が紙の端に掛かった＝請求書・見積書だけ紙の余白を取る（対応するブラウザだけ） */
  @supports (page: inv) {
    #print-root .inv { page: inv; min-height: auto; padding-top: 2mm; padding-bottom: 2mm; }
  }
  @page inv { size: A4; margin: 14mm 0 12mm; }
  /* 工事写真帳：A4に3枚・左に写真・右に説明（11/11 棚18） */
  #print-root .pd-page { width: 210mm; height: 297mm; padding: 12mm 12mm 10mm; display: flex; flex-direction: column; gap: 4mm; break-after: page; overflow: hidden; }
  #print-root .pd-page:last-child { break-after: auto; }
  #print-root .pd-row { flex: 1; min-height: 0; }
  #print-root .pd-img img { max-height: 80mm; }
}
.pd-page { display: flex; flex-direction: column; gap: 12px; background: var(--paper); color: #111; }
.pd-top { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid #111; padding-bottom: 2mm; }
.pd-top h1 { margin: 0; font-size: 16pt; font-family: var(--serif); }
.pd-row { display: grid; grid-template-columns: 58% 1fr; gap: 4mm; border: 1px solid #111; padding: 3mm; break-inside: avoid; }
.pd-img { display: flex; align-items: center; justify-content: center; background: var(--paper); }
.pd-img img { max-width: 100%; max-height: 80mm; object-fit: contain; }
.pd-t { width: 100%; border-collapse: collapse; font-size: 10pt; }
.pd-t th, .pd-t td { border: 1px solid #111; padding: 1.2mm 2mm; text-align: left; vertical-align: top; }
.pd-t th { width: 6.5em; font-weight: 700; white-space: nowrap; }
.pd-memo td { height: 18mm; }
.pd-group { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
figure.photo-cell { margin: 0; }
.pd-thumb { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--ink); min-height: 48px; }
.pd-thumb:focus-visible img { outline: 3px solid var(--accent); outline-offset: 2px; }
.pd-big { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pd-big img { width: 100%; max-height: min(60vh, max(120px, calc(100dvh - 340px))); object-fit: contain; background: #000; border-radius: 6px; }
.pd-big-cap { margin: 0; font-size: 16px; }
.pd-big-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-big-nav .btn { min-height: 48px; flex: 1 1 8em; }

@media (max-width: 767px) { .rolebar-note { display: none; } .rolebar { padding: 6px 16px; } }
@media (max-width: 767px) { .subtabs { flex-wrap: wrap; overflow-x: visible; } }

/* 見積りの下書き（AI） */
.ai-box textarea { min-height: 112px; width: 100%; }
.ai-drafts { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ai-draft { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.tag-draft { border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; padding: 2px 8px; font-size: 14px; }

/* 追加：円グラフの色・工程表の日・契約額の列 */
.donut .seg.c1 { stroke: var(--d1); } .donut .seg.c2 { stroke: var(--d2); } .donut .seg.c3 { stroke: var(--d3); } .donut .seg.c4 { stroke: var(--d4); }
.g-day span { display: block; }
.g-day { font-size: 14px; }
td.band-td { min-width: 168px; }
.side-pills button { color: var(--ink); }
.btn-pick { font-weight: 400; }
.mainwrap { min-width: 0; }
.view > * { min-width: 0; }
.two > .w2 { min-width: 0; }
@media (min-width: 1100px) { .two { align-items: stretch; } .two > .w2 > .box { height: 100%; } }
.g-bar.zumi { background: var(--bar-done); }

/* 使い方・この試用版について・問い合わせ（読む頁） */
.doc { max-width: 720px; gap: 16px; }
.doc-p { margin: 0; line-height: 1.8; }
.doc-list { margin: 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; line-height: 1.8; }
.doc h2.sec { margin-top: 8px; font-family: var(--serif); font-size: 20px; }
.doc-slot { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; background: var(--surface-2); color: var(--ink); }

/* ======================================================================
   新しい置き方（11/10 午後）：左の帯＝新しい工事・探す・区分・最近の工事／真ん中＝入力欄と流れ／右の欄＝書類
   ====================================================================== */

[hidden] { display: none !important; }
.work { flex: 1; min-height: 0; display: flex; position: relative; }
.center { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.center > .view { flex: 1; }

/* 左の帯の上 */
.side-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.side-new { width: 100%; }
.side-find { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--sub); cursor: pointer; text-align: left; width: 100%; }
.side-find:hover { background: var(--surface-2); }
.kbd, kbd { font-family: inherit; font-size: 14px; color: var(--sub); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--seg); white-space: nowrap; }
.side-recent { display: flex; flex-direction: column; gap: 2px; }
.side-recent button { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; width: 100%; font-size: 16px; }
.side-recent button:hover { background: var(--seg); }
.side-recent button[aria-current="page"] { background: var(--sel-bg); font-weight: 700; }
.side-rec-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-empty { padding: 4px 12px; font-size: 14px; color: var(--sub); }
.side-foot .side-biz { margin: 8px 0 0; }

/* ホーム */
.home-top { display: flex; flex-direction: column; gap: 16px; max-width: 880px; width: 100%; margin: 0 auto; }
.home-hello { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.3; }
@media (min-width: 768px) { .home-hello { font-size: 34px; } }
.composer { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.composer:focus-within { border-color: var(--accent); }
.composer-label { font-weight: 700; font-size: 16px; }
.composer textarea { width: 100%; min-height: 96px; border: 0; padding: 0; background: transparent; resize: vertical; font-size: 16px; outline: none; }
.composer-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-to { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.composer-to select { min-width: 0; max-width: 100%; flex: 1; }
.dock-keys { font-size: 14px; color: var(--sub); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; font-size: 16px; }
.chip:hover { background: var(--sel-bg); }
.page-sub { margin: 0; font-family: var(--serif); font-size: 20px; font-weight: 700; }

/* 工事の中：流れ */
.doc-btns .btn[aria-pressed="true"] { background: var(--sel-bg); border-color: var(--accent-soft); color: var(--accent); }
.stream { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; max-width: 760px; width: 100%; margin-inline: auto; }
.ev { border-bottom: 1px solid var(--line-2); }
.ev-body { display: grid; grid-template-columns: 96px auto minmax(0, 1fr); gap: 4px 12px; align-items: baseline; width: 100%; min-height: 48px; padding: 10px 4px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font-size: 16px; }
div.ev-body { cursor: default; }
button.ev-body:hover { background: var(--surface-2); }
.ev-when { font-size: 14px; color: var(--sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-tag { font-size: 14px; color: var(--sub); border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.ev-seikyu, .ev-nyuukin { color: var(--accent); border-color: var(--accent-soft); }
.ev-mine { color: var(--ink); border-color: var(--ink); }
.ev-draft .ev-tag { color: var(--accent); border-color: var(--accent); border-style: dashed; }
.ev-text { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) { .ev-body { grid-template-columns: auto minmax(0, 1fr); } .ev-text { grid-column: 1 / -1; } }

/* 下に固定の入力欄 */
.dock { flex: none; border-top: 1px solid var(--line); background: var(--surface); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 768px) { .dock { padding: 12px 48px 16px; } }
.dock textarea { width: 100%; min-height: 56px; max-height: 160px; resize: vertical; }
.dock-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dock-to { flex: 1; min-width: 200px; font-size: 14px; color: var(--sub); }
.dock .hint { font-size: 14px; }

/* 右の欄 */
.pane { flex: none; width: var(--pane-w, 520px); max-width: 100%; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; }
.pane-resize { position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 6; touch-action: none; }
.pane-resize::after { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: transparent; }
.pane-resize:hover::after, .pane-resize:focus-visible::after { background: var(--accent); }
.pane-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pane-title { margin: 0; font-size: 16px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pane-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.pane-body > * { flex-shrink: 0; min-width: 0; }
@media (max-width: 1099px) and (min-width: 768px) { .pane { position: absolute; right: 0; top: 0; bottom: 0; width: min(var(--pane-w, 520px), 100%); } }
@media (max-width: 767px) {
  .pane { position: fixed; inset: 0; width: 100%; z-index: 30; border-left: 0; padding-top: env(safe-area-inset-top); animation: pane-up .18s ease-out; }
  .pane-resize { display: none; }
}
@keyframes pane-up { from { transform: translateY(24px); opacity: .0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pane { animation: none; } }

/* 左の帯をスマホで出す */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 15, .45); z-index: 39; }
@media (max-width: 767px) {
  html[data-layout="new"] .side[data-open] { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, 86vw); z-index: 40; padding: 20px 16px 16px; background: var(--side-bg); border-right: 1px solid var(--line); overflow-y: auto; }
}
@media (min-width: 768px) { #mhead-menu, #mhead-find, .scrim { display: none !important; } }
html[data-layout="old"] #mhead-menu, html[data-layout="old"] #mhead-find,
:root[data-role="sagyouin"] #mhead-menu, :root[data-role="sagyouin"] #mhead-find { display: none !important; }

/* 探す（⌘K） */
dialog.pal { width: min(640px, calc(100vw - 24px)); margin: 12vh auto auto; padding: 0; border-radius: 14px; overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pal-in input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 18px; outline: none; min-height: 44px; padding: 0; }
.pal-list { max-height: min(56vh, 480px); overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.pal-group { font-size: 14px; letter-spacing: .12em; color: var(--sub); font-weight: 700; padding: 10px 8px 4px; }
.pal-item { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-size: 16px; }
.pal-item[aria-selected="true"] { background: var(--sel-bg); }
.pal-title { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sub { font-size: 14px; color: var(--sub); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: none; max-width: 55%; }
.pal-item[aria-selected="true"] .pal-sub { color: var(--ink-2); }
.pal-more, .pal-none { font-size: 14px; color: var(--sub); padding: 6px 12px; margin: 0; }
.pal-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--sub); }

/* 設定の区分 */
.seg-wrap { flex-wrap: wrap; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.set-label { font-size: 16px; }
.login-list li { align-items: center; }
.login-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
li .kbd { margin-right: 12px; }

/* 見た目の好み */
html[data-fs="large"] .view, html[data-fs="large"] .pane-body, html[data-fs="large"] .dock { zoom: 1.15; }
html[data-density="tight"] table.t td, html[data-density="tight"] table.t th { padding-top: 6px; padding-bottom: 6px; height: auto; }
html[data-density="tight"] .view { gap: 24px; }
html[data-density="tight"] .ev-body { min-height: 36px; padding: 4px; }

/* 前の置き方：新しい物を隠し、左の帯を前の順に */
html[data-layout="old"] .side-top, html[data-layout="old"] .side-recent, html[data-layout="old"] .pane, html[data-layout="old"] .dock { display: none !important; }
html[data-layout="old"] .side-foot { display: contents; }
html[data-layout="old"] .side-brand { order: -3; }
html[data-layout="old"] .side-foot .side-biz { order: -2; margin: 0 0 16px; }
html[data-layout="old"] .side-backup { margin-top: auto; }
:root[data-role="sagyouin"] .side-top, :root[data-role="sagyouin"] .side-recent { display: none !important; }

.doc-link { color: var(--accent); font-weight: 700; text-decoration: underline; overflow-wrap: anywhere; }
.dock-note { margin: 0; font-size: 14px; color: var(--sub); }
.dock-to { min-width: 0; flex: 1 0 auto; white-space: nowrap; } /* 11/10 狭いと1文字ずつ縦に折れた＝縮めずに次の行へ回す */
.dock .hint:empty, .composer .hint:empty { display: none; }
.list-plain li { min-width: 0; } .list-plain li > .num { min-width: 0; overflow-wrap: anywhere; text-align: right; }
html { line-break: strict; }

/* 11/10 13:5x PM：375幅の崩れ3つを直す（見出しが1字ずつ折れる・入れる工事の選ぶ欄が潰れる・スマホに⌘Enterが出る） */
.mhead-titles { flex: 1 1 auto; }
.mhead-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mhead-actions { flex: none; gap: 6px; }
@media (max-width: 767px) {
  .mhead-actions .btn { padding-left: 10px; padding-right: 10px; }
  .composer-to { flex: 1 1 100%; }
  .composer-to > span { white-space: nowrap; flex: none; }
  .dock-keys { display: none; }
}
@media (hover: none) { .dock-keys { display: none; } }

/* 今日の確認（11/10）：ホームの主役。追加→承諾→請求→入金の詰まりを件数と次の一手で */
.kakunin { min-width: 0; display: flex; flex-direction: column; gap: 12px; max-width: 880px; width: 100%; margin: 0 auto 8px; }
.kk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }

.kk-row { min-width: 0; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.kk-row.kk-on { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.kk-head { display: flex; align-items: baseline; gap: 10px; }
.kk-n { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.kk-row:not(.kk-on) .kk-n { color: var(--sub); }
.kk-title { font-weight: 700; font-size: 16px; }
.kk-zero { margin: 0; color: var(--sub); font-size: 14px; }
.kk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.kk-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--seg); color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.kk-item:hover { background: var(--line); }
.kk-what { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.4; }
.kk-amt { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.home-sub { margin: 0; font-size: 18px; font-weight: 700; }
/* 今日の確認：PCは1列のやることの一覧（左に件数と題・真ん中に中身・右に次の一手） */
@media (min-width: 900px) {
  .kk-grid { gap: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .kk-row { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: center; column-gap: 16px; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
  .kk-row:first-child { border-top: 0; border-radius: 14px 14px 0 0; }
  .kk-row:last-child { border-radius: 0 0 14px 14px; }
  .kk-row > .hint, .kk-row > .sub { grid-column: 2; margin: 0; }
  .kk-row > .btn { grid-column: 3; grid-row: 1; }
  .kk-row > .kk-list, .kk-row > .kk-zero { grid-column: 2; grid-row: 1; }
}.cust-list { display: flex; flex-direction: column; gap: 6px; }
.cust-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.cust-row > .grow { flex: 1 1 auto; min-width: 0; }
.cust-row .btn { padding-left: 10px; padding-right: 10px; min-width: 44px; flex: none; }
.linklike { border: 0; background: none; padding: 0; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
#hajime-name { width: 100%; min-height: 48px; font-size: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; }

/* 設定の区分（11/10）：スマホは縦の一覧→頁、PCは左の縦の一覧 */
.set-list ul { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.set-list li + li { border-top: 1px solid var(--line); }
.set-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name go" "desc go"; align-items: center; column-gap: 12px; row-gap: 2px; width: 100%; min-height: 64px; padding: 12px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.set-item:hover { background: var(--quiet); }
.set-item-name { grid-area: name; font-size: 17px; font-weight: 700; }
.set-item-desc { grid-area: desc; font-size: 14px; color: var(--sub); }
.set-item-go { grid-area: go; font-size: 24px; color: var(--sub); }
.set-back { align-self: flex-start; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.set-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 16px; }
.set-nav .set-item { min-height: 44px; padding: 8px 12px; border-radius: 10px; grid-template-areas: "name"; grid-template-columns: 1fr; }
.set-nav .set-item-name { font-size: 15px; font-weight: 400; }
.set-nav .set-item[aria-current="page"] { background: var(--sel-bg); }
.set-nav .set-item[aria-current="page"] .set-item-name { font-weight: 700; color: var(--accent); }
.set-body { min-width: 0; }
.cust-row { flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cust-row .grow { min-width: 12em; }
.seg-big button { min-height: 48px; min-width: 72px; font-size: 16px; }
/* 当社からのお知らせ・よくある質問（11/10） */
.osh-list { margin: 0; padding: 0; }
.list-plain .osh-item, .osh-item { display: block; list-style: none; padding: 16px 0; border-bottom: 1px solid var(--line); }
.osh-item.osh-daiji .osh-title { color: var(--accent); }
.osh-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; }
.osh-kind { font-weight: 700; color: var(--accent); }
.osh-new { font-weight: 700; color: var(--ink); }
.osh-title { font-size: 18px; margin: 6px 0 4px; line-height: 1.5; }
.qa-list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa-q { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.qa-q::-webkit-details-marker { display: none; }
.qa-q::after { content: "＋"; margin-left: auto; color: var(--accent); font-weight: 700; }
.qa[open] > .qa-q::after { content: "－"; }
.qa-a { margin: 0 0 14px; font-size: 16px; line-height: 1.8; }
/* 長い説明は初回だけ（棚6） */
.hint-once { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.hint-once p { margin: 0; flex: 1 1 16em; }
.hint-close { min-height: 48px; }
/* まとめて入金の割り当て（棚11）：狭い画面でも金額が切れないよう2段 */
.matome-plan .list-plain li { flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.matome-plan .list-plain li .num { text-align: left; font-size: 18px; }
/* 写真（棚8）：手袋でも押せる大きさ・外すは写真の下 */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-sec { margin-top: 12px; }
.photo-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.photo-add { min-height: 48px; display: inline-flex; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.photo-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.photo-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.photo-del { min-height: 48px; }
/* 一覧の右の値が長いとき（取引先・協力会社の名前）は折り返す＝切らない */
.list-plain li > span:first-child { flex: 0 0 auto; max-width: 45%; }
.list-plain li > .num { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
/* 締めのまとめ（棚15） */
.shime-g { margin-top: 12px; }
.shime-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
/* 探す窓の絞り込み（棚15） */
.pal-shibori { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pal-shibori button { min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font-size: 15px; }
.pal-shibori button[aria-pressed="true"] { background: var(--ink); color: var(--bg, #fff); border-color: var(--ink); font-weight: 700; }
/* 領収書（棚17） */
.rcpt .inv-atena { margin-top: 16px; font-size: 20px; border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.rcpt .inv-amount { margin: 16px 0 8px; }
.rcpt .inv-from { margin-top: 24px; text-align: right; }
/* 追加・変更の承諾書（棚19） */
.shd .inv-atena { margin-top: 12px; font-size: 20px; }
.shd-bun { margin: 20px 0 12px; font-size: 16px; }
.shd-sign { display: grid; gap: 14px; margin: 8px 0 24px; }
.shd-sign > div { display: flex; gap: 12px; align-items: flex-end; }
.shd-line { flex: 1; min-height: 32px; border-bottom: 1px solid currentColor; padding: 0 4px 2px; }
/* うちの業種（棚0a）：1行ずつ・押すと選ぶ／外す（48px以上） */
.gy-list { display: grid; gap: 8px; margin-top: 8px; }
.gy-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.gy-item[aria-pressed="true"] { border: 2px solid var(--accent); }
.gy-name { font-size: 16px; font-weight: 700; }
.gy-item[aria-pressed="true"] .gy-name { color: var(--accent); }
.gy-rei { font-size: 14px; color: var(--sub); }
@media (min-width: 768px) { .gy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pin-code { font-family: ui-monospace, Menlo, monospace; font-size: 28px; letter-spacing: 0.15em; text-align: center; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); user-select: all; }
.ai-okuru { font-size: 14px; color: var(--sub); margin: 6px 0 0; line-height: 1.6; }
/* 11/10 社長「UIはみ出てる」（目標との差 ¥666,790 が 411px 幅で34pxはみ出た）＝狭い幅では金額の字を幅に合わせて縮め、余白も詰める */
@media (max-width: 899px) { .strip > div { padding: 14px 14px; } .strip-v { font-size: clamp(18px, 5.6vw, 24px); white-space: normal; overflow-wrap: anywhere; } }
/* 11/10 はみ出しの点検（411px）：入金の表の中のボタン（現場名＋請求番号）が1行で8pxはみ出た＝表の中のボタンは折り返す */
.t td .btn-quiet { white-space: normal; text-align: left; overflow-wrap: anywhere; height: auto; min-height: 48px; }
/* 優先100 追加工事登録（11/10）：欄ごとのエラー・保存すると変わる物・これまでの版・元に戻す */
.f-err { color: var(--diff); font-size: 14px; margin: 2px 0 0; font-weight: 700; }
[aria-invalid="true"] { border-color: var(--diff) !important; }
.eikyou .r span:first-child { flex: 1; }
.ver-box { margin-top: 8px; } .ver-box summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
.ver-row { display: flex; flex-wrap: wrap; gap: 4px 12px; } .ver-diff { width: 100%; color: var(--diff); font-size: 14px; }
.toast { position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%); z-index: 50; display: flex; gap: 12px; align-items: center; background: var(--ink); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 10px; max-width: calc(100vw - 32px); }
.toast .btn { background: var(--bg); color: var(--ink); }
.rireki-f { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; margin-bottom: 8px; }
.shd-diff { font-size: 14px; color: #444; } .shd-noru { margin: 0 0 8px; } .shd-noru summary { min-height: 48px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }

/* 11/10 公開前の幅の点検：ファイル名など長い英数字が欄からはみ出した＝入らないときだけ途中でも折り返す（入るときは変わらない） */
body { overflow-wrap: break-word; }
.tel { white-space: nowrap; } /* 11/10 スマホで電話番号が途中で折れた */

/* 11/11 UI・UX直し（uiux_kaizen_1110 U010・U015・U023） */
body.dlg-open .tabbar { visibility: hidden; }
.dlg-actions { flex-direction: column; align-items: stretch; }
.dlg-row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.dlg-row.dlg-danger { justify-content: flex-start; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dlg-ask { margin: 0; font-weight: 700; font-size: 16px; }
/* 11/11 U041：全削除は一番下の区切りの中・小さな赤い文字のボタン（押す高さは48px） */
.danger-zone { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.btn-text-danger { min-height: 48px; padding: 0 4px; border: 0; background: transparent; color: var(--late); font: inherit; font-size: 16px; text-decoration: underline; cursor: pointer; }

/* 11/11 UI・UX直し（uiux_kaizen_1110 U018〜U022・U025）見積り */
.mi-sticky { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l b" "v b"; align-items: center; gap: 0 12px; padding: 10px 16px; margin: 0 -16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0, 0, 0, .06); }
.mi-sticky-l { grid-area: l; font-size: 14px; color: var(--sub); }
.mi-sticky-v { grid-area: v; font-size: 20px; font-variant-numeric: tabular-nums; }
.mi-sticky .btn { grid-area: b; }
.lines-add { padding: 12px 16px; border-top: 1px solid var(--line-2); }
.line-flash { animation: lineflash 1.6s ease-out; }
@keyframes lineflash { 0% { background: var(--accent-soft, rgba(168, 73, 42, .18)); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .line-flash { animation: none; outline: 2px solid var(--accent); } }
.hint.keta { color: var(--late); margin: 0; min-height: 0; }
.hint.keta:empty { display: none; }
/* U025：狭い画面では品名を上の段に全幅・下の段に「数量×単価」と金額 */
@media (max-width: 767px) {
  .line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "sub amt" "zei amt"; }
  .line .line-name { grid-area: name; }
  .line .line-amt { grid-area: amt; align-self: end; }
  .line .line-sub:not(.num) { grid-area: sub; }
  .line .line-sub.num { grid-area: zei; }
}
.pane-body .mi-sticky { bottom: -16px; }

/* 11/11 UI・UX直し（uiux_kaizen_1110 U001〜U009・U044）工事の一覧・設定 */
.rolebar[hidden] { display: none !important; }
.filters .filter-q { flex: 1 1 100%; width: 100%; min-height: 48px; }
.k-name { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.k-go { color: var(--sub); font-size: 22px; font-weight: 400; }
.mhead-set { font-size: 14px; }
.set-login { margin-top: 12px; min-height: 48px; }
@media (max-width: 767px) { .table-wrap { margin-bottom: 24px; } }
/* 11/11 U011〜U014 新しい工事の窓 */
.f-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.f-pick > .btn { min-height: 48px; }
details.more { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
details.more > summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 700; }
details.more[open] { padding-bottom: 12px; }
details.more > .f { margin-top: 8px; }
.newbox-foot { justify-content: space-between; align-items: center; }
details.more > summary { list-style: none; justify-content: space-between; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: '＋'; flex: none; color: var(--accent); font-size: 20px; }
details.more[open] > summary::after { content: '－'; }
.f-pick > .f { min-width: 0; }
.f-pick .hint { grid-column: 1 / -1; }
.f-pick-hint { grid-column: 1 / -1; margin: 0; }
/* 11/11 U030 ホームの入口 */
.home-go { display: flex; flex-direction: column; gap: 8px; }
/* 11/11 U030：スマホのホームを1画面に＝0件の区分は1行の細い形・お金の2枚は横に並べる */
@media (max-width: 767px) {
  .kk-row:not(.kk-on) { padding: 8px 12px; min-height: 0; }
  .kk-row:not(.kk-on) .kk-head { gap: 8px; }
  .kk-row:not(.kk-on) .kk-n { font-size: 16px; font-family: inherit; font-weight: 700; }
  .kk-row:not(.kk-on) .kk-title { font-size: 16px; font-weight: 400; color: var(--ink-2); }
  .kk-row:not(.kk-on) .kk-zero { display: none; }
  .kk-grid { gap: 8px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpis .kpi { padding: 12px; }
  .kpis .kpi-value { font-size: 24px; }
}
.home-go .btn { flex-direction: column; white-space: normal; min-height: 56px; line-height: 1.3; }
.home-go-sub { font-size: 14px; font-weight: 400; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* 11/11 U027 請求の前に要る物 */
.need-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; }
/* 11/11 U039・U042・U043 */
.empty-go { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.touroku-add { margin: 4px 0; }
.day-nav { display: flex; align-items: center; gap: 4px; }
.day-nav .btn { min-width: 48px; min-height: 48px; font-size: 20px; padding: 0; }
.day-nav input[type="date"] { min-height: 48px; }
/* 11/11 U035：右の欄が開いている間は、真ん中の履歴の文を全幅の2行目に */
#work[data-pane="open"] .ev-body { grid-template-columns: auto minmax(0, 1fr); }
#work[data-pane="open"] .ev-text { grid-column: 1 / -1; }

/* 棚15 電波の無い現場（11/11）：圏外の間だけ出る1行 */
.kengai { padding: 10px 16px; background: var(--late-bg); color: var(--late); border-bottom: 1px solid var(--late-line); font-size: 15px; font-weight: 700; line-height: 1.5; }
/* 棚15 キーボード：表の行も Tab で止まった所が見える */
tr.click:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }

/* ログインと新規登録の頁（login.html・11/11）：縦に1列・白い枠1つ・ラベルは欄の上（実物 freee・ジョブカン） */
.auth-body { overflow: auto; background: var(--surface-2); color: var(--ink); min-height: 100dvh; }
.auth { max-width: 440px; margin: 0 auto; padding: 32px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 20px; font-weight: 700; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.auth-title { margin: 0; font-size: 22px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row { display: flex; flex-direction: column; gap: 4px; }
.auth-row input[type="email"], .auth-row input[type="password"], .auth-row input[type="text"] { width: 100%; min-height: 48px; border: 1px solid var(--sub); border-radius: 10px; background: var(--surface); padding: 8px 12px; font-size: 16px; }
.auth-row input[aria-invalid="true"] { border-color: var(--late); border-width: 2px; }
.auth-pw { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.auth-show { min-height: 48px; min-width: 64px; }
.auth-submit { min-height: 52px; font-size: 17px; font-weight: 700; width: 100%; }
.auth-err { margin: 0; color: var(--late); font-size: 16px; font-weight: 700; }
.auth-err:empty { display: none; }
.auth-forgot summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--accent); }
.auth-switch, .auth-foot { margin: 0; text-align: center; font-size: 16px; }
.auth a { color: var(--accent); }
/* 承諾リンクで相手が見る頁（shoudaku.html・11/11）：紙の承諾書と同じ並び */
.shd-page { max-width: 560px; }
.shd-from { margin: 0; font-size: 16px; color: var(--ink-2); }
.shd-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 16px; }
.shd-meta dt { color: var(--sub); }
.shd-meta dd { margin: 0; font-weight: 700; }
.shd-t { width: 100%; border-collapse: collapse; font-size: 16px; }
.shd-t th, .shd-t td { border-bottom: 1px solid var(--line); padding: 10px 4px; text-align: left; vertical-align: top; }
.shd-t .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shd-t tfoot th, .shd-t tfoot td { font-size: 18px; font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
.shd-ver { color: var(--sub); font-size: 14px; }
/* 11/11 OY-EX-00973：再承諾の行の前の版との差 */
.shd-tk { margin-top: 20px; }
.shd-tk summary { min-height: 48px; display: flex; align-items: center; font-size: 16px; cursor: pointer; }
.shd-mae { color: var(--sub); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; }
.shd-note { margin: 0; white-space: pre-wrap; font-size: 16px; }
/* 11/11 OY-EX-00938 承諾すると決まること（書類の最後・ここまで見ると「承諾する」が押せる） */
.shd-kimaru { margin: 16px 0 0; padding: 12px 14px; border: 2px solid var(--line); border-radius: 6px; }
.shd-kimaru h2 { font-size: 17px; margin: 0 0 6px; }
.shd-kimaru ul { margin: 0; padding-left: 1.2em; }
.shd-kimaru li { margin: 4px 0; font-size: 16px; line-height: 1.6; }
.shd-end { height: 1px; }
.shd-done { margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 17px; font-weight: 700; }
.auth-row textarea { width: 100%; min-height: 96px; border: 1px solid var(--sub); border-radius: 10px; background: var(--surface); padding: 8px 12px; font-size: 16px; } /* 11/11 枠の明暗差1.2→入力欄と同じ */
.auth-row textarea[aria-invalid="true"] { border-color: var(--late); border-width: 2px; }
.auth-submit + .auth-submit { margin-top: -4px; }
/* 承諾リンクの欄（11/11） */
.w-full { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 16px; background: var(--surface); }

/* 11/11 設定のメンバー（ログイン版） */
.row-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.row-inline .f { flex: 1 1 220px; }
.row-inline > .btn { margin-bottom: 2px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 1.05rem; letter-spacing: .04em; user-select: all; overflow-wrap: anywhere; }
.form-msg:empty { display: none; }
.member-list .t td:last-child { text-align: right; white-space: nowrap; }
.member-mail { overflow-wrap: anywhere; font-weight: 700; }
@media (max-width: 767px) { .member-list .t td:last-child { text-align: left; } .member-list .t td:last-child:empty { display: none; } }
/* 11/11 背の低い画面（横向きのスマホ・小さいノート）で窓のボタンが2段に折り返すと、本文が2行しか残らず件数や説明が隠れていた＝本文に最低の高さ */
.dlg-body { flex: 1 1 auto; min-height: min(34dvh, 220px); }
/* 続きがあるときだけ本文の上下に薄い影（スクロールすると消える）＝下に続きがあると分かる */
.dlg-body {
  background:
    linear-gradient(var(--surface) 30%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--surface) 70%) bottom / 100% 28px no-repeat local,
    linear-gradient(var(--line), transparent) top / 100% 10px no-repeat scroll,
    linear-gradient(transparent, var(--line)) bottom / 100% 10px no-repeat scroll;
  background-color: var(--surface);
}
.member-btns { justify-content: flex-start; }
/* 11/11 操作履歴：絞り込みの3つは狭い画面で1列に・押す所は48px */
.rireki-jouken { align-items: flex-end; }
.rireki-jouken .f { flex: 1 1 160px; }
.rireki-jouken select, .rireki-jouken input, .rireki-jouken > .btn { min-height: 48px; }


/* 11/11 OY-EX-00188 影響の事前表示（結ぶ職人を変える・外す） */
.eikyou { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; margin-top: 12px; } /* 11/12 A組 K088：左だけの太い線（AIの画面によくある形）をやめ、背景の濃淡で区切る */
.eikyou-midashi { font-weight: 700; margin: 8px 0 2px; }
.eikyou-list { margin: 0 0 4px 1.2em; padding: 0; }
.eikyou-list li { margin: 2px 0; }

/* 11/11 送った承諾リンクの一覧：状態を太く */
.okutta-links .okutta-joutai { font-weight: 700; }
/* 11/11 OY-EX-00968：請求に入る承諾の記録（版・日時・人・どこで）は内容の下の2行目に */
.calc-box .r.r-shoudaku { align-items: flex-start; }
.calc-box .r.r-shoudaku > span:first-child, #inv-tsuika li > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.r-kiroku { font-size: 14px; overflow-wrap: anywhere; }
.r-kiroku .r-k { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

/* 11/11 OY-EX-00181：役割を変える窓（いま変えている人を上に・選ぶ行は手袋でも押せる高さ） */
.ima-kaeru { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.yakuwari { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.yakuwari legend { font-weight: 700; margin-bottom: 4px; }
.yakuwari-opt { display: flex; gap: 12px; align-items: flex-start; min-height: 56px; padding: 10px 12px; border: 1px solid var(--sub); border-radius: 10px; cursor: pointer; }
.yakuwari-opt input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.yakuwari-opt > span { display: flex; flex-direction: column; gap: 2px; }
.yakuwari-opt.is-off { opacity: 1; color: var(--sub); cursor: not-allowed; }
/* 11/11 棚0c：新規作成の窓の「追加を記録」の工事の並び（手袋でも隣を押さない間） */
#shinki-tsuika { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }

/* 11/11 棚0b：つながり */
.tg-bangou { font-size: 24px; letter-spacing: 0.08em; font-weight: 700; margin: 4px 0 8px; }
.tg-row { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; }
.tg-row .dlg-row { margin-left: auto; }

/* 11/12 規約・プライバシーへの同意（登録の画面）と、各画面の下のリンク */
.auth-agree { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 8px 0; font-size: 16px; line-height: 1.6; cursor: pointer; }
.auth-agree input[type="checkbox"] { flex: none; width: 28px; height: 28px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.auth-agree input[type="checkbox"][aria-invalid="true"] { outline: 2px solid var(--late); outline-offset: 2px; }
.auth-agree a, .auth-kiyaku a { display: inline-block; min-height: 44px; line-height: 44px; }
.auth-kiyaku { margin: 0; text-align: center; font-size: 16px; }
.legal-foot { flex: none; margin: 0; display: flex; justify-content: center; gap: 4px 24px; flex-wrap: wrap; font-size: 16px; border-top: 1px solid var(--line); }
.legal-foot a { display: inline-block; min-height: 44px; line-height: 44px; }

/* 外注の発注書・請書・請求の照合（11/12 F-GAI）。手袋・片手：ボタンは大きく、字は16px以上 */
.gc-row { border-top: 1px solid var(--line); padding: 8px 0 4px; }
.gc-grp { border-top: 1px solid var(--line); }
.gc-grp > summary { font-size: 16px; font-weight: 700; padding: 12px 0; min-height: 48px; cursor: pointer; }
.gc-acts .btn { min-height: 48px; font-size: 16px; }
.gc-rowname { font-size: 16px; align-self: center; flex: 1 1 40%; }
.gc-hyou th, .gc-hyou td { font-size: 16px; }
.gc-list, .gc-rireki { margin: 0; padding-left: 20px; font-size: 16px; }
.gc-list li { margin-bottom: 12px; }
.gc-rireki li { font-size: 14px; color: var(--sub); }
.gc-kv { width: 100%; border-collapse: collapse; }
.gc-kv th { text-align: left; font-weight: 400; width: 42%; vertical-align: top; padding: 1mm 2mm; }
.gc-kv td { padding: 1mm 2mm; white-space: pre-wrap; }
td .gc-kensuu { font-size: 14px; }
.dlg-body > .table-wrap, .dlg-body > .gc-grp, .dlg-body > .sec-wrap, .dlg-body > .box { flex: none; } /* 窓の中の表が、縦に潰れて見えなくなるのを防ぐ（11/12 実機で確認） */
/* 外注の窓の中の行：金額は縦に並べ、スマホ（375px）でも横に はみ出さない */
.gc-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gc-rows li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.gc-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.gc-nums { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: 16px; margin-top: 2px; }
.gc-ng .gc-name { color: var(--late, inherit); }
.gc-name b { white-space: nowrap; }
.gc-rows + p, .gc-sa ~ p { font-size: 16px; }

/* 11/12 経費・支払（印刷の検索結果・支払のボタン） */
.kp { padding: 12mm; color: #111; font-size: 10.5pt; }
.kp h1 { font-size: 15pt; margin: 0 0 3mm; }
.kp-t { width: 100%; border-collapse: collapse; }
.kp-t th, .kp-t td { border: 1px solid #333; padding: 1.2mm 2mm; text-align: left; }
.kp-t td.num { text-align: right; }
.btn-pay { min-width: 140px; }
.seg.seg-col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.seg.seg-col button { min-height: 52px; border-radius: 12px; text-align: left; padding: 0 16px; font-size: 16px; }
.f-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* ---------- 11/12 ご契約：お試し期間の帯・申し込みの窓（keiyaku_gamen.js）。文字16px以上・ボタン48px以上 ---------- */
.ky-obi { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: var(--surface-2); color: var(--sub); border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.5; }
.ky-obi-me { padding: 12px 16px; background: var(--late-bg); color: var(--late); border-bottom-color: var(--late-line); font-weight: 700; }
.ky-obi-bun { flex: 1 1 220px; min-width: 0; }
.ky-btn { min-height: 48px; font-size: 16px; }
.ky-mado { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 20px 16px; }
.ky-mado-title { margin: 0 0 12px; font-size: 20px; line-height: 1.4; }
.ky-bun { font-size: 16px; line-height: 1.7; margin: 0 0 12px; }
.ky-kakunin { margin: 0 0 12px; padding-left: 1.2em; font-size: 16px; line-height: 1.7; }
.ky-kakunin li { margin-bottom: 6px; }
.ky-hint { font-size: 16px; color: var(--sub); margin: 0 0 12px; }
.ky-mado-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-top: 8px; }
@media (min-width: 768px) { .ky-obi { padding-left: 48px; padding-right: 48px; } }

/* ===== 11/12 使いやすさ（初めての親方として全部の流れを通した直し・tsukau_hito_check.md の 1〜3）===== */
/* 入力欄の枠：薄いベージュ（明暗差 1.2）で日差しの中では欄が見えなかった＝枠だけ 3 以上の濃さに */
:root { --field-line: #8A877F; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --field-line: #85827B; } }
:root[data-theme="dark"] { --field-line: #85827B; }
select, textarea, input[type="text"], input[type="date"], input[type="search"], input[type="number"], input[type="email"], input[type="password"], input[type="tel"], input[type="time"], input[type="month"] { border-color: var(--field-line); }
input[type="email"], input[type="password"], input[type="tel"] { border-width: 1px; border-style: solid; border-radius: 10px; background: var(--surface); padding: 8px 10px; font-size: 16px; max-width: 100%; }
@media (max-width: 767px) {
  /* 1 手袋の指：押す所は高さ48px以上（基本の44pxを上げる） */
  .btn, .linklike, .crumb button, .chip, .btn-pick, .seg button, .theme-sw button, .set-back, .set-nav .set-item, .kk-item, .pal-item,
  .side-menu button, .side-find, .side-recent button, .field-inline, .cust-row, .f-check, .hint-close, .pal-shibori button,
  .legal-foot a, .auth-agree a, .auth-kiyaku a, .auth-foot a { min-height: 48px; }
  .legal-foot a, .auth-agree a, .auth-kiyaku a { line-height: 48px; }
  select, input[type="text"], input[type="date"], input[type="search"], input[type="number"], input[type="email"], input[type="password"], input[type="tel"], input[type="time"], input[type="month"], .filters input, .filters select { min-height: 48px; }
  .btn-sq { min-width: 48px; }
  .nav2 button { width: 48px; height: 48px; }
  input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; }
  /* 3 日差し：読む字は16px以上（14・15pxの説明・小見出し・表の見出し・下のタブの名前） */
  .sub, .mhead-biz, .tabbar button, .page-date, .placeholder, .kpi-label, .kpi-delta, .kpi-sub, .seg button, .legend, .stage-name, .stage-amt,
  .tag-st, .strip-k, .facts, .site-area, .d-legend li, .dec-k, .dec-d, table.t th, table.t td .cell-sub, table.t.stack td[data-label]::before,
  .pct, .band-cap, .tag, .crumb, .crumb button, .line-sub, .list-plain .when, .st-word, .tag-draft, .ev-when, .ev-tag, .dock-to, .dock .hint,
  .dock-note, .pal-sub, .pal-more, .pal-none, .kk-zero, .kk-item, .set-item-desc, .set-nav .set-item-name, .side-group, .side-backup, .side-empty,
  .side-biz-tag, .kengai, .gc-rireki li, td .gc-kensuu, .pal-shibori button { font-size: 16px; }
  .tabbar button { gap: 0; }
  /* 工事の中：下の入力欄（メモ・話して下書き）が画面の6割を取り、工事の中身が2行しか見えなかった。
     欄は1段に縮め、送り先の説明は欄を押して書いている間だけ出す */
  .dock { padding: 8px 12px; gap: 6px; }
  .dock textarea { min-height: 48px; height: 48px; }
  .dock:focus-within textarea { height: auto; min-height: 88px; }
  .dock .dock-note, .dock .dock-to { display: none; }
  .dock:focus-within .dock-note.ai-okuru { display: block; }
  .dock-row { flex-wrap: nowrap; }
  .dock-row .btn { flex: 1 1 0; }
}
/* 11/12 使いやすさ（続き）：スマホでは「右に」「Esc」は意味が無い。法律の頁へのリンクは毎画面で約100pxを取っていた＝ホームと設定（とログインの頁）にだけ出す */
@media (max-width: 767px) {
  .doc-btns-label, .key-hint { display: none; }
  :root[data-route]:not([data-route="dash"]):not([data-route="settei"]) .legal-foot { display: none; }
}
@media (hover: none) { .key-hint { display: none; } }
/* 11/12 使いやすさ：工事の中（下にメモの欄がある画面）では「AIに頼む」の丸いボタンが欄の「話して下書き」に重なっていた＝欄の上へ逃がす */
@media (max-width: 767px) { body:has(#dock:not([hidden])) .tn-fab { bottom: 200px; } }
@media (max-width: 767px) { body:has(#pane:not([hidden])) .tn-fab { bottom: 96px; } }
/* 11/12 使いやすさ：工事の「次は」（次の一手を1つだけ） */
.tsugi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 16px; }
.tsugi-l { font-weight: 700; color: var(--accent); flex: none; }
.tsugi-t { flex: 1 1 12em; min-width: 0; }
.tsugi .btn { flex: none; min-height: 48px; }
/* 11/12 使いやすさ：ログインの頁の「新規登録」「ログイン」の切り替えが字の高さ（16px）しか無く、手袋で押せなかった／スマホに ⌘K を出さない */
.auth-card a[href="#shinki"], .auth-card a[href="#login"] { display: inline-block; min-height: 48px; line-height: 48px; padding: 0 8px; font-weight: 700; }
@media (hover: none), (max-width: 767px) { .side-find kbd { display: none; } }
@media (max-width: 767px) { .mi-sticky-l { font-size: 16px; } }
/* 11/12 使いやすさ：＋の窓のボタンの下の小さな説明（どの工事か）。長い工事名でも枠からはみ出さない */
.btn-wide:has(.btn-sub) { flex-direction: column; white-space: normal; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; }
.btn-sub { font-weight: 400; font-size: 16px; overflow-wrap: anywhere; }
/* スマホのホーム：「AIに頼む」の丸ボタンが法律の頁のリンクに重なっていた＝リンクを左に寄せる */
@media (max-width: 767px) { .legal-foot { justify-content: flex-start; padding: 0 16px; gap: 0 20px; } }

/* ===== 11/12 A組の評価（使いやすさ・画面・アクセシビリティ）で見つけた所の直し ===== */
/* K048 押す所48px：パンくずの「工事」（幅32px）・割り当ての帯（高さ44px）・問い合わせのメール（高さ26px） */
.crumb button { min-width: 48px; }
.b-track { height: 56px; }
.doc-link { display: inline-flex; align-items: center; min-height: 48px; }
/* K053 押し所の縁の明暗差が1.3〜1.8（3未満）だった＝線のボタンは入力欄と同じ濃さの枠 */
.btn-line { border-color: var(--field-line, #8A877F); }
/* K079・K080 PCで書類パネルを開くと「AIに頼む」が「＋ 行を追加」に重なっていた（1280px で実測）＝パネルの間は隠す（閉じれば出る） */
@media (min-width: 768px) { body:has(#pane:not([hidden])) .tn-fab { visibility: hidden; } }
/* K079 スマホのホーム・設定で「AIに頼む」（右下・幅約150px）がプライバシーポリシーのリンクに約30px重なっていた（390pxで実測）＝リンクの並びを右のボタンの手前で折り返す */
@media (max-width: 767px) { .legal-foot { padding-right: 172px; } }
/* K015 工事の流れ（見積り・受注・請求・入金）の今の段：字（済み・今・まだ）と形で見せる */
/* 押せる物に見えないよう枠は付けない（押しても動かない物をボタンの形にしない）・段の間は「›」 */
.k-dan { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 0; font-size: 16px; }
.k-dan li { display: inline-flex; align-items: baseline; gap: 4px; }
.k-dan li + li::before { content: '›'; color: var(--sub); margin: 0 8px; }
.k-dan-j { font-weight: 700; }
.k-dan li.k-dan-ima .k-dan-name, .k-dan li.k-dan-ima .k-dan-j { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.k-dan li.k-dan-mada { color: var(--sub); }
.k-dan li.k-dan-mada .k-dan-j { font-weight: 400; }
/* K021 書類パネルの「閉じる」はPCでも48px（PCの基本のボタンは44px） */
#pane-close { min-height: 48px; min-width: 48px; }
/* K083 請求書・見積書の下の段：「.inv table { width:100% }」が合計の表（.inv-sum の 320px）に勝ち、左の注記（端数・出来高）が1字幅の縦書きになっていた（1280pxの画面で実測・印刷も同じCSS）＝合計の表の幅を戻す */
.inv .inv-sum { width: 320px; flex: none; }
/* K061 横向きのスマホ（844×390）やPCの狭い幅で、右下の「AIに頼む」が「特定商取引法に基づく表記」に重なっていた＝リンクの並びを右のボタンの手前までにする */
@media (min-width: 768px) { .legal-foot { padding-right: 184px; } }
/* KA+003 ログインの頁：「パスワードをお忘れの方」（44px）・「ログインせずに試用版を使う」（2段で42px）を48pxに */
.auth-forgot summary { min-height: 48px; }
.auth-foot a { display: inline-flex; align-items: center; min-height: 48px; }
/* KA+008 「AIに頼む」の窓の「AIに送る物について」（開く所）が高さ32px＝手袋で押しにくい（390pxで実測）。ai_tanomu.css は会話の担当の物なので、ここで上書きする */
dialog.tanomu details.tn-note > summary { min-height: 48px; display: flex; align-items: center; }
/* K012 スマホの「その他」（左のメニュー）に、下のタブと同じ行き先（ホーム・工事・入金＝お金・新しい工事＝新規作成）が重なって並んでいた＝スマホでは下のタブに任せて隠す。作業員の形は下のタブを使わないので隠さない */
@media (max-width: 767px) {
  :root:not([data-role="sagyouin"]) .side-menu button[data-menu="dash"],
  :root:not([data-role="sagyouin"]) .side-menu button[data-menu="kouji"],
  :root:not([data-role="sagyouin"]) .side-menu button[data-menu="nyuukin"],
  :root:not([data-role="sagyouin"]) #side-new,
  :root:not([data-role="sagyouin"]):not([data-layout="old"]) #side-find { display: none; } /* 検索は画面の上の右の「検索」と同じ */
}
