/* シリーズ共通の左カラム・共通一覧（顧客台帳 / 案件一覧 / 顧客の概要）・ローカル操作タブの見た目。3 製品で同じファイルを読む。
   値は px で固定し、フォントも明示する（ホスト側のフォント・文字サイズ・box-sizing の違いで行の高さや余白が変わらないように）。
   色・行の形は既存 CRM の左ナビ・一覧（.nav-link / .list-row / .small-badge / .empty / .note）の値に合わせた。外部フォント・画像なし。
   FIX-14: 共通一覧の文字・部品の大きさを会社情報・顧客チャートと同じ値に揃えた（ページ見出し 20px / 欄の見出し 18px / 本文・入力 16px /
   ラベル・ボタン 14px / 日付・件数などの補足 13px。操作は高さ 44px・角丸 10px。余白は 8 / 16 / 24px）。 */

.tsn-side,
.tsn-list,
.tsn-local,
.tsn-bar,
.tsn-dialog {
  --tsn-ink: #202a25;
  --tsn-muted: #68746e;
  --tsn-line: #e5e9e6;
  --tsn-green: #167451;
  --tsn-green-dark: #0e5e41;
  --tsn-pale: #e9f3ed;
  --tsn-hover: #eef2ef;
  --tsn-red: #8c2f2a;
  --tsn-red-pale: #fbeeed;
  --tsn-amber-pale: #fff5df;
  --tsn-font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  font-family: var(--tsn-font);
  color: var(--tsn-ink);
  -webkit-text-size-adjust: 100%;
}
.tsn-side *,
.tsn-list *,
.tsn-local *,
.tsn-bar *,
.tsn-dialog * { box-sizing: border-box; }

/* ---------------------------------------------------------------- 左カラム */
.tsn-side {
  min-width: 0;
  padding: 12px 8px;
  background: #fff;
  border-right: 1px solid var(--tsn-line);
  font-size: 14px;
  line-height: 1.4;
}
.tsn-side[hidden] { display: none !important; }
.tsn-side { box-sizing: border-box; }
/* 左カラムの高さいっぱいに伸ばし、「使い方」を下端に置く（高さの決まった左カラムのとき。ドロワーなど高さが自動のときは項目の後ろ） */
.tsn-side > .tsn-nav-host { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 100%; }
.tsn-side > .tsn-nav,
.tsn-nav-host > .tsn-nav { flex: 1 0 auto; min-height: 100%; }
.tsn-nav { display: flex; flex-direction: column; margin: 0; padding: 0; }
.tsn-nav-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tsn-nav-item { margin: 0; padding: 0; }
.tsn-nav-item[hidden] { display: none; }
.tsn-nav-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #536159;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.tsn-nav-link:hover { background: var(--tsn-hover); color: #244b36; text-decoration: none; }
.tsn-nav-link:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-nav-link[aria-current="page"] { background: var(--tsn-pale); border-color: #cfe5d8; color: #175f40; font-weight: 700; }
.tsn-nav-link[aria-disabled="true"] { opacity: 0.6; pointer-events: none; }
.tsn-nav-sep { height: 1px; margin: 10px 4px; background: var(--tsn-line); }
.tsn-nav-case { display: flex; flex-direction: column; gap: 1px; margin: 0 4px 6px; padding: 0 8px; font-size: 12px; line-height: 1.4; color: var(--tsn-muted); }
.tsn-nav-case[hidden] { display: none; }
.tsn-nav-case-name { color: var(--tsn-ink); font-weight: 650; overflow-wrap: anywhere; }
.tsn-nav-error { margin: 8px 0 0; padding: 8px 10px; border: 1px solid #e6c1be; border-radius: 10px; background: var(--tsn-red-pale); color: var(--tsn-red); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.tsn-nav-error[hidden] { display: none; }
@media (pointer: coarse) {
  .tsn-nav-link { min-height: 44px; }
}
/* 下端の「使い方」。項目が多く左カラムがスクロールしても下端に見える（sticky） */
.tsn-nav-foot { position: sticky; bottom: 0; margin: auto 0 0; padding: 10px 0 0; background: #fff; }
.tsn-nav-foot::before { content: ""; display: block; height: 1px; margin: 0 4px 8px; background: var(--tsn-line); }
.tsn-help-open {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #536159;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.tsn-help-open:hover { background: var(--tsn-hover); color: #244b36; }
.tsn-help-open:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-help-open svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .tsn-help-open { min-height: 44px; } }

/* ---------------------------------------------------------------- 使い方（読み取り専用の案内。modal の dialog。見た目は共通一覧の .tsn-list の文字・ボタンを使う） */
.tsn-help.tsn-list {
  --tsn-ink: #202a25;
  --tsn-muted: #68746e;
  --tsn-line: #e5e9e6;
  --tsn-green: #167451;
  --tsn-pale: #e9f3ed;
  --tsn-hover: #eef2ef;
  --tsn-font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  z-index: 1000; /* top layer に乗らない環境（fallback）だけ効く */
  width: min(680px, calc(100vw - 24px));
  max-width: none;
  height: fit-content; /* inset: 0 でも全高に伸ばさず、margin: auto で中央に置く */
  min-height: min(480px, calc(100vh - 24px)); /* 手順ごとに高さが変わってボタンの位置が動かないように */
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--tsn-line);
  border-radius: 16px;
  background: #fff;
  color: var(--tsn-ink);
  box-shadow: 0 12px 40px rgba(22, 40, 30, 0.22);
  font-family: var(--tsn-font);
  font-size: 14px;
  line-height: 1.6;
  text-align: left;
}
.tsn-help.tsn-list[open] { display: flex; flex-direction: column; }
.tsn-help.tsn-list:not([open]) { display: none !important; }
.tsn-help.tsn-list * { box-sizing: border-box; }
.tsn-help.tsn-list [hidden] { display: none !important; }
.tsn-help::backdrop { background: #18241f66; }
.tsn-help-backdrop { position: fixed; inset: 0; z-index: 999; background: #18241f66; }
.tsn-help.tsn-list .tsn-help-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 18px 10px; border-bottom: 1px solid var(--tsn-line); }
.tsn-help.tsn-list .tsn-help-titles { min-width: 0; }
.tsn-help.tsn-list .tsn-help-title { margin: 0; padding: 0; font-family: var(--tsn-font); font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--tsn-ink); border: 0; }
.tsn-help.tsn-list .tsn-help-title:focus { outline: none; }
.tsn-help.tsn-list .tsn-help-title:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 2px; border-radius: 4px; }
.tsn-help.tsn-list .tsn-help-sub { margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--tsn-muted); overflow-wrap: anywhere; }
.tsn-help.tsn-list .tsn-btn { margin: 0; min-height: 36px; padding: 6px 12px; }
.tsn-help.tsn-list .tsn-btn:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-help.tsn-list .tsn-help-close { flex: none; }
.tsn-help.tsn-list .tsn-help-primary { background: #167451; border-color: #167451; color: #fff; }
.tsn-help.tsn-list .tsn-help-primary:hover:not(:disabled) { background: #0e5e41; border-color: #0e5e41; }
/* 案内の選択・タブ（共通のローカル操作 .tsn-local と同じ形） */
.tsn-help.tsn-list .tsn-help-seg { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 18px 0; padding: 4px; border: 1px solid var(--tsn-line); border-radius: 12px; background: #fff; }
.tsn-help.tsn-list .tsn-help-tabs { margin-bottom: 10px; }
.tsn-help.tsn-list .tsn-help-seg .tsn-help-seg-btn { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 9px; background: transparent; color: #536159; font-weight: 600; }
.tsn-help.tsn-list .tsn-help-seg .tsn-help-seg-btn:hover { background: var(--tsn-hover); color: #244b36; }
.tsn-help.tsn-list .tsn-help-seg .tsn-help-seg-btn[aria-pressed="true"] { background: var(--tsn-pale); color: #175f40; font-weight: 700; }
.tsn-help.tsn-list .tsn-help-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; margin: 0; padding: 4px 18px 16px; border-top: 1px solid var(--tsn-line); }
.tsn-help.tsn-list .tsn-help-body:focus { outline: none; }
.tsn-help.tsn-list .tsn-help-body:focus-visible { outline: 3px solid #b4d8c8; outline-offset: -3px; }
.tsn-help.tsn-list .tsn-help-intro { margin: 12px 0 4px; font-size: 14px; color: var(--tsn-ink); }
.tsn-help.tsn-list .tsn-help-note { margin: 12px 0 4px; padding: 9px 12px; border-radius: 10px; background: #f5f7f6; color: #4f5d56; font-size: 13px; }
.tsn-help.tsn-list .tsn-help-h { margin: 14px 0 4px; padding: 0; border: 0; font-family: var(--tsn-font); font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--tsn-ink); }
.tsn-help.tsn-list .tsn-help-list { margin: 0; padding: 0 0 0 1.2em; list-style: disc; }
.tsn-help.tsn-list .tsn-help-list li { margin: 3px 0; padding: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.tsn-help.tsn-list .tsn-help-count { margin: 12px 0 0; font-size: 12px; font-weight: 700; color: var(--tsn-green); }
.tsn-help.tsn-list .tsn-help-step { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; margin: 8px 0 0; padding: 12px 14px; border: 1px solid var(--tsn-line); border-radius: 12px; }
.tsn-help.tsn-list .tsn-help-step dt { margin: 0; color: var(--tsn-muted); font-size: 13px; font-weight: 700; }
.tsn-help.tsn-list .tsn-help-step dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.tsn-help.tsn-list .tsn-help-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 18px 14px; border-top: 1px solid var(--tsn-line); }
@media (pointer: coarse) {
  .tsn-help.tsn-list .tsn-btn,
  .tsn-help.tsn-list .tsn-help-seg .tsn-help-seg-btn { min-height: 44px; }
}
@media (max-width: 560px) {
  .tsn-help.tsn-list { width: calc(100vw - 16px); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .tsn-help.tsn-list .tsn-help-head { padding: 12px 12px 8px; }
  .tsn-help.tsn-list .tsn-help-seg { margin: 8px 12px 0; }
  .tsn-help.tsn-list .tsn-help-tabs { margin-bottom: 8px; }
  .tsn-help.tsn-list .tsn-help-body { padding: 2px 12px 14px; }
  .tsn-help.tsn-list .tsn-help-foot { padding: 8px 12px 12px; }
  .tsn-help.tsn-list .tsn-help-step { grid-template-columns: 1fr; gap: 2px; }
  .tsn-help.tsn-list .tsn-help-step dd + dt { margin-top: 8px; }
}

/* 幅ハンドル */
.tsn-resizer { position: relative; min-width: 0; width: 10px; cursor: col-resize; touch-action: none; outline-offset: -3px; }
.tsn-resizer[hidden] { display: none !important; }
.tsn-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 32px;
  margin: -16px 0 0 -2px;
  border-radius: 2px;
  background: #c3ccc6;
}
.tsn-resizer:hover::after,
.tsn-resizer:focus-visible::after,
.tsn-resizer.dragging::after { background: var(--tsn-green, #167451); }
.tsn-resizer:focus-visible { outline: 3px solid #167451; }
body.tsn-resizing, body.tsn-resizing * { user-select: none !important; cursor: col-resize; }

/* 開閉ボタン（ChatGPT 風）と、それを置くバー（現調・工程。CRM は既存の上部バーに同じボタンを置く） */
.tsn-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid #ccd4db;
  border-radius: 10px;
  background: #fff;
  color: #26323b;
  cursor: pointer;
}
.tsn-toggle:hover { border-color: #606d78; }
.tsn-toggle:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-toggle[aria-expanded="false"] { background: var(--tsn-pale, #e9f3ed); color: #175f40; border-color: #167451; }
.tsn-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tsn-bar { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--tsn-line); }
.tsn-bar-title { font-size: 14px; font-weight: 700; color: var(--tsn-muted); white-space: nowrap; }
@media (pointer: coarse) {
  .tsn-toggle { width: 44px; height: 44px; }
  .tsn-bar { height: 52px; }
}

/* ドロワー（現調・工程。ホストが data-tsn-drawer="open" を付ける。CRM は既存の Drawer を使う） */
.tsn-backdrop { position: fixed; inset: 0; z-index: 60; background: #18241f66; }
.tsn-backdrop[hidden] { display: none; }

/* ---------------------------------------------------------------- 作業エリアのローカル操作（製品固有の画面切替） */
.tsn-local {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 0 0 10px;
  padding: 4px;
  border: 1px solid var(--tsn-line);
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 1.4;
}
.tsn-local a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin: 0;
  padding: 6px 12px;
  border-radius: 9px;
  color: #536159;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.tsn-local a:hover { background: var(--tsn-hover); color: #244b36; }
.tsn-local a:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-local a[aria-current="page"] { background: var(--tsn-pale); color: #175f40; font-weight: 700; }
@media (pointer: coarse) { .tsn-local a { min-height: 44px; } }

/* ---------------------------------------------------------------- 共通一覧のページ（3 製品で同じ面・位置）
   右の作業エリアの先頭（共通の開閉バー 40px）の直下から、薄灰の面に白いカード（見出し | 検索・一覧）を同じ余白・同じ最大幅で置く。
   各製品の全体 CSS（button / input / nav / a / h1 など）に負けないよう、中の規則は .tsn-list.tsn-list で詳細度を上げる。 */
.tsn-page {
  box-sizing: border-box;
  min-width: 0;
  min-height: calc(100dvh - 40px);
  margin: 0;
  padding: 24px 24px 32px;
  background: #f5f7f6;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}
.tsn-page > .tsn-list-host,
.tsn-page > .tsn-host-view { max-width: 980px; margin: 0; padding: 0; }
.tsn-page-status { max-width: 980px; margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: #8c2f2a; }
.tsn-page-status:empty { display: none; }

/* ---------------------------------------------------------------- 共通一覧（顧客台帳・案件一覧・顧客の概要） */
.tsn-list.tsn-list { font-size: 14px; line-height: 1.5; text-align: left; }
.tsn-list.tsn-view {
  box-sizing: border-box;
  max-width: 980px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--tsn-line);
  border-radius: 16px;
  box-shadow: 0 2px 9px rgba(22, 40, 30, 0.055);
}
.tsn-list.tsn-list .tsn-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 64px;
  margin: 0;
  padding: 8px 24px;
  border-bottom: 1px solid var(--tsn-line);
  background: #fff;
}
.tsn-list.tsn-list .tsn-view-title { margin: 0; padding: 0; font-family: var(--tsn-font); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.015em; color: var(--tsn-ink); overflow-wrap: anywhere; }
.tsn-list.tsn-view > .tsn-view-body { padding: 24px; }
/* 見出しの右の操作は右寄せ。入らないときは次の行へ折り返し、そこでも右寄せ（縮めない） */
.tsn-list.tsn-list .tsn-view-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.tsn-list.tsn-list .tsn-view-actions:empty { display: none; }
.tsn-list.tsn-list .tsn-view-actions > * { margin: 0; }
.tsn-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tsn-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.tsn-list.tsn-list .tsn-input,
.tsn-list.tsn-list .tsn-select {
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #cfd8d2;
  /* 現調の全体 CSS が input / select の角丸を !important で 5px にするため、共通一覧の検索欄・絞込だけ 10px に固定（.tsn-list 内の .tsn-input / .tsn-select 以外へは効かない） */
  border-radius: 10px !important;
  background: #fff;
  color: var(--tsn-ink);
  font-family: var(--tsn-font);
  font-size: 16px;
  line-height: 1.4;
  box-shadow: none;
  appearance: auto;
}
.tsn-list.tsn-list .tsn-input { flex: 1; min-width: 200px; width: auto; height: 44px; }
.tsn-list.tsn-list .tsn-select { width: auto; height: 44px; }
.tsn-list.tsn-list .tsn-input:focus-visible,
.tsn-list.tsn-list .tsn-select:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; border-color: var(--tsn-green); }
.tsn-list.tsn-list .tsn-check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.tsn-list.tsn-list .tsn-check input { width: 20px; height: 20px; margin: 0; padding: 0; flex: none; accent-color: var(--tsn-green); }
.tsn-list.tsn-list .tsn-check label { display: inline-flex; align-items: center; min-height: 44px; margin: 0; font-size: 14px; font-weight: 400; color: var(--tsn-ink); }
.tsn-list.tsn-list .tsn-rows { margin: 0; padding: 0; list-style: none; }
.tsn-list.tsn-list .tsn-rows > li { margin: 0; padding: 0; list-style: none; border: 0; background: transparent; }
.tsn-list.tsn-list .tsn-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 2px;
  border-top: 1px solid var(--tsn-line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.tsn-list.tsn-list .tsn-rows > li:first-child > .tsn-row { border-top: 0; }
.tsn-list.tsn-list .tsn-row:hover { background: #f7f9f7; text-decoration: none; }
.tsn-list.tsn-list .tsn-row:focus-visible { outline: 3px solid #b4d8c8; outline-offset: -3px; }
.tsn-list.tsn-list .tsn-row-text { min-width: 0; }
.tsn-list.tsn-list .tsn-row-title { display: block; margin: 0; font-size: 16px; font-weight: 650; line-height: 1.45; color: var(--tsn-ink); overflow-wrap: anywhere; }
.tsn-list.tsn-list .tsn-row-meta { display: block; margin: 2px 0 0; font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--tsn-muted); overflow-wrap: anywhere; }
.tsn-list.tsn-list .tsn-badge { display: inline-flex; align-items: center; margin: 0; padding: 3px 9px; border: 0; border-radius: 999px; background: #eef2ef; color: #4f6256; font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
/* FIELD-START: 既存の案件へ紐付けた現調記録の印(段階のバッジの横。現調の淡い緑。単品・セット版で同じ) */
.tsn-list.tsn-list .tsn-row-badges { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; }
.tsn-list.tsn-list .tsn-badge.tsn-badge-field { background: #e9f3ed; color: #175f40; }
.tsn-list.tsn-list .tsn-muted { margin: 8px 0; color: var(--tsn-muted); font-size: 13px; }
.tsn-list.tsn-list .tsn-fine { margin: 4px 0; color: var(--tsn-muted); font-size: 13px; }
.tsn-list.tsn-list .tsn-empty { margin: 8px 0; padding: 24px 16px; border: 1px dashed #d6ded8; border-radius: 10px; color: var(--tsn-muted); font-size: 14px; text-align: center; }
.tsn-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: var(--tsn-amber-pale, #fff5df); color: #5d4310; font-size: 14px; }
.tsn-note[hidden] { display: none; }
.tsn-note.tsn-error { background: var(--tsn-red-pale, #fbeeed); color: var(--tsn-red, #8c2f2a); }
.tsn-list.tsn-list .tsn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 4px 0 0;
  padding: 8px 14px;
  border: 1px solid #d3dfd8;
  border-radius: 10px;
  background: #fff;
  color: #244d3a;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.tsn-list.tsn-list .tsn-btn:hover:not(:disabled) { background: #f2f8f4; border-color: #a9c8b6; }
.tsn-list.tsn-list .tsn-btn:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-list.tsn-list .tsn-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.tsn-list.tsn-list .tsn-more { margin-top: 8px; }
.tsn-list.tsn-list .tsn-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 13px; color: var(--tsn-muted); }
.tsn-list.tsn-list .tsn-crumb a { color: var(--tsn-green-dark); }
/* 顧客の概要: 項目名はラベル（14px）、値は本文（16px） */
.tsn-list.tsn-list .tsn-summary { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 16px; margin: 0 0 16px; font-size: 16px; }
.tsn-list.tsn-list .tsn-summary dt { margin: 0; color: var(--tsn-muted); font-size: 14px; }
.tsn-list.tsn-list .tsn-summary dd { margin: 0; overflow-wrap: anywhere; }
.tsn-list.tsn-list .tsn-section-title { margin: 24px 0 8px; font-size: 18px; font-weight: 700; line-height: 1.4; }
@media (max-width: 560px) {
  .tsn-list.tsn-list .tsn-row { grid-template-columns: 1fr; }
  .tsn-list.tsn-list .tsn-summary { grid-template-columns: 96px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .tsn-page { padding: 8px 8px 24px; }
  .tsn-list.tsn-view > .tsn-view-body { padding: 16px; }
  .tsn-list.tsn-list .tsn-view-head { padding: 8px 16px; }
}
/* 行の右に置く「作業を開く」リンク（セットの共通一覧: 顧客・対応 / 現調・見積 / 工程・施工 へ同じ案件で直接入る） */
.tsn-list.tsn-list .tsn-row-split { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--tsn-line); }
.tsn-list.tsn-list .tsn-rows > li.tsn-row-split:first-child { border-top: 0; }
.tsn-list.tsn-list .tsn-row-split > .tsn-row { border-top: 0; }
.tsn-list.tsn-list .tsn-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.tsn-list.tsn-list .tsn-row-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #d3dfd8;
  border-radius: 10px;
  background: #fff;
  color: #244d3a;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.tsn-list.tsn-list .tsn-row-action:hover { background: #f2f8f4; border-color: #a9c8b6; }
.tsn-list.tsn-list .tsn-row-action:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
@media (max-width: 560px) {
  .tsn-list.tsn-list .tsn-row-split { grid-template-columns: 1fr; padding-bottom: 10px; }
  .tsn-list.tsn-list .tsn-row-actions { justify-content: flex-start; }
}
/* 共通一覧のカード右上に置く製品固有の操作（新しい案件など）。各製品のボタン部品でも高さ・文字・アイコンは揃える */
.tsn-list.tsn-list .tsn-view-actions :is(button, a) { min-height: 44px; font-size: 14px; }
.tsn-list.tsn-list .tsn-view-actions :is(button, a) svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- FIX-14: 一覧の部品のうち series-lists.mjs が直接 style を付けているもの
   （アイコンのボタン 32px・角丸 6px、案件名の入力の角丸 4px、検索欄のアイコン位置、絞り込みの行・ページ送りの間隔）。
   インラインの値に勝つため、共通一覧（.tsn-list）の中の該当クラスだけ !important。動き（押す・並べ替え・保持色）は変えない。 */
.tsn-list.tsn-list .tsn-icon-btn {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
  flex: none;
}
.tsn-list.tsn-list .tsn-icon-btn svg { width: 20px; height: 20px; }
.tsn-list.tsn-list .tsn-icon-btn:hover:not(:disabled) { background: var(--tsn-hover) !important; color: #1e4b36; }
.tsn-list.tsn-list .tsn-icon-btn:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-list.tsn-list .tsn-icon-btn:disabled { opacity: 0.45; cursor: not-allowed !important; }
.tsn-list.tsn-list .tsn-search-row { gap: 8px 16px !important; }
.tsn-list.tsn-list .tsn-search-icon { left: 12px !important; }
.tsn-list.tsn-list .tsn-search-icon svg { width: 20px; height: 20px; }
.tsn-list.tsn-list .tsn-search .tsn-input { padding-left: 42px !important; }
/* 案件名（その場で直す入力）: 本文と同じ 16px。枠は既存どおりフォーカスしたときだけ見える */
.tsn-list.tsn-list .tsn-row-main { font-size: 16px; }
.tsn-list.tsn-list .tsn-title-input {
  box-sizing: border-box;
  min-height: 44px;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  color: var(--tsn-ink);
}
.tsn-list.tsn-list .tsn-title-input:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
/* ページ送り（20 件ずつ）: 件数は補足の 13px、今のページは薄緑（タブ・左カラムの選択と同じ） */
.tsn-list.tsn-list .tsn-pager { gap: 8px !important; }
.tsn-list.tsn-list .tsn-pager-count { font-size: 13px; color: var(--tsn-muted); }
.tsn-list.tsn-list .tsn-pager-btn { min-width: 44px; margin: 0; padding: 8px 12px; }
.tsn-list.tsn-list .tsn-pager-btn[aria-current="page"] { background: var(--tsn-pale); border-color: #cfe5d8; color: #175f40; cursor: default; }
.tsn-list.tsn-list .tsn-pager-gap { color: var(--tsn-muted); font-size: 14px; }

/* ---------------------------------------------------------------- FIX16: 顧客台帳・案件一覧の行 = 同じカード、案件のドラッグの差し込み線
   カード（.tsn-card、顧客・案件で同じ）: 白・枠 1px・角丸 12px・余白 8px 12px・間隔 12px。保留（淡橙 + 橙の左線）と完了（灰）の背景は
   series-lists.mjs の rowStyle のインラインのまま白より優先。完了の薄さは中身だけ（差し込み線は薄くしない）。
   差し込み線: 現調・見積の明細行の .drop-before（editor-fixes.css: box-shadow: inset 0 4px 0 var(--primary)）と同じ太さ 4px・主色を
   --tsn-drop-size / --tsn-drop-color に置き、カードの間（間隔の真ん中）に出す。series-row-drag.mjs が付ける .tsn-drop-before /
   .tsn-drop-after = 落とした後に入る位置。線は pointer-events: none（dragleave を起こさない）。 */
.tsn-list.tsn-list {
  --tsn-card-gap: 12px;
  --tsn-card-line: #d6ded8;
  --tsn-drop-size: 4px;
  --tsn-drop-color: var(--tsn-green);
}
.tsn-list.tsn-list .tsn-rows.tsn-card-list { display: flex; flex-direction: column; gap: var(--tsn-card-gap); }
/* .tsn-rows > li.tsn-row-split:first-child（上の枠を消す）と同じ詳細度で後に置き、先頭のカードにも 4 辺の枠を出す */
.tsn-list.tsn-list .tsn-rows.tsn-card-list > li.tsn-card {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--tsn-card-line);
  border-radius: 12px;
  background: #fff;
}
.tsn-list.tsn-list .tsn-rows.tsn-card-list > li.tsn-card:hover { border-color: #a9c8b6; }
.tsn-list.tsn-list .tsn-card .tsn-row { min-width: 0; padding: 4px 0; border-top: 0; }
.tsn-list.tsn-list .tsn-card .tsn-row:hover { background: transparent; }
.tsn-list.tsn-list .tsn-card .tsn-title-input { width: 100%; min-width: 0; }
.tsn-list.tsn-list .tsn-card.tsn-card-closed > * { opacity: 0.72; }
/* FIX18: アーカイブ済み（「アーカイブ済みを表示」のときだけ出る）。中身だけ薄く、操作（戻す）は薄くしない。枠は破線 */
.tsn-list.tsn-list .tsn-rows.tsn-card-list > li.tsn-card.tsn-card-archived { border-style: dashed; background: #f7f8f7; }
.tsn-list.tsn-list .tsn-card.tsn-card-archived > :not(.tsn-row-actions) { opacity: 0.6; }
/* FIX18: 案件の段階（caseStage。1 つだけ）とアーカイブ済みの印 */
.tsn-list.tsn-list .tsn-badge.tsn-badge-stage { background: #e8f0fb; color: #1f4f8a; }
.tsn-list.tsn-list .tsn-badge.tsn-badge-stage:is(.stage-invoiceFull, .stage-invoicePartial) { background: #fdf0e6; color: #8a4a12; }
.tsn-list.tsn-list .tsn-badge.tsn-badge-archived { background: #eceeed; color: #555f59; }
.tsn-list.tsn-list .tsn-card.tsn-dragging { outline: 2px dashed var(--tsn-drop-color); outline-offset: 2px; }
.tsn-list.tsn-list .tsn-card.tsn-drop-before::before,
.tsn-list.tsn-list .tsn-card.tsn-drop-after::after {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  height: var(--tsn-drop-size);
  border-radius: var(--tsn-drop-size);
  background: var(--tsn-drop-color);
  pointer-events: none;
}
/* 枠 1px の外、間隔の真ん中（先頭の前・最後の後ろも同じ距離） */
.tsn-list.tsn-list .tsn-card.tsn-drop-before::before { top: calc(-1px - (var(--tsn-card-gap) + var(--tsn-drop-size)) / 2); }
.tsn-list.tsn-list .tsn-card.tsn-drop-after::after { bottom: calc(-1px - (var(--tsn-card-gap) + var(--tsn-drop-size)) / 2); }
/* スマホ: 横にはみ出さない（長い名前は中身を折り返し、操作のアイコンは次の行の右へ） */
@media (max-width: 560px) {
  .tsn-list.tsn-list .tsn-rows.tsn-card-list > li.tsn-card { flex-wrap: wrap; }
  .tsn-list.tsn-list .tsn-card > .tsn-row-actions { margin-left: auto; }
}

/* 削除の確認・行の操作の確認（native <dialog>。顧客・案件の削除は body の直下、行の操作は一覧の中に置かれる。どちらでも同じ白いカード） */
.tsn-dialog {
  box-sizing: border-box;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--tsn-line);
  border-radius: 16px;
  background: #fff;
  color: var(--tsn-ink);
  box-shadow: 0 12px 40px rgba(22, 40, 30, 0.22);
  font-family: var(--tsn-font);
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}
.tsn-dialog::backdrop { background: #18241f66; }
.tsn-dialog :is(.tsn-dialog-title, .tsn-section-title) { margin: 0 0 16px; padding: 0; border: 0; font-family: var(--tsn-font); font-size: 18px; font-weight: 700; line-height: 1.4; color: var(--tsn-ink); }
.tsn-dialog p { margin: 0 0 8px; overflow-wrap: anywhere; }
.tsn-dialog .tsn-dialog-warn { font-weight: 700; color: var(--tsn-red); }
.tsn-dialog .tsn-check { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 8px 0 0; font-size: 14px; }
.tsn-dialog .tsn-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--tsn-green); }
.tsn-dialog :is(.tsn-dialog-actions, .tsn-row-actions) { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 24px 0 0; }
.tsn-dialog .tsn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #d3dfd8;
  border-radius: 10px;
  background: #fff;
  color: #244d3a;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.tsn-dialog .tsn-btn:hover:not(:disabled) { background: #f2f8f4; border-color: #a9c8b6; }
.tsn-dialog .tsn-btn:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-dialog .tsn-btn:disabled { cursor: not-allowed; opacity: 0.55; }
/* 元に戻せない削除は赤（CRM の「お客様を削除する」の .btn.danger と同じ） */
.tsn-dialog .tsn-btn.tsn-danger { background: #a33c36; border-color: #a33c36; color: #fff; }
.tsn-dialog .tsn-btn.tsn-danger:hover:not(:disabled) { background: #8a302b; border-color: #8a302b; }
/* ---------------------------------------------------------------- FIX17: 左カラムの業務の表示・ログイン中の表示とログアウト・右の列・タブ
   値は FIX-14 と同じ（ページ見出し 20px / 欄の見出し 18px / 本文・入力 16px / ラベル・ボタン 14px / 補足 13px。操作は高さ 44px・
   角丸 10px・フォーカスは #b4d8c8 の輪。選択中は薄緑 #e9f3ed + 線 #cfe5d8 + 文字 #175f40）。
   右の列（.tsn-rw / .tsn-right*）は CRM の顧客チャートの履歴と現調・見積の作業画面で同じ DOM・同じ値（幅 280〜520px・既定 340px、
   面は薄灰 #f5f7f6、欄は白いカード: 線 1px・角丸 16px・余白 16px・影）。860px 以下は中央の下に重ねる（幅ハンドルなし）。 */
.tsn-rw,
.tsn-tabs {
  --tsn-ink: #202a25;
  --tsn-muted: #68746e;
  --tsn-line: #e5e9e6;
  --tsn-green: #167451;
  --tsn-green-dark: #0e5e41;
  --tsn-pale: #e9f3ed;
  --tsn-hover: #eef2ef;
  --tsn-font: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
}

/* 左カラム: 業務は押せない表示（使える業務を並べる。カーソルは矢印のまま・ホバーで色を変えない）。
   いまの業務（aria-current）だけ選択中と同じ薄緑。基本マスタの画面ではどれも選択中にしない */
.tsn-nav-list[hidden],
.tsn-nav-item[hidden],
.tsn-nav-sep[hidden] { display: none; }
.tsn-nav-business-label {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #536159;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  cursor: default;
}
.tsn-nav-business-label[aria-current="page"] { border-color: #cfe5d8; background: var(--tsn-pale); color: #175f40; font-weight: 700; }

/* 左カラムの下端: 「使い方」の下にログイン中の表示（名前 14px・補足 13px）とログアウト。どちらも高さ 44px */
.tsn-nav-account { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--tsn-line); }
.tsn-nav-account[hidden] { display: none; }
.tsn-nav-account-id { display: flex; flex-direction: column; gap: 1px; margin: 0 0 4px; padding: 0 12px; font-size: 13px; line-height: 1.4; color: var(--tsn-muted); overflow-wrap: anywhere; }
.tsn-nav-account-name { color: var(--tsn-ink); font-size: 14px; font-weight: 650; }
.tsn-nav-account-name[hidden],
.tsn-nav-account-detail[hidden] { display: none; }
.tsn-help-open { min-height: 44px; }
.tsn-nav-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #536159;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.tsn-nav-logout:hover:not(:disabled) { background: var(--tsn-hover); color: #244b36; }
.tsn-nav-logout:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-nav-logout:disabled { cursor: not-allowed; opacity: 0.6; }
.tsn-nav-logout svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tsn-nav-account-error { margin: 8px 0 0; }

/* 中央 + 右の列 */
.tsn-rw {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px var(--tsn-right-w, 340px);
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: #f5f7f6;
}
.tsn-rw[data-right="closed"] { grid-template-columns: minmax(0, 1fr) 14px 44px; }
.tsn-rw[data-right="none"] { grid-template-columns: minmax(0, 1fr); }
.tsn-rw-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tsn-rw[data-right="closed"] > .tsn-rw-main { grid-column: 1; }
.tsn-rw[data-right="closed"] > .tsn-right-rail { grid-column: 3; }
.tsn-rw > .tsn-right-resizer { width: auto; min-height: 0; }
.tsn-rw > .tsn-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  color: var(--tsn-ink);
  font-family: var(--tsn-font);
  -webkit-text-size-adjust: 100%;
}
.tsn-rw > .tsn-right[hidden] { display: none !important; }
.tsn-right * { box-sizing: border-box; }
.tsn-right .tsn-right-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; margin: 0 0 8px; padding: 0 2px; }
.tsn-right .tsn-right-title { min-width: 0; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--tsn-muted); overflow-wrap: anywhere; }
.tsn-right .tsn-right-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  margin: 0;
  padding: 0 2px 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #c8d1cc transparent;
}
.tsn-rw > .tsn-right-rail { display: flex; flex-direction: column; align-items: center; min-width: 0; min-height: 0; padding: 4px 0 0; }

/* 欄（白いカード）。見出し全体が開閉のボタン（18px・高さ 44px）、件数は右端（13px） */
.tsn-right-section {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--tsn-line, #e5e9e6);
  border-radius: 16px;
  box-shadow: 0 2px 9px rgba(22, 40, 30, 0.055);
  color: var(--tsn-ink, #202a25);
  font-size: 16px;
  line-height: 1.55;
}
.tsn-right-section.tsn-right-section-inline { margin-top: 8px; padding: 8px 0 0; background: transparent; border: 0; border-top: 1px solid #e5e9e6; border-radius: 0; box-shadow: none; }
.tsn-right-section > .tsn-right-section-head { margin: 0; padding: 0; border: 0; font-family: var(--tsn-font, system-ui, sans-serif); font-size: 18px; font-weight: 700; line-height: 1.4; color: inherit; letter-spacing: 0; }
.tsn-right-section .tsn-right-section-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.tsn-right-section .tsn-right-section-toggle:hover { color: #175f40; }
.tsn-right-section .tsn-right-section-toggle:focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
.tsn-right-section .tsn-right-caret { flex: none; display: inline-block; width: 1em; text-align: center; color: var(--tsn-muted, #68746e); transition: transform 0.15s; }
.tsn-right-section .tsn-right-section-toggle[aria-expanded="true"] .tsn-right-caret { transform: rotate(90deg); }
.tsn-right-section .tsn-right-section-title { min-width: 0; overflow-wrap: anywhere; }
.tsn-right-section .tsn-right-count { flex: none; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--tsn-muted, #68746e); }
.tsn-right-section > .tsn-right-section-body { min-width: 0; padding-top: 8px; }
.tsn-right-section > .tsn-right-section-body[hidden] { display: none; }
.tsn-right-section.tsn-right-section-inline > .tsn-right-section-body { padding-top: 0; }
@media (prefers-reduced-motion: reduce) {
  .tsn-right-section .tsn-right-caret { transition: none; }
}

/* 狭い画面（左カラムのドロワーと同じ 860px）: 右の列は中央の下に全幅で重ねる。幅ハンドルなし・列の中のスクロールなし */
@media (max-width: 860px) {
  .tsn-rw,
  .tsn-rw[data-right] { display: flex; flex-direction: column; gap: 16px; }
  .tsn-rw > .tsn-right-resizer,
  .tsn-rw > .col-resizer { display: none !important; }
  .tsn-right .tsn-right-body { overflow: visible; }
  .tsn-rw > .tsn-right-rail { flex-direction: row; justify-content: flex-end; padding: 0; }
}

/* シリーズ共通のタブ。会社情報（.settings-tabs.tsn-tabs）・顧客チャート（.chart-tabs.tsn-tabs）・現調・見積の作業画面
   （.series-case-tabs.tsn-tabs）がこの規則だけで同じ見た目になる（各画面の CSS は置き場所の余白と狭い画面の 2 列だけ）。左寄せ・折り返す */
.tsn-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; padding: 0; }
html body .tsn-tabs.tsn-tabs > :is(button, a) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #e5e9e6;
  border-radius: 10px;
  background: #fff;
  color: #202a25;
  font-family: var(--tsn-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
}
html body .tsn-tabs.tsn-tabs > :is(button, a):hover:not(:disabled) { background: #eef2ef; }
html body .tsn-tabs.tsn-tabs > :is(button, a):is([aria-current="page"], [aria-selected="true"]) { background: #e9f3ed; border-color: #cfe5d8; color: #175f40; font-weight: 700; }
html body .tsn-tabs.tsn-tabs > :is(button, a):focus-visible { outline: 3px solid #b4d8c8; outline-offset: 1px; }
html body .tsn-tabs.tsn-tabs > button:disabled { cursor: not-allowed; opacity: 0.55; }


/* ---------------------------------------------------------------- 印刷: 左カラム・ハンドル・開閉バー・ローカル操作・一覧の操作は出さない */
@media print {
  .tsn-side,
  .tsn-resizer,
  .tsn-toggle,
  .tsn-bar,
  .tsn-backdrop,
  .tsn-local,
  .tsn-help,
  .tsn-help-backdrop,
  .tsn-view-actions,
  .tsn-search-row,
  .tsn-more,
  .tsn-nav-account,
  .tsn-right,
  .tsn-right-rail,
  .tsn-right-resizer { display: none !important; }
  .tsn-rw { display: block; background: none; }
}

/* ---------------------------------------------------------------- FIX17 右の列 QA（1440px・既定 340px）: series-common.fix17.css の後に付ける。
   右の列の中だけ。「台帳の内容を反映」はボタンと補足を縦に重ね、ボタンの文字は幅の中で折り返す。
   現調メモ（.field-note-card / .field-record-page）は欄の白いカードと二重にならないよう外枠・余白を外し、見出し 18px・本文 16px・補足 13px */
.tsn-right-body .ledger-reflect { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
.tsn-right-body .ledger-reflect > button {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.4;
  text-align: center;
}
.tsn-right-body .ledger-reflect > small { display: block; margin: 0; font-size: 13px; line-height: 1.5; color: var(--tsn-muted, #68746e); overflow-wrap: anywhere; }

.tsn-right-section :is(.field-note-card, .field-record-page) {
  min-width: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.55;
}
.tsn-right-section :is(.field-note-card, .field-record-page) .field-page-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; }
.tsn-right-section :is(.field-note-card, .field-record-page) :is(p, textarea) { font-size: 16px; overflow-wrap: anywhere; }
.tsn-right-section :is(.field-note-card, .field-record-page) :is(small, .muted, .review-description, .pc-reference-status) { font-size: 13px; line-height: 1.5; }
