:root {
  color-scheme: light;
  --bg: #ede9fe;
  --card: #ffffff;
  --text: #1c1e21;
  --muted: #6b7280;
  --accent: #1d4ed8;
  --accent-dark: #1e3a8a;
  --border: #d9dce1;
  --error: #b91c1c;
  --error-bg: #fef2f2;
  --ok-bg: #ecfdf5;
  --ok-text: #065f46;
  --danger: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.6;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #000 url('/assets/login-bg.jpg') center center / cover no-repeat;
}
.login-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(2px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  width: 320px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.login-card h1 { font-size: 1.2rem; margin-top: 0; }
.login-logo {
  display: block;
  height: 40px;
  margin: 0 auto 20px;
}
/* ログイン画面の ENDLESS のロゴ（アプリのアイコンと同じ黒地に金。2026-10-12）*/
.login-logo.login-logo-endless {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.admin-wrap {
  max-width: 1700px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.admin-header h1 { font-size: 1.3rem; margin: 0; }
.admin-header > div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* PC用の左サイドバー（admin-sidebar.js が挿入する）。
   .admin-wrap を .admin-main-area で包み、左にサイドバーを並べる2カラムにする。
   スマホ（画面幅640px以下）ではサイドバーを隠し、従来どおりヘッダー内のリンクを使う。 */
.admin-layout {
  display: flex;
  align-items: flex-start;
}
.admin-main-area {
  flex: 1;
  min-width: 0;
}
.admin-sidebar {
  flex: 0 0 220px;
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar-brand {
  font-weight: 700;
  color: var(--accent);
  padding: 0 8px 16px;
  font-size: 1.05rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.admin-sidebar a, .admin-sidebar-logout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin: 3px 0;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
}
.admin-sidebar a[data-color="blue"] { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.admin-sidebar a[data-color="purple"] { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.admin-sidebar a[data-color="teal"] { background: linear-gradient(135deg, #e6f7fa, #cdf1f7); }
.admin-sidebar a[data-color="green"] { background: linear-gradient(135deg, #eafaf0, #d3f5e1); }
.admin-sidebar a[data-color="amber"] { background: linear-gradient(135deg, #fefce8, #fef9c3); }
.admin-sidebar a[data-color="blue"]:hover { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.admin-sidebar a[data-color="purple"]:hover { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.admin-sidebar a[data-color="teal"]:hover { background: linear-gradient(135deg, #cdf1f7, #a5e4ef); }
.admin-sidebar a[data-color="green"]:hover { background: linear-gradient(135deg, #d3f5e1, #bbf0d1); }
.admin-sidebar a[data-color="amber"]:hover { background: linear-gradient(135deg, #fef9c3, #fef08a); }
.admin-sidebar a[data-color="blue"].active { border-left-color: #1d4ed8; }
.admin-sidebar a[data-color="purple"].active { border-left-color: #7c3aed; }
.admin-sidebar a[data-color="teal"].active { border-left-color: #0e7490; }
.admin-sidebar a[data-color="green"].active { border-left-color: #15803d; }
.admin-sidebar a[data-color="amber"].active { border-left-color: #ca8a04; }
.admin-sidebar a.active { font-weight: 700; }
.admin-sidebar-logout {
  margin-top: 12px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
}
.admin-sidebar-logout:hover { background: linear-gradient(135deg, #fee2e2, #fecaca); }
/* アカウント管理は一番下に置き、他と区別できるよう白背景・赤文字・点線枠にする */
.admin-sidebar-admin-only {
  margin-top: 4px;
  background: #fff;
  color: var(--danger);
  border: 1px dashed #fca5a5;
}
.admin-sidebar-admin-only:hover { background: #fef2f2; }
.admin-sidebar-admin-only.active { border-style: solid; }
/* 「AA関係」のようなまとまり（中カテゴリー）: 見出しを付け、左に細い線を引いて、中の項目を少し内側に並べる */
.admin-sidebar-group {
  margin: 10px 0;
  padding: 4px 0 4px 6px;
  border-left: 3px solid #ddd6fe;
}
.admin-sidebar-group-title {
  padding: 2px 10px 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #6d28d9;
}
.admin-sidebar-group a { padding: 10px 12px; }

@media (max-width: 640px) {
  .admin-sidebar { display: none; }
  .admin-layout { display: block; }
}
@media (min-width: 641px) {
  /* PCではサイドバーがナビゲーションを兼ねるので、ヘッダー内のリンク列は隠す
     （タイトルや「一覧に戻る」等の見出し代わりのリンクはそのまま残す） */
  .admin-header > div { display: none; }
}

/* スマホでは、見出しとボタンを折り返さず1行に並べる（縦に何段も積み重ならないようにする）。
   ボタンは小さめにし、data-short がある場合は短い表記に切り替える。
   それでも入りきらない極端に狭い画面では、ボタン部分だけ横にスクロールできるようにする */
@media (max-width: 640px) {
  .admin-header {
    gap: 4px;
    flex-wrap: nowrap;
  }
  .admin-header h1 {
    flex: 0 0 auto;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  .admin-header > div {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-header > div::-webkit-scrollbar { display: none; }
  /* 押しやすいよう、小さくしすぎない（高さ・横幅とも少し余裕を持たせる） */
  .admin-header .btn-ghost {
    flex: 0 0 auto;
    padding: 10px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: 6px;
  }
  .admin-header .btn-ghost[data-short] { font-size: 0; }
  .admin-header .btn-ghost[data-short]::after {
    content: attr(data-short);
    font-size: 0.75rem;
  }
  .admin-header h1[data-short] { font-size: 0; }
  .admin-header h1[data-short]::after {
    content: attr(data-short);
    font-size: 0.9rem;
  }
}
/* 幅の狭いスマホでは、1行に収まるよう少しだけ詰める */
@media (max-width: 380px) {
  .admin-header h1 { font-size: 0.76rem; }
  .admin-header h1[data-short]::after { font-size: 0.76rem; }
  .admin-header .btn-ghost { padding: 9px 4px; font-size: 0.75rem; }
  .admin-header .btn-ghost[data-short]::after { font-size: 0.75rem; }
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.panel h2 {
  font-size: 1.05rem;
  margin: -18px -20px 16px;
  padding: 14px 20px;
  background: linear-gradient(120deg, rgba(29, 78, 216, 0.1), rgba(29, 78, 216, 0.015));
  border-radius: 10px 10px 0 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.btn-small {
  padding: 6px 12px;
  font-size: 0.82rem;
  width: auto;
}
.panel h3 { font-size: 0.95rem; }

label {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 10px;
}
input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}
/* 担当者入力欄で、未入力の項目に気づけるよう薄い赤で示す。入力されると自動的に消える。 */
input.field-empty, select.field-empty {
  background-color: var(--error-bg);
}

button {
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
button:hover:not(.inv-app *) { background: var(--accent-dark); } /* 保険請求管理（幡野さんのアプリ）の中のボタンは、アプリの色のまま */
button:disabled { background: #9ca3af; cursor: not-allowed; }

.btn-ghost {
  display: inline-block;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}
.btn-ghost:hover {
  background: #eef2ff;
}

.btn-line { background: #06c755; }
.btn-line:hover { background: #05a847; }

.btn-print { background: #4f46e5; }
.btn-print:hover { background: #4338ca; }

.pdf-delivery-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #ecfdf5;
  color: #065f46;
}

.vehicle-name-display {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
}
.vehicle-name-grade {
  font-size: 0.78em;
  color: #6b7280;
}

/* 特記事項2の自動車税の戻り額（契約書に載る金額なので、目視確認を促す） */
.tax-refund-note {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
  background: #f8fafc;
}
.tax-refund-note.has-amount {
  color: #92400e;
  background: #fef3c7;
  font-weight: 600;
}

/* --- リサイクル料金の自動照会（自動車リサイクルシステムのWebAPI）--- */
.recycle-auto {
  margin: 0 0 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.recycle-auto-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px 10px;
  border: 0;
  border-radius: 8px;
  background: #047857;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}
.recycle-auto-btn:hover { background: #036045; }
.recycle-auto-btn:disabled { background: #94a3b8; }
.recycle-auto-msg { margin: 8px 0 0; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.recycle-auto-msg[data-state="ok"] { color: #047857; }
.recycle-auto-msg[data-state="warn"] { color: var(--danger); }
.recycle-auto-detail { margin: 4px 0 0; font-size: 0.78rem; line-height: 1.6; color: var(--muted); }

/* --- リサイクル料金の照会に使う番号（タップでコピーして、照会ページに貼り付ける）--- */
.recycle-ref {
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.recycle-ref-title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.recycle-ref-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.recycle-ref-name {
  flex: 0 0 5.5em;
  font-size: 0.8rem;
  color: var(--muted);
}
/* 番号はコピーしやすいよう、押せる大きな文字で表示する */
.recycle-ref-value {
  flex: 1 1 auto;
  width: auto;
  padding: 8px 10px;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: left;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.recycle-ref-value:hover { background: #eef2ff; }
.recycle-ref-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}
.recycle-ref-msg {
  margin: 8px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ok-text);
}

/* --- 車検証の写真読み取り（選ぶ・貼り付け・ドラッグで自動読み取り）--- */
.shaken-ocr {
  margin-bottom: 16px;
}
.shaken-ocr-title {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}
.shaken-ocr-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
  padding: 18px 16px;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  background: #f5f8ff;
  text-align: center;
  cursor: pointer;
}
.shaken-ocr-drop:hover { background: #eaf0ff; }
.shaken-ocr-drop.dragover { background: #dde8ff; border-color: var(--accent-dark); }
/* ネイティブのファイル選択欄は、枠全体を押せるようにするため隠す */
.shaken-ocr-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.shaken-ocr-drop-icon {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  font-weight: 700;
}
.shaken-ocr-drop-main {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.shaken-ocr-drop-sub {
  font-size: 0.78rem;
  color: var(--muted);
}
/* 案件一覧: 担当者・状態の絞り込み */
.deal-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
}
.deal-filter-row label {
  flex: 1 1 200px;
  margin-bottom: 0;
}
.deal-filter-row label.hidden { display: none; }

/* 案件詳細: お客様情報の修正ボタン */
.submission-edit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.submission-edit-row .muted { font-size: 0.82rem; }

/* アプリのインストール案内（pwa.js） */
.install-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
}
.install-banner-body {
  flex: 1 1 auto;
  min-width: 0;
}
.install-banner .install-lead { margin: 0 0 6px; font-size: 0.88rem; }
.install-banner .install-btn { padding: 8px 12px; font-size: 0.85rem; }
.install-banner .install-steps { font-size: 0.8rem; }
.install-later {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 6px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.install-later:hover { background: transparent; color: var(--text, #111827); }
.install-card {
  margin: 14px 0;
  padding: 14px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  background: #f5f8ff;
  text-align: left;
}
.install-card.hidden { display: none; }
.install-lead {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--accent-dark);
}
.install-note {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}
.install-steps {
  margin: 6px 0 0;
  padding-left: 20px;
  font-size: 0.88rem;
  line-height: 1.8;
}
.install-btn {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
}
.install-page { max-width: 440px; }
.install-intro { margin: 0 0 8px; line-height: 1.7; text-align: left; }
.install-merits { margin: 0; padding-left: 20px; text-align: left; font-size: 0.9rem; line-height: 1.8; }
.install-skip {
  display: block;
  margin-top: 16px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.setup-install-title { margin: 0; font-weight: 700; }

/* Androidの「共有」で受け取った車検証ファイルの取り込み */
.shared-cert-banner {
  display: block;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}
.shared-cert-banner.hidden { display: none; }
.share-suggested {
  margin: 14px 0 6px;
  padding: 12px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #f5f8ff;
}
.share-suggested-reason {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.share-list-title {
  margin: 18px 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}
.share-deal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.share-deal-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text, #111827);
  text-align: left;
  font-weight: 400;
}
.share-deal-option:hover { background: #f3f4f6; }
.share-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.share-preview.hidden { display: none; }
.share-fallback {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  background: #f5f8ff;
}
.share-fallback-title { margin: 0 0 6px; font-weight: 700; color: var(--accent-dark); }
.share-fallback ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.8; font-size: 0.9rem; }
.share-reinstall {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 2px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
}
.share-reinstall .share-fallback-title { color: #92400e; }
.share-reinstall-text { margin: 0 0 10px; font-size: 0.88rem; line-height: 1.7; }
.share-fallback-note { margin: 0 0 10px; font-size: 0.8rem; line-height: 1.6; color: var(--muted); }
.share-fallback-btn {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.share-diag {
  margin: 8px 0 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--muted);
  word-break: break-all;
}
.share-deal-option.is-suggested { border-color: var(--accent); }
.share-deal-name { font-size: 1rem; font-weight: 700; }
.share-deal-detail { font-size: 0.8rem; color: var(--muted); }
.share-deal-action {
  align-self: stretch;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* ページを直接開いたときの案内（1行目） */
.perm-note { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: var(--danger); }

/* 権限がない項目（AA調整・AA調整表）を押したときの案内。メニューは消さず、押したら出す */
.perm-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #334155;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 1000;
}
/* スマホでは、下のタブに重ならない高さに出す */
body.has-bottom-nav .perm-toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
/* 権限がない項目には、鍵の印を付ける（押せないことが分かるように） */
.admin-sidebar a.is-locked, .admin-header a.is-locked, .m-sheet-row.is-locked { opacity: 0.72; }
.admin-sidebar a.is-locked::after, .admin-header a.is-locked::after, .m-sheet-row.is-locked::after {
  content: " 🔒";
  font-size: 0.85em;
}

/* パソコンでLINE共有したときの案内（画面下に数秒表示。タップで閉じる） */
.line-share-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 10px;
  background: #065f46;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 1000;
}

/* お客様控えに「必要書類のご案内」ページが付くかどうかの案内 */
.guidance-note {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #1e3a8a;
}
.guidance-note.is-omitted {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

/* 電子車検証のICタグを読み取る「車検証閲覧アプリ」の起動リンク */
.shaken-ocr-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 8px 0 0;
  text-align: center;
}
.shaken-ocr-app-btn {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.shaken-ocr-app-btn:hover { background: #eaf0ff; }
.shaken-ocr-app-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}
.shaken-ocr.locked .shaken-ocr-app-btn {
  border-color: var(--border);
  color: var(--muted);
}
.shaken-ocr-msg {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.shaken-ocr-msg.working { color: var(--accent); font-weight: 700; }
.shaken-ocr-msg.done { color: var(--ok-text); font-weight: 700; }
.shaken-ocr-msg.failed { color: var(--error); font-weight: 700; }
/* 決定後は読み取りできないため、押せない見た目にする */
.shaken-ocr.locked .shaken-ocr-drop {
  border-color: var(--border);
  background: #f3f4f6;
  cursor: not-allowed;
}
.shaken-ocr.locked .shaken-ocr-drop-icon,
.shaken-ocr.locked .shaken-ocr-drop-main {
  color: var(--muted);
}

/* --- 統計画面 --- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
/* 数字が短いカード（件数・日数など）は、スマホでも2列に並べる */
.stat-cards.stat-cards-compact { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: #f8fafc;
}
.stat-card-label { font-size: 0.8rem; color: var(--muted); }
.stat-card-value { font-size: 1.35rem; font-weight: 700; }
.stat-card-note { font-size: 0.75rem; color: var(--muted); }
/* 統計: 今月の数字の月の選択、小見出し、注記、契約から入庫までの日数の詳細 */
.stat-month-pick { margin: 0; font-size: 0.85rem; font-weight: 600; }
.stat-month-pick input {
  display: inline-block;
  width: auto;
  margin: 0 0 0 6px;
  padding: 5px 8px;
  font-size: 0.9rem;
}
.stat-footnote { margin: 12px 0 0; font-size: 0.78rem; color: var(--muted); }
.stat-subtitle {
  margin: 16px 0 4px;
  padding-left: 8px;
  border-left: 4px solid var(--accent);
  font-size: 0.92rem;
}
.stat-card-value small { display: block; margin-top: 2px; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.stat-detail-list { margin: 14px 0 0; padding: 0; list-style: none; font-size: 0.88rem; }
.stat-detail-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.stat-detail-list b { display: inline-block; min-width: 5.5em; }
.stat-empty { color: var(--muted); font-size: 0.88rem; margin: 8px 0 0; }
/* 車種の割合（CSSの幅で棒グラフを表現する） */
.stat-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.stat-bar-name {
  flex: 0 0 34%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* スマホでは名前（車種・市区町村）が切れないよう、広めに取って折り返す */
@media (max-width: 480px) {
  .stat-bar-name { flex-basis: 40%; white-space: normal; line-height: 1.25; }
}
.stat-bar-track {
  flex: 1 1 auto;
  height: 14px;
  background: #eef0f4;
  border-radius: 999px;
  overflow: hidden;
}
.stat-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.stat-bar-value {
  flex: 0 0 auto;
  min-width: 6.6em;
  text-align: right;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ヘッダーのナビゲーションボタンを行き先ごとに色分け */
.nav-stats { border-color: #15803d; color: #15803d; }
.nav-stats:hover { background: #eafaf0; }
.nav-pdf { border-color: #0e7490; color: #0e7490; }
.nav-pdf:hover { background: #e6f7fa; }
.nav-users { border-color: #6b7280; color: #374151; }
.nav-users:hover { background: #f3f4f6; }
.nav-help { border-color: #ca8a04; color: #a16207; }
.nav-help:hover { background: #fefce8; }
.nav-logout { border-color: var(--danger); color: var(--danger); }
.nav-logout:hover { background: #fef2f2; }
.btn-link {
  display: inline-block;
  margin-left: 10px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.btn-danger {
  background: var(--danger);
}
.btn-danger:hover { background: #7f1414; }

#createEntry {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px 0 4px;
}
/* 「リピーター様」「過去の契約書の取り込み」は、大きなボタンの下に、目立たない文字のリンクで並べる */
.create-entry-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 16px;
}
.create-entry-links .btn-ghost {
  padding: 8px 6px;
  border-color: transparent;
  background: transparent;
  font-size: 0.92rem;
  text-decoration: underline;
}
.create-entry-links .btn-ghost:hover { background: #eef2ff; }
/* 一番よく押すボタンなので、押せることがすぐ分かるよう厚みのある立体的な見た目にする */
.btn-create-huge {
  width: 100%;
  max-width: 720px;
  padding: 38px 20px;
  font-size: 2.1rem;
  font-weight: 700;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho", serif;
  letter-spacing: 0.08em;
  color: #fff;
  /* 上を明るく・下を暗くして丸みを出す */
  background: linear-gradient(180deg, #d93434 0%, var(--danger) 55%, #8f1717 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),   /* 上面のハイライト */
    inset 0 -2px 4px rgba(0, 0, 0, 0.25),     /* 下側の陰 */
    0 6px 0 #6d1010,                          /* ボタンの厚み（側面） */
    0 10px 16px rgba(0, 0, 0, 0.28);          /* 机に落ちる影 */
  transform: translateY(0);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.15s ease;
  /* 厚みと落ち影のぶん、下に余白を取る */
  margin-bottom: 6px;
}
.btn-create-huge:hover {
  background: linear-gradient(180deg, #e14040 0%, #c42222 55%, #8f1717 100%);
}
/* 押した瞬間は実際に沈み込んで、厚みが縮む */
.btn-create-huge:active {
  transform: translateY(5px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 3px rgba(0, 0, 0, 0.3),
    0 1px 0 #6d1010,
    0 2px 5px rgba(0, 0, 0, 0.3);
}
.btn-create-huge:focus-visible {
  outline: 3px solid #fca5a5;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .btn-create-huge { transition: none; }
}
.btn-create-huge-sub {
  display: block;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}
@media (max-width: 480px) {
  .btn-create-huge { padding: 32px 14px; font-size: 1.75rem; letter-spacing: 0.04em; }
  .btn-create-huge-sub { font-size: 0.9rem; letter-spacing: 0; }
}

/* 契約書作成ボタンと同じ大きさ・厚みで、色だけ水色にした版（案件詳細への導線用） */
.btn-huge-blue {
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 55%, #075985 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
    0 6px 0 #075985,
    0 10px 16px rgba(0, 0, 0, 0.22);
}
.btn-huge-blue:hover {
  background: linear-gradient(180deg, #5fcdfa 0%, #1cabee 55%, #075985 100%);
}
.btn-huge-blue:active {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 3px rgba(0, 0, 0, 0.25),
    0 1px 0 #075985,
    0 2px 5px rgba(0, 0, 0, 0.25);
}
.btn-huge-blue:focus-visible {
  outline: 3px solid #7dd3fc;
}
/* #createEntry の外（案件作成の結果表示）で使うときは、自前で中央寄せする */
#createResult .btn-create-huge,
#createResultExtra .btn-create-huge {
  display: block;
  margin: 14px auto 10px;
}
#createResultExtra {
  margin-bottom: 16px;
}

.confirm-dialog {
  border: none;
  border-radius: 10px;
  padding: 20px;
  max-width: 360px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.confirm-dialog p {
  margin: 0 0 16px;
}
.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
/* 契約書PDFは別の画面（deal.html?view=pdf）で作成する。
   案件詳細では契約書PDFの欄を出さず、その画面を開く入口のバーだけを出す */
body:not(.pdf-view) #pdfPanel { display: none; }
body.pdf-view #mainPanel,
body.pdf-view #submissionPanel,
body.pdf-view #staffPanel,
body.pdf-view .danger-panel,
body.pdf-view #pdfLinkBar,
body.pdf-view .admin-header > a { display: none; }
/* 契約書PDFの画面では、この欄が画面そのものなので閉じられないようにする */
body.pdf-view #pdfPanel > summary { pointer-events: none; }
body.pdf-view #pdfPanel > summary::before { content: none; }
.pdf-view-header { margin: 4px 0 14px; }
.pdf-view-header h1 { margin: 12px 0 4px; font-size: 1.35rem; }
.pdf-view-target { margin: 0; color: var(--muted); font-weight: 700; }
.pdf-link-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 5px solid #16a34a;
  border-radius: 8px;
  background: linear-gradient(90deg, #dcfce7 0%, #f5fdf8 100%);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.pdf-link-bar:hover { background: linear-gradient(90deg, #bbf7d0 0%, #ecfdf3 100%); }
.pdf-link-bar-title { flex: 1; }
.pdf-link-bar .panel-summary-badge { margin-left: 0; }
.pdf-link-bar-go { color: #15803d; white-space: nowrap; }
/* 案件一覧: ナンバーの下の車台番号 */
.deal-chassis { margin-top: 2px; font-size: 0.82em; color: var(--muted); }
/* 契約書PDF: 契約日（契約書に印字する日付） */
.contract-date-row { margin-bottom: 14px; }
.contract-date-row label { margin-bottom: 4px; font-weight: 700; }
.contract-date-row input { max-width: 220px; }
.contract-date-row p { margin: 4px 0 0; font-size: 0.82rem; }
/* 契約書PDF: 生成の準備ができた案内と、生成後の「お疲れさまでした」 */
.pdf-ready-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  color: #065f46;
  font-weight: 700;
}
.pdf-done {
  margin-top: 18px;
  padding: 18px 16px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  text-align: center;
}
.pdf-done-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #065f46;
}
.pdf-done-sub {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--muted);
}
.pdf-done .pdf-done-home {
  display: block;
  margin: 0 auto 6px;
  text-align: center;
  text-decoration: none;
}
/* 「すべて決定する」の確認の小窓: 入力内容の一覧（この中だけスクロール） */
.confirm-dialog.decide-dialog { width: calc(100% - 24px); max-width: 560px; max-height: 92vh; }
/* 未入力の一覧と入力内容の一覧が両方長くても、「はい／いいえ」まで1画面に収まるようにする */
.decide-dialog .decide-missing-list { max-height: 18vh; }
.confirm-dialog .decide-dialog-title { margin: 0 0 10px; font-size: 1.1rem; font-weight: 700; }
.decide-summary {
  max-height: 38vh;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 4px 12px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
}
.confirm-dialog .decide-summary-title {
  margin: 12px 0 4px;
  padding-left: 8px;
  border-left: 4px solid #7c3aed;
  font-weight: 700;
  font-size: 0.92rem;
}
.decide-summary dl { margin: 0; display: grid; grid-template-columns: minmax(7em, 40%) 1fr; gap: 4px 10px; font-size: 0.86rem; }
.decide-summary dt { color: var(--muted); }
.decide-summary dd { margin: 0; font-weight: 700; word-break: break-all; }
.decide-summary dd.is-empty { color: var(--error); font-weight: 400; }
/* 「すべて決定する」の確認: 未入力の項目一覧（多いときはこの中だけスクロール） */
.decide-missing {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--error-bg);
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.confirm-dialog .decide-missing-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--error);
}
.decide-missing-list {
  max-height: 40vh;
  overflow-y: auto;
}
.confirm-dialog .decide-missing-list p {
  margin: 0 0 4px;
  font-size: 0.9rem;
  color: var(--error);
}
.confirm-dialog .decide-question {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 1.05rem;
}
.confirm-dialog .decide-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.inline-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.inline-form label { flex: 1; min-width: 180px; }

.table-scroll {
  overflow-x: auto;
}
/* 表の上側の横スクロールバー（top-scrollbar.js）。上下のバーが同じ見た目になるよう、
   両方とも色を付けて常に表示する（スマホでも消えずに見える） */
.table-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 6px;
}
.table-scroll-top-inner { height: 1px; }
.table-scroll-top::-webkit-scrollbar,
.table-scroll.has-top-scrollbar::-webkit-scrollbar { height: 12px; }
.table-scroll-top::-webkit-scrollbar-track,
.table-scroll.has-top-scrollbar::-webkit-scrollbar-track { background: #eef1f5; border-radius: 6px; }
.table-scroll-top::-webkit-scrollbar-thumb,
.table-scroll.has-top-scrollbar::-webkit-scrollbar-thumb {
  background: #9aa5b5;
  border: 2px solid #eef1f5;
  border-radius: 6px;
}
.table-scroll-top::-webkit-scrollbar-thumb:hover,
.table-scroll.has-top-scrollbar::-webkit-scrollbar-thumb:hover { background: #6b7688; }
@supports not selector(::-webkit-scrollbar) {
  .table-scroll-top,
  .table-scroll.has-top-scrollbar { scrollbar-color: #9aa5b5 #eef1f5; }
}

/* 案件一覧の見出しの右側: AAメモのボタンと、状態ごとの件数（押すとその案件だけを表示） */
.deal-h2-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.deal-stage-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.deal-stage-chip,
.deal-stage-chip:hover {
  padding: 4px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-color);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.deal-stage-chip:hover { filter: brightness(0.96); }
.deal-stage-chip b { font-size: 1.05rem; margin: 0 1px; }
.deal-stage-chip.is-zero { opacity: 0.55; }
.deal-stage-chip.is-active {
  opacity: 1;
  background: var(--chip-color);
  color: #fff;
  box-shadow: 0 0 0 2px var(--chip-bg), 0 0 0 4px var(--chip-color);
}
.deal-stage-chip.is-active:hover { background: var(--chip-color); }
.deal-stage-chip-pending { --chip-color: #92400e; --chip-bg: #fef3c7; }
.deal-stage-chip-submitted { --chip-color: #1d4ed8; --chip-bg: #dbeafe; }
.deal-stage-chip-contracted { --chip-color: #065f46; --chip-bg: #d1fae5; }
.deal-stage-chip-collected { --chip-color: #7c3aed; --chip-bg: #ede9fe; }
.deal-stage-chip-paid { --chip-color: #0e7490; --chip-bg: #cffafe; }
.deal-stage-chip-lien_waiting { --chip-color: #b45309; --chip-bg: #ffedd5; }

/* 住所を押すとGoogleマップで開くリンク（map-link.js） */
.map-link { color: var(--accent); text-decoration: underline; word-break: break-all; }
.map-link-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  vertical-align: 1px;
}
.map-link-hint::before { content: "📍"; margin-right: 2px; }

/* --- お客様入力リンクのQRコード（来店中のお客様に読み取ってもらう小窓） --- */
.qr-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 1200;
  padding: 16px;
  background: rgba(15, 23, 42, 0.6);
}
.qr-box {
  width: 100%;
  max-width: 420px;
  max-height: 92vh;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
}
.qr-title { margin: 0 0 4px; font-size: 1.1rem; font-weight: 700; }
.qr-sub { margin: 0 0 14px; font-size: 0.84rem; line-height: 1.6; color: var(--muted); }
/* 読み取りやすいよう、白い余白ごと大きく出す */
.qr-image {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.qr-url {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  word-break: break-all;
}
.qr-close {
  width: 100%;
  margin: 16px 0 0;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}
/* 案件作成直後の「コピー・LINEで送る・QRで渡す」: スマホでも1行に並べる */
@media (max-width: 640px) {
  .share-link-row { gap: 8px; }
  .share-link-row > button { flex: 1 1 auto; padding-left: 10px; padding-right: 10px; }
}
/* QRを出している間は、後ろの画面が動かないようにする */
body.qr-open { overflow: hidden; }
/* スマホでは、読み取りやすいようにQRを画面いっぱいまで大きくする */
@media (max-width: 640px) {
  .qr-overlay { padding: 10px; }
  .qr-box { max-width: 100%; padding: 16px 14px; }
  .qr-title { font-size: 1.05rem; }
  .qr-sub { margin-bottom: 10px; font-size: 0.8rem; }
  .qr-image { max-width: min(100%, 62vh); }
}

/* 電話番号を押すとそのまま電話をかけられるリンク（tel-link.js） */
.tel-link { color: var(--accent); text-decoration: underline; white-space: nowrap; }
.tel-link-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  vertical-align: 1px;
}
.tel-link-hint::before { content: "📞"; margin-right: 3px; }

/* 案件一覧の「振込先を確認する」ボタン（振込待ちの案件。「取り消す」の上に1行で出す） */
.deal-bank-btn {
  display: block;
  margin: 6px 0;
  white-space: nowrap;
}

/* 案件一覧の「案件概要を確認する」ボタンと、その小窓（deal-summary.js） */
.deal-summary-btn {
  display: block;
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}
.confirm-dialog.deal-summary-dialog {
  width: calc(100% - 24px);
  max-width: 560px;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
}
.deal-summary-dialog[open] {
  display: flex;
  flex-direction: column;
}
.deal-summary-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}
.deal-summary-heading { flex: 1; min-width: 0; }
.deal-summary-label { font-size: 0.78rem; font-weight: 600; opacity: 0.9; }
.deal-summary-name { margin: 2px 0 6px; font-size: 1.15rem; font-weight: 700; word-break: break-all; }
.deal-summary-status { font-size: 0.78rem; }
.deal-summary-x,
.deal-summary-x:hover {
  padding: 0 4px;
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}
.deal-summary-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 16px 14px;
}
.deal-summary-section {
  margin: 14px 0 6px;
  padding-left: 8px;
  border-left: 4px solid #2563eb;
  font-size: 0.92rem;
  font-weight: 700;
}
.deal-summary-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(7em, 36%) 1fr;
  gap: 5px 12px;
  font-size: 0.88rem;
}
.deal-summary-list dt { color: var(--muted); }
.deal-summary-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; white-space: pre-wrap; }
.deal-summary-list dd.is-empty { color: var(--muted); font-weight: 400; }
.deal-summary-list dd.is-warn { color: var(--danger); }
.deal-summary-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.deal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 640px;
}
/* 見出しを折り返し禁止にすることで、列数が多くても縦方向に間延びせず、
   表全体が必要な幅まで広がって横スクロール（.table-scroll側）に収まるようにする */
.deal-table th {
  white-space: nowrap;
}
/* 案件一覧は列数が多いので、セル内も折り返さず横スクロールで見せる
   （お客様名や金額が1文字ずつ縦に割れないようにする） */
.deal-table-nowrap td {
  white-space: nowrap;
}
/* 一覧のお客様名・メモは、長い場合に末尾を「…」にして列が広がりすぎないようにする（全文はカーソルを合わせると表示） */
.customer-name-short {
  display: inline-block;
  max-width: 11em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.deal-table td.cell-ellipsis {
  max-width: 12em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- 完了済み一覧（月ごとに表が分かれている）: 列の幅をそろえて、月をまたいでも同じ位置に並ぶようにする --- */
/* 幅を決めないと、その月に入っている文字の長さで列の幅が変わり、車名などの位置が月ごとにずれる。
   幅は文字数に合わせて決めているので、画面が狭いときは表を横にずらして見る（.table-scroll） */
.archive-table { table-layout: fixed; }
.archive-table col.a-col-name { width: 7em; }
.archive-table col.a-col-vehicle { width: 13em; }
.archive-table col.a-col-chassis { width: 11em; }
.archive-table col.a-col-plate { width: 8.5em; }
.archive-table col.a-col-price { width: 7em; }
.archive-table col.a-col-date { width: 9.5em; }
.archive-table col.a-col-memo { width: 6em; }
.archive-table col.a-col-pdf { width: 7em; }
.archive-table col.a-col-ops { width: 8em; }
/* 幅に入りきらないときは「…」にする（車台番号・メモは、カーソルを合わせると全文が出る） */
.archive-table th, .archive-table td { overflow: hidden; text-overflow: ellipsis; }
/* 文字の多い列は、切らずに折り返す（お客様名・車名・PDFのリンク・操作のボタン） */
.archive-table td.a-name, .archive-table td.a-vehicle, .archive-table td.a-pdf, .archive-table td.a-act { white-space: normal; }
.archive-table td.a-vehicle { overflow-wrap: anywhere; }
.archive-table td.a-act button { white-space: normal; }
/* PDFの2つのリンクは、上下に並べる（「／」は出さない。横に並べると3行になって行が高くなる） */
.archive-table td.a-pdf a { display: block; }
.archive-table td.a-pdf .pdf-sep { display: none; }
/* 車名とグレードは、列の左にそろえる（真ん中寄せだと、グレードの長さで車名の位置がずれる） */
.archive-table .vehicle-name-display { align-items: flex-start; }
.deal-table td button {
  white-space: nowrap;
  line-height: 1.4;
}
.deal-table th, .deal-table td {
  text-align: left;
  padding: 8px 6px;
  vertical-align: middle;
}
.deal-table th {
  border-bottom: 1px solid var(--border);
}
/* 案件（行）の区切りを濃い点線にして、行の境目を目で追いやすくする */
.deal-table tbody td {
  border-bottom: 2px dotted #1c1e21;
}
/* パソコンの表は、横に長くなりすぎないよう、作成日・期限・詳細の列を出さず、
   内容の多い列（状態・契約書PDF・所有権解除・処理先）は折り返して幅を抑える。
   スマホは、以前と同じ、横にスクロールする表のまま */
@media (min-width: 641px) {
  .deal-table th.c-created, .deal-table td.c-created,
  .deal-table th.c-expires, .deal-table td.c-expires,
  .deal-table th.c-open, .deal-table td.c-open { display: none; }
  .deal-table-nowrap td.c-status,
  .deal-table-nowrap td.c-vehicle,
  .deal-table-nowrap td.c-pdf,
  .deal-table-nowrap td.c-lien { white-space: normal; }
  .deal-table td.c-status { min-width: 9em; max-width: 10.5em; }
  .deal-table td.c-vehicle { min-width: 7.5em; max-width: 9em; }
  .deal-table td.c-pdf { max-width: 7em; }
  .deal-table td.c-lien { max-width: 7.5em; }
  /* 処理先の4つのボタンは、2つずつ2段に並べる */
  .deal-table td.c-disposition { min-width: 7.6em; }
  .deal-table td.c-disposition .disposition-chips { flex-wrap: wrap; max-width: 6.6em; }
}
/* スタッフは自分の案件しか見えないので、担当者の列は出さない（管理者だけ） */
.deal-table.hide-creator th.c-creator,
.deal-table.hide-creator td.c-creator { display: none; }

/* --- 案件一覧の検索・絞り込み --- */
.deal-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.deal-search-row input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.deal-search-row button { flex: 0 0 auto; white-space: nowrap; }
/* パソコンでは担当者・状態の絞り込みを常に出す。「絞り込み」ボタンはスマホだけ */
.deal-filter-toggle { display: none; }
.deal-filter-toggle.has-filter {
  background: var(--accent);
  color: #fff;
}
.deal-list-note { margin: 12px 0 0; font-size: 0.8rem; }

@media (max-width: 640px) {
  /* 見出し: 題名とAAメモを1行に、状態ごとの件数は次の行に1列（横にスライド）で並べる */
  .deal-h2-actions { display: contents; }
  .deal-stage-counts {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .deal-stage-counts::-webkit-scrollbar { display: none; }

  /* 検索欄は1行、その下にボタンを横に並べる。担当者・状態の絞り込みは「絞り込み」で開閉する */
  .deal-search-row { flex-wrap: wrap; }
  .deal-search-row input { flex: 1 1 100%; }
  .deal-search-row button { flex: 1 1 0; }
  .deal-filter-toggle { display: inline-block; }
  #dealFilterRow { display: none; }
  #dealListDetails.filters-open #dealFilterRow { display: flex; }
}
.status-pending, .status-submitted, .status-contracted, .status-pdf_generated,
.status-collected, .status-paid, .status-completed {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pending { color: #92400e; background: #fef3c7; }
.status-submitted { color: #1d4ed8; background: #dbeafe; }
.status-pdf_generated, .status-contracted { color: #065f46; background: #d1fae5; }
.status-collected { color: #7c3aed; background: #ede9fe; }
.status-paid { color: #0e7490; background: #cffafe; }
.status-completed { color: #15803d; background: #dcfce7; }

.status-date-note {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.status-date-note.urgent {
  color: var(--danger);
  font-weight: 700;
}
.status-date-note.warning {
  color: #b45309;
  font-weight: 700;
}

/* 案件一覧の段階別アクションボタン（進捗操作） */
.btn-stage-collected { background: #7c3aed; }
.btn-stage-collected:hover { background: #6d28d9; }
.btn-stage-paid { background: #0e7490; }
.btn-stage-paid:hover { background: #0c6178; }
.btn-stage-completed { background: #15803d; }
.btn-stage-completed:hover { background: #116530; }
/* 所有権解除の進捗（残債振込済み・所有権解除中・所有権解除完了にする）。「所有権解除待ち」の件数ボタンと同じ色 */
.btn-lien-next { background: #b45309; color: #fff; }
/* 所有権解除が済むまで「完了」にできないときの注意文 */
.deal-block-note { display: inline-block; color: #b45309; font-size: 0.85rem; line-height: 1.45; }
.btn-lien-next:hover { background: #92400e; }

.staff-group-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}
.staff-group-details[open] {
  padding-bottom: 14px;
}
.staff-group-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 1rem;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* 案件一覧の開閉ボタンは、タップしやすいよう一回り大きくする */
/* 案件一覧は、枠の中にさらに枠を入れず、開閉の見出しを細くして、一覧をすぐ見えるようにする */
#dealListDetails {
  border: none;
  border-radius: 0;
  margin: 0;
  overflow: visible;
}
#dealListDetails[open] { padding-bottom: 0; }
#dealListDetails > summary {
  padding: 2px 0 10px;
  font-size: 0.95rem;
}
#dealListDetails > .panel-body { padding: 0; }
.staff-group-details summary::-webkit-details-marker { display: none; }
.staff-group-details summary::before {
  content: '\25B8';
  display: inline-block;
  margin-right: 0;
  color: var(--accent);
  transition: transform 0.15s;
}
.staff-group-details[open] summary::before {
  transform: rotate(90deg);
}
/* 案件詳細の大見出し（案件情報・お客様提出内容など）は、パネルごとに色分けしたグラデーションにする。
   担当者入力欄の中の①②③などの入れ子の見出しは対象外（子要素の summary だけに当てる） */
#mainPanel > summary { --panel-accent: #2563eb; --panel-from: #dbeafe; --panel-to: #f5f9ff; }
#submissionPanel > summary { --panel-accent: #0891b2; --panel-from: #cffafe; --panel-to: #f3fdff; }
#staffPanel > summary { --panel-accent: #7c3aed; --panel-from: #ede9fe; --panel-to: #faf8ff; }
#pdfPanel > summary { --panel-accent: #16a34a; --panel-from: #dcfce7; --panel-to: #f5fdf8; }
.danger-panel > summary { --panel-accent: #dc2626; --panel-from: #fee2e2; --panel-to: #fff7f7; }
#mainPanel > summary,
#submissionPanel > summary,
#staffPanel > summary,
#pdfPanel > summary,
.danger-panel > summary {
  background: linear-gradient(90deg, var(--panel-from) 0%, var(--panel-to) 100%);
  border-left: 5px solid var(--panel-accent);
}
#mainPanel > summary::before,
#submissionPanel > summary::before,
#staffPanel > summary::before,
#pdfPanel > summary::before,
.danger-panel > summary::before {
  color: var(--panel-accent);
}
/* 案件詳細: 開いた中身は白背景にし、入力欄は黒い枠線、入力欄の項目名は太字にして見やすくする */
.deal-page .staff-group-details {
  background: var(--card);
}
.deal-page .staff-group-details input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.deal-page .staff-group-details select,
.deal-page .staff-group-details textarea {
  border: 1px solid var(--text);
}
.deal-page .staff-group-details label:not(.shaken-ocr-drop) {
  font-weight: 700;
}
/* 項目名の下の補足説明は、太字にせず読みやすいままにする */
.deal-page .staff-group-details label .muted {
  font-weight: 400;
}
.staff-group-details > .staff-form,
.staff-group-details > .panel-body {
  padding: 14px 16px 0;
  margin-bottom: 0;
}
.staff-form-actions {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}
/* 「保存」と取り消せない「決定」を押し間違えないよう、ボタン同士の間を空ける（スマホで縦に並んだときも） */
.staff-form-actions button {
  margin: 0 48px 60px 0;
}
.panel-summary-badge {
  margin-left: auto;
}
.badge-muted {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: #6b7280;
  background: #f1f5f9;
}

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  row-gap: 8px;
  font-size: 0.9rem;
}
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.staff-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px 16px;
  margin-bottom: 14px;
}
.staff-form label {
  margin-bottom: 0;
}
.staff-form label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.staff-form label.checkbox-row input {
  width: auto;
  margin-top: 0;
}
/* 見落とすと後工程が漏れるチェック項目（所有権留保車両）を黒の太字で強調する */
.staff-form label.checkbox-row-emphasized {
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
}
.staff-form-full-row {
  grid-column: 1 / -1;
}
.staff-section-heading {
  grid-column: 1 / -1;
  margin: 10px 0 -2px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text);
}
.staff-section-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.plate-group {
  grid-column: span 2;
}
.plate-group-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 6px;
}
.plate-inputs {
  display: flex;
  gap: 6px;
  align-items: center;
}
.plate-input {
  padding: 8px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  min-width: 0;
}
.plate-office { flex: 1.4; }
.plate-class { flex: 1; }
.plate-hiragana { flex: 0.8; }
.plate-number { flex: 1.2; }

@media (max-width: 480px) {
  .plate-group { grid-column: span 1; }
  .plate-inputs { flex-wrap: wrap; }
  .plate-input { flex: 1 1 40%; }
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.price-row, .link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-top: 14px;
}
.price-row label, .link-row label { flex: 1; min-width: 200px; margin-bottom: 0; }
.link-row button { flex-shrink: 0; }
/* アカウント管理の「店舗」: 名前の欄は短くてよいので、横いっぱいに広げない */
#storesPanel .link-row { margin-top: 8px; }
#storesPanel .link-row label { flex: 0 1 320px; }

.id-images {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.id-images figure {
  margin: 0;
  text-align: center;
}
.id-images img {
  max-width: 280px;
  max-height: 200px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: zoom-in;
  display: block;
  background: #fff;
}
.id-images figcaption {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 40px;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 24px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.pdf-actions { margin-top: 16px; }
.pdf-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pdf-variant-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.pdf-variant-label {
  min-width: 90px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.btn-download { background: #0369a1; }
.btn-download:hover { background: #035581; }
.btn-mail { background: #c2410c; }
.btn-mail:hover { background: #9a3412; }

.danger-panel {
  border-color: #fecaca;
}

/* --- 過去の契約書の取り込み（import.html）--- */
.import-notes {
  margin: 0 0 14px;
  padding-left: 1.2em;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--muted);
}
.import-drop { margin-bottom: 14px; }
.import-default-row label { max-width: 480px; margin-bottom: 0; }
.import-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.import-waiting {
  margin: 0;
  padding: 18px;
  text-align: center;
  color: var(--accent);
  font-weight: 700;
}
.import-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}
.import-preview {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.import-preview-frame {
  width: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f1f5f9;
  cursor: zoom-in;
}
.import-preview-frame canvas,
.import-preview-frame img,
.import-zoom-pages canvas,
.import-zoom-pages img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}
.import-preview-frame canvas + canvas,
.import-zoom-pages canvas + canvas { margin-top: 8px; }
.import-preview-status {
  margin: 0;
  padding: 16px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}
.import-zoom {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.import-zoom-close {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 1001;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.import-zoom-close:hover { background: #e5e7eb; }
.import-zoom-pages {
  width: min(1400px, 200vw);
  margin: 56px auto 24px;
  padding: 0 8px;
}
.import-zoom-pages .import-preview-status { color: #e5e7eb; }
body.import-zoom-open { overflow: hidden; }
.import-warnings {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.85rem;
  font-weight: 600;
}
.import-warnings ul { margin: 0; padding-left: 1.2em; }
.import-warnings a { color: #92400e; }
.import-section-title {
  margin: 16px 0 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}
.import-form > .import-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 14px;
}
.import-grid label { margin-bottom: 0; }
.import-grid .import-wide,
.import-grid .import-plate,
.import-grid .import-total,
.import-grid .import-checkbox { grid-column: 1 / -1; }
.import-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.import-checkbox input { width: auto; margin: 0; }
.import-plate-label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.import-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--ok-bg);
  color: var(--ok-text);
}
.import-total strong { font-size: 1.1rem; }
.import-total-label, .import-total-note { font-size: 0.82rem; }
.import-total.is-mismatch { background: var(--error-bg); color: var(--error); }
.import-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 0;
  background: var(--card);
  border-top: 2px solid var(--border);
}
.import-actions .error { flex-basis: 100%; margin-top: 0; }
.import-allow-duplicate {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #92400e;
  font-weight: 700;
}
.import-allow-duplicate input { width: auto; margin: 0; }
.import-queue {
  margin: 0;
  padding-left: 1.6em;
  font-size: 0.88rem;
}
.import-queue-item {
  padding: 6px 0;
  line-height: 2;
  border-bottom: 1px solid #eef0f3;
}
.import-queue-item::marker { color: var(--muted); }
.import-queue-item > * { margin-right: 10px; }
.import-queue-name { font-weight: 600; word-break: break-all; }
.import-queue-status {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f1f5f9;
  color: var(--muted);
}
.is-reading .import-queue-status, .is-saving .import-queue-status { background: #eff6ff; color: var(--accent); }
.is-ready .import-queue-status, .is-reviewing .import-queue-status { background: #fffbeb; color: #92400e; }
.is-saved .import-queue-status { background: var(--ok-bg); color: var(--ok-text); }
.is-error .import-queue-status { background: var(--error-bg); color: var(--error); }
.import-queue-error { color: var(--error); font-size: 0.82rem; }
.import-queue-item .btn-small { padding: 3px 10px; font-size: 0.78rem; }
.import-done {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--ok-bg);
  color: var(--ok-text);
  font-weight: 700;
}
.import-done p { margin: 0 0 8px; }
.import-done .btn-ghost { margin: 0 6px 4px 0; }
@media (max-width: 900px) {
  .import-review { grid-template-columns: minmax(0, 1fr); }
  .import-preview { position: static; }
  .import-preview-frame { max-height: 55vh; }
  .import-actions { gap: 8px; padding: 8px 0; }
  .import-actions button { flex: 1 1 0; padding: 10px 8px; font-size: 0.85rem; }
  .import-allow-duplicate { font-size: 0.8rem; }
}

/* システム更新のお知らせ（pwa.js）。画面の下に固定して表示する */
.app-update-banner {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 2000;
  width: min(560px, calc(100% - 24px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1e3a8a;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}
.app-update-text { flex: 1; min-width: 0; line-height: 1.4; }
.app-update-text strong { display: block; font-size: 0.95rem; }
.app-update-note { display: block; font-size: 0.75rem; opacity: 0.85; }
.app-update-btn {
  flex: 0 0 auto;
  background: #fff;
  color: #1e3a8a;
  font-weight: 700;
  padding: 10px 16px;
}
.app-update-btn:hover { background: #dbeafe; }
.app-update-btn:disabled { background: #cbd5e1; color: #1e3a8a; }
/* お知らせで画面の一番下のボタン等が隠れないよう、その分の余白を空ける */
body.has-app-update { padding-bottom: 88px; }
body.has-app-update .import-actions { bottom: 84px; }

/* 更新内容のお知らせ（pwa.js）と、使い方ページの「最近の更新」 */
.changelog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.55);
}
.changelog-card {
  width: min(480px, 100%);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 18px 18px 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}
.changelog-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-dark);
}
.changelog-date {
  margin: 10px 0 2px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.changelog-list .changelog-date:first-child { margin-top: 0; }
.changelog-items {
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.88rem;
  line-height: 1.7;
}
.changelog-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.changelog-ok { min-width: 96px; }

/* 案件一覧の処理先（AA・在庫・解体・業販）の選択 */
.disposition-chips { display: flex; gap: 4px; }
.disposition-chip {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
}
.disposition-chip:hover { background: #eef2ff; }
.disposition-chip.is-selected { color: #fff; background: #0f766e; border-color: #0f766e; }
.disposition-chip.is-selected:hover { background: #115e59; }

/* AAメモ */
.aa-schedule-table { min-width: 0; max-width: 420px; }
/* 開催予定はタップで開閉（閉じている間も見出しに次の開催予定だけ出す） */
.aa-schedule-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--accent);
  padding: 6px 0;
  list-style: none;
}
.aa-schedule-details summary::-webkit-details-marker { display: none; }
.aa-schedule-details summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.15s;
}
.aa-schedule-details[open] summary::before { transform: rotate(90deg); }
.aa-schedule-details[open] summary { margin-bottom: 8px; }
.aa-settings { margin-top: 12px; }
.aa-settings summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.aa-venue-settings { margin-top: 10px; }
.aa-venue-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f3;
}
.aa-venue-row label { margin: 0; }
@media (max-width: 640px) {
  .aa-venue-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.aa-show-done { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.aa-list-tools { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; row-gap: 4px; margin: 0 0 6px; }
.aa-owner-filter { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; }
.aa-owner-filter.hidden { display: none; }
.aa-owner-filter select { width: auto; margin: 0; padding: 5px 8px; }
.aa-show-done input { width: auto; margin: 0; }
/* 出品の一覧は項目が多いので、詰まった印象にならないよう行の縦方向にゆとりを持たせる */
.aa-table td, .aa-table th { padding: 16px 10px; }
.aa-table td { vertical-align: top; }
.aa-input { margin-top: 0; padding: 9px 10px; font-size: 0.92rem; line-height: 1.4; transition: background-color 0.3s; }
.aa-input-auctionDate { width: 10em; }
.aa-input-venue { width: 8em; }
.aa-input-round { width: 5.5em; }
.aa-input-lot { width: 5.5em; }
.staff-mode-banner {
  display: block;
  padding: 8px 12px;
  background: #fef3c7;
  color: #92400e;
  border-bottom: 1px solid #fde68a;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.aa-input-soldAmount { width: 9em; display: inline-block; text-align: right; }
.aa-yen { margin-left: 4px; }
.aa-table td.aa-bold, .aa-table td.aa-bold a { font-weight: 700; }
.aa-listing-type { width: 8.5em; }
.aa-profit { margin-top: 4px; font-size: 0.82rem; font-weight: 700; color: #047857; }
.aa-profit.negative { color: #b91c1c; }
/* アカウント一覧の「権限」のプルダウン（表の中で細くならないよう、幅を決めておく） */
.role-select { display: inline-block; width: auto; min-width: 11.5em; margin: 0; padding: 6px 8px; font-size: 0.9rem; font-weight: 600; }

/* --- AA調整（aa-coordination.html）--- */
.aac-meta { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; }
.aac-meta label { flex: 1 1 160px; margin-bottom: 0; font-weight: 700; }
.aac-summary { margin: 8px 0; font-weight: 700; }
/* AA調整: メールで送って取り込む（たたんで出す） */
.aac-mail { margin-top: 14px; border-top: 1px solid var(--border, #e2e8f0); padding-top: 10px; }
.aac-mail > summary { cursor: pointer; font-weight: 700; color: var(--accent, #1d4ed8); }
.aac-mail-body { margin-top: 8px; }
.aac-mail-address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.05rem; word-break: break-all; }
.aac-mail-address button { width: auto; margin: 0; }
.aac-mail-list { list-style: none; padding: 0; margin: 8px 0 0; }
.aac-mail-item { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px dotted var(--border, #e2e8f0); font-size: 0.9rem; }
.aac-mail-when { color: #64748b; white-space: nowrap; }
.aac-mail-status { font-weight: 700; white-space: nowrap; }
.aac-mail-item.is-error .aac-mail-status, .aac-mail-item.is-rejected .aac-mail-status { color: #b91c1c; }
.aac-mail-text { flex: 1 1 200px; word-break: break-all; }
.aac-actions { margin: 8px 0; }
/* ボタンの整理: いちばん使う「表を全画面で見て入力する」を大きく、ほかは「ほかの操作」の中に入れる。
   パソコン（幅641px以上）では、まとめずに横1列で全部出す */
.aac-main-btn { width: auto; margin: 0; padding: 12px 18px; font-size: 1rem; font-weight: 700; }
/* パソコンは、ボタンを全部そのまま横に並べる（「ほかの操作」のボタンは出さない） */
.aac-more-toggle { display: none; }
.aac-more-body { display: flex; flex-wrap: wrap; gap: 8px; }
.aac-more-body > button { width: auto; margin: 0; }
@media (max-width: 640px) {
  /* スマホは、いちばん使う1つを大きく出し、ほかは「ほかの操作」を押したときだけ出す（幅いっぱいの縦並び） */
  .aac-actions { display: block; }
  .aac-main-btn { display: block; width: 100%; margin: 0 0 10px; padding: 15px 12px; font-size: 1.05rem; }
  .aac-more-toggle {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    background: #fff;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: none;
  }
  .aac-more-body { display: none; }
  .aac-more-body.is-open { display: block; }
  .aac-more-body > button { display: block; width: 100%; margin: 8px 0 0; }
  .aac-actions .aac-dirty { display: block; margin-top: 8px; }
}
.aac-table td { vertical-align: top; }
.aac-lot { font-weight: 700; font-size: 1.05rem; }
/* 出品番号の下に出す、セリ予想時刻（CISの画面から取り込む） */
.aac-seri { margin-top: 1px; font-size: 0.78rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.aac-seri-th { font-size: 0.75rem; font-weight: 500; color: var(--accent); }
.aac-table tr.aac-done .aac-seri { color: #8b95a5; }
.aac-car { font-weight: 700; }
.aac-sub { font-size: 0.8rem; color: var(--muted); }
.aac-muted { color: var(--muted); }
.aac-warn { max-width: 16em; font-size: 0.78rem; font-weight: 600; color: #b45309; white-space: normal; }
.aac-change { font-size: 0.8rem; font-weight: 700; color: #1d4ed8; }
.aac-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.aac-badge-exact { background: #d1fae5; color: #065f46; }
.aac-badge-tail, .aac-badge-multiple { background: #fef3c7; color: #92400e; }
.aac-badge-none { background: #e5e7eb; color: #4b5563; }
.aac-check { display: inline-block; width: auto; margin: 4px 6px 4px 4px; transform: scale(1.6); }
.aac-view { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 16px; margin: 8px 0; }
.aac-view label { flex: 0 1 22em; margin-bottom: 0; font-weight: 700; }
.aac-view .muted { flex: 1 1 18em; margin: 0; }
.aac-own > td { background: #f0fdf4; }
.aac-num { text-align: right; white-space: nowrap; }
.aac-pos { color: #047857; font-weight: 700; }
.aac-neg { color: #b91c1c; font-weight: 700; }
.aac-table tfoot td { padding: 10px 6px; border-top: 2px solid var(--border-strong, #9ca3af); background: #f8fafc; font-weight: 700; }
.aac-sheet-title { margin: 16px 0 0; font-size: 1.9rem; font-weight: 800; line-height: 1.3; color: #dc2626; }
.aac-unit { margin: 2px 0 8px; font-size: 0.85rem; }
/* 長い説明（金額の単位など）。スマホでは押したときだけ出し、パソコンではそのまま出す */
.aac-note { border: 0; margin: 0 0 8px; overflow: visible; }
.aac-note > summary { display: none; }
@media (max-width: 640px) {
  .aac-note > summary {
    display: block;
    padding: 6px 0;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
  }
  .aac-note > summary::-webkit-details-marker { display: none; }
  .aac-note > summary::after { content: " ▾"; }
  .aac-note[open] > summary::after { content: " ▴"; }
}
.aac-table th { white-space: nowrap; font-size: 0.8rem; }
.aac-table td { padding: 6px 6px; font-size: 0.9rem; }
.aac-counts { white-space: nowrap; font-size: 0.8rem; color: var(--muted); }
/* 打ち込む欄は、指でも押しやすいよう大きくする（高さ40px以上・文字16px。16px未満だと、iPhoneで押したときに画面が拡大されてしまう） */
.aac-input-cell { padding: 4px 5px; }
.aac-in { display: block; box-sizing: border-box; width: 7.5em; min-height: 42px; margin: 0; padding: 8px 9px; font-size: 1rem; text-align: right; }
.aac-in-staff { width: 5.8em; padding-right: 4px; text-align: left; font-weight: 700; } /* 名前は3〜4文字なので、少し狭く */
.aac-in-result { width: 7.5em; text-align: left; font-weight: 700; }
@media (max-width: 640px) {
  .aac-in { min-height: 46px; }
}
/* 列の区切りの縦線。固定した列（出品番号・車種名）でも、線が一緒に動くよう、border-collapse は使わない */
.aac-table { border-collapse: separate; border-spacing: 0; }
.aac-table th, .aac-table td { border-right: 1px solid #b4bdca; }
.aac-table th:first-child, .aac-table td:first-child { border-left: 1px solid #b4bdca; }
.aac-table thead th { border-bottom: 1px solid #b4bdca; }
.aac-in-result[data-result="成約"] { color: #047857; background: #ecfdf5; }
.aac-in-result[data-result="流れ"] { color: #b91c1c; background: #fef2f2; }
.aac-foot-label { font-size: 1rem; }
.aac-warn-box { margin: 8px 0; padding: 10px 12px; border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.9rem; font-weight: 600; }
.aac-back { display: inline-block; font-size: 0.9rem; }
.aac-fs-search { display: block; box-sizing: border-box; width: 11em; min-height: 38px; margin: 0; padding: 6px 10px; font-size: 1rem; }
td.aac-none { padding: 18px 10px; color: var(--muted); font-size: 0.95rem; }
.aac-sellout-tax { min-height: 1.1em; margin-top: 2px; text-align: right; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.aac-table tr.aac-done .aac-sellout-tax { color: #9aa3b2; }
/* セリ予想時刻の受け取り画面（aa-times-relay.html）と、ブックマークレットの案内 */
.relay-wrap { max-width: 460px; margin: 0 auto; padding: 16px; }
.relay-title { margin: 0 0 10px; font-size: 1.15rem; }
.relay-h2 { margin: 16px 0 6px; font-size: 0.95rem; }
.relay-state { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.relay-note { font-size: 0.82rem; }
.relay-log { margin: 0; padding: 0; list-style: none; font-size: 0.85rem; }
.relay-log-item { padding: 6px 0; border-bottom: 1px solid var(--border); }
.relay-log-item.ok { color: #15803d; font-weight: 700; }
.relay-log-item.error { color: var(--danger); font-weight: 700; }
.relay-log-item.warn { color: #b45309; }
.relay-log-item.same { color: var(--muted); }
.relay-drag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.relay-drag {
  display: inline-block;
  padding: 10px 16px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  cursor: grab;
}
.aac-textarea { display: block; box-sizing: border-box; width: 100%; max-width: 28em; margin: 6px 0 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 1rem; line-height: 1.5; }
.aac-dirty { align-self: center; color: #b45309; font-size: 0.9rem; font-weight: 700; }
/* 自動保存の状態: 保存待ち・保存中はオレンジ、保存済みは控えめな灰色、失敗は赤 */
.aac-dirty[data-state="saved"] { color: var(--muted); font-weight: 500; }
.aac-dirty[data-state="error"] { color: var(--danger); }
/* 出品番号と車種名の列は、横にスクロールしても左に固定する（他の列はスクロールする）。
   出品番号は左端（left: 0）、車種名はその右（出品番号の幅ぶんだけ空ける）に固定する。
   下の列が透けないよう、背景は塗りつぶし。車種名の右側に影を付けて、固定の境目が分かるようにする */
/* 出品番号の列の幅。見出しと本文で文字の大きさが違うので、em ではなく px・rem で決める。
   実際の幅は、表を出すときに、いちばん長い番号にぴったり合わせて、JS（fitLotColumn）が上書きする */
.aac-table { --aac-lot-w: 3.5rem; }
.aac-table th.aac-lotcol, .aac-table td.aac-lot, .aac-table th.aac-name, .aac-table td.aac-name {
  position: sticky;
  z-index: 1;
  background: #fff;
}
.aac-table th.aac-lotcol, .aac-table td.aac-lot {
  left: 0;
  padding-left: 4px;
  padding-right: 4px;
  box-sizing: border-box;
  width: var(--aac-lot-w);
  min-width: var(--aac-lot-w);
  max-width: var(--aac-lot-w);
}
.aac-table th.aac-name, .aac-table td.aac-name {
  left: var(--aac-lot-w);
  box-shadow: 4px 0 6px -3px rgba(15, 23, 42, 0.28);
}
.aac-table td.aac-name { min-width: 9em; max-width: 11em; white-space: normal; }
.aac-table .aac-own > td.aac-lot, .aac-table .aac-own > td.aac-name { background: #f0fdf4; }
/* 落札金額が入った（終わった）車の行は、灰色にする。自社出品の緑色や、固定した列の背景も、灰色にそろえる */
.aac-table tr.aac-done > td { background: #e9ecf0; color: #8b95a5; }
.aac-table tr.aac-done > td.aac-lot, .aac-table tr.aac-done > td.aac-name { background: #e9ecf0; }
.aac-table tr.aac-done .aac-sub, .aac-table tr.aac-done .aac-muted, .aac-table tr.aac-done .aac-counts { color: #9aa3b2; }
.aac-table tr.aac-done .aac-pos, .aac-table tr.aac-done .aac-neg { color: #7b8596; }
.aac-table tr.aac-done .aac-in { background: #e9ecf0; color: #6b7686; }
.aac-table tr.aac-done .aac-in-result[data-result] { background: #e9ecf0; color: #6b7686; }
.aac-table tr.aac-done a { color: #8b95a5; }
/* 表の全画面表示（「表を全画面で見る」）。題名から表までを、画面いっぱいに広げる。
   対応していないブラウザ（iPhoneなど）でも使えるよう、まず画面いっぱいの表示（fixed）にして、
   そのうえで、使えるブラウザでは本物の全画面（ブラウザの枠も消える）にもする */
.aac-full-bar { display: none; }
.aac-table-wrap.aac-full {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  padding: 8px 10px;
  background: #fff;
}
.aac-table-wrap.aac-full .aac-full-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.aac-table-wrap.aac-full .aac-full-bar button { width: auto; margin: 0; padding: 6px 12px; }
.aac-table-wrap.aac-full .aac-sheet-title { margin: 0 0 4px; font-size: 1.3rem; }
.aac-table-wrap.aac-full .aac-unit, .aac-table-wrap.aac-full .aac-note { display: none; }
/* 全画面のときは、表を画面の下まで広げる（通常表示の「画面の7割まで」の指定を打ち消す） */
#sheetPanel .aac-table-wrap.aac-full .table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
/* 縦にもスクロールするので、見出しの行も上に固定する（左上の出品番号・車種名の見出しは、いちばん手前） */
.aac-table-wrap.aac-full .aac-table thead th { position: sticky; top: 0; z-index: 2; background: #fff; }
.aac-table-wrap.aac-full .aac-table thead th.aac-lotcol, .aac-table-wrap.aac-full .aac-table thead th.aac-name { z-index: 3; }
body.aac-full-open { overflow: hidden; }
/* 全画面を「横向き」にする。スマホの向きを固定できるブラウザ（Android Chromeなど）では、それで横向きにする。
   固定できないブラウザ（iPhoneなど）では、代わりに、表の中身ごと90度回して横向きに見せる（回しても、打ち込みはできる） */
.aac-table-wrap.aac-full.aac-rotate {
  width: 100dvh;
  height: 100dvw;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: top left;
}
/* 全画面のときの、金額を打つテンキー（画面の中に出すので、スマホのキーボードが画面の大半を占めない）。
   表の右側に置き、開いている間は、表の場所をその分だけ狭くする（表と見比べながら打てる） */
.aac-numpad { display: none; }
/* テンキーは、全画面の枠（position: fixed）の中に置くので、ここで position を上書きしてはいけない
   （上書きすると、全画面が画面いっぱいにならなくなる） */
.aac-table-wrap.aac-full .aac-numpad.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  box-sizing: border-box;
  width: 230px;
  padding: 6px;
  border-left: 1px solid var(--border-strong, #9ca3af);
  background: #f8fafc;
}
.aac-table-wrap.aac-full.aac-pad-open .table-scroll { margin-right: 230px; }
/* 上の表示（どの欄を打っているか・今の値）は、高さを決めておく（キーの位置がずれないように） */
.aac-numpad-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  box-sizing: border-box;
  height: 26px;
  padding: 0 2px 4px;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  color: var(--muted);
}
.aac-numpad-head span:last-child { flex: 0 0 auto; font-size: 1.05rem; color: var(--text); }
.aac-numpad-head span:first-child { overflow: hidden; text-overflow: ellipsis; }
.aac-numpad-keys { flex: 1 1 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.aac-numpad-keys button {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: none;
}
.aac-numpad-keys button:active { background: #e2e8f0; }
.aac-numpad-keys .aac-numpad-sub { font-size: 0.85rem; background: #eef2f7; }
.aac-numpad-keys .aac-numpad-close { grid-column: span 2; }
/* いまテンキーで打っている欄を、目立たせる */
.aac-table input.aac-in-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.35); background: #eff6ff; }
/* スマホのキーボードが出ている間は、題名などを隠して、表に使える場所を増やす
   （縮める大きさは、admin-aa-sheet.js が、キーボードの高さから決める） */
.aac-table-wrap.aac-full.aac-kb { padding: 4px 6px; }
.aac-table-wrap.aac-full.aac-kb .aac-sheet-title { display: none; }
.aac-table-wrap.aac-full.aac-kb .aac-full-bar { margin-bottom: 2px; }
.aac-table-wrap.aac-full.aac-kb .aac-full-bar button { padding: 4px 8px; font-size: 0.8rem; }
.aac-table-wrap.aac-full.aac-kb .aac-fs-search { width: 7em; min-height: 32px; padding: 3px 8px; }
.aac-table-wrap.aac-full.aac-kb #fsMsg { display: none; }
/* スマホの全画面（横向き・90度回した表示のどちらも）は、1画面に見える台数を増やすため、全体を詰める。
   題名は操作バーの中に小さく出し、見出しと行の高さを低くする（打ち込む欄の文字は16pxのまま。iPhoneで拡大されないように） */
.aac-fs-title { display: none; }
/* 全画面の帯の右はしの、今の時刻（黒地に白で、保存の知らせの時刻と見分けられるように） */
.aac-fs-clock { display: none; }
.aac-table-wrap.aac-full .aac-fs-clock {
  display: inline-block;
  flex: none;
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
@media (max-width: 640px), (max-height: 500px) {
  .aac-table-wrap.aac-full { padding: 4px 6px; }
  .aac-table-wrap.aac-full .aac-sheet-title { display: none; }
  .aac-table-wrap.aac-full .aac-full-bar { flex: none; flex-wrap: nowrap; gap: 6px; margin-bottom: 3px; overflow: hidden; }
  .aac-table-wrap.aac-full .aac-full-bar button { flex: none; padding: 4px 8px; font-size: 0.8rem; }
  .aac-table-wrap.aac-full .aac-fs-search { flex: 0 1 8em; width: 8em; min-width: 5em; min-height: 32px; margin: 0; padding: 3px 8px; }
  .aac-table-wrap.aac-full .aac-fs-title { display: block; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; font-weight: 800; color: #dc2626; }
  .aac-table-wrap.aac-full #fsMsg, .aac-table-wrap.aac-full #fsDirty { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.75rem; }
  .aac-table-wrap.aac-full .aac-table thead th { padding: 3px 5px; font-size: 0.7rem; line-height: 1.15; }
  .aac-table-wrap.aac-full .aac-table td { padding: 3px 5px; font-size: 0.85rem; line-height: 1.25; }
  .aac-table-wrap.aac-full .aac-table td.aac-input-cell { padding: 2px 4px; }
  .aac-table-wrap.aac-full .aac-in { min-height: 34px; padding: 3px 6px; }
  .aac-table-wrap.aac-full .aac-sellout-tax { min-height: 0; margin-top: 0; font-size: 0.75rem; line-height: 1.1; }
  .aac-table-wrap.aac-full .aac-lot { font-size: 0.95rem; }
  .aac-table-wrap.aac-full .aac-seri { font-size: 0.75rem; }
  .aac-table-wrap.aac-full .aac-table td.aac-name { min-width: 6em; max-width: 7em; }
  .aac-table-wrap.aac-full .aac-table td.aac-name .aac-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* グレードは1行（長いときは「…」） */
  .aac-table-wrap.aac-full .aac-numpad.open { width: 200px; }
  .aac-table-wrap.aac-full.aac-pad-open .table-scroll { margin-right: 200px; }
}
/* 全画面ではない通常の表示でも、下にスライドしたときに見出し（項目名）が見えるように、
   表の場所だけを縦にスクロールさせて、見出しの行を上に固定する（一番下の合計は、表の下に出たまま） */
#sheetPanel .table-scroll {
  max-height: 72vh;
  max-height: 72dvh;
  min-height: 260px; /* 画面の高さがうまく取れないブラウザでも、表がつぶれないように */
  overflow: auto;
}
#sheetPanel .aac-table thead th { position: sticky; top: 0; z-index: 2; background: #fff; }
#sheetPanel .aac-table thead th.aac-lotcol, #sheetPanel .aac-table thead th.aac-name { z-index: 3; }
/* スマホは画面が狭いので、固定する列を少し細くして、動かせる列の場所を残す */
@media (max-width: 640px) {
  .aac-table td.aac-name { min-width: 7em; max-width: 8em; }
}
.aac-set { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.aac-set-title { margin-bottom: 6px; font-weight: 700; }
.aac-version { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; }
.aac-version-info { flex: 1 1 14em; font-size: 0.88rem; }
/* 調整表の一覧: 今日の回は大きく目立たせ、ほかの回は小さく1行にする */
.aac-set.is-today { padding: 14px; border: 2px solid var(--accent); background: #eff6ff; }
.aac-set.is-today .aac-set-title { font-size: 1.15rem; }
.aac-today-badge { display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.85rem; font-weight: 800; vertical-align: 2px; }
.aac-set.is-today .aac-today-open { flex: 1 1 8em; display: block; padding: 12px 16px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 1.05rem; font-weight: 800; text-align: center; text-decoration: none; }
.aac-set.is-today .aac-version { gap: 10px; }
.aac-set.is-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; padding: 6px 10px; background: #fff; }
.aac-set.is-compact .aac-set-name { flex: 1 1 12em; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.aac-set.is-compact .btn-small { padding: 3px 10px; font-size: 0.8rem; min-height: 0; }
.aac-history summary { margin-top: 6px; font-size: 0.85rem; color: var(--accent); cursor: pointer; }

/* 出品一覧の上に出す、開催日ごとの粗利予想の合計（その日の分だけを足す。本日の行は目立たせる） */
.aa-day-summary {
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}
.aa-day-summary-title { margin: 0; padding: 8px 12px; font-size: 0.82rem; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); }
.aa-day-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.aa-day-row:last-child { border-bottom: none; }
.aa-day-row.is-today { background: #ecfdf5; }
.aa-day-date { font-weight: 700; min-width: 6.5em; }
.aa-day-today { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #047857; color: #fff; font-size: 0.75rem; font-weight: 700; }
.aa-day-count { font-size: 0.85rem; color: var(--muted); }
.aa-day-profit { margin-left: auto; font-size: 1.1rem; font-weight: 700; color: #047857; white-space: nowrap; }
.aa-day-profit.negative { color: #b91c1c; }
.aa-day-profit.pending { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.aa-day-note { flex: 1 1 100%; font-size: 0.76rem; color: var(--muted); }
.aa-listing-badge-wrap { margin-top: 6px; text-align: center; }
.aa-name-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.aa-table td.aa-bold .aa-staff-name { flex: none; padding: 1px 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.aa-listing-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.aa-listing-normal { background: #dbeafe; color: #1d4ed8; }
.aa-listing-deregistration { background: #fee2e2; color: #b91c1c; }
.aa-listing-early_transfer { background: #d1fae5; color: #047857; }
.aa-input.aa-saved { background-color: var(--ok-bg); border-color: #6ee7b7; }
.aa-pick { margin-top: 0; padding: 9px 10px; font-size: 0.88rem; width: 10.5em; }
.aa-round-hint { display: block; margin-top: 4px; font-size: 0.75rem; color: #b45309; font-weight: 700; }
.aa-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
/* 案件一覧の状態欄に出す場合は、前の要素（状態バッジ等）と少し間隔を空ける */
.aa-status-list-badge { margin-left: 8px; margin-top: 4px; }
.aa-status-waiting { background: #f1f5f9; color: var(--muted); }
.aa-status-listed { background: #eff6ff; color: var(--accent); }
.aa-status-sold { background: #fffbeb; color: #92400e; }
.aa-status-done { background: var(--ok-bg); color: var(--ok-text); }
.aa-status-cell .btn-small { margin: 10px 6px 0 0; padding: 6px 12px; font-size: 0.82rem; }
.aa-status-cell .btn-ghost.btn-small { padding: 5px 12px; font-size: 0.78rem; }
.aa-status-cell .status-date-note { margin-top: 4px; }
.aa-flowed-wrap { display: inline-block; }
.aa-flowed-btn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.aa-flowed-btn:hover { background: #fef3c7; }

/* 遺産案件（担当者入力欄のチェック・案件詳細の状態） */
.staff-form label.checkbox-row-inheritance { color: var(--danger); }
.inheritance-status { color: var(--danger); font-weight: 700; }
.inheritance-docs-notice {
  padding: 10px 12px;
  border: 2px solid var(--danger);
  border-radius: 8px;
  background: var(--error-bg);
  color: var(--danger);
}
.inheritance-docs-notice p { margin: 0; }
.inheritance-docs-title { font-weight: 700; font-size: 0.98rem; }
.inheritance-docs-amount { margin-top: 4px !important; font-weight: 700; font-size: 1.1rem; }
.inheritance-docs-note { margin-top: 4px !important; font-size: 0.82rem; }

/* 読み取りに使った車検証の写真を開くボタン（案件一覧・完了済み一覧の車両欄） */
.shaken-view-btn {
  margin-left: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  color: var(--accent);
  background: #eff6ff;
  border: 1px solid #93c5fd;
}
.shaken-view-btn:hover { background: #dbeafe; }
.shaken-view-detail { margin-top: 8px; }

/* 画像の拡大表示（image-viewer.js） */
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  flex-direction: column;
  background: #0f172a;
}
.image-viewer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #fff;
}
.image-viewer-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.image-viewer-close {
  flex: 0 0 auto;
  background: #fff;
  color: var(--text);
  border-radius: 999px;
}
.image-viewer-close:hover { background: #e5e7eb; }
.image-viewer-body {
  flex: 1;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 8px;
}
.image-viewer-body img {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  cursor: zoom-in;
}
.image-viewer-body img.is-zoomed {
  width: 250%;
  max-width: none;
  cursor: zoom-out;
}
.image-viewer-status { margin: 24px 0; text-align: center; color: #e5e7eb; }
.image-viewer-pdf-link {
  display: block;
  width: fit-content;
  margin: 40px auto;
  padding: 12px 20px;
  background: #fff;
  color: var(--accent);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.image-viewer-hint { margin: 0; padding: 8px; text-align: center; font-size: 0.75rem; color: #cbd5e1; }
body.image-viewer-open { overflow: hidden; }

/* 契約書PDFから取り込んだ案件の目印（案件一覧・完了済み一覧・案件詳細） */
.imported-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
  color: #6b21a8;
  background: #f3e8ff;
}
.import-entry-link { font-size: 0.82rem; }

.error {
  color: var(--error);
  background: var(--error-bg);
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 12px;
}
.muted { color: var(--muted); font-size: 0.85rem; }
/* 使用者が所有者と同じときの表記（案件詳細の担当者入力欄） */
.owner-user-same-note {
  color: #15803d;
  background: #dcfce7;
  padding: 10px 12px;
  border-radius: 6px;
  margin: 12px 0 0;
  font-weight: 700;
}
.hidden { display: none !important; }
.req { color: var(--danger); font-size: 0.75rem; font-weight: bold; }

/* ===== スマホ用の新しいレイアウト（幅640px以下）=====
   1. 下のタブ（admin-sidebar.js）  2. 案件一覧: 名前の列を左に固定  3. 完了済み一覧: 1件ずつのカード
   ボタンの色のルール: 青の塗りつぶし＝次にやること／灰色の枠＝見る・開く／赤い文字＝取り消す・戻す */
.m-bottom-nav, .m-sheet-overlay { display: none; }
.deal-name-vehicle, .deal-next-mobile, .deal-summary-btn .lbl-short, .deal-bank-btn .lbl-short { display: none; }
.archive-shaken-mobile { display: none; }
.date-short { display: none; }

@media (max-width: 640px) {
  /* --- 1. 下のタブ。上の小さなボタン列は、下のタブと「その他」に移したので出さない --- */
  .admin-header > div { display: none; }
  .admin-header h1, .admin-header h1[data-short] { font-size: 1.05rem; white-space: normal; }
  .admin-header h1[data-short]::after { content: none; }
  body.has-bottom-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .m-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid var(--border);
    background: #fff;
  }
  .m-bottom-nav.is-hidden { display: none; }
  .m-bottom-nav .m-tab {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    min-height: 58px;
    margin: 0;
    padding: 7px 2px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
  }
  .m-bottom-nav .m-tab:hover { background: transparent; }
  .m-bottom-nav .m-tab.active { color: var(--accent); }
  .m-tab-icon { display: block; height: 24px; }
  .m-tab-icon svg { display: block; }
  .m-sheet-overlay.open {
    display: flex;
    align-items: flex-end;
    position: fixed;
    inset: 0;
    z-index: 950;
    background: rgba(15, 23, 42, 0.45);
  }
  .m-sheet {
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-sizing: border-box;
    padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    background: #fff;
  }
  .m-sheet .m-sheet-row {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 16px 20px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
  }
  .m-sheet .m-sheet-row:hover { background: #f8fafc; }
  /* 「AA関係」のようなまとまり: 小さな見出しの下に、少し内側に並べる */
  .m-sheet .m-sheet-group-title {
    padding: 10px 20px 6px;
    background: #f5f3ff;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #6d28d9;
  }
  .m-sheet .m-sheet-sub { padding-left: 34px; }
  .m-sheet .m-sheet-row.active { color: var(--accent); }
  .m-sheet .m-sheet-logout { margin-top: 10px; border-top: 8px solid #f1f5f9; border-bottom: 0; color: var(--danger); }
  .m-sheet .m-sheet-close { border-bottom: 0; color: var(--muted); text-align: center; }
  /* 画面の下に固定している他のもの（更新のお知らせ・取り込みのボタン）は、タブの上にずらす */
  body.has-bottom-nav .app-update-banner { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  body.has-bottom-nav .import-actions { bottom: 62px; }
  body.has-bottom-nav.has-app-update { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  body.has-bottom-nav.has-app-update .import-actions { bottom: 146px; }
  /* 契約書PDFを作る画面では、タブを出さない */
  body.pdf-view .m-bottom-nav, body.pdf-view .m-sheet-overlay { display: none !important; }
  body.pdf-view.has-bottom-nav { padding-bottom: 0; }

  /* --- 2. 案件一覧: 顧客名（と車名・次にやること）の列を左に固定して、ほかの列だけ横にスクロールする --- */
  #dealListDetails .deal-table { border-collapse: separate; border-spacing: 0; }
  #dealListDetails .deal-table th.c-name, #dealListDetails .deal-table td.c-name {
    position: sticky;
    left: 0;
    z-index: 2;
    box-sizing: border-box;
    /* 画面の3分の1くらいに収める（スマホの文字を大きくしている人でも広がりすぎないよう、vwでも上限をつける） */
    width: min(8em, 34vw);
    min-width: min(8em, 34vw);
    max-width: min(8em, 34vw);
    padding-left: 8px;
    padding-right: 8px;
    white-space: normal;
    background: #fff;
    border-right: 1px solid var(--border-strong, #9ca3af);
    box-shadow: 3px 0 5px -3px rgba(15, 23, 42, 0.28);
  }
  #dealListDetails td.c-name .customer-name-short { max-width: 100%; }
  .deal-name-vehicle { display: block; margin-top: 2px; font-size: 0.75rem; line-height: 1.25; color: var(--muted); }
  .deal-next-desktop { display: none; }
  /* 「次にやること」のボタンは、小さめ・1行にして、縦に場所を取らないようにする（改行は出さない）。
     「.deal-table td button」の指定（白い所での折り返しなし）に負けないよう、同じくらい細かく書く */
  .deal-table td button.deal-next-mobile {
    display: inline-block;
    box-sizing: border-box;
    width: auto;
    max-width: 100%;
    margin: 5px 0 0;
    padding: 4px 7px;
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    /* ふだんは1行に収まる。スマホの文字を大きくしている人でも、隣の列にはみ出さないよう、入らなければ折り返す */
    white-space: normal;
    word-break: break-all;
  }
  .deal-next-mobile br { display: none; }
  /* 色は、次の段階の色（PCの進捗ボタンと同じ）。ステータスの色と揃えて、どの段階に進めるボタンか分かるようにする */
  .deal-table td button.deal-next-mobile.btn-stage-collected { background: #7c3aed; }
  .deal-table td button.deal-next-mobile.btn-stage-paid { background: #0e7490; }
  .deal-table td button.deal-next-mobile.btn-stage-completed { background: #15803d; }
  #dealListDetails .deal-summary-btn { box-sizing: border-box; width: 100%; padding: 6px 3px; font-size: 0.75rem; text-align: center; }
  .deal-summary-btn .lbl-long { display: none; }
  .deal-summary-btn .lbl-short { display: inline; }
  /* 取り消す・戻すは、ほかのボタンから離して、赤い文字にする */
  #dealListDetails td.c-action .deal-undo-btn,
  #dealListDetails td.c-lien .deal-undo-btn { display: block; margin: 12px 0 0; color: var(--danger); border-color: var(--danger); background: transparent; }

  /* --- 3. 完了済み一覧: 1件ずつのカード --- */
  .archive-table.deal-table { display: block; width: 100%; min-width: 0; table-layout: auto; }
  .archive-table thead, .archive-table colgroup { display: none; }
  .archive-table tbody { display: block; }
  .archive-table.deal-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name date" "vehicle vehicle" "plate plate" "chassis chassis" "price act" "memo memo" "pdf pdf";
    column-gap: 8px;
    row-gap: 2px;
    margin: 0 0 10px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong, #cbd5e1);
    border-radius: 12px;
    background: var(--card);
  }
  .archive-table.deal-table tbody td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; text-align: left; white-space: normal; }
  .archive-table.deal-table tbody td[data-empty] { display: none; }
  .archive-table.deal-table tbody td.a-name { grid-area: name; font-size: 1rem; font-weight: 700; line-height: 1.35; }
  .archive-table.deal-table tbody td.a-date { grid-area: date; align-self: center; color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
  .archive-table.deal-table tbody td.a-date::before { content: "完了 "; }
  .archive-table td.a-date .date-full { display: none; }
  .archive-table td.a-date .date-short { display: inline; }
  /* 月ごとのまとまり（外側の枠）の余白を詰めて、カードを広く使う */
  #archiveContainer > .panel { padding: 14px 10px; }
  #archiveContainer > .panel h2 { margin: -14px -10px 12px; padding: 12px 14px; }
  .archive-table.deal-table tbody td.a-vehicle { grid-area: vehicle; font-size: 0.92rem; line-height: 1.35; }
  /* カードでは、車名とグレードを横に並べる（縦に2行にすると、そのぶんカードが高くなる） */
  .archive-table.deal-table tbody td.a-vehicle .vehicle-name-display { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 5px; }
  .archive-table.deal-table tbody td.a-plate { grid-area: plate; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
  .archive-table.deal-table tbody td.a-plate::before { content: "ナンバー "; }
  .archive-table.deal-table tbody td.a-chassis { grid-area: chassis; color: var(--muted); font-size: 0.8rem; line-height: 1.35; word-break: break-all; }
  .archive-table.deal-table tbody td.a-chassis::before { content: "車台番号 "; }
  .archive-table.deal-table tbody td.a-price { grid-area: price; margin: 2px 0 0; font-size: 1.02rem; font-weight: 700; }
  .archive-table.deal-table tbody td.a-memo { grid-area: memo; overflow: visible; text-overflow: clip; color: var(--muted); font-size: 0.82rem; }
  .archive-table.deal-table tbody td.a-memo::before { content: "メモ: "; }
  .archive-table.deal-table tbody td.a-pdf { grid-area: pdf; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
  .archive-table.deal-table tbody td.a-pdf .pdf-sep { display: none; }
  .archive-table.deal-table tbody td.a-pdf a, .archive-table.deal-table tbody td.a-pdf .archive-shaken-mobile {
    flex: 1 1 0;
    min-width: 6.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 38px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }
  .archive-shaken-desktop { display: none; }
  .archive-table.deal-table tbody td.a-act { grid-area: act; align-self: center; margin-top: 0; text-align: right; }
  .archive-table.deal-table tbody td.a-act .archive-revert-btn {
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: underline;
  }
}

/* --- かんたん表示（はじめて使う人向けに、メニューを案件の作業に必要なものだけにする。admin-sidebar.js）--- */
body.simple-mode .simple-hide { display: none !important; }
.simple-only { display: none !important; }
body.simple-mode .m-bottom-nav .m-tab.simple-only { display: flex !important; }
/* サイドバーのいちばん下の切り替え（目立たせすぎない） */
.admin-sidebar .admin-sidebar-simple-toggle {
  display: block;
  width: auto;
  margin: 14px 10px 0;
  padding: 8px 10px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
  box-shadow: none;
}
.admin-sidebar .admin-sidebar-simple-toggle:hover { background: #f1f5f9; color: var(--text); }
/* スマホの「その他」の切り替えの行 */
.m-sheet .m-sheet-simple { color: var(--accent); }

/* --- 案件詳細の「いまどの段階か・次にやること」（deal-steps.js）--- */
.deal-steps {
  display: block;
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.deal-steps.hidden { display: none; }
.deal-steps-list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deal-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
/* 段階と段階をつなぐ線（前の段階まで進んでいれば緑） */
.deal-step::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: #e2e8f0;
  z-index: 0;
}
.deal-step:first-child::before { display: none; }
.deal-step.is-done::before,
.deal-step.is-current::before { background: #22c55e; }
.deal-step-num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 700;
}
.deal-step.is-done .deal-step-num { background: #22c55e; color: #fff; }
.deal-step.is-current .deal-step-num {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}
.deal-step-label { font-size: 0.76rem; line-height: 1.3; color: var(--muted); }
.deal-step.is-current .deal-step-label { color: var(--accent); font-weight: 700; }
.deal-step.is-done .deal-step-label { color: #15803d; }
/* 次にやること */
.deal-steps-next {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eff6ff;
}
.deal-steps-next.is-complete { background: #ecfdf5; }
.deal-steps-next-title { margin: 0 0 2px; font-size: 0.78rem; font-weight: 700; color: var(--accent); }
.deal-steps-next.is-complete .deal-steps-next-title { color: #047857; }
.deal-steps-next-text { margin: 0; font-size: 0.9rem; line-height: 1.7; color: var(--text); }
.deal-steps-next-btn {
  display: inline-block;
  width: auto;
  margin: 10px 0 0;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}
@media (max-width: 640px) {
  .deal-steps { padding: 12px 8px 10px; }
  .deal-step-num { width: 26px; height: 26px; font-size: 0.8rem; }
  .deal-step::before { top: 12px; }
  .deal-step-label { font-size: 0.75rem; } /* 12px より小さくしない（2026-10-22 全体テスト。前は 0.66rem） */
  .deal-steps-next { margin-top: 10px; padding: 10px 12px; }
  .deal-steps-next-text { font-size: 0.86rem; }
  .deal-steps-next-btn { display: block; width: 100%; }
}

/* --- 練習用の案件（はじめて使う人が、本番と同じ流れを試すため）--- */
/* 案件一覧の入口（リピーター様の隣） */
.create-entry-links .practice-entry-btn { border-style: dashed; border-color: #f59e0b; color: #b45309; }
.create-entry-links .practice-entry-btn:hover { background: #fffbeb; }
/* かんたん表示（はじめての人）では、入口を目立たせる */
body.simple-mode .create-entry-links .practice-entry-btn { border-width: 2px; font-weight: 700; }
/* かんたん表示の切り替え（案件一覧のいちばん上。メニューの切り替えと同じもの） */
.create-entry-links .simple-home-toggle { border-color: #93c5fd; color: #1d4ed8; }
.create-entry-links .simple-home-toggle:hover { background: #eff6ff; }
/* 一覧の「練習」の印 */
.practice-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 1px;
  white-space: nowrap;
}
/* 作成直後の案内 */
.practice-note {
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 2px dashed #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.9rem;
  line-height: 1.7;
}
/* 案件画面の帯 */
.practice-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 2px dashed #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  font-size: 0.86rem;
  line-height: 1.6;
}
.practice-banner.hidden { display: none; }
.practice-banner p { flex: 1 1 260px; margin: 0; }
.practice-banner .btn-ghost { border-color: #d97706; color: #b45309; }

/* ===== 新しいデザインの試作（2026-09-26）: いまは案件一覧だけ（index.html の <body class="design-v2">）=====
   1. 色を減らしてスッキリ: 背景は薄い灰色、見出しのグラデーションや左のメニューの色分けをやめる。
      色を使うのは「状態」と「次に押すボタン」だけ（枠だけのボタンは灰色）。
   2. スマホ（幅640px以下）の案件一覧を、1件ずつのカードにする（横スクロールなし）。
      カードの左の線の色＝いまの状態の色。
   元に戻すときは、index.html の body から class="design-v2" を消すだけでよい。 */
body.design-v2 { --bg: #f3f4f6; }
body.design-v2 .panel {
  border-color: #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
body.design-v2 .panel h2 {
  background: #fff;
  border-radius: 12px 12px 0 0;
  border-bottom-color: #eef0f3;
}
/* 枠だけのボタンは灰色にする（青は「押して進める」ボタンだけに残す）。
   :where で弱くして、個別に色を決めているボタン（取り消す＝赤 など）はそのままにする */
body.design-v2 :where(.btn-ghost) { border-color: #d1d5db; color: #374151; }
body.design-v2 :where(.btn-ghost):hover { background: #f3f4f6; }
/* 「取り消す」は、パソコンでもスマホと同じ赤い文字にする（赤＝戻す、のルールをそろえる） */
body.design-v2 .deal-table .deal-undo-btn { color: var(--danger); border-color: #fca5a5; }
body.design-v2 .deal-table .deal-undo-btn:hover { background: #fef2f2; }
/* パソコンの左メニュー: 色分けをやめ、いま開いている画面だけを青で示す */
body.design-v2 .admin-sidebar a[data-color] { background: transparent; color: #374151; }
body.design-v2 .admin-sidebar a[data-color]:hover { background: #f3f4f6; }
body.design-v2 .admin-sidebar a[data-color].active { background: #eff6ff; color: #1d4ed8; border-left-color: #1d4ed8; }
body.design-v2 .admin-sidebar-logout { background: transparent; color: var(--danger); }
body.design-v2 .admin-sidebar-logout:hover { background: #fef2f2; }
/* 概要の小窓の見出しも、グラデーションをやめて1色に */
body.design-v2 .deal-summary-head { background: #1e40af; }

@media (max-width: 640px) {
  /* 一覧の外枠（白い箱）をなくして、カードを灰色の背景の上に並べる */
  body.design-v2 #dealListSection { padding: 0; background: transparent; border: 0; box-shadow: none; }
  body.design-v2 #dealListSection > h2 { margin: 0 0 8px; padding: 4px 2px; background: transparent; border: 0; }
  body.design-v2 #dealListDetails { background: transparent; }
  body.design-v2 #dealListDetails .table-scroll { overflow: visible; }
  body.design-v2 #dealListDetails .table-scroll-top { display: none !important; }
  body.design-v2 #dealListDetails .deal-table { display: block; width: 100%; min-width: 0; margin-top: 10px; }
  body.design-v2 #dealListDetails .deal-table thead { display: none; }
  body.design-v2 #dealListDetails .deal-table tbody { display: block; }

  /* --- 1件ずつのカード --- */
  body.design-v2 #dealListDetails .deal-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name name"
      "status status"
      "vehicle price"
      "plate creator"
      "pdf pdf"
      "disp disp"
      "lien lien"
      "action action";
    column-gap: 10px;
    margin: 0 0 14px;
    padding: 7px 10px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
  }
  /* 左の線の色＝状態の色（上の件数のボタン・状態の印と同じ色） */
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="pending"] { border-left-color: #f59e0b; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="submitted"] { border-left-color: #2563eb; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="contracted"] { border-left-color: #10b981; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="collected"] { border-left-color: #7c3aed; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="paid"] { border-left-color: #0e7490; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="completed"] { border-left-color: #15803d; }
  /* 表のときの指定（左に固定・点線の区切り・折り返しなし など）を、カードではすべて外す */
  body.design-v2 #dealListDetails .deal-table tbody td {
    display: block;
    position: static;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    white-space: normal;
  }
  /* 1行目: お客様名（押すと案件の画面）と、「概要」のボタン */
  body.design-v2 #dealListDetails .deal-table tbody td.c-name {
    grid-area: name;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
  }
  body.design-v2 #dealListDetails td.c-name > a {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    color: var(--text);
    text-decoration: none;
  }
  body.design-v2 #dealListDetails td.c-name .imported-badge,
  body.design-v2 #dealListDetails td.c-name .practice-badge { margin-left: 0; }
  body.design-v2 #dealListDetails td.c-name .deal-name-vehicle,
  body.design-v2 #dealListDetails .deal-table td.c-name button.deal-next-mobile { display: none; }
  body.design-v2 #dealListDetails .deal-table td.c-name .deal-summary-btn {
    width: auto;
    margin: 0 0 0 auto;
    padding: 2px 8px;
    font-size: 0.7rem;
  }

  /* 2行目: 状態と、期限・所有権ありなどの注意 */
  body.design-v2 #dealListDetails .deal-table tbody td.c-status {
    grid-area: status;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 6px;
    margin-top: 3px;
  }
  body.design-v2 #dealListDetails td.c-status > [class^="status-"]:first-child { padding: 0 8px; font-size: 0.75rem; }
  body.design-v2 #dealListDetails td.c-status select.reg-pill { margin: 0; font-size: 0.7rem; padding: 0 18px 0 7px; }
  body.design-v2 #dealListDetails td.c-status .status-done-at { font-size: 0.75rem; }
  body.design-v2 #dealListDetails td.c-status .status-date-note,
  body.design-v2 #dealListDetails td.c-status .pdf-delivery-badge,
  body.design-v2 #dealListDetails td.c-status .aa-status-list-badge { margin: 0; font-size: 0.75rem; }

  /* 3・4行目: 車名と買取金額、ナンバー・車台番号 */
  /* 車名の行は、どのカードでも1行: 車名・グレード（長ければ「…」）と、その右に「車検証」のボタン */
  body.design-v2 #dealListDetails .deal-table tbody td.c-vehicle {
    grid-area: vehicle;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.88rem;
    line-height: 1.3;
  }
  body.design-v2 #dealListDetails td.c-vehicle .vehicle-name-display {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
  }
  body.design-v2 #dealListDetails td.c-vehicle .vehicle-name-display > span { display: inline; }
  body.design-v2 #dealListDetails td.c-vehicle .vehicle-name-grade { margin-left: 6px; }
  body.design-v2 #dealListDetails td.c-vehicle .shaken-view-btn { flex: none; margin: 0; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-price {
    grid-area: price;
    align-self: start;
    margin-top: 4px;
    font-size: 0.9rem;
    line-height: 1.3;
    font-weight: 700;
    white-space: nowrap;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-plate {
    grid-area: plate;
    display: flex;
    flex-wrap: wrap;
    gap: 0 12px;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
  }
  body.design-v2 #dealListDetails td.c-plate > div[data-empty] { display: none; }

  /* 契約書PDF・処理先・所有権解除・担当者: 左に小さく項目名を付けて、細い線で区切る */
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf { grid-area: pdf; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-disposition { grid-area: disp; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-lien { grid-area: lien; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf,
  body.design-v2 #dealListDetails .deal-table tbody td.c-disposition,
  body.design-v2 #dealListDetails .deal-table tbody td.c-lien {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3px 8px;
    margin-top: 3px;
    padding-top: 3px;
    border-top: 1px solid #f1f3f6;
    font-size: 0.8rem;
    line-height: 1.3;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf::before,
  body.design-v2 #dealListDetails .deal-table tbody td.c-disposition::before,
  body.design-v2 #dealListDetails .deal-table tbody td.c-lien::before {
    content: attr(data-label);
    flex: 0 0 5.4em;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
  }
  body.design-v2 #dealListDetails td.c-lien button { padding: 3px 10px; font-size: 0.76rem; }
  body.design-v2 #dealListDetails td.c-disposition .disposition-chip { padding: 1px 9px; font-size: 0.75rem; }
  body.design-v2 #dealListDetails td.c-lien button br { display: none; }
  body.design-v2 #dealListDetails td.c-lien button.btn-lien-next { padding: 6px 12px; font-size: 0.82rem; }
  body.design-v2 #dealListDetails td.c-lien .deal-undo-btn { margin: 0; }
  /* 所有権解除の行も、下の進捗の行と同じ並び: 1段目に「所有権解除」と今の状態、2段目に色つきのボタン（横いっぱい）と、右に「取り消す」 */
  body.design-v2 #dealListDetails .deal-table tbody td.c-lien {
    display: grid;
    grid-template-columns: 5.4em minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 8px;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-lien::before { grid-column: 1; grid-row: 1; }
  body.design-v2 #dealListDetails td.c-lien > div { grid-column: 2 / -1; grid-row: 1; }
  body.design-v2 #dealListDetails .deal-table td.c-lien button.btn-lien-next {
    grid-column: 1 / 3;
    grid-row: 2;
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.86rem;
    white-space: nowrap;
  }
  body.design-v2 #dealListDetails .deal-table td.c-lien button.btn-lien-next:last-child { grid-column: 1 / -1; }
  body.design-v2 #dealListDetails .deal-table td.c-lien button.deal-undo-btn { grid-column: 3; grid-row: 2; padding: 5px 9px; font-size: 0.75rem; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-creator {
    grid-area: creator;
    align-self: end;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
    white-space: nowrap;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-creator::before { content: "担当 "; }

  /* いちばん下: 次にやることのボタン（状態の色）と、その右に「取り消す」。振込先の確認は、入りきらなければ次の行に小さく */
  body.design-v2 #dealListDetails .deal-table tbody td.c-action {
    grid-area: action;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    margin-top: 5px;
    font-size: 0.78rem;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-action:empty { display: none; }
  body.design-v2 #dealListDetails .deal-table td.c-action button.deal-next-desktop {
    display: block;
    flex: 1 1 auto;
    order: 1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.86rem;
    white-space: nowrap;
  }
  body.design-v2 #dealListDetails td.c-action button.deal-next-desktop br { display: none; }
  /* 「取り消す」は、どの行でも右側に（1行に入らず次の行に回ったときも、右に寄せる） */
  body.design-v2 #dealListDetails td.c-action .deal-undo-btn { order: 3; flex: 0 0 auto; margin: 0 0 0 auto; padding: 5px 9px; font-size: 0.75rem; }
  body.design-v2 #dealListDetails td.c-action .deal-block-note { flex: 1 1 12em; font-size: 0.8rem; font-weight: 600; }
  body.design-v2 #dealListDetails td.c-action .deal-block-note br { display: none; }
  /* 振込先の確認は「振込先」と短くして、次にやることのボタンと「取り消す」のあいだに並べる */
  body.design-v2 #dealListDetails td.c-action .deal-bank-btn { order: 2; flex: 0 0 auto; margin: 0; padding: 5px 9px; font-size: 0.75rem; }
  body.design-v2 #dealListDetails td.c-action .deal-bank-btn .lbl-long { display: none; }
  body.design-v2 #dealListDetails td.c-action .deal-bank-btn .lbl-short { display: inline; }

  /* 状態の帯（2026-09-28。3つの案から選んでもらった「案C」）: カードのいちばん上に、状態の色の帯を出す。
     帯の中に、状態・日付・注意書き（振込日・車検・所有権など）が並ぶ。帯で状態が分かるので、左の色の線はなくす */
  body.design-v2 #dealListDetails .deal-table tbody tr {
    grid-template-areas:
      "status status"
      "name name"
      "vehicle price"
      "plate creator"
      "pdf pdf"
      "disp disp"
      "lien lien"
      "action action";
    padding: 0 12px 10px;
    border-left-width: 1px;
    overflow: hidden;
  }
  /* カードの枠は黒（2026-09-28 ご要望） */
  body.design-v2 #dealListDetails .deal-table tbody tr,
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage] { border-color: #111; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-status {
    margin: 0 -12px 7px;
    padding: 5px 12px;
    background: #f3f4f6;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="pending"] td.c-status { background: #fffbeb; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="submitted"] td.c-status { background: #eff6ff; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="contracted"] td.c-status { background: #ecfdf5; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="collected"] td.c-status { background: #f5f3ff; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="paid"] td.c-status { background: #ecfeff; }
  body.design-v2 #dealListDetails .deal-table tbody tr[data-stage="completed"] td.c-status { background: #f0fdf4; }
  /* 帯の中の状態の名前は、札ではなく、状態の色の太い文字で */
  body.design-v2 #dealListDetails .deal-table tbody td.c-status > [class^="status-"]:first-child { padding: 0; background: transparent; font-size: 0.82rem; font-weight: 800; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-status .status-date-note,
  body.design-v2 #dealListDetails .deal-table tbody td.c-status .status-done-at { font-size: 0.75rem; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-status select.reg-pill:not(.reg-status) { background-color: rgba(255, 255, 255, 0.7); }
  body.design-v2 #dealListDetails .deal-table tbody td.c-name { font-size: 1rem; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-vehicle { font-weight: 600; }
  /* 「概要を見る」は、名前の右で青く塗って目立たせる（2026-09-28。3つの置き場所から選んでもらった「案3」） */
  body.design-v2 #dealListDetails .deal-table tbody td.c-name .deal-summary-btn {
    padding: 4px 12px; font-size: 0.78rem; font-weight: 700; color: #fff; background: #1d4ed8; border: 1px solid #1d4ed8; border-radius: 999px;
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-name .deal-summary-btn .lbl-short::after { content: " ›"; }

  /* B案（2026-10-06 ユーザー「案件一覧がやっぱり見づらい」→ 3つの案から「B案がいいかな」）: 項目はそのまま、1行へらす。
     契約書の控えと処理先を同じ行に。処理先は選んだものだけを印で出し、押すと変えられる（4つのボタンはパソコンの表だけ） */
  body.design-v2 #dealListDetails .deal-table tbody tr {
    grid-template-areas:
      "status status"
      "name name"
      "vehicle price"
      "plate creator"
      "pdf disp"
      "lien lien"
      "action action";
  }
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf::before,
  body.design-v2 #dealListDetails .deal-table tbody td.c-disposition::before { content: none; display: none; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf { gap: 4px 6px; font-size: 0.76rem; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-pdf a { display: inline-block; padding: 2px 10px; border: 1px solid #d1d5db; border-radius: 999px; color: #374151; font-weight: 700; text-decoration: none; }
  body.design-v2 #dealListDetails .deal-table tbody td.c-disposition { justify-content: flex-end; }
  body.design-v2 #dealListDetails .deal-table td.c-disposition .disposition-chips { display: none; }
  body.design-v2 #dealListDetails .deal-table td.c-disposition .disp-compact { display: inline-flex; padding: 3px 10px; font-size: 0.76rem; }

  /* お客様名（押すと案件の画面）を、青い大きな字＋下線＋「›」にして、上下にも広げて押しやすく
     （2026-10-07 ユーザー「案件一覧、詳細を見る時に名前を押すと思うけど、開きずらい」→ 3つの案から「案B」）。
     「›」は背景の絵にして、長い名前が「…」で切れても消えないように */
  body.design-v2 #dealListDetails .deal-table tbody td.c-name > a {
    padding: 6px 16px 6px 0;
    color: #1d4ed8;
    font-size: 1.1rem;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath d='M1.5 1.5l5 5-5 5' fill='none' stroke='%231d4ed8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 2px center / 7px 11px;
  }

  /* カードに出さないもの: 中身のない項目、作成日・期限・詳細（「概要」で見られる）、「〜になってから操作できます」の説明。
     上の display: flex などと同じ強さなので、必ずこの一番最後に置く */
  body.design-v2 #dealListDetails .deal-table tbody td[data-empty],
  body.design-v2 #dealListDetails .deal-table tbody td.c-created,
  body.design-v2 #dealListDetails .deal-table tbody td.c-expires,
  body.design-v2 #dealListDetails .deal-table tbody td.c-open,
  body.design-v2 #dealListDetails .deal-table tbody td.muted,
  body.design-v2 #dealListDetails .deal-table.hide-creator tbody td.c-creator { display: none; }
}


/* --- 通知の設定（notify.html）--- */
.notify-options { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.notify-options label { margin: 0; }
.notify-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.95rem; line-height: 1.5; cursor: pointer; }
.notify-check input { width: auto; margin: 4px 0 0; flex: 0 0 auto; transform: scale(1.2); }
.notify-options select { max-width: 320px; }
.notify-sample { margin-top: 12px; }
.notify-sample summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.notify-sample pre {
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f9fafb;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1.6;
  white-space: pre-wrap;
}
/* 案件の画面: 「ご入力のお願い」メール（自動）の状況 */
.reminder-note { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); }
.reminder-note.is-sent { color: #047857; font-weight: 600; }
.notify-howto { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f9fafb; font-size: 0.86rem; line-height: 1.6; }
.notify-howto p { margin: 6px 0 2px; }
.notify-howto ol { margin: 0 0 6px; padding-left: 1.4em; }

.aa-fee { font-size: 0.78rem; color: var(--muted); }
.aac-fee .aac-sub { font-size: 0.7rem; white-space: nowrap; }

/* --- AAメモ: USS横浜 コーナー・手数料の一覧（aa-fee-guide.js）--- */
.fee-guide > summary { cursor: pointer; color: var(--accent); font-weight: 700; padding: 6px 0; }
.fee-guide[open] > summary { margin-bottom: 10px; }
.fee-guide-table { min-width: 720px; font-size: 0.86rem; }
.fee-guide-table th, .fee-guide-table td { padding: 6px 8px; vertical-align: top; }
.fee-guide-table tbody td { border-bottom: 1px solid var(--border); }
.fee-guide-table .fee-lot { white-space: nowrap; font-weight: 700; }
.fee-guide-table .fee-name { white-space: nowrap; font-weight: 600; }
.fee-guide-table .fee-num { text-align: right; white-space: nowrap; }
.fee-guide-table .fee-own { background: #eff6ff; }
.fee-guide-table th.fee-own { color: #1d4ed8; }
.fee-guide-table .fee-summary { min-width: 14em; white-space: normal; color: #374151; }
.fee-guide-legend { margin: 6px 0 10px; font-size: 0.82rem; color: var(--muted); }
.fee-guide-sub { margin: 8px 0 14px; }
.fee-guide-sub > summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.fee-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-top: 10px; }
.fee-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fafafa; font-size: 0.84rem; line-height: 1.55; }
.fee-card p { margin: 0 0 4px; }
.fee-card-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 0.95rem; }
.fee-card-lot { color: var(--muted); font-size: 0.8rem; }
.fee-card-price { font-weight: 600; }
.fee-card-spec { color: #4b5563; font-size: 0.78rem; }
.fee-card-list { margin: 4px 0 0; padding-left: 1.2em; }
.fee-card-note { color: #b45309; font-size: 0.8rem; }
.fee-guide-heading { margin: 16px 0 6px; font-size: 0.95rem; }
.fee-guide-notes { margin: 0; padding-left: 1.3em; font-size: 0.86rem; line-height: 1.65; }
.fee-guide-text { margin: 4px 0; font-size: 0.86rem; }
.fee-extra-table { width: auto; min-width: 0; font-size: 0.86rem; }
.fee-extra-table th, .fee-extra-table tbody td { padding: 5px 10px; border-bottom: 1px solid var(--border); }
.fee-extra-table .fee-num { text-align: right; }
.fee-deadlines { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 6px; font-size: 0.88rem; }
.fee-deadlines dt { font-weight: 700; }
.fee-deadlines dd { margin: 0; }
.fee-guide-source { margin: 14px 0 0; font-size: 0.78rem; color: var(--muted); }
.fee-guide-table .fee-name-sub { display: none; }
@media (max-width: 640px) {
  .fee-deadlines { grid-template-columns: 1fr; }
  .fee-deadlines dd { margin-bottom: 6px; }
  /* スマホ: 横にずらさずに見られるよう、1POSと主な条件の列を出さず、条件はコーナー名の下に小さく出す */
  .fee-guide-table { min-width: 0; width: 100%; font-size: 0.78rem; }
  .fee-guide-table th, .fee-guide-table td { padding: 5px 4px; }
  .fee-guide-table th { white-space: normal; font-size: 0.75rem; line-height: 1.3; }
  .fee-guide-table .fee-pos, .fee-guide-table .fee-summary { display: none; }
  .fee-guide-table .fee-name { white-space: normal; }
  .fee-guide-table .fee-name-sub { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 400; color: var(--muted); line-height: 1.35; }
}

/* AA調整表: 精算書の手数料が、システムの計算と違った欄 */
.aac-table td.aac-fee-diff { background: #fff7ed; }
.aac-table td.aac-fee-diff .aac-sub { color: #b45309; }

/* --- ダウンロードのお知らせ（download-helper.js）: 画面の下に出す --- */
.dl-toast {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: min(560px, calc(100% - 24px));
  padding: 12px 14px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
}
body.has-bottom-nav .dl-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.dl-toast-text { flex: 1 1 14em; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-toast-sub { font-size: 0.8rem; color: #d1d5db; overflow-wrap: anywhere; }
.dl-toast-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dl-toast-actions button { width: auto; margin: 0; padding: 8px 14px; border-radius: 8px; font-size: 0.88rem; }
.dl-toast .dl-toast-main { background: #2563eb; color: #fff; }
.dl-toast .dl-toast-sub-btn { background: #06c755; color: #fff; }
.dl-toast .dl-toast-close { background: transparent; color: #d1d5db; border: 1px solid #4b5563; }
.dl-toast-error { background: #7f1d1d; }
/* ダウンロードした書類をメールで送る（パソコン。2026-10-16） */
.dl-toast .dl-toast-mail-btn { background: #fff; color: #1d4ed8; }
.dl-mail { flex: 1 0 100%; display: flex; flex-direction: column; gap: 6px; }
.dl-mail-row { display: flex; gap: 8px; }
.dl-mail-row input { flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 0; border-radius: 8px; font-size: 0.95rem; color: #111827; }
.dl-mail-row button { width: auto; margin: 0; padding: 8px 16px; border-radius: 8px; font-weight: 700; white-space: nowrap; flex: 0 0 auto; }
.dl-mail-copy { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: #e5e7eb; }
.dl-mail-copy input { width: auto; margin: 0; }
.dl-mail-note { margin: 0; font-size: 0.8rem; color: #bfdbfe; }
.dl-mail-note:empty { display: none; }

/* --- 担当者入力 ③必要書類: 横にずらさずに枚数まで入れられる表（スマホでも画面の幅に収める） --- */
.deal-table.doc-checklist-table { min-width: 0; width: 100%; table-layout: fixed; }
.doc-checklist-table th:first-child, .doc-checklist-table td:first-child { width: 34px; padding-left: 4px; padding-right: 4px; }
.doc-checklist-table th:last-child, .doc-checklist-table td:last-child { width: 78px; }
.doc-checklist-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.doc-checklist-table tbody td { border-bottom: 1px solid var(--border); }
.doc-checklist-table input[type="checkbox"] { width: auto; margin: 0; transform: scale(1.25); }
.doc-checklist-table input[type="number"] { width: 100%; max-width: 72px; margin: 0; }
.doc-checklist-table input[type="text"] { width: 100%; margin: 0; }
.doc-where { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--muted); line-height: 1.4; }
/* ③必要書類の一番上: お客様の「住所相違あり」の申告 */
.address-mismatch-notice { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #fcd34d; border-left: 5px solid #d97706; border-radius: 8px; background: #fffbeb; }
.address-mismatch-title { margin: 0 0 4px; color: #b45309; font-size: 1rem; font-weight: 700; }
.address-mismatch-note { margin: 0; font-size: 0.85rem; color: #78350f; line-height: 1.5; }
/* 車検証・過去の契約書の「カメラで撮影する」（枠のすぐ下。camera-capture.js） */
.camera-under-drop { display: block; margin: 10px auto 14px; }

/* ===== 案件一覧の上のリンク（リピーター様・練習用・過去の契約書・かんたん表示）を、小さなボタンにして1〜2行にまとめる（2026-09-27）===== */
.create-entry-links { gap: 8px; margin-top: 4px; }
.create-entry-links .btn-ghost {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: #374151;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
}
.create-entry-links .btn-ghost:hover { background: #f3f4f6; }
.create-entry-links .practice-entry-btn { color: #b45309; border: 1px dashed #f59e0b; }
.create-entry-links .practice-entry-btn:hover { background: #fffbeb; }
.create-entry-links .simple-home-toggle { color: #1d4ed8; border-color: #93c5fd; }
.create-entry-links .simple-home-toggle:hover { background: #eff6ff; }
body.simple-mode .create-entry-links .practice-entry-btn { border-width: 2px; font-weight: 700; }
/* スマホは2つずつ並べる（縦に4段にならないように） */
@media (max-width: 640px) {
  .create-entry-links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .create-entry-links .btn-ghost { width: 100%; padding: 8px 4px; text-align: center; }
}

/* ===== 在庫管理（inventory.html / admin-inventory.js）===== */
/* 在庫の状況ごとの色（カードの左の線・状況の選択・しぼるボタン） */
.stock-card, .stock-filter { --st: #6b7280; --st-bg: #f3f4f6; }
[data-status="before_listing"] { --st: #6b7280; --st-bg: #f3f4f6; }
[data-status="listed"] { --st: #1d4ed8; --st-bg: #eff6ff; }
[data-status="sold"] { --st: #7c3aed; --st-bg: #f5f3ff; }
[data-status="transfer"] { --st: #0e7490; --st-bg: #ecfeff; }
[data-status="maintenance"] { --st: #b45309; --st-bg: #fffbeb; }
[data-status="awaiting_delivery"] { --st: #be185d; --st-bg: #fdf2f8; }
[data-status="done"] { --st: #15803d; --st-bg: #f0fdf4; }

.stock-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.stock-filter,
.stock-filter:hover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--st);
  background: #fff;
  border: 1px solid var(--st);
  border-radius: 999px;
}
.stock-filter[data-status=""] { --st: #374151; }
.stock-filter:hover { background: var(--st-bg); }
.stock-filter.active { color: #fff; background: var(--st); }
.stock-filter-count { font-size: 0.78rem; opacity: 0.85; }

.stock-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 640px) {
  .stock-list { grid-template-columns: 1fr; }
}
.stock-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 5px solid var(--st);
  border-radius: 10px;
  min-width: 0;
}
.stock-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.stock-name { font-weight: 700; font-size: 1rem; color: var(--text); text-decoration: none; line-height: 1.4; min-width: 0; }
.stock-name:hover { text-decoration: underline; }
select.stock-status {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 5px 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--st);
  background: var(--st-bg);
  border: 1px solid var(--st);
  border-radius: 8px;
}
.stock-meta { margin: 0; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.stock-price-row, .stock-delivery-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 0.88rem; }
.stock-purchase { color: #374151; }
.stock-sale, .stock-delivery { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-size: 0.86rem; }
.stock-sale-input { width: 9em; margin: 0; padding: 6px 8px; text-align: right; font-size: 0.95rem; }
.stock-delivery input { width: auto; margin: 0; padding: 5px 8px; font-size: 0.9rem; }
.stock-yen { font-weight: 400; }
.stock-diff { font-size: 0.82rem; font-weight: 700; color: #15803d; }
.stock-diff.negative { color: var(--danger); }
.stock-buyer { font-size: 0.82rem; color: #374151; }
.stock-saved { outline: 2px solid #16a34a; outline-offset: 1px; }

/* 整備作業 */
.stock-maint { border: 1px solid var(--border); border-radius: 8px; }
.stock-maint > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 10px;
  font-size: 0.86rem;
}
.stock-maint > summary::-webkit-details-marker { display: none; }
.stock-maint-title { font-weight: 700; color: var(--accent); }
.stock-maint-title::before { content: '▸ '; }
.stock-maint[open] .stock-maint-title::before { content: '▾ '; }
.stock-maint-sub { color: #374151; }
.stock-maint-progress { padding: 1px 8px; font-size: 0.76rem; font-weight: 700; color: #b45309; background: #fffbeb; border-radius: 999px; }
.stock-maint-progress.all-done { color: #15803d; background: #f0fdf4; }
.stock-maint-body { padding: 4px 10px 10px; border-top: 1px solid var(--border); }
.stock-maint-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dotted #e5e7eb; }
.stock-maint-row label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.86rem; font-weight: 400; cursor: pointer; }
.stock-maint-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; }
.stock-maint-row.is-needed .stock-maint-need { font-weight: 700; }
.stock-maint-row.is-done .stock-maint-need { color: #15803d; text-decoration: line-through; }
.stock-maint-done { padding: 2px 8px; border: 1px solid #d1d5db; border-radius: 999px; font-size: 0.8rem !important; }
.stock-maint-note { display: block; margin: 8px 0 0; font-size: 0.82rem; font-weight: 700; }
.stock-maint-note textarea { display: block; width: 100%; margin-top: 4px; font-size: 0.9rem; font-weight: 400; }

/* 注文書の読み込み */
.stock-order-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.stock-order-view { font-size: 0.82rem; }
.stock-order-chooser { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.stock-order-chooser button { width: auto; margin: 0; }
.stock-order-msg { margin: 4px 0 0; font-size: 0.84rem; font-weight: 700; }
.stock-order-msg:empty { display: none; }
.stock-order-msg[data-state="busy"] { color: #1d4ed8; }
.stock-order-msg[data-state="warn"] { color: var(--danger); }
.stock-order-result { margin-top: 6px; padding: 10px 12px; background: #f5f3ff; border: 1px solid #c4b5fd; border-radius: 8px; font-size: 0.86rem; }
.stock-order-result-title { margin: 0 0 6px; font-weight: 700; color: #5b21b6; }
.stock-order-list { margin: 0 0 8px; padding-left: 18px; line-height: 1.8; }
.stock-order-label { display: inline-block; min-width: 6.5em; font-weight: 700; }
.stock-order-warn { margin: 0 0 8px; padding: 6px 10px; color: #7f1d1d; background: #fef2f2; border-left: 4px solid #dc2626; border-radius: 6px; font-weight: 700; }
.stock-order-actions { display: flex; gap: 8px; }
.stock-order-actions button { width: auto; margin: 0; }
/* 整備作業の項目の入れ替え（管理者だけ） */
.stock-settings > summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 4px 0; }
.stock-settings-rows { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px; }
.stock-settings-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stock-settings-row button { width: auto; margin: 0; }
.stock-settings-row input { margin: 0; padding: 6px 8px; font-size: 0.9rem; }
.stock-settings-label { flex: 1 1 180px; min-width: 0; font-weight: 700; }
.stock-settings-hint { flex: 2 1 220px; min-width: 0; }
.stock-settings-remove { color: var(--danger); }

/* 車検・抹消の状況（案件一覧の状態の欄・在庫管理。registration-status.js） */
.reg-status { display: inline-block; margin: 4px 4px 0 0; padding: 1px 8px; font-size: 0.76rem; font-weight: 700; border-radius: 999px; border: 1px solid currentColor; }
.reg-grace { color: #0e7490; background: #ecfeff; }
.reg-dereg_planned { color: #b45309; background: #fffbeb; }
.reg-dereg_in_progress { color: #7c3aed; background: #f5f3ff; }
.reg-deregistered { color: #374151; background: #e5e7eb; }
select.reg-status-select { display: block; width: auto; max-width: 100%; margin: 6px 0 0; padding: 4px 8px; font-size: 0.8rem; color: #374151; border: 1px dashed #9ca3af; border-radius: 8px; background: #fff; }
select.reg-status-select.is-set { font-weight: 700; border-style: solid; }
.shaken-countdown { font-weight: 700; }
/* 1ヶ月より先の「車検残り 5ヶ月」は、目立たない色にする */
.shaken-countdown.is-muted { color: var(--muted); font-weight: 600; }
.stock-reg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.stock-reg-row select.reg-status-select { margin: 0; }
.stock-reg-row .status-date-note { margin: 0; }

/* 抹消済みの車: 新規登録の法定費用（目安）（在庫管理。registration-fees.js） */
.stock-fees { border: 1px solid #c7d2fe; border-radius: 8px; background: #f8faff; }
.stock-fees > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; padding: 8px 10px; font-size: 0.86rem; }
.stock-fees > summary::-webkit-details-marker { display: none; }
.stock-fees-title { font-weight: 700; color: #3730a3; }
.stock-fees-title::before { content: "▸ "; }
.stock-fees[open] .stock-fees-title::before { content: "▾ "; }
.stock-fees-total { font-weight: 700; color: #111827; }
.stock-fees-body { padding: 4px 10px 10px; border-top: 1px solid #c7d2fe; }
.stock-fees-line { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 5px 0; border-bottom: 1px dotted #d1d5db; font-size: 0.84rem; }
.stock-fees-label { font-weight: 700; }
.stock-fees-amount { text-align: right; white-space: nowrap; font-weight: 700; }
.stock-fees-note { grid-column: 1 / -1; color: #6b7280; font-size: 0.76rem; line-height: 1.5; }
.stock-fees-sum { border-bottom: none; border-top: 2px solid #c7d2fe; font-size: 0.92rem; }
.stock-fees-options { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 8px 0 4px; font-size: 0.82rem; }
.stock-fees-options label { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 700; }
.stock-fees-options input[type="text"] { width: 5.5em; margin: 0; padding: 4px 6px; font-size: 0.86rem; text-align: right; }
.stock-fees-options select { width: auto; margin: 0; padding: 4px 6px; font-size: 0.82rem; }
.stock-fees-options .stock-fees-check { font-weight: 400; }
.stock-fees-options input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.stock-fees-notes { margin: 4px 0 0; padding-left: 18px; font-size: 0.75rem; color: #6b7280; line-height: 1.6; }
.stock-fees-read { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0; font-size: 0.8rem; }
.stock-fees-read button { width: auto; margin: 0; }

/* 案件作成: 自社用で作成（お客様に送らない） */
.create-internal-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.create-internal-sub { font-size: 0.75rem; font-weight: 400; color: #64748b; }
/* 自社用の印は、名前のじゃまにならないよう小さく・控えめに */
.imported-badge.internal-badge { margin-left: 4px; padding: 0 5px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; color: #64748b; background: #f1f5f9; }
/* 案件一覧: 車検・抹消の状況は、状態の欄の中の「押して選べる印」（印と選ぶ欄を1つにまとめた） */
select.reg-pill {
  display: inline-block; width: auto; max-width: 100%; margin: 4px 4px 0 0; padding: 1px 20px 1px 8px;
  font-size: 0.76rem; font-weight: 700; line-height: 1.5; border-radius: 999px; border: 1px dashed #9ca3af; color: #6b7280;
  -webkit-appearance: none; appearance: none; cursor: pointer; vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; background-size: 8px 5px;
}
select.reg-pill:not(.reg-status) { background-color: #fff; font-weight: 600; }
select.reg-pill.reg-status { border-style: solid; border-color: currentColor; }
/* AA調整表: R預託金の手入力の欄（取り込めなかった売れた車だけ） */
.aac-in.aac-in-recycle { width: 6.5em; text-align: right; }
.aac-recycle-typing .aac-sub { color: #b45309; }

/* ===== 手帳（notebook.html）===== */
.nb-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.nb-tab { width: auto; margin: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: #374151; font-weight: 700; font-size: 0.92rem; }
.nb-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.nb-month-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.nb-month-row button { width: auto; margin: 0; }
.panel h2.nb-month-title { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; font-size: 1.15rem; min-width: 7.5em; text-align: center; }
.nb-month-row button { padding: 6px 14px; font-size: 1rem; }
.nb-today-btn { margin-left: auto !important; }
.nb-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.nb-dow { text-align: center; font-size: 0.78rem; font-weight: 700; color: #6b7280; padding: 2px 0; }
.nb-dow.is-sun, .nb-cell.is-sun .nb-daynum { color: #dc2626; }
.nb-dow.is-sat, .nb-cell.is-sat .nb-daynum { color: #2563eb; }
.nb-cell {
  display: flex; flex-direction: column; align-items: stretch; gap: 1px; width: auto; min-height: 76px; margin: 0; padding: 4px 5px;
  border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; color: var(--text); text-align: left; font-weight: 400; overflow: hidden; cursor: pointer;
}
.nb-cell.is-blank { border: 0; background: transparent; cursor: default; }
.nb-cell:hover { background: #f8fafc; }
.nb-cell.is-today { border-color: #93c5fd; background: #eff6ff; }
.nb-cell.is-selected { border: 2px solid var(--accent); padding: 3px 4px; }
.nb-daynum { font-size: 0.82rem; font-weight: 700; }
.nb-cell-line { display: block; font-size: 0.7rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #374151; background: #fef3c7; border-radius: 3px; padding: 0 3px; }
.nb-cell-line.is-shared { background: #dbeafe; }
.nb-cell-more { font-size: 0.66rem; color: #6b7280; }
.nb-cell-dots { display: none; }
/* 案件の日付（入庫・書類・振込・車検満了）: メモと見分けがつくよう、色の線で */
.nb-cell-line.nb-ev { background: #f3f4f6; border-left: 3px solid #9ca3af; }
.nb-ev-delivery { border-left-color: #7c3aed !important; }
.nb-ev-documents { border-left-color: #d97706 !important; }
.nb-ev-transfer { border-left-color: #0e7490 !important; }
.nb-ev-shaken { border-left-color: #dc2626 !important; }
.nb-cell-line.nb-ev.is-done { color: #9ca3af; text-decoration: line-through; }
.nb-events { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.nb-event { display: block; padding: 7px 10px; border: 1px solid #e5e7eb; border-left: 4px solid #9ca3af; border-radius: 6px; background: #f9fafb; color: var(--text); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.nb-event:hover { background: #f3f4f6; }
.nb-event.is-done { color: #9ca3af; font-weight: 500; }
.nb-offline { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #fcd34d; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 0.86rem; font-weight: 600; }
.nb-day { margin-top: 16px; }
.nb-day-title { margin: 0 0 8px; font-size: 1.05rem; }
.nb-notes { display: flex; flex-direction: column; gap: 10px; }
.nb-note { border: 1px solid #e5e7eb; border-left: 4px solid #f59e0b; border-radius: 8px; padding: 8px 10px; background: #fffdf7; }
.nb-note.is-shared { border-left-color: #3b82f6; background: #f8fbff; }
.nb-note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.nb-time { width: auto; margin: 0; padding: 3px 6px; font-size: 0.85rem; }
.nb-share { width: auto; margin: 0; padding: 2px 10px; border-radius: 999px; border: 1px solid #f59e0b; background: #fff; color: #92400e; font-size: 0.75rem; font-weight: 700; }
.nb-share.is-shared { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.nb-share-other { display: inline-block; }
.nb-del { width: auto; margin: 0 0 0 auto; padding: 2px 10px; border-radius: 999px; border: 1px solid #fca5a5; background: #fff; color: #b91c1c; font-size: 0.75rem; font-weight: 700; }
.nb-text { width: 100%; min-height: 64px; margin: 0; padding: 6px 8px; font-size: 0.95rem; line-height: 1.55; resize: vertical; border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; }
.nb-meta { margin-top: 4px; font-size: 0.75rem; color: #6b7280; }
.nb-add-btn { width: 100%; margin: 10px 0 0; padding: 10px; border: 1px dashed #9ca3af; border-radius: 8px; background: #fff; color: var(--accent); font-weight: 700; }
.nb-memo-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.nb-search { flex: 1 1 auto; margin: 0; }
.nb-add-btn.nb-add-inline { width: auto; margin: 0; white-space: nowrap; }
.nb-foot { margin-top: 10px; font-size: 0.8rem; }
@media (max-width: 640px) {
  /* スマホ: カレンダーのます目は、日にちとメモの件数（点）だけ */
  .nb-cell { min-height: 44px; padding: 3px; align-items: center; }
  .nb-cell.is-selected { padding: 2px; }
  .nb-cell-line, .nb-cell-more { display: none; }
  .nb-cell-dots { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
  .nb-cell-dot { display: inline-block; min-width: 15px; padding: 0 3px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 0.62rem; font-weight: 700; text-align: center; line-height: 15px; }
  .nb-cell-dot.is-event { background: #64748b; }
  .nb-tab { flex: 1 1 0; }
}
/* 手帳: 週・月の切り替え（2026-09-28。案Bと案Cの組み合わせ）*/
.nb-view-row { display: inline-flex; margin: 0 0 10px; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.nb-view-btn { width: auto; margin: 0; padding: 6px 18px; border: 0; border-radius: 0; background: #fff; color: #374151; font-weight: 700; }
.nb-view-btn.is-active { background: #1f2937; color: #fff; }
/* 週 */
.nb-wday { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #e5e7eb; min-height: 44px; }
.nb-wday.is-open { background: #f8fafc; margin: 0 -8px; padding: 8px; border-radius: 8px; border-top-color: transparent; }
.nb-wdate { flex: 0 0 3.2em; width: auto; margin: 0; padding: 2px 0; border: 0; background: none; color: var(--text); text-align: center; align-self: flex-start; }
.nb-wdate b { display: block; font-size: 1.35rem; line-height: 1.15; }
.nb-wdate span { display: block; font-size: 0.75rem; color: #6b7280; font-weight: 600; }
.nb-wdate.is-sun b { color: #dc2626; }
.nb-wdate.is-sat b { color: #2563eb; }
.nb-wdate.is-today b { color: #fff; background: #1d4ed8; border-radius: 10px; }
.nb-wbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.nb-wempty { width: 100%; margin: 0; padding: 8px 0; border: 0; background: none; color: #9ca3af; font-size: 0.82rem; font-weight: 500; text-align: left; }
.nb-add-btn.nb-add-day { margin: 2px 0 0; padding: 8px; }
/* 予定・メモの1行（週・月の一覧で共通）。予定は種類の色、メモはオレンジ（共有は青） */
.nb-item { display: block; width: 100%; margin: 0; padding: 5px 9px; border: 0; border-left: 4px solid #9ca3af; border-radius: 6px; background: #f3f4f6; color: var(--text); font-size: 0.88rem; font-weight: 600; line-height: 1.45; text-align: left; text-decoration: none; overflow-wrap: anywhere; }
.nb-item.nb-ev-delivery { background: #f3e8ff; }
.nb-item.nb-ev-documents { background: #fef3c7; }
.nb-item.nb-ev-transfer { background: #cffafe; }
.nb-item.nb-ev-shaken { background: #fee2e2; }
.nb-item.is-done { color: #9ca3af; text-decoration: line-through; font-weight: 500; }
.nb-item-note { border-left-color: #f59e0b; background: #fff7ed; font-weight: 500; }
.nb-item-note.is-shared { border-left-color: #3b82f6; background: #eff6ff; }
/* 月: 色の点 */
.nb-dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.nb-dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.nb-dot.nb-ev-delivery { background: #7c3aed; }
.nb-dot.nb-ev-documents { background: #d97706; }
.nb-dot.nb-ev-transfer { background: #0e7490; }
.nb-dot.nb-ev-shaken { background: #dc2626; }
.nb-dot.nb-dot-note { background: #f59e0b; }
.nb-dot.nb-dot-note.is-shared { background: #3b82f6; }
#monthView .nb-cell { min-height: 52px; align-items: center; }
/* 月の予定の一覧 */
.nb-agenda { margin-top: 14px; }
.nb-agenda-title { margin: 0 0 4px; font-size: 1rem; }
.nb-aday { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid #e5e7eb; }
.nb-adate { flex: 0 0 5.4em; width: auto; margin: 0; padding: 0; border: 0; background: none; color: var(--text); font-weight: 800; font-size: 0.9rem; text-align: left; align-self: flex-start; }
.nb-adate.is-today { color: #1d4ed8; }
.nb-alist { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
/* 手帳: だれの予定を出すか・開いている日（2026-09-28。月だけの表示に）*/
.nb-owner-filter { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 0.85rem; font-weight: 700; color: #4b5563; }
.nb-owner-filter select { width: auto; margin: 0; padding: 5px 8px; font-size: 0.9rem; }
#monthView .nb-cell.is-selected { border: 2px solid var(--accent); padding: 2px; }
#dayPanel { margin: 14px 0 0; padding: 10px; border: 1px solid #dbeafe; border-radius: 10px; background: #f8fbff; }
#dayPanel .nb-day-title { margin: 0 0 8px; }
.nb-aday.is-selected .nb-adate { color: var(--accent); }
button.nb-item { cursor: pointer; }
.nb-item-deal { position: relative; padding-right: 22px; }
.nb-item-deal::after { content: '›'; position: absolute; right: 8px; top: 50%; transform: translateY(-52%); font-size: 1.1rem; font-weight: 800; color: #6b7280; text-decoration: none; }


/* AA調整: 月別販売の表（OneDrive）とつなぐ */
.aac-od-step { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.aac-od-step p { margin: 0 0 8px; }
.aac-od-step label { display: block; margin: 6px 0; font-weight: 700; }
.aac-od-redirect { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aac-od-redirect code { padding: 4px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--border); font-size: 0.82rem; word-break: break-all; }
.aac-od-redirect button, .aac-od-search button { width: auto; margin: 0; }
.aac-od-search { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.aac-od-search input { flex: 1 1 auto; min-width: 0; margin: 0; }
.aac-od-connect { width: auto; margin: 0; }
.aac-od-link { margin-top: 8px; }
.aac-od-link > summary { color: var(--accent); font-size: 0.85rem; font-weight: 700; cursor: pointer; }
/* 調整表: OneDriveの月別販売の表から入れられるときのお知らせ */
.aac-od-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 8px 0; padding: 10px 12px; border: 1px solid #93c5fd; border-radius: 10px; background: #eff6ff; font-size: 0.9rem; }
.aac-od-banner span { flex: 1 1 16em; }
.aac-od-banner button { width: auto; margin: 0; }

/* 調整表: ランキング（この回） */
.aac-ranking { margin-top: 16px; border: 0; }
.aac-ranking > summary { font-size: 1.05rem; font-weight: 800; cursor: pointer; padding: 6px 0; }
.aac-ranking-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 6px; }
.aac-rank-card { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.aac-rank-title { margin: 0 0 4px; font-size: 1rem; font-weight: 800; }
.aac-rank-note { margin: 0 0 6px; font-size: 0.78rem; color: var(--muted); }
.aac-rank-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.aac-rank-table th { padding: 4px 6px; border-bottom: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); text-align: left; white-space: nowrap; }
.aac-rank-table td { padding: 5px 6px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.aac-rank-table td:first-child { white-space: nowrap; font-weight: 700; color: var(--muted); }
.aac-rank-table tr:first-child td:first-child { color: #b45309; }
.aac-rank-table td.aac-num { text-align: right; white-space: nowrap; font-weight: 700; }
.aac-rank-sub { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted); }
.aac-rank-more { width: auto; margin: 8px 0 0; }

/* AAメモ: ほかの人の車の出品状況（出さない） */
.aa-status-other { color: #9ca3af; font-weight: 700; }
.aac-rank-foot { margin: 8px 0 0; font-size: 0.8rem; }

/* ログイン: この端末でIDとパスワードを覚える */
.login-remember { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; font-weight: 600; font-size: 0.9rem; }
.login-remember input { width: auto; margin: 0; transform: scale(1.3); }
.login-remember-note { margin: 0 0 12px; font-size: 0.75rem; color: var(--muted); }
.login-remembered { margin: -4px 0 8px; padding: 6px 8px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: 0.8rem; }
.login-remembered .btn-link { display: inline; width: auto; min-height: 0; margin: 0 0 0 6px; padding: 0; border: 0; background: none; box-shadow: none; color: var(--accent); font-size: 0.8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* 調整表: Excelにランキングを付けるか */
.aac-excel-rank { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 0.85rem; font-weight: 600; }
.aac-excel-rank input { width: auto; margin: 0; transform: scale(1.2); }

/* 累計ランキング（調整表・統計） */
.aac-rank-summary { grid-column: 1 / -1; margin: 0; font-size: 0.8rem; color: var(--muted); }
.aac-rank-when { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.aac-rank-car { font-weight: 600; }
.aac-rank-car .aac-rank-sub { font-weight: 500; }

.aac-rank-actions { margin: 6px 0 8px; }
.aac-rank-actions button { width: auto; margin: 0; }

/* 累計: 担当ごとの台数と粗利の割合（棒）、粗利の金額帯ごとの台数（横にずらせる表） */
.aac-share-cell { white-space: nowrap; font-weight: 700; }
.aac-share-bar { display: block; height: 6px; margin-top: 3px; border-radius: 3px; background: #eef0f4; overflow: hidden; }
.aac-share-fill { display: block; height: 100%; border-radius: 3px; }
.aac-share-bar.is-count .aac-share-fill { background: #93c5fd; }
.aac-share-bar.is-profit .aac-share-fill { background: #34d399; }
.aac-rank-card.is-scroll { overflow-x: auto; }
.aac-rank-card.is-scroll .aac-rank-table td, .aac-rank-card.is-scroll .aac-rank-table th { white-space: nowrap; }
.aac-rank-card.is-scroll .aac-rank-table tr:last-child td { font-weight: 800; border-top: 1px solid var(--border); }
.aac-rank-card.no-rank .aac-rank-table tr:first-child td:first-child { color: var(--muted); }
/* 累計ランキング: 文字が枠からはみ出ない・細かく折り返さないように（2026-10-02 ユーザー「AA累計ランキングの表記がはみ出たりしている」）。
   カードを少し広くして（パソコンは3列）、名前・数字は途中で割れないようにする。それでも入らないときは、カードの中で横にずらせる */
#cumRankingBody, #aaRankingBody { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.aac-rank-card { min-width: 0; overflow-x: auto; }
.aac-rank-table td.aac-rank-name { white-space: nowrap; }
.aac-rank-table td.aac-rank-maker { word-break: keep-all; }
.aac-nw { white-space: nowrap; }
.aac-rank-carname { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
.aac-rank-carname.is-open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.aac-rank-table td.aac-num .aac-rank-sub { white-space: normal; }
.aac-share-cell { white-space: normal; }
@media (max-width: 480px) {
  .aac-rank-card { padding: 10px 8px; }
  .aac-rank-table th, .aac-rank-table td { padding-left: 4px; padding-right: 4px; }
}

/* ===== ホーム（入口。home.html / admin-home.js）=====
   「今日やること」と、グループごとのメニュー。グループの色: 案件=青・AA関係=紫・在庫・記録=緑、今日やること=オレンジ。
   「契約書を作成する」は案件一覧と同じ赤 */
.home-wrap { max-width: 1180px; }
.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 16px; }
.home-date { margin: 0; font-size: 0.82rem; color: #4b5563; }
.home-title { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.35; }
.home-avatar { flex: none; width: 40px; height: 40px; border-radius: 20px; background: #dbe5ff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.home-grid { display: flex; flex-direction: column; gap: 16px; }
.home-groups { display: flex; flex-direction: column; gap: 16px; }
.home-dot { flex: none; width: 8px; height: 8px; border-radius: 4px; background: currentColor; }
.home-dot.is-orange { background: #ea580c; }

.home-today { padding: 16px 16px 8px; border-radius: 18px; background: #fff; border: 1px solid #e5e7eb; }
.home-today-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 0.9rem; font-weight: 800; }
.home-today-scope { margin-left: auto; font-size: 0.75rem; font-weight: 500; color: #6b7280; }
.home-today-empty { margin: 6px 0 12px; font-size: 0.88rem; color: #4b5563; }

.home-group-title { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0 4px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; }
.home-group.is-blue .home-group-title { color: #1d4ed8; }
.home-group.is-purple .home-group-title { color: #6d28d9; }
.home-group.is-green .home-group-title { color: #0f766e; }
.home-group.is-orange .home-group-title { color: #c2410c; }

.home-deal-row { display: flex; gap: 12px; }
.home-create, .home-list-btn { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 12px 16px; border-radius: 16px; text-decoration: none; }
.home-create { flex: 1.3; background: #b91c1c; color: #fff; }
.home-create:hover { background: #991b1b; }
.home-list-btn { flex: 1; background: #eaf0ff; border: 1px solid #c7d6fe; color: #1e3a8a; }
.home-list-btn:hover { background: #dbe5ff; }
.home-list-btn svg { color: #1d4ed8; }
.home-create svg, .home-list-btn svg { flex: none; }
.home-btn-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.home-btn-text b { font-size: 1rem; font-weight: 800; word-break: keep-all; } /* 「契約書を／作成する」の区切りでだけ折り返す */
.home-btn-text small { font-size: 0.75rem; }
.home-create .home-btn-text small { display: none; opacity: 0.92; }
.home-list-btn .home-btn-text small { color: #1e40af; }

/* 押せる四角を横に並べる。間の線は、すき間（1px）から背景の色が見えるようにして引く（かんたん表示で消えた項目があっても崩れない） */
.home-cells { display: flex; gap: 1px; border-radius: 16px; overflow: hidden; border: 1px solid; }
.home-cell { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 4px; font-size: 0.8rem; font-weight: 700; text-decoration: none; text-align: center; }
.home-cell svg { flex: none; }
/* ボタンのホームのマス（粗利予想）も、リンクのマスと同じ見た目にする */
button.home-cell { width: auto; margin: 0; border: 0; border-radius: 0; font-family: inherit; line-height: inherit; cursor: pointer; }
.home-group.is-purple .home-cells { background: #e4d9fb; border-color: #ddd0fb; }
.home-group.is-purple .home-cell { background: #f3eeff; color: #4c1d95; }
.home-group.is-purple .home-cell:hover { background: #ebe2ff; }
.home-group.is-purple .home-cell svg { color: #6d28d9; }
.home-group.is-green .home-cells { background: #cdeae3; border-color: #bfe6dc; }
.home-group.is-green .home-cell { background: #e6f6f2; color: #134e4a; }
.home-group.is-green .home-cell:hover { background: #d7f0ea; }
.home-group.is-green .home-cell svg { color: #0f766e; }
.home-group.is-orange .home-cells { background: #fde3cf; border-color: #fed7aa; }
.home-group.is-orange .home-cell { background: #fff4ed; color: #7c2d12; }
.home-group.is-orange .home-cell:hover { background: #ffe9d9; }
.home-group.is-orange .home-cell svg { color: #c2410c; }
.home-cell.is-locked { opacity: 0.72; }
.home-cell.is-locked span::after { content: " 🔒"; font-size: 0.85em; }
/* マスが5つ以上のグループ（便利機能。2026-10-06 リサイクル預託金を足して5つに）は、1行に3つずつ（3＋2）。
   5つを1行に並べると「住所コー／ド」のように細切れに折り返すため */
.home-cells:has(> .home-cell:nth-child(5)) { flex-wrap: wrap; }
.home-cells:has(> .home-cell:nth-child(5)) > .home-cell { flex: 1 1 30%; }
/* 7つ以上（便利機能に手数料の計算を足して7つ。2026-10-06）は、1行に4つずつ（4＋3） */
.home-cells:has(> .home-cell:nth-child(7)) > .home-cell { flex: 1 1 22%; }

.home-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.home-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: #4b5563; font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.home-links a:hover { color: var(--text); text-decoration: underline; }
.home-links a + a::before { content: ""; width: 1px; height: 14px; margin-right: 12px; margin-left: -12px; background: #d1d5db; }
/* スマホで2行になると、2行目が区切りの線から始まるので、細い画面では線を出さない（2026-10-13 検証）*/
@media (max-width: 600px) { .home-links a + a::before { display: none; } }

@media (min-width: 900px) {
  .home-top { padding: 8px 4px 20px; }
  .home-date { font-size: 0.9rem; }
  .home-title { font-size: 1.75rem; }
  .home-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; align-items: start; }
  .home-groups { gap: 22px; }
  .home-today { padding: 20px 20px 10px; border-radius: 20px; }
  .home-today-title { font-size: 0.95rem; margin-bottom: 8px; }
  .home-group-title { font-size: 0.8rem; margin-bottom: 10px; }
  .home-deal-row { gap: 16px; }
  .home-create, .home-list-btn { min-height: 104px; padding: 16px 24px; border-radius: 20px; gap: 16px; }
  .home-create { flex: 1.4; }
  .home-btn-text b { font-size: 1.25rem; }
  .home-btn-text small { font-size: 0.8rem; }
  .home-create .home-btn-text small { display: block; }
  .home-cells { border-radius: 20px; }
  .home-cell { flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 96px; padding: 16px 20px; font-size: 1.05rem; font-weight: 800; text-align: left; }
  .home-cell svg { width: 30px; height: 30px; }
  .home-links { justify-content: flex-end; margin-top: 20px; }
}


/* ===== B1の色分けを、ほかの画面にも（2026-09-30）=====
   ホーム（.home-*）と同じ色: 案件=青・AA関係=紫・在庫・記録=緑・設定と使い方=灰。
   各画面の body に class="theme-b1" と data-group（deals / aa / records / settings）を付ける。
   ・ページの題名の左に、グループ名の小さな札
   ・パネルの見出しは、グループの薄い色（グラデーションはやめる）
   ・左のメニューは、グループごとにまとめ、いま開いている画面をそのグループの色で示す
   ・スマホの下のタブも、選ばれているタブをグループの色に
   元に戻すときは、body から theme-b1 を消すだけでよい。 */
body.theme-b1 { --bg: #f4f5f7; --grp: #1d4ed8; --grp-soft: #eaf0ff; --grp-line: #c7d6fe; --grp-text: #1e3a8a; --grp-name: "案件"; }
body.theme-b1[data-group="aa"] { --grp: #6d28d9; --grp-soft: #f3eeff; --grp-line: #ddd0fb; --grp-text: #4c1d95; --grp-name: "AA関係"; }
body.theme-b1[data-group="records"] { --grp: #0f766e; --grp-soft: #e6f6f2; --grp-line: #bfe6dc; --grp-text: #134e4a; --grp-name: "在庫・記録"; }
body.theme-b1[data-group="settings"] { --grp: #475569; --grp-soft: #eef2f6; --grp-line: #d5dde6; --grp-text: #1e293b; --grp-name: "設定・使い方"; }
body.theme-b1[data-group="tools"] { --grp: #c2410c; --grp-soft: #fff4ed; --grp-line: #fed7aa; --grp-text: #7c2d12; --grp-name: "業務支援"; }

/* ページの題名の左の札（ホームは題名がないので出ない） */
body.theme-b1 .admin-header h1::before {
  content: var(--grp-name);
  display: inline-block;
  margin-right: 10px;
  padding: 1px 10px;
  border: 1px solid var(--grp-line);
  border-radius: 999px;
  background: var(--grp-soft);
  color: var(--grp);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.7;
  vertical-align: 0.18em;
}

/* パネル: 角を丸く、見出しはグループの薄い色（使い方のページは項目ごとの色があるので、手帳の「2026年9月」は見出しではないので、そのまま） */
body.theme-b1 .panel { border-color: #e5e7eb; border-radius: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
body.theme-b1:not(.help-page) .panel h2:not(.nb-month-title) {
  background: var(--grp-soft);
  color: var(--grp-text);
  border-bottom-color: var(--grp-line);
  border-radius: 16px 16px 0 0;
}
/* 枠だけのボタンは灰色（青は「押して進める」ボタンだけ）。個別に色を決めているボタンはそのまま */
body.theme-b1 :where(.btn-ghost) { border-color: #d1d5db; color: #374151; }
body.theme-b1 :where(.btn-ghost):hover { background: #f3f4f6; }
/* 案件の画面の大見出し: グラデーションをやめて1色に（左の色の線はそのまま） */
body.theme-b1 #mainPanel > summary,
body.theme-b1 #submissionPanel > summary,
body.theme-b1 #staffPanel > summary,
body.theme-b1 #pdfPanel > summary,
body.theme-b1 .danger-panel > summary { background: var(--panel-from); }
body.theme-b1 .deal-summary-head { background: #1e40af; }

/* 左のメニュー: 色の帯をやめ、いま開いている画面だけ、そのグループの色で示す */
body.theme-b1 .admin-sidebar a[data-color] { background: transparent; color: #374151; }
body.theme-b1 .admin-sidebar a[data-color]:hover { background: #f3f4f6; }
body.theme-b1 .admin-sidebar a[data-tone="deals"].active { background: #eaf0ff; color: #1e3a8a; border-left-color: #1d4ed8; }
body.theme-b1 .admin-sidebar a[data-tone="aa"].active { background: #f3eeff; color: #4c1d95; border-left-color: #6d28d9; }
body.theme-b1 .admin-sidebar a[data-tone="records"].active { background: #e6f6f2; color: #134e4a; border-left-color: #0f766e; }
body.theme-b1 .admin-sidebar a[data-tone="settings"].active { background: #eef2f6; color: #1e293b; border-left-color: #475569; }
body.theme-b1 .admin-sidebar a[data-tone="tools"].active { background: #fff4ed; color: #7c2d12; border-left-color: #c2410c; }
body.theme-b1 .admin-sidebar-logout { background: transparent; color: var(--danger); }
body.theme-b1 .admin-sidebar-logout:hover { background: #fef2f2; }
/* 「在庫・記録」のまとまり（AA関係は紫のまま） */
.admin-sidebar-group[data-tone="records"] { border-left-color: #bfe6dc; }
.admin-sidebar-group[data-tone="records"] .admin-sidebar-group-title { color: #0f766e; }

/* スマホの下のタブ・「その他」: 選ばれているものを、いまの画面のグループの色に */
body.theme-b1 .m-bottom-nav .m-tab.active { color: var(--grp); }
body.theme-b1 .m-sheet .m-sheet-row.active { color: var(--grp); }

/* ホーム: 「練習用の案件で試す」「かんたん表示にする」（案件のボタンの下） */
.home-sub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.home-chip { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 40px; margin: 0; padding: 0 16px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-family: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.home-chip.is-practice { border-style: dashed; border-color: #f59e0b; color: #b45309; }
.home-chip.is-practice:hover { background: #fffbeb; }
.home-chip.is-simple { border-color: #93c5fd; color: #1d4ed8; }
.home-chip.is-simple:hover { background: #eff6ff; }
/* 空の契約書（何も入っていない契約書のPDF。2026-10-12） */
.home-chip.is-blank { border-color: #cbd5e1; color: #334155; }
.home-chip.is-blank:hover { background: #f8fafc; }
/* かんたん表示のとき（はじめての人）は、練習用を目立たせる */
body.simple-mode .home-chip.is-practice { border-width: 2px; }

/* ===== 統計のグラフ（2026-09-30）: 月ごとの縦の棒・処理先の割合の帯・表はたたむ ===== */
.stat-vchart-bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding: 0 2px; border-bottom: 1px solid #e5e7eb; }
.stat-vchart-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; position: relative; padding-bottom: 20px; }
.stat-vchart-bar { display: block; width: 100%; max-width: 44px; border-radius: 6px 6px 0 0; background: #99d8cb; }
.stat-vchart-col.is-current .stat-vchart-bar { background: var(--grp, #0f766e); }
.stat-vchart-value { font-size: 0.75rem; color: #4b5563; }
.stat-vchart-col.is-current .stat-vchart-value { font-weight: 800; color: var(--grp, #0f766e); }
.stat-vchart-label { position: absolute; bottom: 0; font-size: 0.7rem; color: #4b5563; white-space: nowrap; }
.stat-vchart-col.is-current .stat-vchart-label { font-weight: 800; color: var(--grp, #0f766e); }
@media (max-width: 480px) {
  .stat-vchart-bars { gap: 3px; height: 160px; }
  .stat-vchart-label { font-size: 0.6rem; }
}
.stat-table-details { margin-top: 12px; }
.stat-table-details > summary { cursor: pointer; font-size: 0.85rem; font-weight: 700; color: #374151; padding: 6px 0; }
.stat-stack { display: flex; height: 24px; border-radius: 12px; overflow: hidden; background: #eef0f4; }
.stat-stack:empty { display: none; }
.stat-stack-part { display: block; height: 100%; }
.stat-stack-part.is-aa, .stat-legend-dot.is-aa { background: #6d28d9; }
.stat-stack-part.is-stock, .stat-legend-dot.is-stock { background: #0f766e; }
.stat-stack-part.is-wholesale, .stat-legend-dot.is-wholesale { background: #ea580c; }
.stat-stack-part.is-scrap, .stat-legend-dot.is-scrap { background: #64748b; }
.stat-stack-part.is-none, .stat-legend-dot.is-none { background: #cbd5e1; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 0.85rem; }
.stat-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.stat-legend-dot { width: 10px; height: 10px; border-radius: 3px; }
body.theme-b1 .stat-bar-fill { background: var(--grp); }

/* オン・オフはスイッチ（通知の設定）。1行ずつ、左に文字・右にスイッチ */
body.theme-b1 .notify-options { gap: 0; border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; }
body.theme-b1 .notify-options > label { padding: 12px 14px; border-top: 1px solid #eef0f3; }
body.theme-b1 .notify-options > label:first-child { border-top: 0; }
body.theme-b1 .notify-check { flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 14px; min-height: 36px; font-weight: 600; }
body.theme-b1 .notify-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: none;
  width: 50px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: #cbd5e1;
  transform: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
body.theme-b1 .notify-check input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: transform 0.15s ease;
}
body.theme-b1 .notify-check input[type="checkbox"]:checked { background: #1d4ed8; }
body.theme-b1 .notify-check input[type="checkbox"]:checked::before { transform: translateX(20px); }
body.theme-b1 .notify-check input[type="checkbox"]:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
body.theme-b1 .notify-check input[type="checkbox"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* 2つから選ぶもの（ならんだボタン） */
.segmented { display: flex; max-width: 420px; margin-top: 8px; padding: 4px; border-radius: 12px; background: #e5e7eb; }
.segmented-btn { flex: 1; width: auto; min-height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: #4b5563; font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.segmented-btn:hover { background: rgba(255, 255, 255, 0.5); }
.segmented-btn.is-on { background: #fff; color: #111827; font-weight: 800; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }

/* ===== 案件の画面: いちばん上のまとめ・チェックリスト・下の帯（2026-09-30）===== */
.deal-hero { margin: 0 0 12px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid #e5e7eb; }
.deal-hero-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.deal-hero-who { min-width: 0; }
.deal-hero-name { margin: 0; font-size: 1.25rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.deal-hero-sub { margin: 2px 0 0; font-size: 0.85rem; color: #4b5563; }
.deal-hero-price { flex: none; text-align: right; }
.deal-hero-price span { display: block; font-size: 0.75rem; color: #4b5563; }
.deal-hero-price b { font-size: 1.15rem; font-weight: 800; white-space: nowrap; }
.deal-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.deal-hero-tag { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #eaf0ff; color: #1e40af; }
.deal-hero-tag.status-pending { background: #fef3c7; color: #92400e; }
.deal-hero-tag.status-contracted { background: #d1fae5; color: #065f46; }
.deal-hero-tag.status-collected { background: #ede9fe; color: #5b21b6; }
.deal-hero-tag.status-paid { background: #cffafe; color: #155e75; }
.deal-hero-tag.status-completed { background: #dcfce7; color: #166534; }
.deal-hero-tag.is-plain { background: #f3f4f6; color: #374151; }
.deal-hero-tag.is-practice { background: #fffbeb; color: #b45309; border: 1px dashed #f59e0b; }
@media (min-width: 900px) {
  .deal-hero { padding: 18px 22px; }
  .deal-hero-name { font-size: 1.5rem; }
  .deal-hero-price b { font-size: 1.4rem; }
}

.deal-todo { list-style: none; margin: 10px 0 12px; padding: 0; border-radius: 12px; background: #fff; border: 1px solid #e5e7eb; overflow: hidden; }
.deal-todo li + li { border-top: 1px solid #eef0f3; }
.deal-todo-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0; padding: 6px 12px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-family: inherit; font-size: 0.9rem; font-weight: 600; text-align: left; cursor: pointer; }
.deal-todo-item:hover { background: #f8fafc; }
.deal-todo-mark { flex: none; width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; box-sizing: border-box; }
.deal-todo-item.is-done .deal-todo-mark { background: #16a34a; color: #fff; }
.deal-todo-item.is-todo .deal-todo-mark { border: 2px solid #f59e0b; }
.deal-todo-item.is-check .deal-todo-mark { border: 2px dashed #9ca3af; }
.deal-todo-title { flex: 1; min-width: 0; }
.deal-todo-status { flex: none; font-size: 0.78rem; font-weight: 800; }
.deal-todo-item.is-done .deal-todo-status { color: #166534; }
.deal-todo-item.is-todo .deal-todo-status { color: #9a3412; }
.deal-todo-item.is-check .deal-todo-status { color: #4b5563; }

.deal-action-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 16px -16px -64px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 255, 255, 0.97); border-top: 1px solid #e5e7eb; box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.06); }
.deal-action-bar button { width: auto; margin: 0; min-height: 46px; padding: 0 18px; font-size: 0.95rem; font-weight: 800; }
.deal-action-msg { flex: 1; min-width: 0; font-size: 0.82rem; color: #4b5563; }
@media (max-width: 640px) {
  body.has-bottom-nav .deal-action-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); margin-bottom: 0; padding-bottom: 10px; }
  .deal-action-bar button { flex: 1; padding: 0 10px; }
  .deal-action-bar #barDecideBtn { flex: 2; }
  .deal-action-msg:empty { display: none; }
  .deal-action-bar { flex-wrap: wrap; }
  .deal-action-msg { flex-basis: 100%; }
}

/* ===== 案件一覧: 段階ごとの列（ボード。パソコンだけ）と、回答待ち・提出済みの「次にやること」ボタン（2026-09-30）===== */
.deal-view-toggle { display: none; margin: 0; }
.deal-view-toggle .segmented-btn { flex: none; min-height: 34px; font-size: 0.82rem; padding: 0 14px; white-space: nowrap; }
.deal-board { display: none; }
.btn-open-contract { background: #1d4ed8; }
.btn-open-contract:hover { background: #1e40af; }
@media (min-width: 900px) {
  .deal-view-toggle { display: inline-flex; }
  #dealListDetails.is-board .table-scroll,
  #dealListDetails.is-board .table-scroll-top,
  #dealListDetails.is-board .deal-list-note { display: none !important; }
  #dealListDetails.is-board .deal-board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 14px; align-items: start; }
}
.deal-board-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; border-radius: 14px; background: #f3f4f6; transition: opacity 0.15s ease; }
.deal-board-col.is-dim { opacity: 0.45; }
.deal-board-col.is-pending { background: #fff7ed; --col: #9a3412; --dot: #f59e0b; --line: #fde2c3; }
.deal-board-col.is-submitted { background: #eef3ff; --col: #1e40af; --dot: #2563eb; --line: #c7d6fe; }
.deal-board-col.is-contracted { background: #eaf7f0; --col: #065f46; --dot: #10b981; --line: #bfe6d2; }
.deal-board-col.is-collected { background: #f3eeff; --col: #5b21b6; --dot: #7c3aed; --line: #ddd0fb; }
.deal-board-col.is-paid { background: #e6f4f7; --col: #155e75; --dot: #0e7490; --line: #bfe0e8; }
.deal-board-head { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.92rem; font-weight: 800; color: var(--col); }
.deal-board-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--dot); }
.deal-board-count { margin-left: auto; padding: 0 8px; border-radius: 10px; background: #fff; font-size: 0.82rem; }
.deal-board-hint { margin: -4px 0 2px; font-size: 0.75rem; color: var(--col); }
.deal-board-empty { margin: 4px 0; font-size: 0.8rem; color: #6b7280; text-align: center; }
.deal-board-card { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line, #e5e7eb); min-width: 0; }
.deal-board-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 6px; }
.deal-board-name { min-width: 0; font-size: 0.92rem; font-weight: 800; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.deal-board-name:hover { text-decoration: underline; }
.deal-board-price { flex: none; margin-left: auto; font-size: 0.82rem; font-weight: 800; }
/* お客様の名前を「架空…」で切らない。名前は折り返して全部出し、金額は横に入らなければ下の行の右へ（2026-10-22 全体テスト） */
.deal-board-name.customer-name-short { flex: 1 1 auto; max-width: 100%; white-space: normal; }
.deal-board-sub { margin: 0; font-size: 0.76rem; color: #4b5563; overflow-wrap: anywhere; }
.deal-board-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.deal-board-tag { padding: 1px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: 0.75rem; font-weight: 700; }
.deal-board-tag.is-warn { background: #fff7ed; color: #9a3412; }
.deal-board-tag.is-urgent { background: #fef2f2; color: #b91c1c; }
.deal-board-tag.is-practice { background: #fffbeb; color: #b45309; }
.deal-board-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.deal-board-next { flex: 1 1 100%; width: auto; min-height: 36px; margin: 0; padding: 0 10px; font-size: 0.8rem; font-weight: 800; }
.deal-board-next br { display: none; }
.deal-board-small { flex: 1; width: auto; min-height: 32px; margin: 0; padding: 0 8px; font-size: 0.76rem; }
.deal-board-block { margin: 0; font-size: 0.75rem; color: #9a3412; }
/* 回答待ち・提出済みの「次にやること」（表・スマホのカード）: 改行を入れず1行に */
.deal-table td.c-action button.btn-open-link,
.deal-table td.c-action button.btn-open-contract { white-space: nowrap; }

/* ===== すっきり版（2026-09-30 ユーザー「ごちゃごちゃした」）===== */
/* 案件一覧の見出しの横の小さなリンク（リピーター様はこちら・過去の契約書を取り込む） */
.deal-h2-link { display: inline-flex; align-items: center; width: auto; min-height: 32px; margin: 0; padding: 0 6px; border: 0; background: none; color: #1d4ed8; font-family: inherit; font-size: 0.8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.deal-h2-link:hover { background: none; color: #1e40af; }
/* 案件の画面: 上のまとめと段階の表示を、つなげて1つの箱に */
.deal-hero.is-joined { margin-bottom: 0; border-bottom: 0; border-radius: 16px 16px 0 0; padding-bottom: 6px; }
.deal-hero.is-joined + .deal-steps { border-top: 0; border-color: #e5e7eb; border-radius: 0 0 16px 16px; padding-top: 8px; }
/* 担当者入力の番: 説明文とボタンの代わりに、チェックリストだけ */
.deal-steps-next.has-todo .deal-steps-next-text,
.deal-steps-next.has-todo .deal-steps-next-btn { display: none; }
.deal-steps-next.has-todo .deal-todo { margin-bottom: 0; }
.deal-quick-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 14px; margin: -8px 0 8px; }
.deal-quick-links:not(:has(> :not(.hidden))) { display: none; }

/* ===== 「メニュー」ボタン（スマホのいちばん下のタブ・パソコンの左のメニューの代わり。2026-09-30／10-01）===== */
.m-menu-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; width: auto; min-height: 40px; margin: 0 0 0 auto; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #374151; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.m-menu-btn:hover { background: #f3f4f6; }
.m-menu-btn .m-tab-icon { display: block; height: 20px; }
.m-menu-btn svg { display: block; width: 20px; height: 20px; }
.m-menu-btn.is-floating { position: fixed; top: 10px; right: 10px; z-index: 900; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12); }
/* 「メニュー」の左の「ホーム」ボタン（ホームへ戻るだけ）。2つを右にまとめて並べる */
.m-home-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 40px; margin: 0 0 0 auto; padding: 0 12px; border: 1px solid #c7d6fe; border-radius: 12px; background: #eaf0ff; color: #1e40af; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.m-home-btn:hover { background: #dbe5ff; }
.m-home-btn .m-tab-icon { display: block; height: 20px; }
.m-home-btn svg { display: block; width: 20px; height: 20px; }
.m-home-btn + .m-menu-btn { margin-left: 8px; }
@media (min-width: 641px) {
  .m-home-btn { min-height: 44px; padding: 0 16px; font-size: 0.88rem; }
}
/* とても狭いスマホでは、ボタンの文字を隠して絵だけにする（題名が入るように） */
@media (max-width: 370px) {
  .m-home-btn, .m-menu-btn { padding: 0 10px; font-size: 0; gap: 0; }
}
/* ホームは、名前の丸いアイコンの代わりにメニュー */
.home-top .home-avatar { display: none; }
@media (min-width: 641px) {
  .m-menu-btn { min-height: 44px; padding: 0 16px; font-size: 0.88rem; }
}

/* ===== メニューの中身（2026-10-01）: 絵のついた四角を、グループの色で3つずつ（スマホもパソコンも同じ）===== */
@media all {
  .m-sheet.m-sheet-tiles { padding: 6px 14px calc(14px + env(safe-area-inset-bottom, 0px)); background: #f4f5f7; }
  .m-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 4px; font-size: 1.05rem; font-weight: 800; }
  .m-sheet .m-sheet-x { width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 22px; background: #e5e7eb; color: #374151; font-size: 1.4rem; line-height: 1; cursor: pointer; }
  .m-sheet-group { margin-top: 10px; --t: #1d4ed8; --t-soft: #eaf0ff; }
  .m-sheet-group[data-tone="aa"] { --t: #6d28d9; --t-soft: #f3eeff; }
  .m-sheet-group[data-tone="records"] { --t: #0f766e; --t-soft: #e6f6f2; }
  .m-sheet-group[data-tone="settings"] { --t: #475569; --t-soft: #eef2f6; }
  .m-sheet-group[data-tone="tools"] { --t: #c2410c; --t-soft: #fff4ed; }
  .m-sheet-group-label { display: flex; align-items: center; gap: 6px; margin: 0 2px 6px; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; color: var(--t); }
  .m-sheet-group-label::before { content: ""; width: 7px; height: 7px; border-radius: 4px; background: var(--t); }
  .m-sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .m-sheet-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 78px; padding: 8px 4px; border: 2px solid transparent; border-radius: 14px; background: #fff; color: #111827; font-size: 0.82rem; font-weight: 700; text-align: center; text-decoration: none; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06); }
  .m-sheet-tile.active { border-color: var(--t); }
  .m-sheet-tile-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--t-soft); color: var(--t); }
  .m-sheet-tile-icon svg { width: 22px; height: 22px; }
  .m-sheet-tile.is-locked { opacity: 0.6; }
  .m-sheet-tile.is-locked .m-sheet-tile-label::after { content: " 🔒"; font-size: 0.8em; }
  .m-sheet-foot { display: flex; gap: 8px; margin-top: 14px; }
  .m-sheet .m-sheet-chip { flex: 1; width: auto; min-height: 44px; margin: 0; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
  .m-sheet .m-sheet-chip.m-sheet-simple { color: #1d4ed8; border-color: #93c5fd; }
  .m-sheet .m-sheet-chip.m-sheet-logout { color: var(--danger); border-color: #fca5a5; }
}

/* ===== ホーム「今後の予定」（2026-10-01）: これから1週間の 入庫予定・振込予定・セリ（1行ずつ。class 名は最初の「最近の動き」のまま）===== */
.home-dot.is-blue { background: #1d4ed8; }
.home-feed-item { border-top: 1px solid #eef0f3; }
.home-feed-link { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 0; color: var(--text); text-decoration: none; }
.home-feed-link:hover .home-feed-who b { text-decoration: underline; }
.home-feed-dot { flex: none; width: 10px; height: 10px; border-radius: 5px; background: #9ca3af; }
.home-feed-dot.is-blue { background: #1d4ed8; }
.home-feed-dot.is-green { background: #16a34a; }
.home-feed-dot.is-teal { background: #0e7490; }
.home-feed-dot.is-purple { background: #7c3aed; }
.home-feed-dot.is-gray { background: #9ca3af; }
.home-feed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.home-feed-who { font-size: 0.92rem; overflow-wrap: anywhere; }
.home-feed-who b { font-weight: 800; }
.home-feed-what { font-size: 0.8rem; color: #4b5563; }
.home-feed-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.home-feed-staff { padding: 0 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.home-feed-more { display: block; width: 100%; min-height: 44px; margin: 4px 0 6px; border: 0; border-top: 1px solid #eef0f3; border-radius: 0; background: none; color: #1d4ed8; font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; }
.home-feed-more:hover { background: #f8fafc; }

/* パソコン: 「メニュー」を押すと、右上に一覧を出す（スマホは下から出る。上の @media (max-width: 640px) の .m-sheet-overlay）*/
@media (min-width: 641px) {
  .m-sheet-overlay.open { display: flex; position: fixed; inset: 0; z-index: 950; align-items: flex-start; justify-content: flex-end; padding: 64px 24px 24px; background: rgba(15, 23, 42, 0.3); }
  .m-sheet.m-sheet-tiles { width: 440px; max-height: calc(100vh - 96px); overflow-y: auto; box-sizing: border-box; padding: 10px 18px 18px; border-radius: 18px; background: #f4f5f7; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25); }
  .m-sheet-tile:hover { border-color: var(--t-soft); }
  .m-sheet .m-sheet-x { width: 40px; height: 40px; }
}
/* 今後の予定: 「（本日）」はオレンジ、「（○日過ぎ）」は赤 */
.home-plan-count { margin-left: 2px; }
.home-feed-item.is-today .home-plan-when { color: #9a3412; font-weight: 700; }
.home-feed-item.is-today .home-plan-count { color: #c2410c; font-weight: 800; }
.home-feed-item.is-late .home-plan-when { color: #b91c1c; font-weight: 700; }
.home-feed-item.is-late .home-plan-count { font-weight: 800; }

/* スマホ: 題名が長い画面（完了済み一覧（月別）など）でも「ホーム」「メニュー」がはみ出さないよう、題名を折り返す */
@media (max-width: 640px) {
  .admin-header h1 { flex: 1 1 auto; min-width: 0; }
}

/* 今後の予定の「全員／自分」（統合管理者・管理者だけ）。見出しの右に小さく */
.home-today-scope.home-plan-scope { margin: 0 0 0 auto; padding: 3px; border-radius: 10px; }
.home-plan-scope .segmented-btn { flex: none; min-height: 30px; padding: 0 12px; font-size: 0.78rem; }

/* ===== 振込の一覧（2026-10-01。transfers.html）: 押すとコピーできる金額・口座 ===== */
.tr-lead { margin: -4px 0 10px; font-size: 0.85rem; color: #4b5563; }
.tr-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid #c7d6fe; border-radius: 14px; background: #eaf0ff; color: #1e3a8a; }
.tr-summary-count { font-weight: 800; }
.tr-summary-total { font-size: 1.1rem; font-weight: 800; }
.tr-summary-note { font-size: 0.8rem; font-weight: 700; color: #b45309; }
.tr-list { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) { .tr-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1400px) { .tr-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tr-empty { margin: 0; padding: 24px 16px; border: 1px dashed #d1d5db; border-radius: 14px; background: #fff; color: #4b5563; text-align: center; }
.tr-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; border: 1px solid #e5e7eb; border-left: 5px solid #0e7490; border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.tr-card.is-today { border-left-color: #ea580c; }
.tr-card.is-late { border-left-color: #b91c1c; }
.tr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: #4b5563; }
.tr-card.is-today .tr-when { color: #9a3412; font-weight: 700; }
.tr-card.is-late .tr-when { color: #b91c1c; font-weight: 700; }
.tr-count { font-weight: 800; }
.tr-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.tr-tag { padding: 0 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
.tr-tag.is-practice { border: 1px dashed #f59e0b; background: #fffbeb; color: #b45309; }
.tr-who { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.tr-who b { margin-right: 8px; font-weight: 800; }
.tr-car { font-size: 0.85rem; color: #374151; }
.tr-amount-row { display: flex; align-items: center; gap: 10px; }
.tr-label { flex: none; width: 4.6rem; font-size: 0.78rem; font-weight: 700; color: #6b7280; }
.tr-parts { margin: 0 0 0 calc(4.6rem + 10px); font-size: 0.75rem; color: #6b7280; }
.tr-warn { margin: 0; padding: 6px 10px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 0.8rem; font-weight: 700; }
.tr-note { margin: 4px 0 0; font-size: 0.85rem; color: #4b5563; }
.tr-missing { font-size: 0.82rem; font-weight: 700; color: #b45309; }
.tr-plain { font-size: 0.9rem; font-weight: 700; color: #111827; }
.tr-bank { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: center; gap: 6px 10px; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid #eef0f3; }
.tr-bank dt { font-size: 0.78rem; font-weight: 700; color: #6b7280; }
.tr-bank dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; margin: 0; }
button.tr-copy { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 38px; margin: 0; padding: 4px 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #f9fafb; color: #111827; font-family: inherit; font-size: 0.95rem; font-weight: 700; text-align: left; cursor: pointer; }
button.tr-copy:hover { border-color: #93c5fd; background: #eef2ff; }
button.tr-copy:active { background: #dbeafe; }
button.tr-copy svg { flex: none; color: #6b7280; }
.tr-copy-text { min-width: 0; overflow-wrap: anywhere; }
button.tr-copy.tr-amount { font-size: 1.15rem; font-weight: 800; color: #0f172a; }
button.tr-copy.tr-code { min-height: 30px; padding: 2px 8px; background: #fff; color: #4b5563; font-size: 0.75rem; font-weight: 600; }
.tr-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 10px; border-top: 1px solid #eef0f3; }
.tr-actions .btn-small { display: inline-flex; align-items: center; min-height: 40px; }
button.tr-paid { background: #0e7490; }
button.tr-paid:hover { background: #155e75; }
.tr-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 960; padding: 10px 18px; border-radius: 999px; background: rgba(17, 24, 39, 0.92); color: #fff; font-size: 0.88rem; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity 0.15s, transform 0.15s; }
.tr-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ホーム: 日付の入れ忘れ（2026-10-01）。あるときだけ、今後の予定の下に1行（押すと開く）*/
.home-feed-dot.is-amber { background: #d97706; }
.home-missing { margin: 2px 0 6px; border-top: 1px solid #eef0f3; }
.home-missing-summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 2px; color: #b45309; font-size: 0.88rem; font-weight: 800; cursor: pointer; list-style: none; }
.home-missing-summary::-webkit-details-marker { display: none; }
.home-missing-summary::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 10px; background: #fef3c7; color: #b45309; font-size: 0.8rem; font-weight: 900; }
.home-missing-summary::after { content: "›"; margin-left: auto; font-size: 1.2rem; line-height: 1; transition: transform 0.15s; }
.home-missing[open] .home-missing-summary::after { transform: rotate(90deg); }
/* 案件一覧のいちばん上の「確認が必要な案件」（2026-10-16） */
.deal-needs-check { margin: 0 0 10px; padding: 0 12px; border: 1px solid #fde68a; border-top: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; }
.needs-check-hint { margin: 0 0 4px; font-size: 0.8rem; color: #6b7280; }
/* ホーム: 振込待ちがあるときの「振込の一覧」への近道 */
.home-chip.is-transfer { border-color: #67e8f9; background: #ecfeff; color: #0e7490; }
.home-chip.is-transfer:hover { background: #cffafe; }

/* 案件の画面: お客様への連絡文（2026-10-01。customer-message.js）。上のまとめの右下に小さなボタン */
.deal-hero-tags { align-items: center; }
button.deal-hero-msg, a.deal-hero-msg { display: inline-flex; align-items: center; gap: 5px; width: auto; min-height: 34px; margin: 0 0 0 auto; padding: 0 14px; border: 1px solid #c7d6fe; border-radius: 999px; background: #fff; color: #1d4ed8; font-family: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; }
button.deal-hero-msg:hover, a.deal-hero-msg:hover { background: #eaf0ff; }
.msg-dialog { width: min(560px, calc(100vw - 24px)); max-width: none; padding: 14px 16px 16px; border-radius: 16px; }
.msg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.confirm-dialog p.msg-title { margin: 0; font-size: 1.05rem; font-weight: 800; }
button.msg-x { flex: none; width: 40px; height: 40px; padding: 0; border-radius: 20px; background: #f3f4f6; color: #374151; font-size: 1.3rem; line-height: 1; }
button.msg-x:hover { background: #e5e7eb; }
.msg-tabs { max-width: none; margin: 8px 0 10px; }
/* 種類が4つ（アンケート。2026-10-02）になっても、スマホで1行に収まるように（ことばの途中で折り返さない） */
.msg-tabs .segmented-btn { min-width: 0; padding: 0 4px; white-space: nowrap; }
@media (max-width: 420px) { .msg-tabs .segmented-btn { font-size: 0.8rem; } }
.msg-warn { margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 0.8rem; font-weight: 700; }
.confirm-dialog .msg-warn p { margin: 0; }
.confirm-dialog .msg-warn p + p { margin-top: 4px; }
.msg-text { display: block; width: 100%; min-height: 250px; margin: 0; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-family: inherit; font-size: 0.92rem; line-height: 1.6; resize: vertical; }
.confirm-dialog p.msg-hint { margin: 6px 0 0; font-size: 0.75rem; color: #6b7280; }
.confirm-dialog p.msg-done { margin: 4px 0 0; min-height: 1.3em; font-size: 0.82rem; font-weight: 700; color: #065f46; }
.msg-actions { display: flex; gap: 8px; margin-top: 8px; }
.msg-actions button { flex: 1; min-height: 46px; border-radius: 12px; font-size: 0.95rem; font-weight: 800; }
/* 振込の一覧: 担当者で絞り込み（ほかの人の案件も見られる人だけ）*/
.tr-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 0.85rem; font-weight: 700; color: #374151; }
.tr-filter select { width: auto; min-width: 15rem; max-width: 100%; min-height: 40px; margin: 0; border-radius: 10px; font-weight: 600; }

/* ===== 連絡文の定型文（2026-10-01。message-templates.html）===== */
.tpl-readonly { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font-size: 0.85rem; font-weight: 700; }
.tpl-help { margin: 0 0 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.tpl-help > summary { display: flex; align-items: center; min-height: 44px; padding: 0 14px; color: #1e293b; font-size: 0.9rem; font-weight: 800; cursor: pointer; }
.tpl-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 4px 12px 12px; }
button.tpl-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: auto; margin: 0; padding: 8px 10px; border: 1px solid #d5dde6; border-radius: 10px; background: #f8fafc; color: #1e293b; font-family: inherit; text-align: left; cursor: pointer; }
button.tpl-chip:hover { background: #eef2f6; }
button.tpl-chip b { color: #1d4ed8; font-size: 0.92rem; font-weight: 800; }
button.tpl-chip span { color: #4b5563; font-size: 0.75rem; font-weight: 500; }
.tpl-card h2 .tpl-badge { margin-left: auto; padding: 1px 10px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.75rem; font-weight: 700; }
.tpl-card h2 .tpl-badge.is-custom { background: #eaf0ff; color: #1d4ed8; }
.tpl-card h2 .tpl-badge.is-unsaved { background: #fef3c7; color: #92400e; }
.tpl-note { margin: -6px 0 8px; color: #6b7280; font-size: 0.8rem; }
.tpl-text { display: block; width: 100%; min-height: 280px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 10px; font-family: inherit; font-size: 0.92rem; line-height: 1.6; resize: vertical; }
.tpl-text[readonly] { background: #f9fafb; color: #374151; }
.tpl-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.tpl-actions .btn-small { min-height: 40px; }
.tpl-msg { min-height: 1.2em; margin: 6px 0 0; color: #065f46; font-size: 0.82rem; font-weight: 700; }
.tpl-preview { margin-top: 10px; padding: 10px 12px; border: 1px dashed #c7d6fe; border-radius: 12px; background: #f8fbff; }
.tpl-preview-title { margin: 0 0 6px; color: #1e40af; font-size: 0.78rem; font-weight: 800; }
.tpl-preview-warn { margin: 0 0 4px; color: #92400e; font-size: 0.78rem; font-weight: 700; }
.tpl-preview-text { margin: 0; font-family: inherit; font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; }
.tpl-updated { text-align: right; }
/* 連絡文の小窓: 「定型文を変える」（統合管理者・管理者だけ）*/
.msg-hint-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.msg-edit-link { color: #1d4ed8; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
/* スマホ: 題名（連絡文の定型文）を言葉の途中で折り返さない。差し込めるものは2列で小さく */
.msgtpl-page .admin-header h1 { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .tpl-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 2px 10px 10px; }
  button.tpl-chip { padding: 6px 8px; }
  button.tpl-chip b { font-size: 0.85rem; }
  button.tpl-chip span { font-size: 0.75rem; line-height: 1.4; }
}
/* 案件作成: 「自社用」「手書きの契約書」のボタンと「戻る」の間を少し空ける（2026-10-01）*/
#createFormStep #cancelCreateBtn { margin-top: 12px; }

/* ===== 手書き署名の案件: 振込先の登録（2026-10-01。bank-entry.js）===== */
.be-empty { margin: 0 0 10px; color: #b45309; font-size: 0.88rem; font-weight: 700; }
.be-kv { margin-bottom: 10px; }
.be-form { margin-top: 10px; }
.be-skip { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 600; }
.be-skip input { display: inline-block; width: auto; margin: 0; }
.be-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; }
.be-normal, .be-yucho { display: contents; }
.be-field { margin-bottom: 10px; }
.be-note { display: block; margin-top: 2px; color: #6b7280; font-size: 0.75rem; }
button.be-save { margin-top: 4px; }
.be-msg { min-height: 1.2em; margin: 6px 0 0; color: #065f46; font-size: 0.82rem; font-weight: 700; }

/* ===== お見積書（2026-10-02。quote-dialog.js）===== */
/* まとめの右下のボタンが2つ（お見積書・連絡文）のときは、右にそろえて並べる */
.deal-hero-tags .deal-hero-msg ~ .deal-hero-msg { margin-left: 0; }
.qd-dialog .qd-last { margin: 8px 0 0; font-size: 0.82rem; color: #374151; }
.qd-dialog .qd-last a { font-weight: 800; color: #1d4ed8; }
.qd-form { margin-top: 10px; }
.qd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; }
.qd-field { margin-bottom: 10px; font-size: 0.82rem; font-weight: 700; color: #374151; }
.qd-field textarea { display: block; width: 100%; margin-top: 6px; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 10px; font-family: inherit; font-size: 0.85rem; line-height: 1.6; resize: vertical; }
.qd-more { margin: 2px 0 10px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 12px; }
.qd-more > summary { min-height: 40px; display: flex; align-items: center; font-size: 0.82rem; font-weight: 700; color: #4b5563; cursor: pointer; }
.qd-more[open] { padding-bottom: 4px; }
button.qd-create { flex: 1; }

/* ===== 買う前の粗利シミュレーター（2026-10-02。profit-sim.js）===== */
button.profit-sim-link { display: inline-block; width: auto; margin: 6px 0 0; padding: 0; border: 0; background: none; color: #1d4ed8; font-family: inherit; font-size: 0.8rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
button.profit-sim-link:hover { background: none; color: #1e40af; }
button.profit-sim-link:disabled { background: none; color: #9ca3af; text-decoration: none; cursor: default; }
/* 買取金額の下に、いつも出ている粗利予想の欄（2026-10-02） */
.profit-est { margin: -2px 0 12px; padding: 10px 12px; border: 1px solid #ddd6fe; border-radius: 10px; background: #faf5ff; }
.profit-est-title { margin: 0 0 6px; color: #5b21b6; font-size: 0.82rem; font-weight: 800; }
label.profit-est-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 0.8rem; color: #374151; }
label.profit-est-line input { width: 9.5em; margin: 0; padding: 6px 8px; font-size: 16px; }
.profit-est-interp { color: #6b7280; font-size: 0.78rem; }
.profit-est-result { margin-top: 6px; }
.profit-est-wait { margin: 0; color: #6b7280; font-size: 0.78rem; }
.profit-est-total { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.profit-est-total span { color: #374151; font-size: 0.82rem; font-weight: 700; }
.profit-est-total b { font-size: 1.25rem; }
.profit-est-total.is-plus b { color: #15803d; }
.profit-est-total.is-minus b { color: #b91c1c; }
.profit-est-note { margin: 2px 0 0; color: #6b7280; font-size: 0.75rem; }
.profit-est button.profit-sim-link { margin-top: 4px; font-size: 0.76rem; }
.ps-form { display: grid; gap: 8px; margin-top: 10px; }
.ps-row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); align-items: center; gap: 4px 10px; margin: 0; }
.ps-row input, .ps-row select { margin: 0; }
.ps-label { font-size: 0.82rem; font-weight: 700; color: #374151; }
.ps-interp { grid-column: 2; font-size: 0.78rem; color: #6b7280; }
.ps-interp:empty { display: none; }
@media (max-width: 480px) { .ps-row { grid-template-columns: 1fr; } .ps-interp { grid-column: 1; } }
/* R預託金を車台番号から調べる（2026-10-02） */
.ps-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.ps-lookup input { flex: 1 1 11rem; min-width: 0; width: auto; margin: 0; }
button.ps-lookup-btn { flex: none; margin: 0; padding: 8px 12px; border: 1px solid #bfdbfe; border-radius: 8px; background: #fff; color: #1d4ed8; font-family: inherit; font-size: 0.82rem; font-weight: 700; }
button.ps-lookup-btn:hover { background: #eff6ff; }
button.ps-lookup-btn:disabled { background: #f3f4f6; color: #9ca3af; border-color: #e5e7eb; }
.ps-lookup-msg { flex-basis: 100%; margin: 0; color: #6b7280; font-size: 0.78rem; }
.ps-lookup-msg:empty { display: none; }
.ps-lookup-msg[data-state="ok"] { color: #15803d; }
.ps-lookup-msg[data-state="warn"] { color: #b45309; }
@media (max-width: 480px) { .ps-lookup-row > .ps-label { display: none; } }
.ps-result { margin-top: 12px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f8fafc; }
.ps-wait { margin: 0; font-size: 0.85rem; color: #6b7280; }
.ps-lines { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 0.85rem; }
.ps-lines dt { color: #4b5563; }
.ps-lines dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ps-total { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 0; padding-top: 8px; border-top: 1px solid #d1d5db; font-weight: 800; }
.ps-total b { font-size: 1.3rem; }
.ps-total.is-plus b { color: #15803d; }
.ps-total.is-minus b { color: #b91c1c; }
.confirm-dialog p.ps-note { margin: 8px 0 0; font-size: 0.75rem; color: #6b7280; }

/* ===== 手帳の「日報」「取引先」タブ（2026-10-02）===== */
.nb-tab { white-space: nowrap; }
@media (max-width: 640px) { .nb-tab { padding: 8px 6px; font-size: 0.85rem; } }
/* 取引先 */
.ct-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ct-tools .nb-search { flex: 1 1 200px; margin: 0; }
.ct-tools .ct-cat { width: auto; flex: 0 0 auto; margin: 0; }
.ct-group { margin: 14px 0 6px; font-size: 0.85rem; font-weight: 800; color: #0f766e; }
.ct-card { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ct-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ct-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ct-name { font-size: 1rem; overflow-wrap: anywhere; }
.ct-person { font-size: 0.82rem; color: #4b5563; }
.ct-edit { flex: none; }
.ct-lines { display: grid; gap: 2px; margin-top: 4px; font-size: 0.9rem; }
.ct-line { display: flex; gap: 8px; align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.ct-key { flex: none; width: 3em; font-size: 0.75rem; font-weight: 700; color: #6b7280; }
.ct-memo { margin: 6px 0 0; padding: 6px 8px; border-radius: 8px; background: #f8fafc; font-size: 0.82rem; color: #374151; white-space: pre-wrap; }
.ct-dialog .qd-field textarea { min-height: 70px; }
button.ct-delete { flex: 0 0 auto; color: var(--danger); border-color: #fca5a5; }
/* 日報 */
.rp-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rp-nav .rp-title { flex: 1; margin: 0; text-align: center; font-size: 1.05rem; }
.rp-card { padding: 10px 12px; margin-bottom: 8px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.rp-card.rp-mine { border-color: #bfe6dc; background: #f6fbf9; }
.rp-card.is-empty { background: #f9fafb; }
.rp-card.is-empty .rp-body { color: #9ca3af; }
.rp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 4px; font-size: 0.9rem; font-weight: 800; }
.rp-counts { margin: 0 0 6px; font-size: 0.8rem; color: #0f766e; font-weight: 700; }
.rp-counts-inline { font-size: 0.75rem; font-weight: 600; color: #0f766e; }
.rp-text { display: block; width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 10px; font-family: inherit; font-size: 0.92rem; line-height: 1.6; resize: vertical; }
.rp-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.rp-status { font-size: 0.8rem; color: #4b5563; }
.rp-body { margin: 0; font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-time { margin: 4px 0 0; font-size: 0.75rem; color: #6b7280; }
.rp-team-title { margin: 16px 0 8px; font-size: 0.92rem; font-weight: 800; }
.rp-past { margin-top: 12px; border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 12px; background: #fff; }
.rp-past > summary { min-height: 44px; display: flex; align-items: center; font-size: 0.85rem; font-weight: 700; color: #374151; cursor: pointer; }
button.rp-past-item { display: flex; gap: 10px; width: 100%; margin: 0; padding: 8px 0; border: 0; border-top: 1px solid #eef0f3; border-radius: 0; background: none; color: #111827; font-family: inherit; font-size: 0.85rem; font-weight: 400; text-align: left; cursor: pointer; }
button.rp-past-item:hover { background: #f8fafc; }
button.rp-past-item b { flex: none; font-weight: 700; }
.rp-notyet { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: #f9fafb; color: #6b7280; font-size: 0.82rem; }

/* ===== 担当者の目標と達成率（2026-10-02。goals-view.js）=====
   ホーム（今月の目標）・統計（その月の数字の下）に、決めた人だけ「契約 8 / 10台 ████░░ 80%」を出す。決めるのはアカウント管理 */
.goal-list { display: flex; flex-direction: column; }
.goal-person { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid #eef0f3; }
.goal-person:first-child { border-top: 0; }
.goal-name { flex: none; width: 5.5em; margin: 0; font-size: 0.88rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.goal-name small { display: block; color: #6b7280; font-size: 0.75rem; font-weight: 600; }
.goal-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.goal-line-head { display: flex; align-items: baseline; gap: 6px; font-size: 0.82rem; line-height: 1.3; }
.goal-label { flex: none; color: #6b7280; font-weight: 700; }
.goal-nums { min-width: 0; font-variant-numeric: tabular-nums; }
.goal-pct { flex: none; margin-left: auto; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.goal-pct.is-done { color: #15803d; }
.goal-bar { height: 8px; margin-top: 4px; border-radius: 4px; background: #eef0f3; overflow: hidden; }
.goal-fill { display: block; height: 100%; border-radius: 4px; background: #2563eb; }
.goal-fill.is-done { background: #16a34a; }
.goal-person.is-me .goal-name { color: #1d4ed8; }
.goal-list.is-solo .goal-name { display: none; }
.goal-person.is-total { margin-top: 2px; border-top: 1px solid #d1d5db; }
.goal-person.is-total .goal-fill:not(.is-done) { background: #64748b; }
.goal-note { margin: 4px 0 8px; color: #6b7280; font-size: 0.75rem; }
.goal-more { margin-top: 2px; }

/* ホームのカード（スマホは一番下・パソコンは「今後の予定」の下） */
.home-goals { padding: 16px 16px 8px; border-radius: 18px; background: #fff; border: 1px solid #e5e7eb; }
.home-dot.is-green { background: #16a34a; }
@media (min-width: 900px) {
  /* 右のメニューは2段分の高さ。余った高さは2段目にまわして、目標が「今後の予定」のすぐ下に来るようにする */
  .home-grid { grid-template-rows: auto 1fr; }
  .home-groups { grid-column: 2; grid-row: 1 / span 2; }
  .home-goals { grid-column: 1; grid-row: 2; padding: 20px 20px 10px; border-radius: 20px; }
}

/* 統計（その月の数字の下） */
.stat-goals { margin-top: 14px; padding: 12px 14px 4px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.stat-goals-title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 0.9rem; font-weight: 800; }
.stat-goals-title a { margin-left: auto; font-size: 0.75rem; font-weight: 700; }

/* アカウント管理（統合管理者が月ごとに決める表） */
.goal-month-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 10px; }
.goal-month-row label { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; font-weight: 700; }
.goal-edit-table input { width: 6.5em; min-height: 40px; text-align: right; }
.goal-edit-table td { vertical-align: middle; }
.goal-edit-table .goal-now { color: #4b5563; font-size: 0.8rem; white-space: nowrap; }
.goal-edit-table .goal-who small { display: block; color: #6b7280; font-size: 0.75rem; }
.goal-save-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 10px; }

/* ===== お客様アンケート（2026-10-02）=====
   統計の「お客様アンケート」のご感想の並び（admin-stats.js）と、定型文の画面の「Googleの口コミ」の欄（admin-message-templates.js） */
.sv-list { margin-top: 12px; }
.sv-item { padding: 10px 0; border-top: 1px solid #eef0f3; }
.sv-item-head { margin: 0; font-size: 0.82rem; color: #4b5563; }
.sv-item-stars { color: #f59e0b; letter-spacing: 1px; }
.sv-item-who { display: inline-block; margin-top: 2px; font-size: 0.85rem; font-weight: 700; }
.sv-item-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }
.sv-item-text.is-empty { color: #9ca3af; }
.sv-more { margin-top: 8px; }
.tpl-review { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #d1d5db; }
.tpl-review-title { margin: 0 0 8px; font-weight: 800; font-size: 0.9rem; }
.tpl-review .tpl-note { margin: 0 0 8px; }
.tpl-review-row { display: flex; gap: 8px; align-items: center; }
.tpl-review-row input { flex: 1; min-width: 0; min-height: 40px; }
.tpl-review-row .btn-small { flex: none; min-height: 40px; }

/* ===== ログインの記録（2026-10-02。アカウント管理。admin-login-events.js）===== */
.le-list { margin-top: 6px; }
.le-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 2px; border-top: 1px solid #eef0f3; font-size: 0.88rem; }
.le-row:first-child { border-top: 0; }
.le-time { flex: none; width: 7.5em; color: #4b5563; font-variant-numeric: tabular-nums; white-space: nowrap; }
.le-row.is-fail .le-time { width: auto; min-width: 7.5em; }
.le-name { flex: none; }
.le-name.is-unknown { font-weight: 600; color: #6b7280; }
.le-fail { flex: none; padding: 1px 8px; border-radius: 6px; background: #fee2e2; color: #b91c1c; font-size: 0.8rem; font-weight: 800; }
.le-where { color: #374151; }
.le-ip { margin-left: 8px; color: #9ca3af; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.le-alert { margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; font-size: 0.88rem; font-weight: 700; }
.le-more { margin-top: 8px; }

/* ===== ホームの「見積もり作成」（2026-10-02）: 「契約書を作成する」「案件一覧」と並べる（admin-home.js・quote-dialog.js）===== */
button.home-quote-btn { flex: 1; display: flex; align-items: center; gap: 10px; width: auto; min-width: 0; min-height: 84px; margin: 0; padding: 12px 16px; border-radius: 16px; background: #fff; border: 1px solid #d6dbe4; color: #1f2937; font-family: inherit; font-weight: 400; text-align: left; cursor: pointer; box-shadow: none; }
button.home-quote-btn:hover { background: #f8fafc; }
button.home-quote-btn svg { flex: none; color: #b91c1c; }
.home-quote-btn .home-btn-text small { color: #4b5563; }
/* スマホ・タブレット: 3つ並ぶので、絵を上・文字を下にする */
@media (max-width: 899px) {
  .home-deal-row.has-quote { gap: 8px; }
  .home-deal-row.has-quote > .home-create,
  .home-deal-row.has-quote > .home-list-btn,
  .home-deal-row.has-quote > .home-quote-btn { flex-direction: column; justify-content: center; gap: 6px; min-width: 0; min-height: 96px; padding: 12px 6px; text-align: center; }
  .home-deal-row.has-quote > .home-create { flex: 1.15; }
  .home-deal-row.has-quote > .home-list-btn,
  .home-deal-row.has-quote > .home-quote-btn { flex: 1; }
  .home-deal-row.has-quote .home-btn-text { align-items: center; }
  .home-deal-row.has-quote .home-btn-text b { font-size: 0.92rem; }
  .home-deal-row.has-quote .home-quote-btn .home-btn-text small { display: none; }
}
@media (min-width: 900px) {
  button.home-quote-btn { min-height: 104px; padding: 16px 20px; border-radius: 20px; gap: 14px; }
}
/* 見積書の小窓の「前に作った見積書」（ホームから開いたとき） */
.qd-recent { border: 1px solid #e5e7eb; border-radius: 12px; padding: 0 12px; }
.qd-recent > summary { min-height: 40px; display: flex; align-items: center; font-size: 0.82rem; font-weight: 700; color: #4b5563; cursor: pointer; }
.qd-recent-item { padding: 10px 0; border-top: 1px solid #eef0f3; }
.qd-recent-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.qd-recent-expired { padding: 0 6px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 0.75rem; font-weight: 800; }
.qd-recent-vehicle { margin: 2px 0 0; color: #4b5563; font-size: 0.8rem; }
.qd-recent-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.qd-recent-actions .btn-small { min-height: 36px; display: inline-flex; align-items: center; text-decoration: none; }
.qd-dialog .qd-recent-actions a.qd-to-deal,
.qd-dialog .qd-recent-actions a.qd-to-deal:visited { padding: 0 12px; border: 1px solid #b91c1c; border-radius: 8px; background: #b91c1c; color: #fff; font-weight: 800; }
.qd-dialog .qd-recent-actions a.qd-to-deal:hover { background: #991b1b; color: #fff; }
.qd-dialog .qd-recent-actions button.qd-delete { width: auto; margin-left: auto; color: #b91c1c; }
/* 見積書の小窓の「車検証を読み取る」（2026-10-02） */
.qd-shaken { margin: 4px 0 10px; padding: 10px 12px; border: 1px dashed #c7d2fe; border-radius: 12px; background: #f8faff; }
button.qd-shaken-btn { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 40px; }
.qd-shaken-msg { margin: 6px 0 0; color: #4b5563; font-size: 0.8rem; }
.qd-shaken-msg.is-working { color: #1d4ed8; font-weight: 700; }
.qd-shaken-msg.is-done { color: #065f46; font-weight: 700; }
.qd-shaken-msg.is-failed { color: #b91c1c; font-weight: 700; }
/* 「案件作成」に見積書の内容を入れたとき（admin-index.js） */
.from-quote-note { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; background: #eef2ff; color: #1e3a8a; font-size: 0.85rem; font-weight: 700; }
.from-quote-note p { margin: 0; }
.from-quote-note .from-quote-expired { margin-top: 4px; color: #b45309; }

/* ===== 自分の目標（2026-10-02。ホームの「今月の目標」→ goal-dialog.js）===== */
button.home-goals-edit { flex: none; width: auto; min-height: 32px; margin: 0 0 0 auto; padding: 4px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; box-shadow: none; }
button.home-goals-edit:hover { background: #f3f4f6; }
.goal-empty { margin: 2px 0 10px; color: #6b7280; font-size: 0.85rem; }
.goal-dialog .goal-form { margin-top: 8px; }
.goal-dialog .qd-field input { text-align: left; }
.goal-now-line { margin: 4px 0 6px; font-size: 0.85rem; font-weight: 700; color: #374151; }
.goal-hint { margin: 0 0 8px; color: #6b7280; font-size: 0.78rem; }
.goal-all-link { display: inline-block; margin: 0 0 8px; font-size: 0.82rem; font-weight: 700; }

/* ===== 入庫予定日・振込予定日をあとから変える（2026-10-02。案件の画面の「次にやること」。admin-deal.js）===== */
.deal-schedule { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #e5e7eb; }
.deal-schedule-dates { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 0.88rem; }
.deal-schedule-date b { margin-right: 2px; color: #4b5563; font-size: 0.78rem; }
button.deal-schedule-btn { width: auto; min-height: 36px; margin-left: auto; }
.deal-schedule-note { margin: 6px 0 0; color: #6b7280; font-size: 0.78rem; }
.schedule-dialog .schedule-form { margin-top: 8px; }
.schedule-dialog .sd-suggest { margin: -2px 0 10px; }
.schedule-dialog .sd-suggest button { width: auto; text-align: left; }
.schedule-dialog .sd-hint { margin: 0 0 8px; color: #6b7280; font-size: 0.78rem; }

/* ===== 統計の「だれの数字」（2026-10-02。全体／自分／担当者ごと。admin-stats.js）===== */
.stat-owner-bar { display: flex; align-items: center; margin: 0 0 12px; }
.stat-owner-bar label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.9rem; font-weight: 800; }
.stat-owner-bar select { width: auto; min-width: 9em; min-height: 40px; margin: 0; font-weight: 700; }

/* ===== 売上（2026-10-02。sales.html・admin-sales.js）===== */
.sl-tools { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 12px; }
.sl-pick { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: 0.82rem; font-weight: 800; }
.sl-pick input, .sl-pick select { width: auto; min-width: 9em; min-height: 40px; margin: 0; }
button.sl-add { width: auto; min-height: 44px; margin-left: auto; padding: 0 16px; font-weight: 800; }
/* 手で入れる売上は、まだ使われていないので、枠だけの目立たないボタンにする（2026-10-06 ユーザー「その他にまとめるやつやってみて」） */
button.sl-add { min-height: 38px; padding: 0 12px; border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 0.85rem; font-weight: 700; box-shadow: none; }
button.sl-add:hover { background: #f3f4f6; }
.sl-summary { margin-bottom: 12px; }
.sl-kinds { margin: 8px 0 0; color: #374151; font-size: 0.85rem; font-weight: 700; }
.sl-warn { margin: 6px 0 0; color: #b45309; font-size: 0.82rem; font-weight: 700; }
.sl-list { display: flex; flex-direction: column; gap: 8px; }
.sl-item { padding: 10px 12px; border: 1px solid #e5e7eb; border-left: 4px solid #94a3b8; border-radius: 12px; background: #fff; }
.sl-item.is-aa { border-left-color: #7c3aed; }
.sl-item.is-stock { border-left-color: #0f766e; }
.sl-item.is-wholesale { border-left-color: #2563eb; }
.sl-item.is-scrap { border-left-color: #92400e; }
.sl-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.sl-date { font-weight: 800; font-variant-numeric: tabular-nums; }
.sl-kind { padding: 0 8px; border-radius: 6px; background: #f1f5f9; color: #334155; font-size: 0.75rem; font-weight: 800; }
.sl-kind.is-aa { background: #ede9fe; color: #5b21b6; }
.sl-kind.is-stock { background: #ccfbf1; color: #115e59; }
.sl-kind.is-wholesale { background: #dbeafe; color: #1e40af; }
.sl-kind.is-scrap { background: #fef3c7; color: #92400e; }
.sl-vehicle { font-weight: 800; }
.sl-staff { margin-left: auto; color: #4b5563; font-size: 0.82rem; font-weight: 700; }
.sl-parts { margin: 4px 0 0; color: #374151; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.sl-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sl-profit { font-size: 1rem; color: #15803d; font-variant-numeric: tabular-nums; }
.sl-profit.is-minus { color: #b91c1c; }
.sl-profit.is-none { color: #b45309; font-size: 0.85rem; }
button.sl-edit { width: auto; min-height: 36px; margin-left: auto; }
.sl-note { margin: 4px 0 0; color: #9ca3af; font-size: 0.75rem; }
.sl-dialog .sl-form { margin-top: 8px; }
.sl-dialog select, .sl-dialog input { width: 100%; }
.sl-preview { margin: 4px 0 8px; font-weight: 800; color: #15803d; }
.sl-preview.is-minus { color: #b91c1c; }
.sl-info { margin-bottom: 10px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; }
.sl-info-title { margin: 0; font-weight: 800; }
.sl-hint { margin: 6px 0 0; color: #6b7280; font-size: 0.8rem; }
button.sl-delete { margin-right: auto; color: #b91c1c; }
/* 売上の「担当者別」（全体を見ているとき。統合管理者・管理者・事務員） */
.sl-bystaff { margin-top: 12px; }
.sl-bystaff-title { margin: 0 0 4px; font-size: 0.85rem; font-weight: 800; color: #374151; }
.sl-bystaff-table td, .sl-bystaff-table th { white-space: nowrap; }
.sl-bystaff-table .sl-num { text-align: right; font-variant-numeric: tabular-nums; }
.sl-bystaff-table small { display: block; color: #6b7280; font-size: 0.75rem; font-weight: 600; }
button.sl-bystaff-btn { width: auto; min-height: 36px; margin: 0; padding: 0 4px; border: 0; background: none; color: #1d4ed8; font-family: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; box-shadow: none; }
.sl-bystaff-profit { font-weight: 800; color: #15803d; }
.sl-bystaff-profit.is-minus { color: #b91c1c; }

/* 案件一覧のボードの処理先の印（2026-10-02。売上のページの種類と同じ色） */
.deal-board-tag.is-disp-aa { background: #ede9fe; color: #5b21b6; }
.deal-board-tag.is-disp-stock { background: #ccfbf1; color: #115e59; }
.deal-board-tag.is-disp-scrap { background: #fef3c7; color: #92400e; }
.deal-board-tag.is-disp-wholesale { background: #dbeafe; color: #1e40af; }
.deal-board-tag.is-disp-none { background: #fff; color: #6b7280; border: 1px dashed #d1d5db; }
/* ボードの処理先の印は押して変えられる（見えない選ぶ欄を重ねる。スマホで拡大されないよう文字は16px） */
.deal-board-tag.deal-board-disp { position: relative; display: inline-flex; align-items: center; gap: 3px; margin: 0; cursor: pointer; }
.deal-board-tag.deal-board-disp:hover { filter: brightness(0.96); }
.deal-board-tag.deal-board-disp:focus-within { outline: 2px solid #93c5fd; outline-offset: 1px; }
.deal-board-tag.deal-board-disp.is-saving { opacity: 0.55; }
.deal-board-disp-caret { font-size: 0.62rem; opacity: 0.7; }
/* 案件一覧の表（パソコン）では、処理先は4つのボタン。選んだものだけの印（disp-compact）はスマホのカードだけ */
.deal-table td.c-disposition .disp-compact { display: none; }
.deal-board-tag.deal-board-disp select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 16px; border: 0; appearance: none; -webkit-appearance: none; }
/* 在庫管理の「AAに回す」 */
.stock-move-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e5e7eb; }
button.stock-move-aa { width: auto; min-height: 36px; color: #5b21b6; border-color: #ddd6fe; }
.stock-move-note { color: #9ca3af; font-size: 0.75rem; }

/* ===== 便利機能（2026-10-05）: 自動車税の計算・住所コード・書類の原本 ===== */
.tl-wrap { max-width: 860px; }
.tl-lead { margin: 0 0 12px; font-size: 0.9rem; color: #4b5563; }
.tl-source { margin: 12px 0 0; font-size: 0.75rem; color: #9ca3af; }
/* スマホでは、題名の左の札を出さない（題名が「使い/方」のように変な所で折れないように。色で分かる）。
   前は業務支援だけだったのを、全部の画面に（2026-10-22 全体テスト） */
@media (max-width: 480px) {
  body.theme-b1 .admin-header h1::before { display: none; }
  /* 長い題名（完了済み一覧（月別）・保存した整備記録簿 など）は、短い表記（data-short）にする */
  body.theme-b1 .admin-header h1[data-short] { font-size: 0; }
  body.theme-b1 .admin-header h1[data-short]::after { content: attr(data-short); font-size: 1.05rem; }
}
/* 自動車税の計算 */
.ct-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
@media (max-width: 560px) { .ct-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button.ct-kind { flex: 1; margin: 0; padding: 10px 6px; border: 1px solid #ecdcb8; border-radius: 10px; background: #fff; color: #5c4419; font-family: inherit; font-size: 0.92rem; font-weight: 700; }
button.ct-kind:hover { background: #faf6ec; }
button.ct-kind.is-on { background: #8a6a2c; border-color: #8a6a2c; color: #fff; }
.ct-form { display: grid; gap: 10px; }
label.ct-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); align-items: center; gap: 4px 10px; margin: 0; }
label.ct-row.hidden { display: none; }
.ct-label { font-size: 0.85rem; font-weight: 700; color: #374151; }
label.ct-row input, label.ct-row select { margin: 0; font-size: 16px; }
.ct-echo { grid-column: 2; font-size: 0.78rem; color: #6b7280; }
.ct-echo:empty { display: none; }
@media (max-width: 520px) { label.ct-row { grid-template-columns: 1fr; } .ct-echo { grid-column: 1; } }
.ct-result { margin-top: 16px; padding: 12px 14px; border: 1px solid #ecdcb8; border-radius: 12px; background: #faf6ec; }
.ct-wait { margin: 0; color: #6b7280; font-size: 0.88rem; }
.ct-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 1px dashed #fde3cf; }
.ct-line:last-of-type { border-bottom: 0; }
.ct-line-label { font-size: 0.9rem; font-weight: 700; color: #374151; }
.ct-line-value { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ct-line.is-main .ct-line-value { font-size: 1.5rem; color: #8a6a2c; }
.ct-line.is-refund .ct-line-value { color: #15803d; }
.ct-line-note { grid-column: 1 / -1; font-size: 0.76rem; color: #6b7280; }
.ct-notes { margin: 8px 0 0; padding-left: 1.2em; font-size: 0.76rem; color: #6b7280; }
.ct-table > summary { font-weight: 800; cursor: pointer; }
.ct-table-scroll { overflow-x: auto; margin-top: 10px; }
.ct-table table { width: 100%; min-width: 520px; border-collapse: collapse; margin-bottom: 12px; font-size: 0.85rem; }
.ct-table th, .ct-table td { padding: 5px 8px; border-bottom: 1px solid #eef0f4; text-align: right; white-space: nowrap; }
.ct-table th { color: #6b7280; font-size: 0.76rem; background: #fafafa; }
.ct-table th:first-child, .ct-table td:first-child { text-align: left; }
/* 住所コード */
form.ac-search { display: flex; gap: 8px; }
form.ac-search input { flex: 1; min-width: 0; margin: 0; font-size: 16px; }
form.ac-search button { width: auto; margin: 0; }
.ac-result { margin-top: 12px; }
.ac-msg { margin: 0 0 8px; color: #4b5563; font-size: 0.88rem; }
.ac-msg.is-error { color: var(--danger); }
.ac-list { display: grid; gap: 10px; }
.ac-card { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ac-card.is-exact { border-color: #d9c08a; background: #faf6ec; }
.ac-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.ac-address { font-size: 0.95rem; }
.ac-office { font-size: 0.75rem; color: #7a5c22; background: #f6ecd6; border-radius: 999px; padding: 1px 8px; }
.ac-code { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.ac-code-part { display: flex; flex-direction: column; align-items: center; min-width: 4.8em; padding: 4px 8px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.ac-code-label { font-size: 0.75rem; color: #6b7280; }
.ac-code-value { font-size: 1.25rem; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.ac-code-part.is-empty .ac-code-value { font-size: 0.9rem; letter-spacing: 0; color: #9ca3af; padding-top: 4px; }
button.ac-copy { align-self: center; width: auto; margin: 0 0 0 4px; padding: 8px 12px; border: 1px solid #ecdcb8; border-radius: 8px; background: #fff; color: #8a6a2c; font-family: inherit; font-size: 0.82rem; font-weight: 700; }
button.ac-copy:hover { background: #faf6ec; }
button.ac-copy.is-copied { background: #15803d; border-color: #15803d; color: #fff; }
/* 書類の原本 */
.dl-list { display: grid; gap: 8px; }
.dl-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.dl-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 48px; border-radius: 6px; background: #fee2e2; color: #b91c1c; font-size: 0.75rem; font-weight: 800; }
.dl-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-title { font-size: 0.98rem; overflow-wrap: anywhere; }
.dl-note { font-size: 0.8rem; color: #4b5563; }
.dl-meta { font-size: 0.75rem; color: #9ca3af; }
.dl-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
a.dl-open { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 8px; background: #8a6a2c; color: #fff; font-size: 0.88rem; font-weight: 700; text-decoration: none; }
a.dl-open:hover { background: #7a5c22; }
button.dl-btn { width: auto; margin: 0; }
.dl-edit { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; border-top: 1px dashed #e5e7eb; }
button.dl-mini { width: auto; min-height: 32px; margin: 0; padding: 4px 10px; font-size: 0.78rem; }
button.dl-del { color: var(--danger); }
button.dl-mini:disabled { background: #f9fafb; border-color: #e5e7eb; color: #d1d5db; }
@media (max-width: 560px) {
  .dl-item { grid-template-columns: auto minmax(0, 1fr); }
  .dl-actions { grid-column: 1 / -1; justify-content: stretch; }
  .dl-actions > * { flex: 1; justify-content: center; }
}
form.dl-add { display: grid; gap: 10px; }
form.dl-add label { margin: 0; }
form.dl-add button { width: auto; justify-self: start; }
.dl-error { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: var(--danger); font-weight: 700; font-size: 0.88rem; }
/* 書類を作る（2026-10-05） */
.dm-hint { margin: 6px 0 0; font-size: 0.8rem; color: #6b7280; }
label.dm-field { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 0.85rem; font-weight: 700; color: #374151; }
label.dm-field input, label.dm-field select { margin: 0; font-size: 16px; font-weight: 400; }
.dm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.dm-grid .dm-wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .dm-grid { grid-template-columns: 1fr; } }
.dm-docs, .dm-radios { display: grid; gap: 8px; }
label.dm-check { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 9px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-size: 0.92rem; cursor: pointer; }
label.dm-check:has(input:checked) { border-color: #d9c08a; background: #faf6ec; }
label.dm-check input[type="checkbox"], label.dm-check input[type="radio"] { width: auto; margin: 0; transform: scale(1.2); }
label.dm-check span { flex-basis: 100%; padding-left: 26px; font-size: 0.78rem; color: #6b7280; }
label.dm-check input[type="date"] { width: auto; margin: 0 0 0 4px; font-size: 16px; }
fieldset.dm-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0 0; padding: 10px 12px; border: 1px dashed #ecdcb8; border-radius: 10px; }
fieldset.dm-items.hidden { display: none; }
fieldset.dm-items legend { padding: 0 6px; font-size: 0.82rem; font-weight: 800; color: #7a5c22; }
fieldset.dm-items label.dm-check { padding: 6px 10px; font-size: 0.85rem; }
@media (max-width: 560px) { fieldset.dm-items { grid-template-columns: 1fr; } }
.dm-dates { margin-top: 10px; }
.dm-error { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: #fef2f2; color: var(--danger); font-weight: 700; }
.dm-make { margin: 0 0 16px; }
.dm-make button { width: 100%; padding: 14px; font-size: 1.05rem; background: #8a6a2c; }
.dm-make button:hover { background: #7a5c22; }
.dm-result { margin: 0 0 16px; padding: 14px 16px; border: 2px solid #86efac; border-radius: 14px; background: #f0fdf4; }
.dm-result-title { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; color: #15803d; }
.dm-result-list { display: grid; gap: 8px; }
.dm-result-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #fff; }
.dm-result-row b { flex: 1 1 8em; font-size: 0.98rem; }
button.dm-company-save { width: auto; justify-self: start; margin: 0; }
a.deal-hero-msg { text-decoration: none; }
/* 書類を作る: 車検証を読み取る・車庫証明（2026-10-05） */
.dm-shaken { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed #d9c08a; border-radius: 10px; background: #faf6ec; }
label.dm-shaken-btn { display: inline-flex; align-items: center; margin: 0; padding: 10px 14px; border-radius: 10px; background: #8a6a2c; color: #fff; font-size: 0.92rem; font-weight: 800; cursor: pointer; }
label.dm-shaken-btn:hover { background: #7a5c22; }
label.dm-shaken-btn.is-busy { opacity: 0.6; pointer-events: none; }
label.dm-shaken-btn input[type="file"] { display: none; }
.dm-shaken-msg { margin: 6px 0 0; font-size: 0.8rem; color: #6b7280; }
.dm-shaken-msg.is-working { color: #7a5c22; }
.dm-shaken-msg.is-done { color: #15803d; font-weight: 700; }
.dm-shaken-msg.is-failed { color: var(--danger); font-weight: 700; }
.dm-sub { margin: 14px 0 6px; font-size: 0.85rem; font-weight: 800; color: #7a5c22; }
.dm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .dm-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
button.dm-mini { width: auto; margin: 8px 0 0; padding: 6px 12px; font-size: 0.82rem; }
/* 車庫証明の欄: 申請書に入る車の内容（2026-10-05） */
dl.sk-car { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; margin: 10px 0 0; font-size: 0.85rem; }
dl.sk-car dt { color: #7a5c22; font-weight: 700; }
dl.sk-car dd { margin: 0; overflow-wrap: anywhere; }
dl.sk-car dd.is-empty { color: #9ca3af; font-size: 0.78rem; }
/* 所在図の地図（別紙）の印の位置を確かめる地図（2026-10-05） */
.sk-map-box { margin: 10px 0 0; padding: 10px; border: 1px dashed #d9c08a; border-radius: 12px; background: #fffbf5; }
.sk-map-box button.dm-mini { margin-top: 0; }
.sk-map-wrap { margin-top: 8px; }
.sk-map-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 6px; font-size: 0.85rem; font-weight: 700; color: #374151; }
label.sk-pick { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 5px 10px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
label.sk-pick input { width: auto; margin: 0; }
label.sk-pick:has(input:checked) { border-color: #8a6a2c; background: #faf6ec; }
.sk-dot { display: inline-block; width: 12px; height: 12px; }
.sk-dot.is-base { background: #111827; border-radius: 50%; }
.sk-dot.is-park { background: #111827; }
.sk-map { position: relative; height: 300px; overflow: hidden; border: 1px solid #d1d5db; border-radius: 10px; background: #eef2f7; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.sk-map-tiles { position: absolute; inset: 0; }
/* 印刷する地図と同じく白黒で見せる（2026-10-05 ユーザー「白黒で出力してくれたほうがわかりやすいかも」） */
img.sk-tile { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; pointer-events: none; filter: grayscale(1); }
/* 画面の地図を Google マップの画像で（2026-10-16。色はそのまま。PDF は白黒） */
img.sk-gmap-img { position: absolute; left: 0; top: 0; max-width: none; pointer-events: none; }
img.sk-tile.is-missing { visibility: hidden; }
.sk-map-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sk-map-svg line.hidden { display: none; }
.sk-pin { position: absolute; left: 0; top: 0; pointer-events: none; }
/* 印はピンの形（先が場所。2026-10-17 ユーザー「マークがでかくて見づらいのでもっとぴんみたいに」）。頭の白い ●＝使用の本拠、■＝保管場所 */
.sk-pin-dot { position: absolute; left: -7px; top: -17px; width: 14px; height: 14px; box-sizing: border-box; border: 1.5px solid #fff; border-radius: 50% 50% 50% 0; background: #111827; box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.4); transform: rotate(-45deg); }
.sk-pin-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #fff; border-radius: 50%; }
.sk-pin.is-park .sk-pin-dot::after { border-radius: 0; transform: rotate(45deg); }
.sk-pin-label { position: absolute; left: 10px; top: -20px; padding: 1px 6px; border: 1px solid #9ca3af; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #111827; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.sk-map-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 4px; }
.sk-map-zoom button { width: 36px; height: 36px; margin: 0; padding: 0; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; font-size: 1.2rem; font-weight: 700; line-height: 1; box-shadow: none; cursor: pointer; }
.sk-map-credit { position: absolute; right: 4px; bottom: 2px; padding: 0 4px; background: rgba(255, 255, 255, 0.8); color: #374151; font-size: 0.65rem; pointer-events: none; }
.sk-map-dist { margin: 6px 0 0; color: #111827; font-size: 0.95rem; font-weight: 700; }
.sk-map-dist.is-far { color: var(--danger); font-size: 0.85rem; }
.sk-map-found { white-space: pre-line; }
/* 自動車税の還付委任状（都道府県別）（2026-10-05）: 書類の原本の一覧 */
.kp-list { display: grid; gap: 10px; }
.kp-region { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 4px 10px; align-items: start; }
.kp-region-name { padding-top: 6px; color: #7a5c22; font-size: 0.8rem; font-weight: 700; }
.kp-prefs { display: flex; flex-wrap: wrap; gap: 6px; }
a.kp-pref { display: inline-block; padding: 5px 11px; border: 1px solid #d9c08a; border-radius: 999px; background: #fff; color: #7a5c22; font-size: 0.85rem; font-weight: 700; text-decoration: none; }
a.kp-pref:hover { background: #faf6ec; }
a.kp-pref.is-custom { border-color: #15803d; color: #15803d; }
.kp-edit { display: grid; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed #d9c08a; }
.kp-edit-title { margin: 0; color: #7a5c22; font-size: 0.85rem; font-weight: 700; }
.kp-edit label { display: grid; gap: 4px; margin: 0; color: #374151; font-size: 0.85rem; font-weight: 700; }
.kp-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-edit-actions button { width: auto; margin: 0; }
/* 案件の画面: 必要書類の「自動車税還付委任状」の様式を開く */
.kanpu-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.kanpu-pick.kanpu-none { display: none; }
.kanpu-pick select { width: auto; max-width: 9em; margin: 0; padding: 4px 6px; font-size: 0.85rem; }
a.kanpu-open { display: inline-block; padding: 5px 10px; border-radius: 8px; background: #8a6a2c; color: #fff; font-size: 0.8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kanpu-hint { color: #6b7280; font-size: 0.75rem; }
/* 案件の画面: 車検証の読み取りを1行に（2026-10-05 ユーザー「案件詳細の欄がすごくゴチャゴチャしてきた」） */
.shaken-ocr { border-radius: 10px; }
.shaken-ocr.dragover { outline: 2px dashed var(--accent); outline-offset: 4px; background: #f5f8ff; }
.shaken-ocr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shaken-menu-wrap { position: relative; }
button.shaken-menu-btn { width: auto; margin: 0; padding: 9px 14px; border: 1px solid var(--accent); border-radius: 10px; background: #f5f8ff; color: var(--accent); font-size: 0.92rem; font-weight: 700; cursor: pointer; }
button.shaken-menu-btn:hover { background: #eaf0ff; }
.shaken-ocr.locked button.shaken-menu-btn { border-color: var(--border); background: #f3f4f6; color: var(--muted); cursor: not-allowed; }
.shaken-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; display: grid; min-width: 15em; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15); }
.shaken-menu.hidden { display: none; }
.shaken-menu .shaken-menu-item { display: block; width: 100%; margin: 0; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: var(--text); font-size: 0.92rem; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; box-shadow: none; }
.shaken-menu .shaken-menu-item:hover { background: #eef2ff; }
.shaken-file-item input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.shaken-ocr-bar .shaken-view-detail { margin: 0; }
button.shaken-help-btn { width: 2em; height: 2em; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--muted); font-size: 0.9rem; font-weight: 700; line-height: 1; cursor: pointer; }
.shaken-ocr-help { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; color: var(--muted); font-size: 0.8rem; line-height: 1.6; }
.shaken-ocr-help p { margin: 0 0 4px; }
.shaken-ocr-help p:last-child { margin-bottom: 0; }
.staff-auto-note { margin: 0 0 6px; font-size: 0.8rem; }
button.add-note-btn { width: auto; justify-self: start; margin: 0 0 8px; }
/* 画面の下の帯（保存・入力を決定する）が出ている間は、担当者入力欄の下の同じボタンと説明を隠す */
.staff-form-actions.bar-shown #saveStaffBtn,
.staff-form-actions.bar-shown #decideStaffBtn,
.staff-form-actions.bar-shown #staffActionsNote,
.staff-form-actions.bar-shown #staffMsg { display: none !important; }
/* 手帳: 日報・取引先は「その他 ▾」の中（2026-10-06） */
.nb-more { position: relative; display: flex; }
button.nb-more-btn { width: auto; margin: 0; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: #374151; font-weight: 700; font-size: 0.92rem; white-space: nowrap; box-shadow: none; }
button.nb-more-btn.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.nb-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; display: grid; min-width: 9em; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15); }
.nb-more-menu.hidden { display: none; }
.nb-more-menu .nb-tab { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: #111827; text-align: left; }
.nb-more-menu .nb-tab.is-active { background: #eef2ff; color: var(--accent); }
@media (max-width: 640px) {
  .nb-more { flex: 1 1 0; }
  button.nb-more-btn { width: 100%; padding: 8px 6px; font-size: 0.85rem; }
}
/* 統計: 5つの切り替えとグラフ（2026-10-06 ユーザー「統計も見づらい」「図でほしい」。stat-charts.js） */
.stat-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; padding: 2px 2px 4px; scrollbar-width: none; }
.stat-tabs::-webkit-scrollbar { display: none; }
button.stat-tab { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 18px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: #374151; font-size: 0.95rem; font-weight: 700; box-shadow: none; }
button.stat-tab.is-active { background: var(--grp, #0f766e); border-color: var(--grp, #0f766e); color: #fff; }
.stat-tab-off { display: none !important; }
@media (max-width: 640px) {
  .stat-tabs { margin-left: -2px; margin-right: -2px; }
  button.stat-tab { padding: 8px 13px; font-size: 0.88rem; }
}
.stat-chart-title { margin: 16px 0 8px; color: #374151; font-size: 0.92rem; font-weight: 800; }
.stat-chart-title:first-of-type { margin-top: 6px; }
.stat-empty { margin: 6px 0; color: var(--muted); font-size: 0.88rem; }
.sc-donut { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.sc-donut-svg { flex: none; width: 160px; height: 160px; }
.sc-donut-total { fill: #111827; font-size: 28px; font-weight: 800; }
.sc-donut-unit { fill: #6b7280; font-size: 11px; }
.sc-legend { display: grid; flex: 1 1 13em; gap: 7px; min-width: 0; max-width: 26em; }
.sc-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.sc-legend-dot { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.sc-legend-label { flex: 1 1 auto; min-width: 0; overflow: hidden; color: #374151; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sc-legend-value { flex: none; color: #4b5563; font-variant-numeric: tabular-nums; }
.stat-bar-value.is-neg { color: var(--danger); }
.stat-bar-sub { display: block; color: #9ca3af; font-size: 0.75rem; }
#aaCharts .stat-vchart-label { font-size: 0.62rem; letter-spacing: -0.02em; }
/* 便利機能「リサイクル預託金」（2026-10-06 ユーザー「便利機能にリサイクル預託金 金額を調べるをほしい」。recycle.html） */
.rl-shaken { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; }
label.rl-shaken-btn { display: inline-flex; align-items: center; margin: 0; padding: 8px 12px; border: 1px solid #ecdcb8; border-radius: 8px; background: #fff; color: #8a6a2c; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
label.rl-shaken-btn:hover { background: #faf6ec; }
label.rl-shaken-btn.is-busy { opacity: 0.6; pointer-events: none; }
label.rl-shaken-btn input[type="file"] { display: none; }
.rl-shaken-msg { font-size: 0.78rem; color: #9ca3af; }
.rl-shaken-msg.is-working { color: #7a5c22; }
.rl-shaken-msg.is-done { color: #15803d; font-weight: 700; }
.rl-shaken-msg.is-failed { color: var(--danger); font-weight: 700; }
.rl-result { margin-top: 14px; }
.rl-msg { margin: 0; color: #4b5563; font-size: 0.88rem; }
.rl-msg.is-error { color: var(--danger); font-weight: 700; }
.rl-card { padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.rl-card.is-deposited { border-color: #d9c08a; background: #faf6ec; }
.rl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 10px; }
.rl-chassis { font-size: 1rem; letter-spacing: 0.02em; word-break: break-all; }
.rl-status { padding: 1px 10px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.78rem; font-weight: 700; }
.rl-status.is-ok { background: #dcfce7; color: #166534; }
.rl-type { font-size: 0.78rem; color: #6b7280; }
.rl-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.rl-main-label { font-size: 0.85rem; color: #6b7280; font-weight: 700; }
.rl-main-value { font-size: 1.7rem; color: #7a5c22; font-variant-numeric: tabular-nums; }
.rl-main button.ac-copy { align-self: center; margin: 0; }
.rl-note { margin: 8px 0 0; font-size: 0.82rem; color: #4b5563; }
.rl-note.is-warn { color: #92400e; font-weight: 700; }
.rl-note.is-test { color: #9ca3af; font-size: 0.75rem; }
.rl-more { margin-top: 10px; }
.rl-more summary { cursor: pointer; color: #8a6a2c; font-size: 0.85rem; font-weight: 700; }
.rl-breakdown { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; max-width: 26em; margin: 8px 0 0; font-size: 0.85rem; }
.rl-breakdown dt { margin: 0; color: #4b5563; }
.rl-breakdown dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.rl-breakdown .rl-sum { padding-top: 4px; border-top: 1px solid #e5e7eb; font-weight: 800; color: #111827; }
/* AA調整表の確定（2026-10-06。はじめAAメモに付けたが、同じ日に「AAメモじゃなくて調整表の方だわ」で調整表に移した） */
.aac-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; padding: 8px 12px; border: 1px solid #e9d5ff; border-radius: 10px; background: #faf5ff; }
.aac-confirm.is-confirmed { border-color: #c4b5fd; background: #f5f3ff; }
.aac-confirm .btn-small { margin: 0; }
.aac-confirm-text { flex: 1 1 16em; font-size: 0.82rem; color: #4b5563; }
button.aa-confirm-btn { padding: 7px 14px; background: #6d28d9; font-size: 0.85rem; }
button.aa-confirm-btn:hover { background: #5b21b6; }
.aa-confirmed { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #ede9fe; color: #5b21b6; font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.aa-confirmed::before { content: "🔒 "; font-size: 0.85em; }
.aac-set-name .aa-confirmed, .aac-set-title .aa-confirmed { margin-left: 8px; padding: 1px 8px; font-size: 0.75rem; vertical-align: 1px; }
.aa-unlock-dialog { width: calc(100% - 24px); max-width: 420px; }
.aa-unlock-car { margin: 0 0 6px; font-weight: 800; }
.confirm-dialog p.aa-unlock-msg.is-error { color: var(--danger); }
/* 書類を作る: 必要書類のご案内（2026-10-06）。何も選んでいないときの案内 */
.dm-pick-hint { margin: 10px 0 0; color: #7a5c22; font-weight: 700; }
.dm-radios.dm-inline { grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); }
.dm-radios.dm-inline label.dm-check { padding: 8px 10px; }
.dm-guide-list { display: grid; gap: 6px; margin-bottom: 8px; }
.dm-guide-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-size: 0.9rem; }
.dm-guide-row:has(input[type="checkbox"]:checked) { border-color: #d9c08a; background: #faf6ec; }
.dm-guide-row label { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; margin: 0; font-weight: 700; cursor: pointer; }
.dm-guide-row label input[type="checkbox"] { width: auto; margin: 0; transform: scale(1.2); }
.dm-guide-row input.dm-guide-qty { flex: none; width: 3.2em; margin: 0; padding: 6px 4px; font-size: 16px; text-align: center; }
.dm-guide-row.is-custom input[type="text"]:not(.dm-guide-qty) { flex: 1 1 auto; min-width: 0; margin: 0; padding: 6px 8px; font-size: 16px; }
.dm-radios.dm-inline label.dm-check { flex-wrap: nowrap; white-space: nowrap; }
/* 書類を作る: 整備記録簿（2026-10-06） */
.dm-grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 560px) { .dm-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sb-mark-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.sb-mark-tools .dm-mini { margin: 0; }
.sb-legend { margin: 0 0 8px; }
.sb-groups { display: grid; gap: 6px; margin-bottom: 12px; }
details.sb-group { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
details.sb-group > summary { padding: 10px 12px; cursor: pointer; font-weight: 700; font-size: 0.9rem; color: #5c4419; }
details.sb-group[open] > summary { border-bottom: 1px solid #f3f4f6; }
.sb-sub { margin: 8px 12px 2px; font-size: 0.78rem; font-weight: 800; color: #6b7280; }
.sb-item { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; font-size: 0.86rem; }
.sb-item > span { flex: 1 1 auto; min-width: 0; }
.sb-item.is-grey > span::before { content: "灰"; display: inline-block; margin-right: 4px; padding: 0 4px; border-radius: 4px; background: #e5e7eb; color: #6b7280; font-size: 0.75rem; vertical-align: 1px; }
.sb-item select { flex: none; width: 8.6em; margin: 0; padding: 5px 6px; font-size: 16px; }
/* 「？」（項目の説明。2026-10-06） */
button.sb-q { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin: 0 0 0 6px; padding: 0; border: 1px solid #d9c08a; border-radius: 50%; background: #fff; color: #8a6a2c; font-size: 0.75rem; font-weight: 800; line-height: 1; vertical-align: middle; cursor: pointer; }
button.sb-q.is-open { background: #8a6a2c; border-color: #8a6a2c; color: #fff; }
.sb-help { margin: 0 12px 6px; padding: 8px 10px; border-radius: 8px; background: #faf6ec; color: #431407; font-size: 0.82rem; line-height: 1.6; }
.sb-help.hidden { display: none; }
/* 車の仕様（2026-10-06） */
.sb-guess { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 8px; }
.sb-guess .dm-mini { margin: 0; }
.sb-specs { display: grid; gap: 6px; margin-bottom: 12px; }
.sb-spec { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.sb-spec-name { flex: 0 0 9.5em; font-size: 0.82rem; font-weight: 800; color: #374151; }
.sb-spec-choices { display: flex; flex-wrap: wrap; gap: 4px; }
.sb-spec-choices label { display: inline-flex; align-items: center; gap: 4px; margin: 0; padding: 4px 10px; border: 1px solid #e5e7eb; border-radius: 999px; font-size: 0.8rem; cursor: pointer; }
.sb-spec-choices label:has(input:checked) { border-color: #8a6a2c; background: #faf6ec; color: #7a5c22; font-weight: 800; }
.sb-spec-choices input { width: auto; margin: 0; }
details.sb-more { margin-top: 10px; border-top: 1px dashed #ecdcb8; padding-top: 8px; }
details.sb-more > summary { cursor: pointer; font-weight: 800; color: #7a5c22; font-size: 0.92rem; margin-bottom: 6px; }
.sb-daily { display: grid; gap: 6px; }
.sb-extra { display: grid; gap: 6px; }
.sb-extra input.sb-extra-qty { width: 4.6em; }
details.sb-specs-box { margin-bottom: 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
details.sb-specs-box > summary { padding: 10px 12px; cursor: pointer; font-size: 0.86rem; font-weight: 700; color: #5c4419; }
details.sb-specs-box .sb-specs { margin: 0; padding: 0 8px 8px; }
details.sb-specs-box .sb-spec { border-color: #f3f4f6; }
/* 便利機能「手数料の計算」（2026-10-06） */
.fc-procs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .fc-procs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fc-source { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fc-source select { flex: 1 1 220px; width: auto; min-width: 0; max-width: 100%; margin: 0; font-size: 16px; }
label.fc-shaken-btn { padding: 9px 12px; font-size: 0.85rem; }
#fcSourceMsg { margin: 6px 0 12px; }
.fc-check { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: #4b5563; }
.fc-check input { width: auto; margin: 0; transform: scale(1.2); }
.fc-head { margin: 0 0 4px; font-size: 0.85rem; font-weight: 800; color: #7a5c22; }
.ct-line.is-missing .ct-line-value { color: #9ca3af; }
/* ホームのマスの名前は、区切りのいい所（<wbr>）でだけ2行にする（「手数料の計／算」のように割れないように。2026-10-06） */
.home-cell span { word-break: keep-all; line-height: 1.3; }
/* パソコンのホーム: マスを1つずつのカードにして、どのグループも4列にそろえる（2026-10-06 ユーザー「なーんかバランス悪いやな」→ 案A）。
   段ごとにマスの幅が違って線がそろわなかったため。空いた所は何も置かない。スマホは今までどおり（1枚の板） */
@media (min-width: 900px) {
  .home-cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border: 0; border-radius: 0; overflow: visible; }
  .home-group.is-purple .home-cells, .home-group.is-green .home-cells, .home-group.is-orange .home-cells { background: transparent; }
  .home-cells > .home-cell { min-height: 84px; border: 1px solid var(--tile-line, #e5e7eb); border-radius: 14px; }
  .home-cells:has(> .home-cell:nth-child(5)) > .home-cell, .home-cells:has(> .home-cell:nth-child(7)) > .home-cell { flex: none; }
  .home-group.is-green .home-cell { --tile-line: #bfe6dc; }
  .home-group.is-purple .home-cell { --tile-line: #ddd0fb; }
  .home-group.is-orange .home-cell { --tile-line: #ecdcb8; }
}
/* スマホのホーム: マスを1つずつの横長カード（アイコンの右に名前）にして、どのグループも2列にそろえる
   （2026-10-07 ユーザー「スマホ版も少し見づらいかな」→ 案B）。1枚の板を線で区切る形だと、段ごとにマスの幅が違い、
   4列のところは字が小さく詰まっていたため。空いた所は何も置かない */
@media (max-width: 899px) {
  .home-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; border: 0; border-radius: 0; overflow: visible; }
  .home-group.is-purple .home-cells, .home-group.is-green .home-cells, .home-group.is-orange .home-cells { background: transparent; }
  .home-cells > .home-cell { flex: none; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--tile-line, #e5e7eb); border-radius: 12px; font-size: 0.95rem; text-align: left; }
  .home-cells > .home-cell svg { width: 24px; height: 24px; }
  .home-group.is-green .home-cell { --tile-line: #bfe6dc; }
  .home-group.is-purple .home-cell { --tile-line: #ddd0fb; }
  .home-group.is-orange .home-cell { --tile-line: #ecdcb8; }
}
/* 整備記録簿の工場控え（2026-10-07） */
.sb-save { display: grid; gap: 6px; margin: 8px 0 12px; }
a.sb-records-link { justify-self: start; font-size: 0.85rem; font-weight: 700; color: #8a6a2c; }
.sb-saved-note { margin-top: 8px; color: #166534; font-weight: 700; }
.sr-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sr-tools input { flex: 1 1 220px; min-width: 0; margin: 0; font-size: 16px; }
a.sr-new { width: auto; margin: 0; }
.sr-count { margin: 8px 0 4px; font-size: 0.8rem; color: #6b7280; }
.sr-list { display: grid; gap: 8px; }
.sr-card { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.sr-card.is-broken { border-color: #fca5a5; background: #fef2f2; }
.sr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.sr-no { color: #7a5c22; }
.sr-reg { font-weight: 700; }
.sr-warn { color: var(--danger); font-weight: 800; font-size: 0.82rem; }
.sr-meta { margin: 4px 0 0; font-size: 0.85rem; color: #374151; }
.sr-saved { margin: 2px 0 0; font-size: 0.75rem; color: #6b7280; }
.sr-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
button.sr-btn { width: auto; margin: 0; padding: 7px 14px; font-size: 0.85rem; }
/* 整備記録簿の専用ページ（2026-10-07） */
.sb-top-links { margin: -4px 0 10px; font-size: 0.88rem; font-weight: 700; }
.sb-top-links a { color: #8a6a2c; }
/* プライスボード（price-board.html。2026-10-07）: 左に入れる欄、右に見本（パソコンは見本が付いてくる）。スマホは見本が下 */
.pb-wrap { max-width: 1280px; }
.pb-layout { display: grid; gap: 16px; }
@media (min-width: 1100px) {
  .pb-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
  .pb-side { position: sticky; top: 12px; }
}
.pb-preview { border: 1px solid #d1d5db; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.pb-preview svg { display: block; width: 100%; height: auto; }
.pb-total { margin: 10px 0 4px; font-size: 0.95rem; }
.pb-total b { font-size: 1.15rem; color: #c8161d; }
.pb-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 6px; margin: 8px 0; }
button.pb-pick-btn { display: flex; align-items: center; gap: 6px; width: auto; margin: 0; padding: 8px 10px; border: 1.5px solid #c7d2fe; border-radius: 10px; background: #fff; color: #1e3a8a; font-size: 0.85rem; font-weight: 700; text-align: left; }
button.pb-pick-btn svg { flex: none; }
button.pb-pick-btn[aria-pressed="true"] { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
button.pb-pick-btn:disabled { opacity: 0.45; }
.pb-chosen { display: grid; gap: 6px; margin: 8px 0; }
.pb-chosen-row { display: flex; align-items: center; gap: 8px; }
.pb-chosen-no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 11px; background: #1e3a8a; color: #fff; font-size: 0.75rem; font-weight: 800; }
.pb-chosen-icon { flex: none; display: inline-flex; color: #1e3a8a; }
.pb-chosen-row input { flex: 1; min-width: 0; margin: 0; font-size: 16px; }
button.pb-chosen-del { width: auto; margin: 0; padding: 6px 10px; font-size: 0.8rem; }
.pb-custom { display: flex; gap: 8px; }
.pb-custom input { flex: 1; min-width: 0; margin: 0; font-size: 16px; }
.pb-custom button { width: auto; margin: 0; }
button.pb-small { width: auto; margin: 4px 0 10px; padding: 6px 12px; font-size: 0.82rem; }
.pb-warranty-text { margin: 8px 0 4px; }
.pb-wrap label.dm-field textarea { margin: 0; padding: 8px 10px; font-size: 16px; font-weight: 400; line-height: 1.5; resize: vertical; }
/* 名刺（biz-card.html。2026-10-07）: 左に入れる欄・デザイン、右に見本（プライスボードと同じ並び） */
.bc-preview { max-width: 300px; margin: 0 auto; border: 1px solid #d1d5db; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12); background: #fff; }
.bc-preview.is-h { max-width: 480px; }
.bc-preview svg { display: block; width: 100%; height: auto; }
.bc-seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.bc-seg button { width: auto; margin: 0; padding: 7px 14px; border: 1.5px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.88rem; font-weight: 700; }
.bc-seg button[aria-pressed="true"] { background: #8a6a2c; border-color: #8a6a2c; color: #fff; }
.bc-seg button.bc-color { display: inline-flex; align-items: center; gap: 6px; }
.bc-color i { display: inline-block; width: 14px; height: 14px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.6); }
.bc-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 4px 0 8px; }
button.bc-car { display: flex; flex-direction: column; align-items: center; gap: 2px; width: auto; margin: 0; padding: 6px; border: 1.5px solid #e5e7eb; border-radius: 10px; background: #fff; color: #374151; font-size: 0.78rem; font-weight: 700; }
button.bc-car svg { width: 64px; height: 36px; }
button.bc-car[aria-pressed="true"] { border-color: #8a6a2c; background: #faf6ec; }
.bc-shows { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bc-shows label.dm-check { padding: 6px 10px; }
.bc-make { display: grid; gap: 8px; margin-top: 10px; }
.bc-make button { margin: 0; }
button.bc-save { width: auto; margin-top: 8px; }
.bc-admin-btns { display: flex; flex-wrap: wrap; gap: 8px; }
button.bc-del { color: #b91c1c; }
.bc-common summary, .bc-offset summary { cursor: pointer; font-weight: 800; }
.bc-offset { margin-top: 10px; font-size: 0.88rem; }
/* 名刺のデザインの型（小さい見本を並べて、押して選ぶ。2026-10-07） */
.bc-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.bc-tpls.is-h { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
button.bc-tpl { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: auto; margin: 0; padding: 5px; border: 2px solid #e5e7eb; border-radius: 10px; background: #fff; color: #374151; font-size: 0.75rem; font-weight: 700; }
button.bc-tpl svg { display: block; width: 100%; height: auto; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
button.bc-tpl[aria-pressed="true"] { border-color: #8a6a2c; background: #faf6ec; }
/* 名刺の毛筆の字体（Yuji Syuku。SIL OFL 1.1。2026-10-07）。名刺で「毛筆」を選んだときだけ読み込まれる */
@font-face { font-family: 'Yuji Syuku'; src: url('/assets/fonts/YujiSyuku-Regular.ttf') format('truetype'); font-display: swap; }
.bc-seg button.bc-brush-btn { font-family: 'Yuji Syuku', serif; }
/* 案件一覧の検索: 完了済みの案件からも見つかったもの（2026-10-07） */
.deal-done-hits { margin-top: 14px; padding: 12px 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; }
.deal-done-head { margin: 0 0 8px; font-size: 0.95rem; font-weight: 800; color: #166534; }
.deal-done-list { display: grid; gap: 6px; }
.deal-done-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border-radius: 10px; background: #fff; border: 1px solid #dcfce7; }
.deal-done-name { font-weight: 800; color: #1d4ed8; }
.deal-done-meta { flex: 1 1 220px; min-width: 0; font-size: 0.85rem; color: #4b5563; }
button.deal-done-btn { width: auto; margin: 0 0 0 auto; padding: 4px 12px; font-size: 0.8rem; }
/* 案件を作ったあとの「契約書入力へ」ボタン（2026-10-07 ユーザー「スタイリッシュに」→ 案B グラデーション）。
   前は立体的な水色の大きなボタン（btn-create-huge btn-huge-blue）だった */
.btn-next-grad { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 720px; margin: 14px auto 10px; padding: 20px 18px; border: 0; border-radius: 18px; color: #fff; text-align: left; cursor: pointer;
  background: linear-gradient(120deg, #2563eb 0%, #4f46e5 60%, #7c3aed 100%); box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35); transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease; }
.btn-next-grad:hover { filter: brightness(1.06); box-shadow: 0 12px 28px rgba(79, 70, 229, 0.42); }
.btn-next-grad:active { transform: translateY(1px) scale(0.99); box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3); }
.btn-next-grad:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 3px; }
.btn-next-grad-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 14px; background: rgba(255, 255, 255, 0.18); }
.btn-next-grad-text { flex: 1; min-width: 0; }
.btn-next-grad-text b { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: 0.03em; line-height: 1.25; }
.btn-next-grad-text small { display: block; margin-top: 3px; font-size: 0.85rem; opacity: 0.9; }
.btn-next-grad-arw { flex: none; font-size: 2rem; line-height: 1; opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .btn-next-grad { transition: none; } }
/* ホームのボタン（2026-10-07 ユーザー「このボタンもスタイリッシュに」→ 3つの案から「B」: 白いカード＋グラデーションのアイコン）。
   前は、グループの薄い色の地に色の線のアイコン。スマホ・パソコンとも同じ形 */
.home-group.is-green { --hc-g1: #10b981; --hc-g2: #0f766e; --hc-sh: rgba(15, 118, 110, 0.28); }
.home-group.is-purple { --hc-g1: #8b5cf6; --hc-g2: #6d28d9; --hc-sh: rgba(109, 40, 217, 0.28); }
.home-group.is-orange { --hc-g1: #c9a35a; --hc-g2: #b8914a; --hc-sh: rgba(234, 88, 12, 0.28); }
.home-group .home-cells > .home-cell { background: #fff; border: 0; border-radius: 16px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); color: #111827; }
.home-group .home-cells > .home-cell:hover { background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.13); }
.home-group .home-cells > .home-cell svg { box-sizing: border-box; width: 40px; height: 40px; padding: 9px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--hc-g1), var(--hc-g2)); box-shadow: 0 4px 10px var(--hc-sh); }
@media (min-width: 900px) {
  .home-group .home-cells > .home-cell svg { width: 44px; height: 44px; padding: 10px; }
}
/* PDFができたあとの「ホームに戻る」も、同じグラデーションの形（2026-10-08）。リンク（a）なので下線を消す */
a.btn-next-grad, a.btn-next-grad:hover { text-decoration: none; color: #fff; }
.pdf-done a.btn-next-grad.pdf-done-home { display: flex; margin: 0 auto 6px; text-align: left; }

/* お見積書を「LINEで送る」（2026-10-09。quote-dialog.js）。LINEの緑 */
.qd-dialog .qd-line-row { margin: 2px 0 12px; }
.qd-dialog .qd-line-note { margin: 6px 0 0; font-size: 0.8rem; color: #4b5563; }
.qd-dialog button.qd-line { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; margin: 0; border: 0; border-radius: 12px; background: #06c755; color: #fff; font-size: 1rem; font-weight: 800; }
.qd-dialog button.qd-line:hover { background: #05a548; }
.qd-dialog button.qd-line.qd-line-small { display: inline-flex; width: auto; min-height: 36px; padding: 0 14px; border-radius: 8px; font-size: 0.85rem; }
.qd-dialog .qd-last > p > button.qd-line.qd-line-small { margin-top: 6px; }

/* iPhone・iPad で PDF・写真を見る画面（2026-10-11。download-helper.js）。上に「‹ 戻る」「共有・印刷」 */
html.pv-open, html.pv-open body { overflow: hidden; }
.pv-overlay { position: fixed; inset: 0; z-index: 1400; display: flex; flex-direction: column; background: #e5e7eb; }
.pv-bar { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px; background: #111827; color: #fff; }
.pv-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; text-align: center; }
.pv-bar button { width: auto; margin: 0; min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 0.9rem; font-weight: 800; }
.pv-bar button.pv-back { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; }
.pv-bar button.pv-share { border: 0; background: #2563eb; color: #fff; }
.pv-bar button.pv-share:disabled { background: #4b5563; color: #d1d5db; }
.pv-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 16px); }
.pv-img { display: block; width: 100%; height: auto; margin: 0 auto; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.18); }
.pv-page { display: block; width: 100%; height: auto; margin: 0 auto 12px; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.18); }
.pv-note { margin: 0 0 8px; font-size: 0.8rem; color: #374151; text-align: center; }
.pv-note.pv-more { margin: 10px 0 0; }

/* 車名・グレードの自動照会（2026-10-11 グレード判別キット。grade-auto-lookup.js）*/
.gl-box { margin: 4px 0 12px; padding: 12px 14px; border: 1px solid #c7d2fe; border-radius: 12px; background: #f8faff; font-size: 0.85rem; }
.gl-box.hidden { display: none; }
.gl-title { margin: 0 0 6px; font-weight: 800; color: #1e3a8a; }
.gl-sec { margin: 0 0 8px; padding-top: 6px; border-top: 1px dashed #dbe3f5; }
.gl-sec:first-of-type { border-top: 0; padding-top: 0; }
.gl-sub { margin: 0 0 4px; font-weight: 700; color: #111827; }
.gl-msg { margin: 0 0 4px; color: #111827; }
.gl-small { margin: 0 0 4px; font-size: 0.78rem; color: #4b5563; }
.gl-hint { margin: 4px 0; padding: 8px; border-radius: 8px; background: #fff; }
.gl-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.gl-box button.gl-btn { width: auto; margin: 4px 0 0; text-align: left; }
.gl-box button.gl-go { border-color: #1d4ed8; color: #1d4ed8; font-weight: 800; }
.gl-box button.gl-cand { display: block; width: 100%; margin: 4px 0 0; padding: 10px 12px; font-size: 0.9rem; font-weight: 700; }
.gl-box button.gl-cand small { margin-left: 6px; font-weight: 400; color: #6b7280; }
.gl-box button.gl-link { display: block; width: auto; margin: 2px 0 0; padding: 0; border: 0; background: none; color: #1d4ed8; text-decoration: underline; font-size: 0.82rem; }
.gl-ext { color: #1d4ed8; }
.gl-foot { margin: 6px 0 0; font-size: 0.75rem; color: #6b7280; }
.gs-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.gs-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; font-weight: 400; }
.gs-row input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.gs-text { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; }
.gs-note { color: #6b7280; }
.gs-link { font-size: 0.8rem; color: #1d4ed8; }
/* グレード欄のすぐ下のグレードの照会（2026-10-11）*/
.gl-grade-slot { margin: -4px 0 12px; }
.gl-grade-slot.hidden { display: none; }
.gl-grade { padding: 8px 12px; border-left: 3px solid #93c5fd; border-radius: 0 10px 10px 0; background: #f8faff; font-size: 0.85rem; }
.gl-grade .gl-sub { margin: 0 0 2px; font-size: 0.82rem; }
.gl-grade button.gl-btn { width: auto; margin: 6px 0 0; text-align: left; }
.gl-grade button.gl-go { border-color: #1d4ed8; color: #1d4ed8; font-weight: 800; }
.gl-grade button.gl-link { display: block; width: auto; margin: 2px 0 0; padding: 0; border: 0; background: none; color: #1d4ed8; text-decoration: underline; font-size: 0.82rem; }
.gl-grade .gl-btns { align-items: center; gap: 4px 14px; }
.gl-grade.is-idle { padding: 2px 0; border-left: 0; background: none; }

/* 便利機能「グレード検索」（2026-10-11。grade-search.html）*/
.gs-more { margin-top: 10px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 0 12px; }
.gs-more > summary { min-height: 40px; display: flex; align-items: center; font-size: 0.82rem; font-weight: 700; color: #4b5563; cursor: pointer; }
.gs-more[open] { padding-bottom: 10px; }
.gs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.gs-grid label { margin-bottom: 8px; font-size: 0.82rem; font-weight: 700; color: #374151; }
.gs-grid input, .gs-grid select { margin-top: 4px; }
.gs-result { margin-top: 14px; }
.gs-card { padding: 14px; border: 1px solid #d9c08a; border-radius: 12px; background: #faf6ec; }
.gs-chassis { margin: 0 0 8px; font-size: 0.85rem; font-weight: 700; color: #6b7280; letter-spacing: 0.02em; }
.gs-rows { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; align-items: baseline; }
.gs-rows dt { font-size: 0.82rem; color: #6b7280; font-weight: 700; }
.gs-rows dd { margin: 0; }
.gs-value { font-size: 1.15rem; font-weight: 800; color: #111827; overflow-wrap: anywhere; }
.gs-value.is-grade { font-size: 1.3rem; color: #7a5c22; }
.gs-from { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 400; color: #6b7280; }
.gs-note { margin: 8px 0 0; font-size: 0.82rem; color: #4b5563; }
.gs-note.is-small { font-size: 0.75rem; color: #9ca3af; }
.gs-consent { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px dashed #d9c08a; }
.gs-consent button.gs-go { width: auto; margin: 8px 12px 0 0; border-color: #8a6a2c; color: #8a6a2c; font-weight: 800; }
.gs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.gs-actions button { width: auto; margin: 0; }
.gs-link { font-size: 0.82rem; color: #1d4ed8; }
.gs-past { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #ecdcb8; }
.gs-past-title { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; color: #4b5563; }
.gs-past ul { margin: 0; padding-left: 18px; font-size: 0.85rem; }
#gsForm .ac-search { display: flex; gap: 8px; }
#gsForm .ac-search input { flex: 1; min-width: 0; margin: 0; font-size: 16px; }
#gsForm .ac-search button { width: auto; margin: 0; }

/* パソコンでウィンドウを小さくしたとき（幅900〜1199px）のホーム（2026-10-11 ユーザー「ウィンドウ小さくした時にずれるよ」）:
   左の「今後の予定」の列（380px）の分だけボタンが細くなり、名前が切れて右にはみ出していた。
   この幅では「今後の予定」「今月の目標」を上に横並び、ボタンの段をその下に画面いっぱいで出す */
@media (min-width: 900px) and (max-width: 1199px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto; gap: 18px 20px; }
  .home-today { grid-column: 1; grid-row: 1; }
  .home-goals { grid-column: 2; grid-row: 1; align-self: stretch; }
  .home-groups { grid-column: 1 / span 2; grid-row: 2; }
  /* ボタンの段がすぐ見えるように、予定・目標は低めにして、中で上下に動かす */
  .home-today .home-feed-list#homePlanList { max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
  .home-goals { max-height: 340px; overflow-y: auto; }
  /* 目標を出していないときは、予定を横いっぱいに */
  .home-grid:not(:has(> .home-goals:not(.hidden))) > .home-today { grid-column: 1 / span 2; }
}

/* ホームの便利機能の小見出し（2026-10-11 案A: 調べる・計算／書類・印刷）*/
.home-subgroup { margin: 2px 4px 8px; font-size: 0.75rem; font-weight: 800; color: #6b7280; letter-spacing: 0.02em; }
.home-cells + .home-subgroup { margin-top: 14px; }
/* 輸入車の車台番号（VIN）の読み取りを確かめる知らせ（2026-10-11）*/
.vin-warn { display: block; margin-top: 4px; padding: 6px 10px; border-radius: 8px; background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; font-size: 0.8rem; font-weight: 700; }
.vin-warn button.vin-warn-photo { display: inline-flex; width: auto; margin: 6px 0 0; background: #fff; border-color: #fcd34d; color: #92400e; }
/* 公式のグレードの候補（日産など。押して選ぶ。2026-10-11）*/
.gl-grade button.gl-cand { display: block; width: 100%; margin: 6px 0 0; padding: 10px 12px; text-align: left; font-size: 0.9rem; font-weight: 800; }
.gl-grade button.gl-cand small, .gs-cand small { margin-left: 6px; font-weight: 400; color: #6b7280; }
.gs-cands { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.gs-cands button.gs-cand { width: 100%; margin: 0; padding: 10px 12px; text-align: left; font-size: 0.95rem; font-weight: 800; }
/* 便利機能「車検証の読み取りテスト」（2026-10-12。shaken-test.html）*/
.st-wrap { max-width: 1080px; }
.st-nw { display: inline-block; white-space: nowrap; }
.st-pick { display: flex; flex-direction: column; gap: 8px; }
.st-pick .st-drop { position: relative; }
.st-pick .st-drop.is-busy { opacity: 0.55; pointer-events: none; }
.st-pick button.st-camera { width: 100%; margin: 0; }
.st-msg { margin: 10px 0 0; font-size: 0.88rem; color: #6b7280; }
.st-msg:empty { display: none; }
.st-msg.is-working { color: #7a5c22; font-weight: 700; }
.st-msg.is-done { color: #15803d; font-weight: 700; }
.st-msg.is-failed { color: var(--danger); font-weight: 700; }
.st-result { margin-top: 14px; }
.st-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.st-chip { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: #f3f4f6; color: #374151; }
.st-chip.is-ok { background: #dcfce7; color: #166534; }
.st-chip.is-warn { background: #fef3c7; color: #92400e; }
.st-chip.is-muted { background: #f3f4f6; color: #6b7280; font-weight: 400; }
.st-body { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.st-photo { margin: 0; }
.st-photo-frame { overflow: auto; max-height: 46vh; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; }
.st-photo-frame img { display: block; width: 100%; height: auto; cursor: zoom-in; }
.st-photo-frame.is-zoom img { width: 260%; max-width: none; cursor: zoom-out; }
.st-photo figcaption { margin-top: 4px; font-size: 0.75rem; color: #9ca3af; }
.st-nophoto { margin: 0; font-size: 0.82rem; color: #9ca3af; }
.st-table { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; overflow: hidden; }
.st-group { margin: 0; padding: 6px 12px; font-size: 0.75rem; font-weight: 800; color: #6b7280; background: #f9fafb; border-top: 1px solid #e5e7eb; }
.st-group:first-child { border-top: 0; }
.st-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 8px 12px; border-top: 1px solid #f3f4f6; align-items: baseline; }
.st-label { font-size: 0.8rem; font-weight: 700; color: #6b7280; }
.st-cell { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.st-value { font-size: 1rem; font-weight: 800; color: #111827; overflow-wrap: anywhere; }
.st-row.is-empty .st-value { font-size: 0.82rem; font-weight: 400; color: #9ca3af; }
.st-src { padding: 1px 7px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; background: #f3f4f6; color: #6b7280; }
.st-src.is-qr { background: #dcfce7; color: #166534; }
.st-diff { flex-basis: 100%; font-size: 0.76rem; color: #7a5c22; }
.st-diff.is-warn { color: #92400e; font-weight: 700; }
.st-diff.is-small { color: #6b7280; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; }
.st-actions .btn-secondary { width: auto; margin: 0; }
.st-link { font-size: 0.88rem; font-weight: 700; color: #1d4ed8; }
@media (min-width: 900px) {
  .st-pick { flex-direction: row; align-items: stretch; }
  .st-pick .st-drop { flex: 1; }
  .st-pick button.st-camera { width: auto; padding: 0 22px; }
  .st-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .st-photo { position: sticky; top: 12px; }
  .st-photo-frame { max-height: 80vh; }
}
/* Android の「PDF・ファイルから選ぶ」（2026-10-12。photo-pick.js。写真のボタンは Google フォトも出る写真の画面になる）*/
button.photo-pick-file { display: inline-block; width: auto; min-height: 0; margin: 0; padding: 6px 2px; border: 0; border-radius: 0; background: none; box-shadow: none; color: #1d4ed8; font-size: 0.82rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
button.photo-pick-file:hover { background: none; color: #1e40af; }
button.photo-pick-file:disabled { background: none; color: #9ca3af; }
.st-pick button.photo-pick-file { align-self: center; }
@media (min-width: 900px) {
  .st-pick { flex-wrap: wrap; }
  .st-pick button.photo-pick-file { flex-basis: 100%; }
}
/* 書類の受け取り（案件の画面。2026-10-12。doc-tracking.js）*/
.panel-summary-badge.is-ok { color: #15803d; }
.panel-summary-badge.is-warn { color: #b45309; }
.panel-summary-badge.is-danger { color: #b91c1c; }
.dt-hint { margin: 0 0 8px; font-size: 0.8rem; color: #6b7280; }
.dt-list { display: flex; flex-direction: column; gap: 4px; }
.dt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-height: 40px; padding: 4px 8px; border-radius: 8px; background: #f9fafb; }
.dt-row.is-received { background: #f0fdf4; }
.dt-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 0.92rem; font-weight: 700; cursor: pointer; }
.dt-check input { width: 22px; height: 22px; margin: 0; flex: none; }
.dt-name small { font-weight: 400; color: #6b7280; }
.dt-at { font-size: 0.78rem; color: #15803d; }
.dt-issue { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.78rem; color: #4b5563; }
.dt-issue input[type=date] { width: auto; min-height: 32px; margin: 0; padding: 2px 6px; font-size: 0.85rem; }
.dt-expiry { font-size: 0.8rem; font-weight: 700; }
.dt-expiry.is-muted { color: #6b7280; font-weight: 400; }
.dt-expiry.is-danger { color: #b91c1c; }
.dt-status { margin: 6px 0 0; min-height: 1.2em; font-size: 0.78rem; color: #9ca3af; }
.dt-status.is-ok { color: #15803d; }
.dt-status.is-danger { color: var(--danger); font-weight: 700; }
/* ホームの「確認が必要な案件」: 期限が過ぎたものは赤い点 */
.home-feed-dot.is-red { background: #ef4444; }
/* 売上のページ: 名義変更の印（2026-10-12）*/
button.sl-nc { display: inline-block; width: auto; min-height: 0; margin: 0; padding: 2px 8px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #4b5563; font-size: 0.75rem; font-weight: 700; line-height: 1.5; cursor: pointer; box-shadow: none; }
button.sl-nc:hover { background: #f3f4f6; }
button.sl-nc.is-done { border-color: #86efac; background: #f0fdf4; color: #15803d; }
button.sl-nc.is-soon { border-color: #fcd34d; background: #fffbeb; color: #b45309; }
button.sl-nc.is-late { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.sl-nc-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; padding: 8px 10px; border: 1px dashed #d1d5db; border-radius: 8px; background: #fafafa; }
.sl-nc-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 0.8rem; font-weight: 700; color: #374151; }
.sl-nc-field input[type=date] { width: auto; min-height: 34px; margin: 0; padding: 2px 6px; font-size: 0.85rem; }
.sl-nc-actions { display: flex; gap: 6px; }
.sl-nc-actions button { width: auto; margin: 0; }
.sl-item.is-focus { outline: 2px solid #f59e0b; outline-offset: 2px; }
/* ホームの「確認が必要な案件」の小見出し（2026-10-12）*/
.home-feed-group { margin: 10px 0 2px; font-size: 0.75rem; font-weight: 800; color: #6b7280; letter-spacing: 0.02em; }
.home-feed-group:first-child { margin-top: 4px; }
/* 店舗情報（2026-10-12。store-info.html）*/
.si-store { max-width: 360px; }
.si-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.si-grid .dm-field .dm-hint { display: block; margin-top: 2px; font-size: 0.75rem; }
.smail-more { margin: 6px 0 4px; }
.smail-more > summary { cursor: pointer; font-size: 0.85rem; color: #4b5563; padding: 4px 0; }
.si-actions { margin-top: 8px; flex-wrap: wrap; }
/* 保存のあとの長い一言は、ボタンの下の行に（ボタンが縦につぶれないように。2026-10-13 検証）*/
.si-actions .msg-done { flex: 1 1 100%; }
.si-actions button { flex: 1 1 auto; white-space: nowrap; }
.si-h2 { margin: 0 0 6px; font-size: 1rem; }
.si-files { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.si-file { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.si-file-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.si-file-state { font-size: 0.78rem; color: #9ca3af; }
.si-file-state.is-set { color: #15803d; font-weight: 700; }
.si-file-preview { margin: 8px 0; padding: 8px; border: 1px dashed #d1d5db; border-radius: 8px; background: #f9fafb; text-align: center; }
.si-file-preview img { max-width: 100%; max-height: 120px; }
/* 名刺のロゴ: 濃い地の名刺での見え方（2026-10-12）*/
.si-file-dark { margin-top: 8px; padding: 10px; border-radius: 6px; background: #1f2937; }
.si-file-dark img { max-height: 60px; }
.si-file-none { font-size: 0.8rem; color: #9ca3af; }
.si-file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.si-file-actions .btn-ghost, .si-file-actions .si-pick { width: auto; margin: 0; white-space: nowrap; }
/* 「PNGを選ぶ」のボタンの中のファイル欄は見せない（ほかの input の決まりで出ていた。2026-10-12）*/
.si-pick { position: relative; }
.si-pick.is-busy { opacity: 0.5; pointer-events: none; }
.si-pick input[type="file"] { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: 0 !important; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; border: 0 !important; }
/* 名刺: 店舗の住所・電話がないときのお知らせ（2026-10-12）*/
/* 整備記録簿: 店舗情報に住所がないときの注意（2026-10-12）*/
.sb-shop-info { margin: 4px 0 12px; }
.sb-warn { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 0.85rem; font-weight: 600; }
.bc-no-address { margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: #fff7ed; color: #9a3412; font-size: 0.85rem; font-weight: 600; }
label.si-pick { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
/* 店舗情報: 横判＋角印を文字から作る（2026-10-12）*/
.si-maker { display: grid; grid-template-columns: 1fr; gap: 12px; }
.si-maker textarea { width: 100%; font-size: 0.9rem; line-height: 1.5; }
.si-maker-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 4px 0 8px; }
.si-maker-opts .dm-check { margin: 0; }
.si-maker-font { max-width: 160px; margin: 0; }
.si-maker-right canvas { width: 100%; max-width: 405px; height: auto; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
@media (min-width: 900px) { .si-maker { grid-template-columns: minmax(0, 1fr) 430px; align-items: start; } }

/* ===== 店舗の切り替え「○○でログイン中」（全店舗を見られる人だけ。画面の右上、ホーム・メニューの左。2026-10-12）===== */
.m-store-btn { display: inline-flex; align-items: center; gap: 4px; flex: none; min-height: 40px; margin: 0 0 0 auto; padding: 0 12px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; color: #166534; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.m-store-btn:hover { background: #dcfce7; }
.m-store-btn .m-tab-icon { display: block; height: 20px; }
.m-store-btn svg { display: block; width: 20px; height: 20px; }
.m-store-btn .m-store-suffix { font-weight: 500; }
.m-store-btn + .m-home-btn, .m-store-btn + .m-menu-btn { margin-left: 8px; }
@media (min-width: 641px) {
  .m-store-btn { min-height: 44px; padding: 0 16px; font-size: 0.88rem; }
}
/* スマホは「でログイン中」を省いて、店舗の名前だけ（題名が入るように） */
@media (max-width: 640px) {
  .m-store-btn .m-store-suffix { display: none; }
}
@media (max-width: 370px) {
  .m-store-btn { padding: 0 10px; font-size: 0; gap: 0; }
}
.store-pop { position: fixed; z-index: 950; min-width: 230px; max-width: min(340px, calc(100vw - 16px)); /* 下の説明の字で横に広がりすぎない（2026-10-13） */ padding: 8px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16); }
.store-pop-head { padding: 6px 10px 8px; font-size: 0.78rem; color: #6b7280; }
.store-pop-item { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #111827; font-family: inherit; font-size: 0.95rem; text-align: left; cursor: pointer; }
.store-pop-item:hover { background: #f3f4f6; }
.store-pop-item.is-current { font-weight: 700; color: #166534; background: #f0fdf4; }
.store-pop-item.is-current::after { content: ' ✓'; }
.store-pop-item:disabled { opacity: 0.6; cursor: default; }
.store-pop-note { padding: 8px 10px 4px; font-size: 0.75rem; line-height: 1.5; color: #6b7280; }
/* 「全店舗」で見ているときの、案件一覧の店舗の名前 */
.imported-badge.store-badge { margin-left: 4px; padding: 0 5px; font-size: 0.75rem; font-weight: 600; line-height: 1.5; color: #166534; background: #f0fdf4; }
body.pdf-view .m-store-btn, body.pdf-view .store-pop { display: none !important; }

/* ===== お知らせ（社内のお知らせ・操作の記録。2026-10-12）===== */
.home-notice-row { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 2px 0 0; padding: 0 2px; border-top: 1px solid #eef0f3; color: #1d4ed8; font-size: 0.88rem; font-weight: 800; text-decoration: none; }
.home-notice-row::before { content: "i"; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; border-radius: 10px; background: #dbeafe; color: #1d4ed8; font-family: Georgia, 'Times New Roman', serif; font-size: 0.85rem; font-weight: 900; }
.home-notice-row::after { content: "›"; margin-left: auto; font-size: 1.2rem; line-height: 1; }
.home-notice-row:hover { text-decoration: underline; }
.nt-compose > summary { cursor: pointer; font-weight: 700; }
.nt-form label { display: block; margin: 10px 0 0; font-size: 0.88rem; font-weight: 700; }
.nt-form input[type="text"], .nt-form textarea, .nt-form select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
.nt-form .button-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.nt-list { display: flex; flex-direction: column; gap: 10px; }
.nt-item { padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.nt-item.is-new { border-color: #93c5fd; background: #f8fbff; }
.nt-head { display: flex; align-items: center; gap: 8px; }
.nt-new { flex: none; padding: 1px 8px; border-radius: 6px; background: #dbeafe; color: #1d4ed8; font-size: 0.75rem; font-weight: 800; }
.nt-title { margin: 0; font-size: 1rem; line-height: 1.4; }
.nt-meta { margin: 4px 0 0; color: #6b7280; font-size: 0.8rem; }
.nt-body { margin: 8px 0 0; white-space: pre-wrap; font-size: 0.92rem; line-height: 1.6; }
.nt-del { margin-top: 8px; min-height: 36px; padding: 0 12px; font-size: 0.8rem; }
.nt-kind { flex: none; padding: 1px 8px; border-radius: 6px; background: #fef3c7; color: #92400e; font-size: 0.8rem; font-weight: 800; }
.nt-sum { flex: 1 1 100%; color: #374151; }

/* スマホは「○○でログイン中」を見出しの下に1行（見出しの横だと名前が細く折り返して窮屈。2026-10-12） */
.m-store-btn.is-bar { display: flex; width: 100%; justify-content: flex-start; margin: -4px 0 12px; min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 0.82rem; gap: 6px; }
.m-store-btn.is-bar .m-store-suffix { display: inline; }
.home-top + .m-store-btn.is-bar { margin-top: -8px; }

/* 店舗情報のチェックの欄（契約書の透かし。2026-10-12） */
.si-check { grid-column: 1 / -1; }
.si-check-label { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 400; cursor: pointer; }
.si-check-label input { width: 20px; height: 20px; flex: none; }

/* お知らせ: 長いURL・長い本文（2026-10-12 テスター） */
.nt-title, .nt-body { overflow-wrap: anywhere; word-break: break-word; }
.nt-body.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nt-more { margin-top: 4px; padding: 0; border: 0; background: none; color: #1d4ed8; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.home-notice-row { overflow-wrap: anywhere; }
/* 決定の確認: 買取金額が空のときの行 */
.decide-missing-required { color: #b91c1c; font-weight: 800; }
/* 名刺: 上の「印刷へ」 */
.bc-jump { display: inline-block; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: #1d4ed8; }

/* お知らせを送ったあとの一言（書く欄の外。2026-10-12）*/
.nt-sent {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #e8f5ec;
  color: #1d6b35;
  font-weight: 600;
}

/* ほかの画面で店舗が切り替わったときの帯（2026-10-12）*/
.store-changed-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding: 10px 16px;
  background: #fff4d6;
  color: #6b4a00;
  border-bottom: 1px solid #e8c766;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.store-changed-bar button {
  padding: 6px 14px;
  border-radius: 6px;
}

/* とても長い字（区切りのない英数字など）でも、枠の外にはみ出さない（2026-10-12 検証）*/
.deal-hero, .deal-board-card, .board-card, .deal-table td, .home-schedule-row, .nb-memo, .panel dd { overflow-wrap: anywhere; }

/* --- 査定案件の一覧（2026-10-13。appraisals.html）--- */
.ap-new { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.ap-new-btn { flex: 1 1 260px; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
.ap-new-sub { flex: 0 1 auto; min-height: 52px; }
.ap-filters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.ap-filters::-webkit-scrollbar { display: none; }
.ap-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.ap-chip.is-on { border-color: var(--accent); background: #eaf0ff; color: #1e3a8a; }
.ap-chip-n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: 0.75rem; text-align: center; }
.ap-chip.is-on .ap-chip-n { background: #fff; color: #1e3a8a; }
.ap-search { width: 100%; min-height: 44px; margin: 0 0 10px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 12px; font-size: 16px; }
.ap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ap-empty { margin: 0; padding: 24px 16px; border: 1px dashed #d1d5db; border-radius: 14px; background: #fff; color: #4b5563; text-align: center; }
.ap-card { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px; border: 1px solid #e5e7eb; border-left: 5px solid #94a3b8; border-radius: 14px; background: #fff; color: inherit; text-decoration: none; }
.ap-card:hover { border-color: #c7d2fe; }
.ap-card.is-appointment { border-left-color: #7c3aed; }
.ap-card.is-draft { border-left-color: #0e7490; }
.ap-card.is-awaiting_pricing { border-left-color: #d97706; }
.ap-card.is-priced { border-left-color: #16a34a; }
.ap-card.is-contracted { border-left-color: #1d4ed8; }
.ap-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.78rem; color: #4b5563; }
.ap-when { margin-left: auto; }
.ap-status { padding: 1px 10px; border-radius: 999px; background: #f3f4f6; color: #374151; font-weight: 800; }
.ap-status.is-appointment { background: #f3e8ff; color: #6b21a8; }
.ap-status.is-draft { background: #e0f2fe; color: #075985; }
.ap-status.is-awaiting_pricing { background: #fef3c7; color: #92400e; }
.ap-status.is-priced { background: #dcfce7; color: #166534; }
.ap-status.is-contracted { background: #dbeafe; color: #1e3a8a; }
.ap-status.is-returned { background: #fee2e2; color: #991b1b; }
.ap-status.is-test { background: #ede9fe; color: #5b21b6; }
.ap-store { padding: 1px 8px; border-radius: 999px; background: #f0fdf4; color: #166534; font-weight: 700; }
.ap-car { margin: 2px 0 0; font-size: 1.05rem; font-weight: 800; overflow-wrap: anywhere; }
.ap-facts, .ap-who { margin: 0; font-size: 0.82rem; color: #4b5563; overflow-wrap: anywhere; }
.ap-price { margin: 4px 0 0; font-size: 0.85rem; color: #166534; }
.ap-price b { font-size: 1.1rem; font-weight: 800; }
.ap-price-by { color: #6b7280; font-size: 0.78rem; }
.ap-access { margin-top: 18px; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.ap-access summary { cursor: pointer; font-weight: 700; }
.ap-dialog { width: min(440px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: 16px; }
.ap-dialog::backdrop { background: rgba(15, 23, 42, 0.45); }
.ap-dialog-body { display: grid; gap: 10px; padding: 18px; }
.ap-dialog-body h2 { margin: 0 0 4px; font-size: 1.1rem; }
.ap-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* --- 査定の画面（2026-10-13。appraisal.html。案A: 車のまわりを歩く順）--- */
.ap-page .admin-wrap { padding-bottom: 96px; }
.ap-back { margin: -4px 0 8px; font-size: 0.85rem; }
.ap-back a { color: var(--accent); text-decoration: none; font-weight: 700; }
.ap-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; font-size: 0.85rem; color: #4b5563; }
.ap-returned { margin: 0 0 10px; padding: 10px 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #991b1b; font-weight: 700; }
.ap-conflict { margin: 0 0 10px; padding: 10px 14px; border: 1px solid #fde68a; border-radius: 12px; background: #fffbeb; color: #92400e; }
.ap-conflict button { margin-left: 8px; }
.ap-progress { position: sticky; top: 0; z-index: 20; display: flex; gap: 6px; overflow-x: auto; margin: 0 -4px 10px; padding: 8px 4px; background: rgba(243, 244, 246, 0.96); scrollbar-width: none; }
.ap-progress::-webkit-scrollbar { display: none; }
.ap-step { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.ap-step.is-done { border-color: #86efac; background: #f0fdf4; color: #166534; }
.ap-step-mark { font-weight: 800; }
.ap-form { display: grid; gap: 12px; }
.ap-sec { scroll-margin-top: 60px; transition: box-shadow 0.3s; }
.ap-sec.is-flash { box-shadow: 0 0 0 3px #93c5fd; }
.ap-h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.05rem; }
.ap-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #e5e7eb; color: #374151; font-size: 0.85rem; font-weight: 800; }
.ap-sec.is-done .ap-num { background: #16a34a; color: #fff; }
.ap-h3 { margin: 14px 0 6px; font-size: 0.95rem; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; margin: 8px 0; }
.ap-wide { grid-column: 1 / -1; }
.ap-grid input, .ap-grid select, .ap-sec textarea { font-size: 16px; }
.ap-unit-wrap { display: flex; align-items: center; gap: 6px; }
.ap-unit-wrap input { flex: 1; min-width: 0; }
.ap-unit { color: #6b7280; font-weight: 700; }
.ap-big { display: block; width: 100%; min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
.ap-big:disabled { opacity: 0.6; }
.ap-big-sub { min-height: 44px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 12px; background: #eff6ff; color: #1e3a8a; font-weight: 800; cursor: pointer; }
.ap-msg { margin: 8px 0 0; font-size: 0.85rem; color: #4b5563; }
.ap-msg.is-done { color: #166534; }
.ap-msg.is-bad { color: #b91c1c; }
.ap-muted { margin: 4px 0; font-size: 0.82rem; color: #6b7280; }
.ap-choice-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0; }
.ap-choice-label { flex: 0 0 auto; min-width: 7.5em; font-size: 0.88rem; font-weight: 700; color: #374151; }
.ap-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-choice { min-width: 64px; min-height: 44px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #1f2937; font-size: 0.95rem; font-weight: 700; cursor: pointer; }
.ap-choice.is-on { border-color: var(--accent); background: var(--accent); color: #fff; }
.ap-choice:disabled { cursor: default; }
.ap-more { margin: 10px 0; }
.ap-more > summary { cursor: pointer; padding: 6px 0; font-size: 0.88rem; font-weight: 700; color: #1e3a8a; }
.ap-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.ap-slot { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ap-slot-main { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; border: 1px dashed #94a3b8; border-radius: 12px; background: #f8fafc; cursor: pointer; padding: 0; }
.ap-slot.is-required:not(.has-photo) .ap-slot-main { border: 2px dashed #f59e0b; background: #fffbeb; }
.ap-slot.has-photo .ap-slot-main { border: 1px solid #e5e7eb; }
.ap-slot.is-busy .ap-slot-main { opacity: 0.6; }
.ap-slot-main img { width: 100%; height: 100%; object-fit: cover; }
.ap-slot-plus { font-size: 1.6rem; color: #64748b; }
.ap-slot-cap { font-size: 0.78rem; font-weight: 700; color: #374151; text-align: center; }
.ap-slot-tools { display: flex; justify-content: center; gap: 6px; }
.ap-slot-tools button { padding: 2px 8px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; font-size: 0.75rem; cursor: pointer; }
.ap-meter { display: grid; grid-template-columns: minmax(104px, 160px) 1fr; gap: 12px; align-items: start; }
.ap-mileage input { font-size: 1.4rem !important; font-weight: 800; }
.ap-damage-card { padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ap-damage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-damage-head .ap-big-sub { margin-left: auto; }
.ap-damage-list { display: grid; gap: 4px; margin: 8px 0; }
.ap-damage-row { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border: 1px solid #f1f5f9; border-radius: 10px; background: #fff; text-align: left; font-size: 0.88rem; cursor: pointer; }
.ap-code { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; border-radius: 14px; background: #e1261c; color: #fff; font-weight: 800; }
.ap-has-photo { margin-left: auto; padding: 0 8px; border-radius: 999px; background: #dbeafe; color: #1e3a8a; font-size: 0.75rem; font-weight: 700; }
.ap-check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.ap-check-btn { min-height: 44px; padding: 0 16px; border: 1px solid #16a34a; border-radius: 12px; background: #f0fdf4; color: #166534; font-weight: 800; cursor: pointer; }
.ap-checked { color: #166534; font-weight: 800; }
.ap-grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ap-grade { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 4px 10px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.ap-grade b { font-size: 1.2rem; }
.ap-grade small { font-size: 0.75rem; color: #4b5563; line-height: 1.3; }
.ap-grade.is-on { border-color: var(--accent); background: #eff6ff; box-shadow: inset 0 0 0 1px var(--accent); }
.ap-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ap-tag { padding: 2px 10px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 0.78rem; font-weight: 700; }
.ap-areas { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.ap-area { min-height: 36px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; font-size: 0.82rem; cursor: pointer; }
.ap-area.is-on { border-color: var(--accent); background: #eaf0ff; color: #1e3a8a; font-weight: 700; }
.ap-cond-grid, #apFrame { display: grid; gap: 4px; }
.ap-cond-row, .ap-frame-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 4px 0; border-bottom: 1px solid #f1f5f9; }
.ap-cond-row > span { min-width: 5em; font-size: 0.88rem; }
.ap-frame-part { flex: 1 1 12em; font-size: 0.85rem; }
.ap-frame-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.ap-sev { min-width: 44px; min-height: 38px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; font-size: 0.82rem; cursor: pointer; }
.ap-sev.is-on { border-color: #d97706; background: #fef3c7; color: #92400e; font-weight: 800; }
.ap-eq-group { margin: 6px 0; }
.ap-eq-label { margin: 0 0 4px; font-size: 0.8rem; font-weight: 700; color: #6b7280; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-eq { min-height: 40px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; font-size: 0.85rem; cursor: pointer; }
.ap-eq.is-on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }
.ap-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ap-danger { color: #b91c1c !important; border-color: #fecaca !important; }
.ap-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-top: 1px solid #e5e7eb; background: rgba(255, 255, 255, 0.97); }
.ap-bottom-left { font-weight: 800; color: #b45309; white-space: nowrap; }
.ap-bottom-left.is-done { color: #166534; }
.ap-save-state { flex: 1; min-width: 0; font-size: 0.75rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-save-state.is-bad { color: #b91c1c; font-weight: 700; }
.ap-bottom button { min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
body.ap-noscroll { overflow: hidden; overscroll-behavior: none; }
.ap-diagram-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #fff; }
.ap-diagram-dialog::backdrop { background: rgba(15, 23, 42, 0.5); }
.ap-dg { display: flex; flex-direction: column; height: 100%; }
.ap-dg-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #e5e7eb; }
.ap-dg-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); flex: 1; min-height: 0; }
.ap-dg-svg { min-height: 0; padding: 6px; touch-action: none; display: flex; align-items: center; justify-content: center; background: #f8fafc; }
.ap-dg-tools { min-height: 0; overflow-y: auto; padding: 12px; border-left: 1px solid #e5e7eb; }
@media (max-width: 760px) {
  .ap-dg-body { grid-template-columns: 1fr; grid-template-rows: 56% 44%; }
  .ap-dg-tools { border-left: 0; border-top: 1px solid #e5e7eb; }
  .ap-meter { grid-template-columns: 1fr; }
}
.ad-svg { width: 100%; height: 100%; max-height: 100%; user-select: none; -webkit-user-select: none; }
.ad-dir { font-size: 18px; font-weight: 800; fill: #718397; }
.ad-dir.is-front { fill: #176bff; }
.ad-side { font-size: 17px; font-weight: 800; fill: #94a3b8; }
.ad-deco circle, .ad-deco rect { fill: #fff; stroke: #7c8893; stroke-width: 2; }
.ad-panel { fill: #fff; stroke: #586674; stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.ad-panel:hover, .ad-panel:focus { fill: #eef8ff; stroke: #176bff; outline: none; }
.ad-panel.has-damage { fill: #fff8e7; stroke: #dc8a12; }
.ad-glass path { fill: #e8f1fb; stroke: #9fb3c8; stroke-width: 1.5; pointer-events: none; }
.ad-label { font-size: 17px; font-weight: 700; fill: #475569; pointer-events: none; }
.ad-pin { cursor: grab; }
.ad-pin circle:first-child { fill: #e1261c; stroke: #8f0e09; stroke-width: 2; }
.ad-pin.is-selected circle:first-child { stroke: #176bff; stroke-width: 4; }
.ad-pin text { fill: #fff; font-size: 16px; font-weight: 900; pointer-events: none; }
.ad-pin-photo { fill: #176bff !important; stroke: #fff !important; stroke-width: 2 !important; }
.ad-temp circle { fill: rgba(23, 107, 255, 0.18); stroke: #176bff; stroke-width: 3; }
.ad-temp path { stroke: #176bff; stroke-width: 3; }
.ap-dg-title { margin: 0 0 6px; font-weight: 800; }
.ap-dg-sub { margin: 10px 0 4px; font-size: 0.85rem; font-weight: 700; color: #4b5563; }
.ap-codes { display: grid; gap: 6px; margin: 6px 0 10px; }
.ap-code-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-code-group-label { min-width: 6em; font-size: 0.82rem; color: #4b5563; }
.ap-code-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; min-height: 48px; border: 1px solid #fca5a5; border-radius: 12px; background: #fff; cursor: pointer; }
.ap-code-btn b { font-size: 1rem; color: #b91c1c; }
.ap-code-btn small { font-size: 0.7rem; color: #6b7280; }
.ap-code-btn.is-on { background: #e1261c; border-color: #e1261c; }
.ap-code-btn.is-on b, .ap-code-btn.is-on small { color: #fff; }
.ap-dg-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ap-dg-photo img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; cursor: pointer; }
.ap-dg-note { width: 100%; margin: 6px 0; font-size: 16px; }
.ap-dg-row, .ap-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ap-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0; font-size: 0.82rem; color: #374151; }
.ap-viewer { max-width: min(96vw, 1000px); padding: 8px; border: 0; border-radius: 14px; }
.ap-viewer::backdrop { background: rgba(15, 23, 42, 0.8); }
.ap-viewer figure { margin: 0; }
.ap-viewer img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.ap-viewer figcaption { margin: 6px 0; text-align: center; font-weight: 700; }
.ap-pricing { border: 2px solid #f59e0b; }
.ap-search-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: #f8fafc; font-size: 0.85rem; }
.ap-calc { margin: 6px 0; font-weight: 800; color: #1e3a8a; }
.ap-priced { border: 2px solid #86efac; }
.ap-offer { margin: 0; font-size: 1rem; }
.ap-offer b { font-size: 1.6rem; color: #166534; }
.ap-basis { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #f8fafc; white-space: pre-wrap; }
.ap-pricers { display: grid; gap: 6px; }
.ap-pricer { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 10px; border: 1px solid #e5e7eb; border-radius: 12px; }
.ap-pricer input { width: 22px; height: 22px; }
.ap-pricer span { margin-left: auto; font-size: 0.78rem; color: #6b7280; }
body.is-readonly .ap-slot-main { cursor: zoom-in; }

/* 査定の画面: ボタンの字の色（全体のボタンは白い字なので、白い地のボタンは字の色を決める）・見出しは左寄せ */
.ap-eq, .ap-grade, .ap-damage-row, .ap-area, .ap-sev, .ap-code-btn, .ap-slot-tools button, .ap-choice, .ap-pricer { color: #1f2937; }
.ap-eq.is-on, .ap-choice.is-on { color: #fff; }
.ap-sev.is-on { color: #92400e; }
.ap-sec > .ap-h2, .ap-pricing > .ap-h2, .ap-priced > .ap-h2 { justify-content: flex-start; text-align: left; }
.ap-file { display: none !important; }
.ap-sec label.dm-field textarea, .ap-pricing label.dm-field textarea, .ap-dialog textarea, .ap-diagram-dialog textarea { display: block; width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 16px; font-weight: 400; line-height: 1.5; resize: vertical; box-sizing: border-box; }
/* 見るだけ（送ったあと・価格決定のあと）: 全体の「押せないボタン＝灰色」をやめ、選んだ物だけ色・ほかは薄く */
.ap-choice:disabled, .ap-eq:disabled, .ap-grade:disabled, .ap-sev:disabled { background: #fff; color: #9ca3af; border-color: #e5e7eb; cursor: default; }
.ap-choice.is-on:disabled, .ap-eq.is-on:disabled { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-grade.is-on:disabled { background: #eff6ff; border-color: var(--accent); color: #1f2937; }
.ap-sev.is-on:disabled { background: #fef3c7; border-color: #d97706; color: #92400e; }
.ap-slot-main:disabled, .ap-slot.is-required:not(.has-photo) .ap-slot-main:disabled { border: 1px dashed #e5e7eb; background: #f9fafb; cursor: default; }
.ap-slot-none { font-size: 0.75rem; color: #9ca3af; }
/* ホーム: 査定案件（2026-10-13）。価格待ちの件数はオレンジの丸 */
.home-chip.is-appraisal { gap: 6px; border-color: #93c5fd; color: #1e40af; }
.home-chip.is-appraisal:hover { background: #eff6ff; }
.home-chip-count { padding: 1px 8px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 0.75rem; }
/* 査定（2026-10-14 確かめ役の指摘で直した所）
   読み込み中は空の欄を見せない・PCで間延びしない・枠の色・見出しの折り返し・選ぶ欄の名前はいつも上 */
body.ap-loading #apForm, body.ap-loading #apProgress, body.ap-loading #apBottom, body.ap-loading #apActions { visibility: hidden; }
body.ap-page .admin-wrap { max-width: 880px; }
body.theme-b1 .panel.ap-pricing { border: 2px solid #f59e0b; }
body.theme-b1 .panel.ap-priced { border: 2px solid #86efac; }
body.theme-b1 .panel h2.ap-h2 { flex-wrap: nowrap; justify-content: flex-start; }
.ap-num { flex: 0 0 auto; }
.ap-choice-row { flex-direction: column; align-items: flex-start; gap: 6px; }
.ap-choice-label { min-width: 0; }
.ap-head-facts { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ap-fact { white-space: nowrap; }
.ap-priced .ap-muted { word-break: keep-all; overflow-wrap: anywhere; }
.ap-hint { margin: 0 0 8px; font-size: 0.8rem; color: #6b7280; }
.ap-photos-one { margin: 8px 0 4px; }
.ap-car.is-empty { font-size: 0.92rem; font-weight: 600; color: #9ca3af; }
@media (max-width: 600px) { .ap-new-sub { width: 100%; } }
.ap-grade:disabled small { color: inherit; }
/* 下のバー: 「あと N か所」は押すと足りない所へ。足りない所は上に1行で出す */
.ap-bottom button.ap-bottom-left { min-height: 44px; padding: 0 4px; border: 0; border-radius: 0; background: none; color: #b45309; font-size: 0.95rem; font-weight: 800; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.ap-bottom button.ap-bottom-left:hover { background: none; }
.ap-bottom button.ap-bottom-left:disabled, .ap-bottom button.ap-bottom-left.is-done { background: none; color: #166534; text-decoration: none; cursor: default; }
.ap-missing { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0; padding: 8px max(14px, env(safe-area-inset-left)); border-top: 1px solid #fde68a; background: #fffbeb; color: #92400e; font-size: 0.85rem; font-weight: 700; }
/* 白い地のボタンは、マウスを乗せても濃い青にしない（字が見えなくなる） */
.ap-choice:hover:not(:disabled):not(.is-on), .ap-eq:hover:not(:disabled):not(.is-on), .ap-grade:hover:not(:disabled):not(.is-on), .ap-sev:hover:not(:disabled):not(.is-on), .ap-area:hover:not(.is-on), .ap-code-btn:hover:not(.is-on), .ap-step:hover, .ap-slot-tools button:hover, .ap-damage-row:hover, .ap-slot-main:hover:not(:disabled) { background: #f1f5f9; }
.ap-choice.is-on:hover, .ap-eq.is-on:hover { background: var(--accent-dark); }
.ap-slot.has-photo .ap-slot-main:hover { background: #fff; }
/* 価格を決める人の要点 */
.ap-keypoints { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: #fffbeb; font-size: 0.88rem; }
.ap-keypoints dt { font-weight: 700; color: #92400e; }
.ap-keypoints dd { margin: 0; overflow-wrap: anywhere; }
/* 展開図: 記号の直しはたたむ・見るだけの写真 */
.ap-dg-fix { margin: 6px 0; }
.ap-dg-fix summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: 6px 0; }
.ap-dg-ro-photo { display: block; max-width: 100%; margin-top: 8px; border-radius: 10px; cursor: zoom-in; }
/* 査定（2026-10-14 2回目の確かめで足した所）: 送ったあとの帯・足りない欄の光り・その他の写真・価格を決める人の写真の列・根拠の言葉 */
.ap-sent { margin: 0 0 10px; padding: 10px 14px; border: 1px solid #bbf7d0; border-radius: 12px; background: #f0fdf4; color: #166534; font-weight: 700; }
.ap-sec .is-flash:not(.ap-sec) { border-radius: 10px; box-shadow: 0 0 0 3px #fbbf24; transition: box-shadow 0.2s; }
.ap-slot-tools button { white-space: nowrap; min-height: 36px; }
.ap-slot-tools { gap: 10px; }
.ap-strip { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 12px; padding-bottom: 4px; }
.ap-strip-item { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 92px; padding: 0; border: 0; background: none; color: #374151; font-size: 0.7rem; cursor: zoom-in; }
.ap-strip-item:hover { background: none; }
.ap-strip-item img { width: 92px; height: 69px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; }
.ap-strip-item span { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.ap-quick-btn { min-height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #1f2937; font-size: 0.8rem; font-weight: 700; }
.ap-quick-btn:hover { background: #f1f5f9; }
/* 査定（2026-10-14 細かい係の2回目）: マウスを乗せても字が消えない・折れない・赤丸と名前・PCの下のバー など */
.ap-big-sub:hover { background: #dbeafe; }
.ap-check-btn:hover { background: #dcfce7; }
.ap-chip:hover { background: #f1f5f9; }
.ap-chip.is-on:hover { background: #eaf0ff; }
.ap-nobr { display: inline-block; white-space: nowrap; }
.ad-label { paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.ad-label.is-two { font-size: 15px; }
.ad-svg.is-readonly .ad-panel { cursor: default; }
.ad-svg.is-readonly .ad-panel:hover { fill: #fff; stroke: #586674; }
.ad-svg.is-readonly .ad-panel.has-damage:hover { fill: #fff8e7; stroke: #dc8a12; }
.ap-page .admin-wrap { padding-bottom: 150px; }
.ap-pricing button.btn-ghost:disabled { background: #fff; color: #9ca3af; border-color: #e5e7eb; }
.ap-page .admin-header h1 { word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 420px) { .ap-keypoints { grid-template-columns: 1fr; gap: 0; } .ap-keypoints dt { margin-top: 6px; } .ap-keypoints dt:first-child { margin-top: 0; } }
@media (min-width: 920px) { .ap-bottom, .ap-missing { padding-left: calc((100vw - 880px) / 2 + 16px); padding-right: calc((100vw - 880px) / 2 + 16px); } }
.ap-photos[data-photos^="front,"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 700px) { .ap-grades { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.ap-status.is-lost { background: #ffe4e6; color: #9f1239; }
.ap-status.is-on_hold { background: #ffedd5; color: #9a3412; }
.home-chip-count.is-red { background: #dc2626; }
/* ホームの査定案件: 数が増えても1つの丸の中で字が崩れない（狭いときは折り返す）・不成約の札は差し戻しの赤と分ける */
.home-chip.is-appraisal { flex-wrap: wrap; height: auto; min-height: 40px; padding: 6px 14px; row-gap: 4px; }
.home-chip.is-appraisal > * { white-space: nowrap; }
.ap-status.is-lost { background: #475569; color: #fff; }
/* ===== 査定のホーム（2026-10-14）: 大きなボタン2つ（査定を始める＝青に車の絵／査定済み案件を確認する）===== */
.ap-home { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 720px; margin: 8px auto 20px; }
@media (min-width: 720px) { .ap-home { grid-template-columns: 1fr 1fr; } }
.ap-home-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; margin: 0; padding: 22px 16px; border-radius: 22px; font-family: inherit; text-align: center; text-decoration: none; cursor: pointer; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1); transition: transform 0.08s, box-shadow 0.15s; }
.ap-home-btn:active { transform: scale(0.98); }
.ap-home-btn.is-start { border: 0; background: linear-gradient(140deg, #2563eb, #1d4ed8 55%, #1e3a8a); color: #fff; }
.ap-home-btn.is-start:hover { background: linear-gradient(140deg, #1d4ed8, #1e40af 55%, #1e3a8a); box-shadow: 0 10px 24px rgba(29, 78, 216, 0.35); }
.ap-home-btn.is-start:disabled { background: linear-gradient(140deg, #60a5fa, #3b82f6); }
.ap-home-btn.is-list { border: 2px solid #bfdbfe; background: #fff; color: #1e3a8a; }
.ap-home-btn.is-list:hover { background: #f8fbff; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14); }
.ap-home-car { width: 170px; height: auto; }
.ap-home-icon { width: 76px; height: 76px; color: #1d4ed8; }
.ap-home-label { font-size: 1.45rem; font-weight: 900; letter-spacing: 0.02em; }
.ap-home-sub { font-size: 0.85rem; font-weight: 600; opacity: 0.85; }
.ap-home-btn.is-list .ap-home-sub { color: #475569; opacity: 1; }
.ap-list-tools { display: flex; justify-content: flex-end; margin: 0 0 10px; }
/* ===== 1つずつ入れる（ステップ）===== */
body.ap-step-mode .ap-sec:not(.is-current) { display: none; }
.ap-step.is-current { border: 2px solid var(--accent); background: #eaf0ff; color: #1e3a8a; }
.ap-step.is-current.is-done { border-color: #16a34a; }
.ap-view-toggle { margin: -4px 0 8px; text-align: right; }
.ap-link-btn { min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--accent); font-size: 0.82rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ap-link-btn:hover { background: none; color: var(--accent-dark); }
/* 下のバー: 上の段＝あと N か所・保存、下の段＝戻る／次へ（または価格をお願いする） */
.ap-bottom { flex-wrap: wrap; row-gap: 6px; }
.ap-bottom-info { display: flex; flex: 1 1 auto; align-items: center; gap: 10px; min-width: 0; }
.ap-bottom-btns { display: flex; flex: 0 0 auto; gap: 8px; }
body.ap-step-mode .ap-bottom-btns { flex: 1 1 100%; }
body.ap-step-mode .ap-bottom-btns > button { flex: 2 1 0; }
body.ap-step-mode .ap-bottom-btns > button.ap-prev { flex: 1 1 0; }
.ap-bottom button.ap-prev { border: 1px solid #cbd5e1; background: #fff; color: #1f2937; }
.ap-bottom button.ap-prev:hover:not(:disabled) { background: #f1f5f9; }
.ap-bottom button.ap-prev:disabled { background: #fff; color: #cbd5e1; border-color: #e5e7eb; }
.ap-bottom button.ap-next { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ap-step-mode .ap-bottom-left { min-height: 32px; font-size: 0.85rem; }
body.ap-step-mode.ap-page .admin-wrap { padding-bottom: 190px; }
/* 査定: 他社の会社名（「他社と同時の査定」があり のとき）・カラーコードの候補（2026-10-14） */
.ap-competitors { margin: 4px 0 12px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; }
.ap-competitors-ttl { margin: 0 0 6px; font-size: 0.82rem; font-weight: 700; color: #374151; }
.ap-competitor-row { display: flex; gap: 8px; margin: 0 0 6px; }
.ap-competitor-row input { flex: 1; min-width: 0; margin: 0; font-size: 16px; }
button.ap-competitor-del { flex: 0 0 44px; min-height: 40px; margin: 0; padding: 0; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #6b7280; font-size: 1.1rem; }
button.ap-competitor-del:hover { background: #fef2f2; color: #b91c1c; }
.ap-competitor-memo { margin: 8px 0 0; font-size: 16px; }
.ap-colorcode { margin: 4px 0 6px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.ap-colorcode-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ap-color-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; margin: 8px 0; }
.ap-color { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #1f2937; font-size: 0.85rem; text-align: left; }
.ap-color:hover { background: #f1f5f9; }
.ap-color b { flex: 0 0 auto; font-size: 0.9rem; letter-spacing: 0.02em; }
.ap-color span:last-child { overflow-wrap: anywhere; }
.ap-color.is-on { border: 2px solid var(--accent); background: #eff6ff; }
.ap-color.is-on:hover { background: #eff6ff; }
.ap-color-sw { flex: 0 0 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); background: repeating-linear-gradient(45deg, #e5e7eb 0 4px, #fff 4px 8px); box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5); }
/* 査定: コーションプレート・タイヤの溝・査定書・成約（2026-10-14） */
.ap-plate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 4px; }
.ap-tires { margin-top: 6px; }
.ap-report { margin: 14px 0 0; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 14px; background: #f8fafc; }
.ap-report-ttl { margin: 0 0 6px; font-weight: 800; color: #1f2937; }
.ap-report-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.ap-report-btns a.btn-ghost { text-decoration: none; }
button.ap-contract-btn { display: block; width: 100%; min-height: 54px; margin: 14px 0 0; border: 0; border-radius: 14px; background: #16a34a; color: #fff; font-size: 1.05rem; font-weight: 800; }
button.ap-contract-btn:hover { background: #15803d; }
a.ap-contract-link { display: block; margin: 14px 0 0; padding: 14px; border: 2px solid #16a34a; border-radius: 14px; background: #f0fdf4; color: #166534; font-weight: 800; text-align: center; text-decoration: none; }
a.ap-contract-link:hover { background: #dcfce7; }
.ad-label.is-vertical { font-size: 14px; letter-spacing: 1px; }
/* ===================================================================================================
   査定のデザイン S2（2026-10-14 ユーザーが選んだ「スタイリッシュだけどシンプル」。D3 は「黒が多くて重い」でやめた）。
   body.ap-s2（appraisals.html・appraisal.html）だけ。白地に細い線。赤は「次へ」など大事な所だけ。黒い塗りは選んだボタンだけ
   =================================================================================================== */
body.ap-s2 { --aps-red: #e1261c; --aps-red-dark: #c41d14; --aps-ink: #111827; --aps-sub: #4b5563; --aps-line: #e5e7eb; --aps-soft: #f5f5f7; background: #fff; color: var(--aps-ink); }
/* 見出し・右上のボタン */
body.ap-s2 .admin-header h1 { font-weight: 800; color: var(--aps-ink); }
body.ap-s2.theme-b1 .admin-header h1::before { display: none; }
body.ap-s2 .m-home-btn, body.ap-s2 .m-menu-btn { border: 1px solid var(--aps-line); background: #fff; color: var(--aps-ink); }
body.ap-s2 .m-home-btn:hover, body.ap-s2 .m-menu-btn:hover { background: var(--aps-soft); }
body.ap-s2 .ap-back a { color: var(--aps-ink); text-decoration: underline; text-decoration-color: var(--aps-red); text-underline-offset: 4px; }

/* --- ホーム --- */
body.ap-s2 .ap-home { grid-template-columns: 1fr; max-width: 560px; gap: 12px; margin-top: 0; }
body.ap-s2 .ap-hello { margin: 0 0 2px; color: var(--aps-sub); font-size: 0.95rem; font-weight: 600; }
body.ap-s2 .ap-home-btn { box-shadow: none; transition: transform 0.08s, border-color 0.15s; }
body.ap-s2 .ap-home-btn.is-start { position: relative; align-items: flex-start; justify-content: flex-start; gap: 2px; min-height: 0; padding: 22px 22px 18px 26px; border: 1px solid var(--aps-line); border-radius: 22px; background: #fff; color: var(--aps-ink); text-align: left; overflow: hidden; }
body.ap-s2 .ap-home-btn.is-start::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--aps-red); }
body.ap-s2 .ap-home-btn.is-start:hover { border-color: #d1d5db; background: #fff; }
body.ap-s2 .ap-home-en { display: none; }
body.ap-s2 .ap-home-btn.is-start .ap-home-label { font-size: 1.75rem; font-weight: 800; color: var(--aps-ink); }
body.ap-s2 .ap-home-btn.is-start .ap-home-sub { color: var(--aps-sub); font-size: 0.9rem; font-weight: 600; opacity: 1; }
body.ap-s2 .ap-home-car { width: 100%; max-width: 360px; margin: 10px auto 0; }
body.ap-s2 .ap-home-go { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--aps-red); color: #fff; font-size: 1.6rem; font-weight: 700; }
body.ap-s2 .ap-home-btn.is-start:hover .ap-home-go { background: var(--aps-red-dark); }
body.ap-s2 .ap-home-btn.is-list { flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; min-height: 0; padding: 16px 18px; border: 1px solid var(--aps-line); border-radius: 18px; background: #fff; color: var(--aps-ink); text-align: left; }
body.ap-s2 .ap-home-btn.is-list:hover { border-color: #d1d5db; background: #fafafa; }
body.ap-s2 .ap-home-ic { flex: 0 0 46px; display: flex; align-items: center; justify-content: center; height: 46px; border: 1px solid var(--aps-line); border-radius: 14px; background: #fff; color: var(--aps-ink); }
body.ap-s2 .ap-home-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.ap-s2 .ap-home-btn.is-list .ap-home-label { font-size: 1.1rem; font-weight: 800; color: var(--aps-ink); }
body.ap-s2 .ap-home-btn.is-list .ap-home-sub { color: var(--aps-sub); font-size: 0.85rem; font-weight: 600; }
body.ap-s2 .ap-home-arrow { margin-left: auto; color: #9ca3af; font-size: 1.6rem; }
body.ap-s2 .ap-home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
body.ap-s2 .ap-home-stat { display: block; padding: 12px 14px; border: 1px solid var(--aps-line); border-radius: 16px; background: #fff; color: var(--aps-ink); text-decoration: none; }
body.ap-s2 .ap-home-stat:hover { background: #fafafa; }
body.ap-s2 .ap-home-stat b { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.15; }
body.ap-s2 .ap-home-stat span { font-size: 0.82rem; font-weight: 700; color: var(--aps-sub); }
body.ap-s2 .ap-home-stat.is-red b { color: var(--aps-red); }

/* --- 一覧 --- */
body.ap-s2 .ap-chip { border: 1px solid var(--aps-line); background: #fff; color: var(--aps-sub); font-weight: 700; }
body.ap-s2 .ap-chip.is-on, body.ap-s2 .ap-chip.is-on:hover { border: 1.5px solid var(--aps-ink); background: #fff; color: var(--aps-ink); }
body.ap-s2 .ap-chip.is-on .ap-chip-n { background: var(--aps-ink); color: #fff; }
body.ap-s2 .ap-search { border: 1px solid var(--aps-line); border-radius: 14px; }
body.ap-s2 .ap-card { border: 1px solid var(--aps-line); border-radius: 16px; box-shadow: none; }
body.ap-s2 .ap-card:hover { border-color: #d1d5db; }
body.ap-s2 .ap-price b { color: var(--aps-ink); }
body.ap-s2 .ap-price > span:first-child { color: var(--aps-red); font-weight: 700; }
body.ap-s2 button.ap-new-sub { border: 1px solid var(--aps-line); color: var(--aps-ink); font-weight: 700; }

/* --- 査定の画面: 上に項目の名前（✓ そろった・今の項目は線で囲む）。区の見出しは「STEP n / 7」と大きな名前 --- */
body.ap-s2 .ap-progress { gap: 6px; padding: 8px 0 6px; background: rgba(255, 255, 255, 0.97); }
body.ap-s2 .ap-step { border: 1px solid var(--aps-line); background: #fff; color: var(--aps-sub); font-weight: 700; }
body.ap-s2 .ap-step:hover { background: var(--aps-soft); }
body.ap-s2 .ap-step:not(.is-done) .ap-step-mark { display: none; }
body.ap-s2 .ap-step.is-done { border-color: #bbf7d0; background: #fff; color: #15803d; }
body.ap-s2 .ap-step.is-current { border: 1.5px solid var(--aps-ink); color: var(--aps-ink); }
body.ap-s2 .ap-view-toggle .ap-link-btn { color: var(--aps-sub); text-decoration-color: var(--aps-line); }
body.ap-s2 .panel { border: 1px solid var(--aps-line); border-radius: 20px; box-shadow: none; }
body.ap-s2.theme-b1 .panel h2.ap-h2 { flex-direction: column; align-items: flex-start; gap: 0; margin: -18px -20px 12px; padding: 18px 20px 0; border: 0; background: none; color: var(--aps-ink); font-size: 1.65rem; font-weight: 800; }
body.ap-s2 .ap-num, body.ap-s2 .ap-sec.is-done .ap-num { display: inline-block; width: auto; height: auto; border-radius: 0; background: none; color: var(--aps-red); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; }
body.ap-s2 .ap-num::before { content: "STEP "; white-space: pre; }
body.ap-s2 .ap-num::after { content: " / 6"; white-space: pre; }
body.ap-s2 .ap-sec.is-done .ap-num::after { content: " / 6  \2713"; white-space: pre; color: #15803d; }
body.ap-s2 label.dm-field { color: var(--aps-ink); font-size: 0.92rem; font-weight: 800; }
body.ap-s2 .ap-choice-label { color: var(--aps-ink); font-size: 0.95rem; font-weight: 800; }
/* 入力欄: 下線だけ（文字の欄）。長い文の欄は細い枠 */
body.ap-s2 .ap-sec input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.ap-s2 .ap-sec select,
body.ap-s2 .ap-pricing input, body.ap-s2 .ap-dialog input:not([type="checkbox"]), body.ap-s2 .ap-dialog select {
  border: 0; border-bottom: 2px solid var(--aps-ink); border-radius: 0; background-color: transparent; color: var(--aps-ink); font-weight: 700; padding-left: 4px; padding-right: 4px;
}
body.ap-s2 .ap-sec textarea, body.ap-s2 .ap-pricing textarea, body.ap-s2 .ap-dialog textarea { border: 1px solid #d1d5db; border-radius: 12px; background: #fff; }
body.ap-s2 .ap-sec input:focus, body.ap-s2 .ap-sec select:focus, body.ap-s2 .ap-sec textarea:focus, body.ap-s2 .ap-pricing input:focus, body.ap-s2 .ap-dialog input:focus, body.ap-s2 .ap-dialog textarea:focus { outline: none; border-bottom-color: var(--aps-red); }
body.ap-s2 .ap-sec textarea:focus, body.ap-s2 .ap-pricing textarea:focus, body.ap-s2 .ap-dialog textarea:focus { border-color: var(--aps-red); }
body.ap-s2 .ap-sec input:disabled, body.ap-s2 .ap-sec select:disabled, body.ap-s2 .ap-sec textarea:disabled { border-bottom-color: var(--aps-line); background: transparent; color: var(--aps-ink); }
body.ap-s2 .ap-unit-wrap { align-items: center; }
/* 選ぶボタン: 細い枠。選んだら黒 */
body.ap-s2 .ap-choice, body.ap-s2 .ap-eq, body.ap-s2 .ap-sev, body.ap-s2 .ap-area, body.ap-s2 .ap-code-btn, body.ap-s2 .ap-grade { border: 1px solid var(--aps-line); background: #fff; color: var(--aps-ink); font-weight: 700; }
body.ap-s2 .ap-choice.is-on, body.ap-s2 .ap-eq.is-on, body.ap-s2 .ap-area.is-on, body.ap-s2 .ap-code-btn.is-on,
body.ap-s2 .ap-choice.is-on:hover, body.ap-s2 .ap-eq.is-on:hover, body.ap-s2 .ap-choice.is-on:disabled, body.ap-s2 .ap-eq.is-on:disabled { border-color: var(--aps-ink); background: var(--aps-ink); color: #fff; }
body.ap-s2 .ap-grade.is-on, body.ap-s2 .ap-grade.is-on:disabled { border: 1.5px solid var(--aps-ink); background: var(--aps-soft); box-shadow: none; }
body.ap-s2 .ap-sev.is-on, body.ap-s2 .ap-sev.is-on:disabled { border-color: var(--aps-red); background: #fff1f0; color: var(--aps-red-dark); }
body.ap-s2 .ap-choice:disabled:not(.is-on), body.ap-s2 .ap-eq:disabled:not(.is-on), body.ap-s2 .ap-grade:disabled:not(.is-on), body.ap-s2 .ap-sev:disabled:not(.is-on) { border-color: var(--aps-line); color: #a1a1aa; }
/* 写真の枠: 白に点線、赤い＋ */
body.ap-s2 .ap-slot-main, body.ap-s2 .ap-slot.is-required:not(.has-photo) .ap-slot-main { border: 1px dashed #cbd5e1; border-radius: 14px; background: #fff; box-shadow: none; }
body.ap-s2 .ap-slot.is-required:not(.has-photo) .ap-slot-main { border-color: #f3a6a1; }
body.ap-s2 .ap-slot-main:hover:not(:disabled) { background: #fafafa; }
body.ap-s2 .ap-slot-plus { color: var(--aps-red); font-weight: 400; }
body.ap-s2 .ap-slot.has-photo .ap-slot-main { border: 1px solid var(--aps-line); }
body.ap-s2 .ap-slot-main:disabled { background: #fafafa; border: 1px dashed var(--aps-line); }
body.ap-s2 .ap-slot-cap { color: var(--aps-ink); font-weight: 700; }
/* ボタン: 大きなボタンは細い黒枠（車検証を撮る など）、小さなボタンは灰色の枠 */
body.ap-s2 .ap-big { border: 1.5px solid var(--aps-ink); border-radius: 14px; background: #fff; color: var(--aps-ink); box-shadow: none; }
body.ap-s2 .ap-big:hover { background: var(--aps-soft); }
body.ap-s2 .ap-big-sub, body.ap-s2 .ap-check-btn { border: 1px solid #d1d5db; background: #fff; color: var(--aps-ink); }
body.ap-s2 .ap-big-sub:hover, body.ap-s2 .ap-check-btn:hover { background: var(--aps-soft); }
body.ap-s2 .ap-color.is-on, body.ap-s2 .ap-color.is-on:hover { border: 1.5px solid var(--aps-ink); background: var(--aps-soft); }
/* 下のバー: 戻る＝細い枠、次へ・価格をお願いする＝赤 */
body.ap-s2 .ap-bottom { border-top: 0; background: linear-gradient(0deg, #fff 75%, rgba(255, 255, 255, 0.92)); }
body.ap-s2 .ap-bottom button.ap-prev { border: 1px solid var(--aps-line); background: #fff; color: var(--aps-ink); }
body.ap-s2 .ap-bottom button.ap-prev:hover:not(:disabled) { background: var(--aps-soft); }
body.ap-s2 .ap-bottom button.ap-prev:disabled { color: #d1d5db; }
body.ap-s2 .ap-bottom button.ap-next, body.ap-s2 .ap-bottom #apSubmit { background: var(--aps-red); color: #fff; box-shadow: none; }
body.ap-s2 .ap-bottom button.ap-next:hover, body.ap-s2 .ap-bottom #apSubmit:hover { background: var(--aps-red-dark); }
body.ap-s2 .ap-bottom button.ap-bottom-left { color: var(--aps-red); }
/* 価格を決める・決まった価格 */
body.ap-s2.theme-b1 .panel.ap-pricing { border: 1.5px solid var(--aps-red); }
body.ap-s2.theme-b1 .panel.ap-priced { border: 1.5px solid var(--aps-ink); }
body.ap-s2 .ap-keypoints { background: var(--aps-soft); border-left: 3px solid var(--aps-red); border-radius: 8px; }
body.ap-s2 .ap-keypoints dt { color: var(--aps-ink); }
body.ap-s2 .ap-offer b { color: var(--aps-ink); font-weight: 800; }
body.ap-s2 .ap-offer > span:first-child { color: var(--aps-red); font-weight: 700; }
body.ap-s2 .ap-calc { color: var(--aps-ink); }
body.ap-s2 .ap-pricing .ap-big { border: 0; background: var(--aps-red); color: #fff; }
body.ap-s2 .ap-pricing .ap-big:hover { background: var(--aps-red-dark); }
body.ap-s2 button.ap-contract-btn { background: var(--aps-red); box-shadow: none; }
body.ap-s2 button.ap-contract-btn:hover { background: var(--aps-red-dark); }
body.ap-s2 a.ap-contract-link { border: 1.5px solid var(--aps-ink); background: #fff; color: var(--aps-ink); }
body.ap-s2 .ap-report { border: 1px solid var(--aps-line); background: #fff; }
body.ap-s2 .ap-dialog-actions button:not(.btn-ghost), body.ap-s2 #apReportShare { background: var(--aps-red); }
body.ap-s2 .ap-dialog-actions button:not(.btn-ghost):hover, body.ap-s2 #apReportShare:hover { background: var(--aps-red-dark); }
.ap-color-n { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: #f0fdf4; color: #15803d; font-size: 0.75rem; font-weight: 800; white-space: nowrap; }
.notsetup-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 12px; }
.notsetup-row .btn-ghost { width: auto; margin: 0; }
.ap-colorcode-ttl { display: block; margin: 0 0 8px; font-size: 1rem; font-weight: 800; }
.ap-color-ai { margin: 6px 0 0; }
.ap-color-ai .ap-link-btn { font-size: 0.8rem; color: #6b7280; }
body.ap-s2 .ap-plate-row .ap-big { border: 0; background: #e1261c; color: #fff; }
body.ap-s2 .ap-plate-row .ap-big:hover { background: #c41d14; }
/* 写真をまとめて選ぶ・別の枠へ動かす（2026-10-14）*/
button.ap-bulk-btn { display: inline-flex; align-items: center; width: auto; min-height: 40px; margin: 0 0 8px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827; font-size: 0.9rem; font-weight: 700; }
button.ap-bulk-btn:hover { background: #f5f5f7; }
.ap-viewer-move { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 8px 0; font-weight: 700; }
.ap-viewer-move select { width: auto; margin: 0 0 0 6px; }
.ap-viewer-move button { width: auto; margin: 0; }
/* 写真の撮り直す・消すは、大きく見る画面の中へ（2026-10-14）*/
.ap-viewer-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0; }
.ap-viewer-tools button { width: auto; min-height: 40px; margin: 0; padding: 0 18px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827; font-weight: 700; }
.ap-viewer-tools button:hover { background: #f5f5f7; }
.ap-viewer-tools #apDelBtn { color: #b91c1c; }
/* 写真を全画面で見る（2026-10-14 価格を決める人など見るだけの人）*/
.ap-full { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b0b0c; color: #fff; overflow: hidden; }
.ap-full[open] { display: flex; flex-direction: column; }
.ap-full::backdrop { background: #000; }
.ap-full-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); }
.ap-full-top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.ap-full-count { color: #d1d5db; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ap-full button.ap-full-close { width: auto; min-height: 40px; margin: 0; padding: 0 16px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 12px; background: transparent; color: #fff; font-weight: 700; }
.ap-full-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ap-full-stage img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; user-select: none; -webkit-user-select: none; }
.ap-full.is-zoom .ap-full-stage { display: block; overflow: auto; }
.ap-full.is-zoom .ap-full-stage img { max-width: none; max-height: none; height: auto; cursor: zoom-out; }
.ap-full button.ap-full-nav { position: absolute; top: 50%; width: 52px; height: 52px; min-height: 0; margin: -26px 0 0; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; font-size: 2rem; line-height: 1; }
.ap-full button.ap-full-nav:hover { background: rgba(0, 0, 0, 0.7); }
.ap-full-prev { left: 10px; }
.ap-full-next { right: 10px; }
.ap-full.is-zoom .ap-full-nav { display: none; }
.ap-full-hint { margin: 0; padding: 6px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); color: #9ca3af; font-size: 0.8rem; text-align: center; }
button.ap-strip-full { display: inline-flex; align-items: center; width: auto; min-height: 40px; margin: 0 0 8px; padding: 0 14px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827; font-size: 0.9rem; font-weight: 700; }
button.ap-strip-full:hover { background: #f5f5f7; }
html:has(.ap-full[open]), body:has(.ap-full[open]) { overflow: hidden; }
/* 価格を決める欄の写真は、並べて全部見える形（2026-10-14）・車両情報 */
.ap-strip.ap-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 8px; overflow: visible; }
.ap-pgrid .ap-strip-item { width: auto; }
.ap-pgrid .ap-strip-item img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.ap-pgrid .ap-strip-item span { max-width: 100%; }
.ap-pricing .ap-h3 { margin: 18px 0 8px; }
.ap-eq-note { margin-top: 10px; }
/* 写真の区（2026-10-14）: どの組も、外まわりと同じ小さな4列（スマホ）にそろえる */
#sec-photos .ap-photos:not(.ap-photos-multi) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#sec-photos .ap-h3 { margin: 14px 0 4px; }
/* 価格を決める人の車両情報: スマホでも「名前｜中身」の2列でつめる（2026-10-14）・写真はスマホで3列 */
.ap-keypoints.ap-vinfo { grid-template-columns: 7.5em 1fr; gap: 4px 10px; }
@media (max-width: 420px) { .ap-keypoints.ap-vinfo { grid-template-columns: 6.5em 1fr; gap: 4px 8px; } .ap-keypoints.ap-vinfo dt { margin-top: 0; } }
@media (max-width: 520px) { .ap-strip.ap-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 写真の区（枠なし・何枚でも。2026-10-14）: スマホでも3列で、一度に多く見える */
#sec-photos .ap-photos.ap-photos-multi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 700px) { #sec-photos .ap-photos.ap-photos-multi { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* 査定票（2026-10-14 ユーザー「プライシング側の画面、出品票みたいに」）: マス目の表・右に評価点・下に装備・注意事項と展開図 */
.ap-sheet { margin: 6px 0 16px; border: 2px solid #374151; border-radius: 6px; background: #fff; color: #111827; overflow: hidden; }
.ap-sheet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px; border-bottom: 2px solid #374151; background: #f3f4f6; }
.ap-sheet-title { font-size: 1.15rem; letter-spacing: 0.2em; }
.ap-sheet-meta { flex: 1; min-width: 0; color: #4b5563; font-size: 0.78rem; }
.ap-sheet-head .btn-small { width: auto; margin: 0; }
.ap-sheet-body { display: grid; grid-template-columns: 1fr 96px; border-bottom: 1px solid #6b7280; }
.ap-sheet-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ap-sc { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 4px 7px 6px; border-right: 1px solid #9ca3af; border-bottom: 1px solid #9ca3af; }
.ap-sc.s1 { grid-column: span 1; } .ap-sc.s2 { grid-column: span 2; } .ap-sc.s3 { grid-column: span 3; } .ap-sc.s6 { grid-column: span 6; }
.ap-sc-l { color: #4b5563; font-size: 0.68rem; font-weight: 700; line-height: 1.2; }
.ap-sc-v { font-size: 0.95rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ap-sc.is-big .ap-sc-v { font-size: 1.12rem; }
.ap-sheet-score { display: grid; grid-template-rows: 1fr auto; border-left: 2px solid #374151; }
.ap-ss { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6px 4px; border-bottom: 1px solid #9ca3af; }
.ap-ss-v { font-size: 2.2rem; line-height: 1.1; }
.ap-ss.is-sub .ap-ss-v { font-size: 1.5rem; }
.ap-sheet-box { padding: 6px 10px 8px; border-bottom: 1px solid #9ca3af; }
.ap-sheet-line { margin: 2px 0 0; font-size: 0.92rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ap-sheet-low { display: grid; grid-template-columns: 1fr 260px; }
.ap-sheet-low .ap-sheet-notes { border-right: 1px solid #9ca3af; }
.ap-sheet-svg { max-width: 240px; margin: 4px auto 0; }
.ap-sheet-svg svg { display: block; width: 100%; height: auto; }
.ap-sheet-cust { border-bottom: 0; }
.ap-detail-toggle { display: block; margin: 14px 0 0; }
/* 価格を決める人の画面では、下の入力の区・上の項目の丸を出さない（「入力した内容をすべて見る」で出す） */
body.ap-pricing-mode:not(.ap-show-detail) #apForm, body.ap-pricing-mode:not(.ap-show-detail) #apProgress { display: none; }
/* 査定票の注意事項（2026-10-14 ユーザー「注意事項等が見ずらい」）: 項目ごとに左に名前・右に中身。傷は札。申し送りは色の枠 */
.ap-notes-dl { display: grid; grid-template-columns: 7.5em 1fr; gap: 0; margin: 6px 0 0; font-size: 0.95rem; }
.ap-notes-dl dt { padding: 7px 8px 7px 0; border-top: 1px dashed #d1d5db; color: #374151; font-size: 0.82rem; font-weight: 800; }
.ap-notes-dl dd { margin: 0; padding: 6px 0; border-top: 1px dashed #d1d5db; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
.ap-notes-dl dt:first-of-type, .ap-notes-dl dd:first-of-type { border-top: 0; }
.ap-dmg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-dmg-chip { display: inline-flex; align-items: center; gap: 2px; padding: 3px 10px 3px 4px; border: 1px solid #fecaca; border-radius: 999px; background: #fff1f2; font-size: 0.88rem; font-weight: 700; }
.ap-dmg-chip b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.8rem; }
.ap-notes-memo { margin: 10px 0 2px; padding: 8px 10px; border-left: 4px solid #f59e0b; border-radius: 6px; background: #fffbeb; }
.ap-notes-memo b { display: block; font-size: 0.8rem; color: #92400e; }
.ap-notes-memo p { margin: 2px 0 0; font-size: 0.95rem; font-weight: 600; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ap-notes-dl { grid-template-columns: 1fr; } .ap-notes-dl dt { padding-bottom: 0; } .ap-notes-dl dd { border-top: 0; padding-top: 2px; } }
/* パワースライドドアの右・左・両側（2026-10-14） */
.ap-psd-sides { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-psd-q { color: #b91c1c; font-size: 0.8rem; font-weight: 800; }
.ap-eq.ap-psd { min-width: 3.2em; }
.ap-noscore { margin: 8px 0; }
/* もう一度価格をお願いする（2026-10-14） */
.ap-reprice-btn { display: block; width: auto; margin: 10px 0 4px; }
.ap-reprice-banner { margin: 4px 0 12px; padding: 10px 12px; border: 2px solid #f59e0b; border-radius: 10px; background: #fffbeb; }
.ap-reprice-banner b { display: block; color: #92400e; font-size: 0.85rem; }
.ap-reprice-banner p { margin: 4px 0 0; font-size: 1rem; font-weight: 700; }
.ap-reprice-banner .ap-reprice-note { font-weight: 600; white-space: pre-wrap; }
.ap-reprice-banner .ap-muted { font-size: 0.8rem; font-weight: 400; }
.ap-reprice-fields { margin: 0 0 8px; }
/* スマホでも出品票の形のまま（2026-10-14 ユーザー「スマホ版の時も出品表の形崩さないでいける？」）: 列の並びはそのまま、字と余白を小さく */
@media (max-width: 600px) {
  .ap-pricing.panel { padding-left: 10px; padding-right: 10px; }
  .ap-sheet-head { padding: 6px 8px; gap: 4px 8px; }
  .ap-sheet-title { font-size: 1rem; }
  .ap-sheet-meta { order: 3; flex-basis: 100%; font-size: 0.66rem; }
  .ap-sheet-head .btn-small { margin-left: auto; padding: 4px 10px; font-size: 0.75rem; }
  .ap-sheet-body { grid-template-columns: minmax(0, 1fr) 52px; }
  .ap-sc { padding: 3px 4px 4px; gap: 1px; }
  .ap-sc-l { font-size: 0.56rem; }
  .ap-sc-v { font-size: 0.74rem; line-height: 1.25; overflow-wrap: break-word; }
  .ap-sc.is-big .ap-sc-v { font-size: 0.86rem; }
  .ap-sc.s1 .ap-sc-v { font-size: 0.68rem; }
  .ap-ss { padding: 4px 2px; }
  .ap-ss-v { font-size: 1.6rem; }
  .ap-ss.is-sub .ap-ss-v { font-size: 1.15rem; }
  .ap-sheet-box { padding: 5px 7px 6px; }
  .ap-sheet-line { font-size: 0.8rem; line-height: 1.45; }
  .ap-sheet-low { grid-template-columns: minmax(0, 1fr) 38%; }
  .ap-notes-dl { font-size: 0.8rem; }
  .ap-notes-dl dt { font-size: 0.75rem; }
  .ap-dmg-chips { gap: 4px; }
  .ap-dmg-chip { padding: 2px 7px 2px 3px; font-size: 0.72rem; }
  .ap-dmg-chip b { min-width: 24px; height: 18px; padding: 0 4px; font-size: 0.68rem; }
  .ap-notes-memo { padding: 6px 8px; }
  .ap-notes-memo p { font-size: 0.82rem; }
  .ap-sheet-svg { max-width: none; margin-top: 2px; }
}
/* プライシング金額だけ・成約／未成約（2026-10-14） */
.ap-price-one { grid-template-columns: minmax(0, 360px); }
.ap-price-one .ap-unit-wrap input { font-size: 1.3rem; }
.ap-decide { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.ap-decide .ap-contract-btn { width: auto; min-width: 9em; margin: 0; }
.ap-decide .ap-lost-btn { width: auto; min-width: 7em; margin: 0; }
.ap-contract-amount b { color: #15803d; }
.ap-contract-ref { margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #f3f4f6; font-size: 1rem; font-weight: 700; }
.ap-price-one { margin-top: 14px; }
.ap-price-one label.dm-field { font-size: 1rem; font-weight: 800; }

/* ===== 査定票を見やすく（2026-10-14 ユーザー「KINGBID車両査定（幡野作成）のプライシング画面を参考に」）===== */
.ap-sheet-memo { margin: 0; padding: 10px 12px; border-bottom: 1px solid #9ca3af; background: #fffbeb; }
.ap-sheet-memo > b { display: block; color: #92400e; font-size: 0.78rem; }
.ap-sheet-memo-text { margin: 3px 0 0; font-size: 1rem; font-weight: 700; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-sheet-memo-sub { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 6px 0 0; font-size: 0.85rem; }
.ap-sheet-memo-sub span { color: #6b7280; }
.ap-sheet-need { margin: 0; padding: 7px 12px; border-bottom: 1px solid #9ca3af; background: #fff1e8; color: #8c3d14; font-size: 0.85rem; font-weight: 800; }
.ap-sc.is-missing { background: #fefce8; }
.ap-sc.is-missing .ap-sc-v { color: #a16207; }
.ap-sc.is-danger { background: #fef2f2; }
.ap-sc.is-danger .ap-sc-v { color: #b91c1c; }
.ap-ss.is-missing { background: #fefce8; }
.ap-sheet-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.ap-chip { display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid #c7d7e5; border-radius: 999px; background: #eef6fb; color: #1e3a5f; font-size: 0.85rem; font-weight: 700; }
.ap-chip.is-note { border-color: #d1d5db; background: #fff; color: #111827; }
.ap-chip.is-sub { border-color: #d1d5db; background: #f3f4f6; color: #374151; }
.ap-chip.is-warn { border-color: #fecaca; background: #fff1f2; color: #b91c1c; }
.ap-sheet-low { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 0.8fr); }
.ap-sheet-low .ap-sheet-dg { border-right: 1px solid #9ca3af; }
.ap-sheet-low .ap-sheet-svg { max-width: 300px; }
.ap-dmg-list { display: flex; flex-direction: column; gap: 6px; }
.ap-dmg-card { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 0; margin: 0; padding: 7px 9px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #111827; text-align: left; }
button.ap-dmg-card { cursor: pointer; }
button.ap-dmg-card:hover { background: #fff7f7; }
.ap-dmg-code { display: inline-grid; flex: 0 0 auto; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.85rem; }
.ap-dmg-txt { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ap-dmg-txt b { font-size: 0.92rem; }
.ap-dmg-txt small { color: #4b5563; font-size: 0.78rem; overflow-wrap: anywhere; }
.ap-dmg-ph { flex: 0 0 auto; padding: 2px 8px; border-radius: 999px; background: #111827; color: #fff; font-size: 0.72rem; font-weight: 700; }
.ap-sheet-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; border-top: 1px solid #9ca3af; background: #f8fafc; }
.ap-det { min-width: 0; padding: 9px 11px; border: 1px solid #e0e7ed; border-radius: 8px; background: #fff; }
.ap-det > b { display: block; color: #374151; font-size: 0.8rem; }
.ap-det > p { margin: 3px 0 0; font-size: 0.92rem; font-weight: 600; line-height: 1.55; overflow-wrap: anywhere; }
/* ===== プライシング画面（appraisal.html?desk=1）===== */
.ap-desk-queue { margin: 0 0 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; overflow: hidden; }
.ap-dq-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
.ap-dq-en { color: #e1261c; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.15em; }
.ap-dq-head b { font-size: 1.05rem; }
.ap-dq-empty { padding: 10px 14px; }
.ap-dq-item { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: #374151; text-decoration: none; }
.ap-dq-item:hover { background: #f8fafc; }
.ap-dq-item.is-active { background: #fef2f2; box-shadow: inset 4px 0 0 #e1261c; }
.ap-dq-item b { color: #111827; font-size: 0.95rem; }
.ap-dq-item span, .ap-dq-item small { font-size: 0.78rem; }
.ap-dq-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ap-dq-tags em { padding: 2px 7px; border-radius: 4px; font-size: 0.68rem; font-style: normal; font-weight: 800; }
.ap-dq-tags em.is-me { background: #e0f2fe; color: #075985; }
.ap-dq-tags em.is-re { background: #fff3d7; color: #8a4b08; }
.ap-dq-tags em.is-danger { background: #fee2e2; color: #a32d20; }
.ap-dq-meta { color: #9ca3af; }
.ap-desk-empty { padding: 30px 16px; border: 1px dashed #d1d5db; border-radius: 14px; color: #4b5563; font-weight: 700; text-align: center; }
.ap-price-box { padding: 12px 14px; border: 2px solid #111827; border-radius: 14px; background: #fff; }
.ap-price-box-sub { margin: 0 0 4px; color: #4b5563; font-size: 0.8rem; font-weight: 700; }
.ap-price-box .ap-price-one { margin-top: 4px; }
.ap-price-box .ap-row { margin-top: 10px; }
@media (min-width: 1100px) {
  body.ap-desk.ap-page .admin-wrap { max-width: 1480px; display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 18px; align-items: start; }
  body.ap-desk .admin-wrap > * { grid-column: 2; }
  body.ap-desk .admin-wrap > .ap-desk-queue { grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; margin: 0; }
  body.ap-desk #apPricing { display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 18px; align-items: start; }
  body.ap-desk #apPricing > * { grid-column: 1; }
  body.ap-desk #apPricing > .ap-price-box { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: 12px; }
}
@media (max-width: 1099px) {
  .ap-pricing .ap-price-box { position: sticky; bottom: 8px; z-index: 6; margin-top: 12px; box-shadow: 0 -6px 18px rgba(17, 24, 39, 0.12); }
}
@media (max-width: 600px) {
  .ap-sheet-memo { padding: 8px 9px; }
  .ap-sheet-memo-text { font-size: 0.86rem; }
  .ap-sheet-memo-sub { font-size: 0.74rem; gap: 2px 10px; }
  .ap-sheet-need { padding: 6px 9px; font-size: 0.74rem; }
  .ap-chip { padding: 2px 8px; font-size: 0.75rem; }
  .ap-sheet-low { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr); }
  .ap-dmg-card { gap: 5px; padding: 5px 6px; }
  .ap-dmg-code { min-width: 26px; height: 20px; font-size: 0.7rem; }
  .ap-dmg-txt b { font-size: 0.76rem; }
  .ap-dmg-txt small { font-size: 0.66rem; }
  .ap-dmg-ph { padding: 1px 5px; font-size: 0.6rem; }
  .ap-sheet-details { grid-template-columns: 1fr; padding: 7px; gap: 6px; }
  .ap-det > p { font-size: 0.8rem; }
  .ap-price-box { padding: 10px; }
}
/* プライシング画面のスマホ: 依頼の一覧は低く、下の価格の箱は1〜2行に */
@media (max-width: 700px) {
  .ap-pricing .ap-price-box { padding: 8px 10px; }
  .ap-price-box-sub { display: none; }
  .ap-price-box .ap-price-one { margin: 0; }
  .ap-price-box .ap-price-one label.dm-field { font-size: 0.8rem; }
  .ap-price-box .ap-price-one .ap-unit-wrap input { font-size: 1.15rem; }
  .ap-price-box .ap-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; }
  .ap-price-box .ap-row .ap-big { min-height: 44px; margin: 0; font-size: 0.95rem; }
  .ap-price-box .ap-row .btn-ghost { width: auto; margin: 0; padding: 0 12px; font-size: 0.8rem; }
  .ap-price-box .ap-noscore { margin: 4px 0; font-size: 0.75rem; }
}
/* プライシング画面の依頼の一覧（2026-10-23 ユーザー「上の横に流れる車の列」が「ちょうわかりずらい」）:
   パソコン（1100px〜）は左に縦の一覧。スマホ・タブレットは1行の帯（価格待ち 2／3件・‹ 前・次 ›・一覧 ▾）で、一覧は押すと下に開く */
.ap-dq-bar { display: none; }
.ap-dq-item .ap-dq-tags em.is-now { background: #111827; color: #fff; }
@media (min-width: 1100px) {
  .ap-dq-item .ap-dq-tags em.is-now { display: none; }
}
@media (max-width: 1099px) {
  body.ap-desk .ap-dq-head { display: none; }
  body.ap-desk .ap-dq-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
  .ap-dq-count { flex: 1 1 auto; min-width: 0; font-size: 0.92rem; white-space: nowrap; }
  .ap-dq-nav, .ap-page button.ap-dq-toggle { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 38px; margin: 0; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; color: #111827; font: inherit; font-size: 0.85rem; font-weight: 800; text-decoration: none; cursor: pointer; }
  .ap-dq-nav.is-off { color: #c4c7cc; border-color: #eceef1; }
  .ap-page button.ap-dq-toggle { background: #111827; border-color: #111827; color: #fff; }
  body.ap-desk .ap-dq-list { display: none; max-height: 55vh; overflow-y: auto; border-top: 1px solid #e5e7eb; }
  body.ap-desk .ap-desk-queue.is-open .ap-dq-list { display: block; }
  body.ap-desk .ap-dq-item { padding: 10px 12px; }
}

/* ===== 査定票を紙の出品票の形に（2026-10-14 ユーザーが USS の画面を見せて「こんなかんじ」）: 幅720の決まった並びを、画面の幅に合わせて縮める ===== */
.ap-sheet-outer { margin: 6px 0 14px; }
.ap-paper-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 6px; }
.ap-paper-tools .btn-small { width: auto; margin: 0; }
.ap-paper-hint { color: #dc2626; font-size: 0.78rem; font-weight: 700; }
.ap-paper-wrap { overflow: hidden; cursor: zoom-in; }
.ap-paper-wrap.is-actual { overflow-x: auto; cursor: zoom-out; -webkit-overflow-scrolling: touch; }
.ap-paper { width: 720px; box-sizing: border-box; border: 2px solid #111; background: #fff; color: #111; font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; line-height: 1.25; }
.ap-paper .pp-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 10px; border-bottom: 2px solid #111; }
.ap-paper .pp-title b { font-size: 26px; letter-spacing: 0.25em; }
.ap-paper .pp-title span { color: #374151; font-size: 12px; }
.ap-paper .pp-c { display: flex; flex-direction: column; min-width: 0; padding: 2px 5px 3px; border-right: 1px solid #111; border-bottom: 1px solid #111; }
.ap-paper .pp-l { color: #111; font-size: 10px; font-weight: 800; line-height: 1.2; }
.ap-paper .pp-v { flex: 1; display: flex; align-items: flex-end; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.ap-paper .pp-v.is-big { font-size: 18px; }
.ap-paper .is-danger .pp-v { color: #c00; }
.ap-paper .pp-top { display: grid; grid-template-columns: 96px minmax(0, 1fr) 116px; border-bottom: 2px solid #111; }
.ap-paper .pp-no { border-bottom: 0; }
.ap-paper .pp-no .pp-v { align-items: center; justify-content: center; font-size: 20px; letter-spacing: 0.05em; }
.ap-paper .pp-r { display: grid; }
.ap-paper .pp-r1 { grid-template-columns: 150px 110px minmax(0, 1fr); }
.ap-paper .pp-r2 { grid-template-columns: 110px minmax(0, 1fr) 150px 64px; }
.ap-paper .pp-r2 .pp-c { border-bottom: 0; min-height: 52px; }
.ap-paper .pp-score { display: grid; grid-template-rows: 1fr auto; }
.ap-paper .pp-score-main { display: flex; flex-direction: column; align-items: center; padding: 2px 4px; border-bottom: 1px solid #111; }
.ap-paper .pp-score-main b { font-size: 46px; line-height: 1.05; }
.ap-paper .pp-score-sub { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px; padding: 2px 6px; }
.ap-paper .pp-score-sub b { font-size: 26px; }
.ap-paper .pp-mid { display: grid; grid-template-columns: 290px 150px minmax(0, 1fr); border-bottom: 2px solid #111; }
.ap-paper .pp-col { display: flex; flex-direction: column; border-right: 1px solid #111; }
.ap-paper .pp-col:last-child { border-right: 0; }
.ap-paper .pp-col > .pp-c { border-right: 0; }
.ap-paper .pp-color { grid-template-columns: minmax(0, 1fr) 70px 74px; }
.ap-paper .pp-fuel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ap-paper .pp-col .pp-r > .pp-c:last-child { border-right: 0; }
.ap-paper .pp-fuel .pp-c, .ap-paper .pp-col > .pp-c:last-child { border-bottom: 0; }
.ap-paper .is-circle .pp-v span, .ap-paper .is-circle .pp-v { }
.ap-paper .is-circle .pp-v::before { content: ""; }
.ap-paper .is-circle .pp-v { justify-content: center; }
.ap-paper .is-circle .pp-v { border: 1.5px solid #111; border-radius: 999px; align-self: center; min-width: 46px; padding: 0 8px; margin: 2px 0; }
.ap-paper .pp-sales { padding: 3px 6px; }
.ap-paper .pp-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-bottom: 4px; border-bottom: 1px solid #111; }
.ap-paper .pp-badge { padding: 1px 7px; border: 1px solid transparent; border-radius: 999px; color: #9ca3af; font-size: 11px; font-weight: 700; }
.ap-paper .pp-badge.is-on { border-color: #111; color: #111; }
.ap-paper .pp-salespoint { display: flex; flex-direction: column; padding-top: 3px; }
.ap-paper .pp-star { font-size: 13px; font-weight: 700; line-height: 1.35; }
.ap-paper .pp-r3 { grid-template-columns: 150px 120px 120px minmax(0, 1fr); border-bottom: 2px solid #111; }
.ap-paper .pp-r3 .pp-c { border-bottom: 0; }
.ap-paper .pp-r3 .pp-c:last-child { border-right: 0; }
.ap-paper .pp-low { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 330px; border-bottom: 1px solid #111; }
.ap-paper .pp-report { padding: 6px 8px; border-right: 1px solid #111; }
.ap-paper .pp-h { display: block; margin: 4px 0 2px; font-size: 12px; }
.ap-paper .pp-line { margin: 0 0 3px 10px; font-size: 14px; font-weight: 700; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ap-paper .pp-dmgs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0 10px; }
.ap-paper .pp-dmg { display: inline-flex; align-items: center; gap: 3px; width: auto; min-height: 0; margin: 0; padding: 2px 8px 2px 3px; border: 1px solid #111; border-radius: 999px; background: #fff; color: #111; font-size: 12px; font-weight: 700; }
.ap-paper .pp-dmg b { padding: 0 5px; border-radius: 999px; background: #111; color: #fff; font-size: 11px; }
.ap-paper button.pp-dmg { cursor: pointer; }
.ap-paper .pp-diagram { padding: 4px; }
.ap-paper .pp-diagram svg { display: block; width: 100%; height: auto; }
.ap-paper .pp-cust { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 5px 8px; font-size: 13px; }
.ap-paper .pp-ck { color: #374151; font-size: 11px; }
/* 写真（上に大きく1枚・下に小さい写真） */
.ap-pv { margin: 0 0 12px; }
.ap-pv-main { position: relative; display: block; width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 10px; background: #111; overflow: hidden; cursor: zoom-in; }
.ap-pv-main img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.ap-pv-cap { position: absolute; left: 8px; bottom: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.8rem; font-weight: 700; }
.ap-pv-hint { margin: 6px 0; color: #4b5563; font-size: 0.8rem; text-align: center; }
.ap-pv-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .ap-pv-thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); } .ap-pv-main img { max-height: 520px; } }
.ap-pv-th { display: block; width: 100%; min-height: 0; margin: 0; padding: 0; border: 3px solid transparent; border-radius: 6px; background: #f3f4f6; overflow: hidden; }
.ap-pv-th.is-on { border-color: #e1261c; }
.ap-pv-th img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* 純正品の丸（USS の出品票と同じ: 左に「純正品」、右に 4つ×2段） */
.ap-paper .pp-badges { display: grid; grid-template-columns: 22px repeat(4, minmax(0, 1fr)); grid-template-rows: auto auto; gap: 3px 4px; align-items: center; padding: 2px 0 5px; border-bottom: 1px solid #111; }
.ap-paper .pp-badges-l { grid-row: 1 / span 2; writing-mode: vertical-rl; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; border-right: 1px solid #111; height: 100%; display: flex; align-items: center; justify-content: center; }
.ap-paper .pp-badge { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 1px 0; border: 1.5px solid transparent; border-radius: 999px; color: #111; font-size: 13px; font-weight: 700; }
.ap-paper .pp-badge.is-on { border-color: #111; }
.ap-paper .pp-badge:not(.is-on) { color: #111; }

/* ===== ENDLESS業務管理アプリのホーム（2026-10-14 ユーザー「ホーム画面を契約書メインではなく業務メインに」）=====
   パソコン（1024px〜）は左に細かなタブ（黒・金）。上に日付・時刻とあいさつ、右上に通知とメニュー。四角いボタン6つ（ボタンごとに色）。
   スマホは、いちばん上に日付、その下にあいさつ、ボタンは2列（件数は絵の右上の丸）。public/admin/home.html・admin-home.js */
body.eh-home, .ap-hub { --eh-ink: #17171a; --eh-sub: #6e6e76; --eh-line: #e8e4da; --eh-gold: #c9a35a; --eh-red: #d6312a; }
body.eh-home { background: #f3f1ec; color: var(--eh-ink); }
body.eh-home .eh-side svg, body.eh-home .eh-top svg, body.eh-home .eh-tiles svg, .ap-hub svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* 左のタブ（パソコンだけ） */
.eh-side { display: none; }
@media (min-width: 1024px) {
  .eh-side { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; flex-direction: column; width: 232px; background: #0e0e10; color: #b4b4bc; }
}
.eh-logo { display: block; padding: 22px 22px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-decoration: none; }
.eh-logo b { display: block; color: var(--eh-gold); font-size: 17px; font-weight: 800; letter-spacing: 0.38em; }
.eh-logo small { display: block; margin-top: 4px; color: #8d8d96; font-size: 12px; letter-spacing: 0.14em; }
.eh-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.eh-cap { margin: 12px 10px 4px; color: #6f6f78; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; }
.eh-cap a { color: inherit; text-decoration: none; }
.eh-cap a:hover { color: #fff; }
.eh-tab { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: #b4b4bc; font-family: inherit; font-size: 13.5px; font-weight: 400; line-height: 1.2; text-align: left; text-decoration: none; cursor: pointer; }
.eh-tab svg { flex: 0 0 17px; width: 17px; height: 17px; opacity: 0.8; }
.eh-tab:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.eh-tab.is-on { background: rgba(201, 163, 90, 0.15); color: #fff; font-weight: 700; }
.eh-tab.is-on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--eh-gold); }
.eh-tab.is-on svg { color: var(--eh-gold); opacity: 1; }
.eh-tab.is-off, .eh-tab.is-off:hover { background: none; color: #5d5d66; cursor: default; }
.eh-tag { margin-left: auto; padding: 1px 7px; border: 1px solid #44444c; border-radius: 999px; font-size: 12px; font-style: normal; white-space: nowrap; }
.eh-n { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--eh-red); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; text-align: center; }
.eh-tab.is-sub { height: 30px; padding-left: 37px; font-size: 12.5px; }
.eh-fold > summary { list-style: none; }
.eh-fold > summary::-webkit-details-marker { display: none; }
.eh-tab .eh-chev { flex: 0 0 14px; width: 14px; height: 14px; margin-left: auto; transition: transform 0.15s; }
.eh-fold[open] > summary .eh-chev { transform: rotate(90deg); }
.eh-side-foot { display: flex; gap: 6px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.eh-side-foot a, .eh-side-foot button { flex: 1; padding: 8px 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: #b4b4bc; font-family: inherit; font-size: 12px; font-weight: 400; text-align: center; text-decoration: none; cursor: pointer; }
.eh-side-foot button:hover { background: rgba(255, 255, 255, 0.1); }
.eh-side-foot a:hover, .eh-side-foot button:hover { color: #fff; }

/* 右側 */
.admin-wrap.eh-main { max-width: none; margin: 0; padding: 26px 40px 48px; }
@media (min-width: 1024px) {
  .admin-wrap.eh-main { margin-left: 232px; }
}
.eh-top, .eh-tiles, .eh-below, .eh-foot { max-width: 1120px; margin-left: auto; margin-right: auto; }
.home-top.eh-top { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 26px; padding: 0; }
.eh-when { display: flex; align-items: baseline; gap: 14px; padding-right: 26px; border-right: 1px solid #dcd7cb; }
.eh-date { color: var(--eh-sub); font-size: 14px; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; }
.eh-time { font-size: 34px; font-weight: 800; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.eh-hello { flex: 1; min-width: 0; }
.eh-hello-line { margin: 0; font-size: 21px; font-weight: 700; }
.eh-store { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--eh-sub); font-size: 12px; }
.eh-store:empty { display: none; }
.eh-store-dot { width: 7px; height: 7px; border-radius: 50%; background: #22a35a; }
.eh-store .m-store-btn.is-spot { min-height: 30px; margin: 0; padding: 0 10px; border-radius: 999px; font-size: 12px; }
.eh-store .m-store-btn.is-spot .m-store-suffix { display: inline; }
.eh-store .m-store-btn.is-spot svg { width: 16px; height: 16px; }
.eh-bell { position: relative; display: grid; place-items: center; flex: none; width: 46px; height: 46px; margin-left: auto; border: 1px solid var(--eh-line); border-radius: 14px; background: #fff; color: var(--eh-ink); cursor: pointer; }
.eh-bell svg { width: 22px; height: 22px; }
.eh-bell:hover { background: #faf9f6; }
.eh-bell, .eh-bell:hover { padding: 0; font-weight: 400; }
.eh-bell-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #f3f1ec; border-radius: 999px; background: var(--eh-red); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 16px; text-align: center; }
.eh-top .m-menu-btn { min-height: 46px; margin: 0 0 0 -16px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--eh-ink); color: #fff; font-size: 14px; }
.eh-top .m-menu-btn:hover { background: #2a2a30; }
.eh-pop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: min(360px, calc(100vw - 32px)); padding: 6px 8px 8px; border: 1px solid var(--eh-line); border-radius: 16px; background: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14); }
.eh-pop-h { margin: 10px 10px 4px; color: var(--eh-sub); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; }
.eh-pop-item { display: block; padding: 8px 10px; border-radius: 10px; color: var(--eh-ink); text-decoration: none; }
.eh-pop-item:hover { background: #f6f4ef; }
.eh-pop-title { display: block; font-size: 13.5px; line-height: 1.45; }
.eh-pop-item.is-unread .eh-pop-title { font-weight: 700; }
.eh-pop-item.is-unread .eh-pop-title::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--eh-red); vertical-align: 2px; }
.eh-pop-sub { display: block; margin-top: 1px; color: var(--eh-sub); font-size: 12px; }
.eh-pop-empty { margin: 4px 10px 6px; color: var(--eh-sub); font-size: 13px; }
.eh-pop-more { display: block; margin: 2px 10px 6px; color: #1d4ed8; font-size: 12.5px; font-weight: 700; text-decoration: none; }

/* 四角いボタン6つ（ボタンごとに色。真ん中に大きな絵・大きな字） */
.eh-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.eh-tile { --c: #17171a; --c2: #3a3a40; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; aspect-ratio: 5 / 4; min-width: 0; padding: 22px; overflow: hidden; border: 2px solid transparent; border-radius: 26px; background: #fff; color: var(--eh-ink); text-align: center; text-decoration: none; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 10px 28px rgba(20, 20, 20, 0.06); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.eh-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: linear-gradient(90deg, var(--c2), var(--c)); }
.eh-tile:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 2px 4px rgba(20, 20, 20, 0.05), 0 18px 40px rgba(20, 20, 20, 0.1); }
.eh-ic { position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 27px; background: linear-gradient(145deg, var(--c2), var(--c)); color: #fff; box-shadow: 0 12px 24px -10px var(--c); }
.eh-ic svg { width: 44px; height: 44px; stroke-width: 1.8; }
.eh-label { display: block; font-size: 30px; font-weight: 800; letter-spacing: 0.05em; line-height: 1.2; }
.eh-desc { display: block; margin-top: -6px; color: #55555c; font-size: 14px; line-height: 1.6; }
.eh-badge { position: absolute; top: 16px; right: 16px; padding: 6px 13px; border-radius: 999px; background: var(--eh-red); color: #fff; font-size: 13px; font-weight: 800; box-shadow: 0 4px 12px rgba(214, 49, 42, 0.3); }
.eh-dot { display: none; }
/* ボタンの色は黒×金にそろえる（2026-10-14 ユーザー「色揃えたい」→ 見本のA「黒×金」に「やっぱりaで」）。
   左のタブ・ENDLESS のロゴと同じ。絵の地は黒、絵と下の線は金。件数の札だけ赤 */
.t-satei, .t-keiyaku, .t-anken, .t-zaiko, .t-shien { --c: #17171a; --c2: #3a3a40; }
.eh-tile:not(.is-soon) .eh-ic { color: #d9b66f; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5); }
.eh-tile::after { background: linear-gradient(90deg, #e3c88f, #a8843f); }
.eh-tile:hover { border-color: var(--eh-gold); }
/* 店舗名・予定や目標の見出しの点も金に */
.eh-store-dot { background: var(--eh-gold); }
.eh-store .m-store-btn.is-spot { border-color: #e6d6b2; background: #fffaf0; color: #6f5420; }
.eh-store .m-store-btn.is-spot:hover { background: #fbf1dc; }
.eh-store .m-store-btn.is-spot svg { color: #a8843f; }
.eh-below .home-dot.is-blue, .eh-below .home-dot.is-green { background: var(--eh-gold); }
.eh-note { display: inline-block; margin-top: -4px; padding: 7px 12px; border: 1px solid #eadfc6; border-radius: 10px; background: #fff; color: #8a5a00; font-size: 13px; font-weight: 700; line-height: 1.5; word-break: keep-all; }
.eh-tile:not(.is-soon) .eh-note { display: none; }
.eh-tile.is-soon { border: 2px dashed #cfc9bb; background: repeating-linear-gradient(135deg, #faf9f6 0 12px, #f3f1eb 12px 24px); box-shadow: none; cursor: not-allowed; }
.eh-tile.is-soon::after { display: none; }
.eh-tile.is-soon:hover { transform: none; border-color: #cfc9bb; }
.eh-tile.is-soon .eh-ic { background: #dcd8cd; box-shadow: none; }
.eh-tile.is-soon .eh-label { color: #8f8a7e; }
.eh-tile.is-soon .eh-desc, .eh-tile.is-soon .eh-badge, .eh-tile.is-soon .eh-dot { display: none !important; }
.eh-tag-soon { position: absolute; top: 16px; right: 16px; padding: 5px 12px; border-radius: 999px; background: #e6e2d8; color: #6f6a5e; font-size: 12.5px; font-weight: 700; }

/* ボタンの下: 今後の予定・今月の目標 */
.eh-below { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 28px; }
.eh-below:has(> #homeGoals.hidden) { grid-template-columns: minmax(0, 1fr); }
.eh-below .eh-card { grid-column: auto; grid-row: auto; max-height: none; margin: 0; padding: 18px 20px 10px; border-color: var(--eh-line); border-radius: 20px; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); }
.eh-foot { margin-top: 28px; color: #a5a094; font-size: 12px; letter-spacing: 0.14em; text-align: center; }

/* 幅のせまいパソコン・タブレット */
@media (max-width: 1023px) {
  .admin-wrap.eh-main { padding: 22px 24px 40px; }
  .eh-tiles { gap: 14px; }
  .eh-ic { width: 72px; height: 72px; border-radius: 22px; }
  .eh-ic svg { width: 36px; height: 36px; }
  .eh-label { font-size: 24px; }
  .eh-desc { font-size: 12.5px; }
}
@media (max-width: 899px) {
  .eh-below { grid-template-columns: minmax(0, 1fr); }
}

/* スマホ: いちばん上に日付、その下にあいさつ。ボタンは2列 */
@media (max-width: 640px) {
  .admin-wrap.eh-main { padding: 14px 16px 32px; }
  .home-top.eh-top { flex-wrap: wrap; gap: 0; }
  .eh-when { order: 1; flex: 1; flex-direction: column; align-items: flex-start; gap: 0; padding: 0; border: 0; }
  .eh-date { font-size: 12.5px; }
  .eh-time { font-size: 26px; line-height: 1.15; }
  .eh-bell { order: 2; width: 44px; height: 44px; border-radius: 13px; }
  .eh-top .m-menu-btn { order: 3; min-height: 44px; margin-left: 8px; padding: 0 13px; border-radius: 13px; font-size: 13px; }
  .eh-pop { order: 4; }
  .eh-hello { order: 5; flex: 0 0 100%; margin-top: 16px; }
  .eh-hello-line { font-size: 21px; }
  .eh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
  .eh-tile { aspect-ratio: 1 / 1; gap: 10px; padding: 12px 10px 18px; border-radius: 22px; }
  .eh-tile::after { height: 5px; }
  .eh-ic { width: 64px; height: 64px; border-radius: 20px; }
  .eh-ic svg { width: 33px; height: 33px; }
  .eh-label { font-size: 21px; letter-spacing: 0.03em; }
  .eh-desc { margin-top: -4px; font-size: 12px; line-height: 1.45; }
  .eh-badge, .eh-tag-soon { display: none; }
  .eh-dot { position: absolute; top: -7px; right: -7px; display: block; min-width: 24px; height: 24px; padding: 0 6px; border: 2px solid #fff; border-radius: 999px; background: var(--eh-red); color: #fff; font-size: 12px; font-style: normal; font-weight: 800; line-height: 20px; }
  .eh-tile.is-soon { gap: 6px; padding-top: 10px; }
  .eh-note { margin-top: 0; padding: 4px 8px; font-size: 12px; line-height: 1.45; }
  .eh-below { margin-top: 20px; gap: 14px; }
}
@media (max-width: 370px) {
  .eh-label { font-size: 18px; }
  .eh-desc { display: none; }
}

/* 査定のホームのボタン3つ（2026-10-15 ユーザー「査定を入力する・査定一覧・プライシングをする（権限のない人は表示なし）」）。
   ホームと同じ黒×金の .eh-tile。パソコンは横に並べる（プライシングがない人は2つ）、スマホは縦に1つずつ（絵が左・字が右） */
.eh-tiles.ap-hub { max-width: none; margin: 14px 0 18px; }
.ap-hub:has(> #apGoPricing.hidden) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.ap-s2 .ap-home:has(.ap-hub) { max-width: 980px; }
.ap-hub .eh-tile { aspect-ratio: auto; min-height: 260px; }
@media (min-width: 641px) {
  .ap-hub .eh-label { font-size: 26px; }
  .ap-hub .eh-desc { font-size: 13px; }
}
.ap-hub-text { display: block; }
.ap-hub .eh-desc { margin-top: 6px; }
button.eh-tile, button.eh-tile:hover { width: auto; margin: 0; background: #fff; color: var(--eh-ink); font-family: inherit; font-weight: inherit; line-height: inherit; cursor: pointer; }
button.eh-tile:disabled { background: #fff; opacity: 0.7; cursor: wait; }
@media (max-width: 640px) {
  .eh-tiles.ap-hub, .ap-hub:has(> #apGoPricing.hidden) { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ap-hub .eh-tile { flex-direction: row; justify-content: flex-start; gap: 16px; min-height: 0; padding: 16px 18px 20px; text-align: left; }
  .ap-hub .eh-label { font-size: 22px; }
  .ap-hub .eh-desc { margin-top: 2px; font-size: 12.5px; }
}

/* ===== 査定の画面 S3「黒×金」（2026-10-15 ユーザー「査定の画面少しスタイリッシュにできる？」）=====
   ホームと同じ色にそろえる: 地はあたたかい白、カードは白に影（線はなし）、大事なボタンは黒に金の字、
   アクセント（線・STEP・印）は金。注意（差し戻し・足りない・価格待ちの数・傷）は赤のまま。
   S2 の上に重ねているだけなので、戻すときはこの段を消せばよい */
body.ap-s2 { --aps-red: #a8843f; --aps-red-dark: #8a6a2c; --aps-gold: #c9a35a; --aps-gold-l: #f1dfb3; --aps-black: #17171a; --aps-line: #e8e4da; --aps-soft: #f6f3ec; --aps-warn: #d6312a; --aps-shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.05); background: #f3f1ec; }
/* 見出しの上に小さな金の英字。右上の「メニュー」は黒（ホームと同じ） */
body.ap-s2.theme-b1 .admin-header h1::before { content: "APPRAISAL"; display: block; margin: 0 0 3px; padding: 0; border: 0; background: none; color: var(--aps-gold); font-size: 12px; font-weight: 800; letter-spacing: 0.34em; line-height: 1; }
body.ap-s2 .admin-header h1 { letter-spacing: 0.02em; }
body.ap-s2 .m-menu-btn { border-color: var(--aps-black); background: var(--aps-black); color: #fff; }
body.ap-s2 .m-menu-btn:hover { background: #2a2a30; }
body.ap-s2 .m-home-btn { border-color: var(--aps-line); }

/* カード（白に影） */
body.ap-s2 .panel { border: 0; border-radius: 22px; background: #fff; box-shadow: var(--aps-shadow); }
body.ap-s2 .ap-home-stat { border: 0; border-radius: 18px; box-shadow: var(--aps-shadow); }
body.ap-s2 .ap-home-stat:hover { background: #fffdf8; }
body.ap-s2 .ap-home-stat.is-red b { color: var(--aps-warn); }

/* 一覧 */
body.ap-s2 .ap-card { border: 0; border-radius: 18px; background: #fff; box-shadow: var(--aps-shadow); transition: box-shadow 0.15s, transform 0.15s; }
body.ap-s2 .ap-card:hover { border: 0; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20, 20, 20, 0.05), 0 14px 32px rgba(20, 20, 20, 0.08); }
body.ap-s2 .ap-chip { border-color: var(--aps-line); background: #fff; }
body.ap-s2 .ap-chip.is-on, body.ap-s2 .ap-chip.is-on:hover { border: 1.5px solid var(--aps-black); background: var(--aps-black); color: #fff; }
body.ap-s2 .ap-chip.is-on .ap-chip-n { background: var(--aps-gold); color: var(--aps-black); }
body.ap-s2 .ap-search { border-color: var(--aps-line); background: #fff; }
body.ap-s2 button.ap-new-sub { border: 1px solid var(--aps-line); background: #fff; box-shadow: var(--aps-shadow); }
body.ap-s2 button.ap-new-sub:hover { background: #fffdf8; }

/* 入力: 上の項目の名前（今の項目は黒に金の字、そろった項目は金の✓） */
body.ap-s2 .ap-progress { background: rgba(243, 241, 236, 0.97); }
body.ap-s2 .ap-step { border-color: var(--aps-line); background: #fff; }
body.ap-s2 .ap-step:hover { background: #fffdf8; }
body.ap-s2 .ap-step.is-done { border-color: #e6d6b2; background: #fffaf0; color: #6f5420; }
body.ap-s2 .ap-step.is-current, body.ap-s2 .ap-step.is-current:hover { border: 1.5px solid var(--aps-black); background: var(--aps-black); color: var(--aps-gold-l); }
body.ap-s2 .ap-sec.is-done .ap-num::after { color: var(--aps-red); }
/* 大きなボタン（車検証を撮る など）は黒に金の字 */
body.ap-s2 .ap-big, body.ap-s2 .ap-plate-row .ap-big { border: 0; background: linear-gradient(145deg, #2c2c32, #121215); color: var(--aps-gold-l); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.55); }
body.ap-s2 .ap-big:hover, body.ap-s2 .ap-plate-row .ap-big:hover { background: #0b0b0d; }
body.ap-s2 .ap-big:disabled { opacity: 0.5; }
body.ap-s2 .ap-big-sub, body.ap-s2 .ap-check-btn { border-color: var(--aps-line); }
body.ap-s2 .ap-big-sub:hover, body.ap-s2 .ap-check-btn:hover { background: #fffdf8; }
/* 選んだボタンは黒（そのまま）。傷の程度を選んだら金 */
body.ap-s2 .ap-sev.is-on, body.ap-s2 .ap-sev.is-on:disabled { border-color: var(--aps-red); background: #fbf3e2; color: var(--aps-red-dark); }
/* 写真の枠: 点線、＋は金 */
body.ap-s2 .ap-slot.is-required:not(.has-photo) .ap-slot-main { border-color: #e3c88f; }
/* 下のバー: 次へ・価格をお願いする＝黒に金の字 */
body.ap-s2 .ap-bottom { background: linear-gradient(0deg, #f3f1ec 75%, rgba(243, 241, 236, 0.92)); }
body.ap-s2 .ap-bottom button.ap-prev { border-color: var(--aps-line); }
body.ap-s2 .ap-bottom button.ap-next, body.ap-s2 .ap-bottom #apSubmit { background: linear-gradient(145deg, #2c2c32, #121215); color: var(--aps-gold-l); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.55); }
body.ap-s2 .ap-bottom button.ap-next:hover, body.ap-s2 .ap-bottom #apSubmit:hover { background: #0b0b0d; }

/* 価格を決める・決まった価格: 枠は金、確定・成約・送るのボタンは黒に金の字 */
body.ap-s2.theme-b1 .panel.ap-pricing { border: 1.5px solid var(--aps-gold); }
body.ap-s2.theme-b1 .panel.ap-priced { border: 1.5px solid var(--aps-black); }
body.ap-s2 .ap-pricing .ap-big, body.ap-s2 button.ap-contract-btn, body.ap-s2 .ap-dialog-actions button:not(.btn-ghost), body.ap-s2 #apReportShare { border: 0; background: linear-gradient(145deg, #2c2c32, #121215); color: var(--aps-gold-l); }
body.ap-s2 .ap-pricing .ap-big:hover, body.ap-s2 button.ap-contract-btn:hover, body.ap-s2 .ap-dialog-actions button:not(.btn-ghost):hover, body.ap-s2 #apReportShare:hover { background: #0b0b0d; }
body.ap-s2 .ap-pricing .ap-big:disabled { opacity: 0.45; }
/* プライシング画面（左の依頼の一覧）: 英字と選んでいる依頼は金 */
body.ap-s2 .ap-dq-en { color: var(--aps-gold); }
body.ap-s2 .ap-dq-item.is-active { background: #fbf4e4; box-shadow: inset 4px 0 0 var(--aps-gold); }
body.ap-s2 .ap-paper-hint { color: var(--aps-red-dark); }
body.ap-s2 .ap-pv-th.is-on { border-color: var(--aps-gold); }
/* 査定の画面の中だけ: グレードの説明の箱（青）と「○○でログイン中」（緑）も金の色に */
body.ap-s2 .gl-box { border: 0; border-left: 3px solid var(--aps-gold); border-radius: 12px; background: #faf6ec; }
body.ap-s2 .gl-grade { border-left-color: var(--aps-gold); background: #faf6ec; }
body.ap-s2 .gl-grade a { color: #6f5420; }
body.ap-s2 .gl-box a, body.ap-s2 .gl-box .ap-link-btn { color: #6f5420; }
body.ap-s2 .gl-box button.gl-go { border-color: var(--aps-black); color: var(--aps-black); }
body.ap-s2 .m-store-btn { border-color: #e6d6b2; background: #fffaf0; color: #6f5420; }
body.ap-s2 .m-store-btn:hover { background: #fbf1dc; }
body.ap-s2 .m-store-btn svg { color: #a8843f; }
/* ホームの「スタッフ／管理者」の切り替え（2026-10-15。管理者以上だけ。あいさつの横）*/
.eh-hello-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.eh-mode { display: inline-flex; flex: none; padding: 3px; border: 1px solid var(--eh-line); border-radius: 999px; background: #fff; }
.eh-mode button, .eh-mode button:hover { width: auto; margin: 0; padding: 5px 14px; border: 0; border-radius: 999px; background: transparent; color: var(--eh-sub); font-family: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.3; cursor: pointer; }
.eh-mode button:hover:not(.is-on) { color: var(--eh-ink); }
.eh-mode button.is-on, .eh-mode button.is-on:hover { background: var(--eh-ink); color: #f1dfb3; cursor: default; }
.eh-mode.is-busy { opacity: 0.6; pointer-events: none; }
/* 査定のホームの「設定」（2026-10-15。査定を使える人・プライシング担当のチェック。開発者だけ）*/
.ap-settings .ap-set-h { margin: 16px 0 4px; font-size: 1rem; font-weight: 800; }
.ap-settings .ap-set-h:first-of-type { margin-top: 10px; }
.ap-settings { max-width: 980px; margin-left: auto; margin-right: auto; }
.ap-pricer-list { display: grid; gap: 12px; margin: 8px 0 12px; }
/* 全店舗の担当・店舗ごとの担当（名前の札を押して入れる。入っている札は黒に金の字）*/
.ap-ps-sec { padding: 12px 14px; border: 1px solid #ece7dc; border-radius: 14px; background: #fff; }
.ap-ps-sec[data-scope="all"] { border-color: #e6d6b2; background: #fffaf0; }
.ap-ps-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 8px; }
.ap-ps-title b { font-size: 0.95rem; }
.ap-ps-count { color: #6f5420; font-size: 0.78rem; font-weight: 700; }
.ap-ps-count.is-empty { color: #d6312a; }
.ap-ps-count.is-empty::after { content: "（担当がいません）"; }
.ap-ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ap-ps-chip { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid #e3ddd0; border-radius: 999px; background: #fff; cursor: pointer; user-select: none; }
.ap-ps-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.ap-ps-chip:has(input:focus-visible) { outline: 2px solid #c9a35a; outline-offset: 2px; }
.ap-ps-name { font-size: 0.88rem; font-weight: 700; color: #17171a; }
.ap-ps-role { color: #8a8a92; font-size: 0.7rem; font-weight: 600; }
.ap-ps-chip:has(input:checked) { border-color: #17171a; background: #17171a; }
.ap-ps-chip:has(input:checked) .ap-ps-name { color: #f1dfb3; }
.ap-ps-chip:has(input:checked) .ap-ps-role { color: #b9a77e; }
.ap-ps-chip:has(input:checked)::before { content: "\2713"; color: #c9a35a; font-size: 0.8rem; font-weight: 800; }
.ap-set-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-set-actions button { width: auto; margin: 0; }
body.ap-s2 #apPricerSave { border: 0; background: linear-gradient(145deg, #2c2c32, #121215); color: #f1dfb3; }
body.ap-s2 #apPricerSave:hover { background: #0b0b0d; }
.ap-ps-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ap-ps-group + .ap-ps-group { margin-top: 8px; }
.ap-ps-cap { flex-basis: 100%; margin: 0; color: #8a6a2c; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; }
.ap-ps-more, .ap-ps-more:hover { width: auto; margin: 0; padding: 6px 12px; border: 1px dashed #d8cfbd; border-radius: 999px; background: transparent; color: #6f5420; font-family: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
/* 外装色（系統）の横の「車検証の色：○○」（2026-10-15）*/
.ap-shaken-color { display: block; margin: 2px 0 2px; color: #8a6a2c; font-size: 0.78rem; font-weight: 700; }
.ap-shaken-color:empty { display: none; }
/* 車両情報の区の中の「外まわり」「内装・装備」の小見出し（2026-10-15）*/
.ap-h3.ap-h3-part { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; color: #6f5420; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.12em; }
.ap-h3.ap-h3-part::after { content: ""; flex: 1; height: 1px; background: #e8e4da; }
.ap-h3.ap-h3-part#apPartMeter { margin-top: 4px; }
/* 価格が決まったあとの「成約・未成約・検討中」と、一覧のカードの「成約・未成約」（2026-10-15）*/
.ap-decide-ttl { margin: 14px 0 6px; font-size: 0.92rem; font-weight: 800; }
.ap-decide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ap-decide > button[type="button"], body.ap-s2 .ap-decide > button.ap-contract-btn { box-sizing: border-box; width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 8px 4px; border-radius: 14px; font-size: 1rem; font-weight: 800; white-space: nowrap; }
.ap-card-decide { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e8e4da; }
.ap-card-decide button { flex: 1; width: auto; margin: 0; padding: 9px 12px; border-radius: 12px; font-family: inherit; font-size: 0.92rem; font-weight: 800; cursor: pointer; }
.ap-card-decide .ap-card-yes, .ap-card-decide .ap-card-yes:hover { border: 0; background: linear-gradient(145deg, #2c2c32, #121215); color: #f1dfb3; }
.ap-card-decide .ap-card-no, .ap-card-decide .ap-card-no:hover { border: 1px solid #e3ddd0; background: #fff; color: #17171a; }
.ap-status.is-on_hold { background: #fff4e0; color: #8a5a00; }
/* 契約キャンセル（2026-10-15）: 案件一覧のボタンと見出しの横のリンク、案件の画面の帯と欄、キャンセル案件のページ */
.deal-cancel-btn, .deal-cancel-btn:hover { width: auto; margin: 4px 0 0; padding: 4px 10px; border: 1px solid #fecaca; border-radius: 8px; background: #fff; color: #b91c1c; font-size: 0.78rem; font-weight: 700; }
.deal-cancel-btn:hover { background: #fef2f2; }
.deal-cancelled-link { margin: 0 auto 0 12px; color: #b91c1c; font-size: 0.82rem; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.cancel-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 14px; background: #fef2f2; color: #991b1b; }
.cancel-banner p { flex: 1 1 260px; margin: 0; font-size: 0.9rem; font-weight: 700; line-height: 1.6; }
.cancel-banner button { width: auto; margin: 0; }
body.deal-cancelled #dealSteps { display: none !important; }
.cancel-panel .cancel-reason-label { display: block; margin: 8px 0 10px; font-weight: 700; }
.cancel-panel .cancel-reason-label textarea { display: block; width: 100%; margin-top: 4px; }
.cancel-panel #cancelDealBtn { width: auto; }
.cancelled-back { margin: 0 0 8px; }
.cancelled-back a { color: #1d4ed8; font-weight: 700; }
.cancelled-lead { margin: 0 0 10px; }
.cancelled-search { width: 100%; max-width: 520px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; font-size: 16px; }
.cancelled-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.cancelled-card { padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.cancelled-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.cancelled-badge { padding: 2px 9px; border-radius: 999px; background: #fee2e2; color: #b91c1c; font-size: 0.75rem; font-weight: 800; }
.cancelled-store { padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: 0.75rem; font-weight: 700; }
.cancelled-when { margin-left: auto; color: #6b7280; font-size: 0.78rem; }
.cancelled-name { display: inline-block; margin: 2px 0 4px; color: #1d4ed8; font-size: 1.1rem; font-weight: 800; text-decoration: underline; }
.cancelled-facts, .cancelled-who { margin: 2px 0; color: #4b5563; font-size: 0.85rem; }
.cancelled-reason { margin: 6px 0; padding: 8px 10px; border-radius: 10px; background: #fef2f2; color: #7f1d1d; font-size: 0.88rem; }
.cancelled-undo { width: auto; margin-top: 8px; }
/* 装備の選ぶ欄（ナビ・ツインモニター・カメラ・エアコン・ETC。2026-10-15）*/
.ap-eq-rows { margin: 4px 0 14px; padding: 10px 12px 4px; border: 1px solid #ece7dc; border-radius: 14px; background: #fffdf8; }
.ap-eq-row.is-sub { margin-left: 14px; padding-left: 10px; border-left: 3px solid #e6d6b2; }
.ap-eq-text { display: block; margin: 0 0 10px 14px; padding-left: 10px; border-left: 3px solid #e6d6b2; font-size: 0.88rem; }
.ap-eq-text input { margin-top: 2px; }
.ap-eq-fixed { margin: 2px 0 8px; padding: 8px 12px; border-radius: 10px; background: #f6f3ec; color: #6f5420; font-size: 0.9rem; font-weight: 700; }
.ap-eq-subh { margin: 10px 0 2px; color: #6f5420; font-size: 0.85rem; font-weight: 800; }
/* 展開図をページの中に（2026-10-15）。PC は図と操作を横に、スマホは図の下に操作 */
.ap-dg-inline { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 1fr); gap: 0; margin: 4px 0 12px; border: 1px solid #e5e2da; border-radius: 12px; overflow: hidden; background: #fff; }
.ap-dg-inline .ap-dg-svg { padding: 6px; touch-action: manipulation; background: #fbfaf7; }
.ap-dg-inline .ad-svg { width: 100%; height: auto; max-height: 78vh; display: block; }
.ap-dg-inline .ap-dg-tools { padding: 12px 14px; border-left: 1px solid #e5e2da; overflow: visible; }
.ap-dg-inline .ap-dg-tools .ap-choices { margin: 4px 0 8px; }
@media (max-width: 760px) {
  .ap-dg-inline { grid-template-columns: 1fr; }
  .ap-dg-inline .ap-dg-tools { border-left: 0; border-top: 1px solid #e5e2da; }
  .ap-dg-inline .ad-svg { max-height: 70vh; }
}
.ad-tire { cursor: pointer; }
.ad-tire .ad-tire-out { fill: #2b2b30; stroke: #17171a; stroke-width: 2; }
.ad-tire .ad-tire-in { fill: #4a4a52; stroke: #6b6b74; stroke-width: 1.5; }
.ad-tire .ad-tire-v { fill: #fff; font-size: 14px; font-weight: 800; pointer-events: none; }
.ad-tire.is-set .ad-tire-v { font-size: 17px; }
.ad-tire.is-deep .ad-tire-in { fill: #2f7d4f; stroke: #8fd3a8; }
.ad-tire.is-half .ad-tire-in { fill: #a8843f; stroke: #e5c98a; }
.ad-tire.is-shallow .ad-tire-in { fill: #c0392b; stroke: #f0a39b; }
.ad-tire:hover .ad-tire-out, .ad-tire:focus .ad-tire-out { stroke: #a8843f; stroke-width: 4; }
.ad-tire:focus { outline: none; }
.ad-tire.is-selected .ad-tire-out { stroke: #176bff; stroke-width: 5; }
.ad-svg.is-readonly .ad-tire { cursor: default; }
.ad-tire .ad-tire-y { fill: #6f5420; font-size: 14px; font-weight: 800; pointer-events: none; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.ap-dg-inline .ap-tire-year { max-width: 220px; margin: 6px 0 2px; }
/* 査定票のバランス（2026-10-15 ユーザー「査定表のバランスが悪いから直して 展開図を少し大きく」）:
   中の段は欄の高さをならす（エアコンの下だけ大きく空かない）・展開図の幅 300 → 370px */
.ap-paper .pp-mid .pp-col:not(.pp-sales) > * { flex: 1 1 auto; }
.ap-paper .pp-low { grid-template-columns: minmax(0, 1fr) 370px; }
.ap-paper .is-circle .pp-v { flex: 0 0 auto; margin-top: auto; }
/* 車検の残り・職権打刻・輸入車（2026-10-15）*/
.ap-shaken-left, .ap-shokken { display: block; margin: 2px 0; color: #6f5420; font-size: 0.8rem; font-weight: 700; }
.ap-shaken-left:empty, .ap-shokken:empty { display: none; }
.ap-shaken-left.is-expired { color: #c00; }
.ap-import { margin: 0 0 6px; padding: 4px 0 4px 12px; border-left: 3px solid #e5d3a8; }
.ap-import .ap-model-year { max-width: 220px; }
.ap-paper .pp-shaken-left { font-size: 12px; font-weight: 800; color: #374151; }
.ap-paper .pp-shaken-left.is-expired { color: #c00; }
.shokken-note { display: block; margin-top: 2px; color: #6f5420; font-size: 0.82rem; font-weight: 700; }
/* 溝の○分山（1〜10）は5つずつ2段（2026-10-15）*/
.ap-dg-inline .ap-tread { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ap-dg-inline .ap-tread .ap-choice { min-width: 0; padding-left: 4px; padding-right: 4px; }
.ad-tire.is-set .ad-tire-v { font-size: 15px; }
/* 査定票の外色の下に客観色（2026-10-15）*/
.ap-paper .pp-objcolor { font-size: 12px; font-weight: 800; color: #374151; }
/* 査定票の折り返し（2026-10-15 確かめ役の報告）: No は1行に、タイヤは1本ずつ */
.ap-paper .pp-no .pp-v { font-size: 17px; letter-spacing: 0; white-space: nowrap; }
.ap-paper .pp-nowrap { white-space: nowrap; }
/* 確かめ役の報告（2026-10-15）: 10分山を1行に・PCの車検証の欄は入力欄の高さをそろえる */
.ap-dg-inline .ap-tread .ap-choice { white-space: nowrap; font-size: 0.9rem; }
.ap-sec .ap-grid { align-items: end; }
/* スマホ・タブレットのプライシング: 下に貼りつく価格の箱をたたむ（2026-10-15）*/
.ap-price-fold, .ap-price-fold-line { display: none; }
@media (max-width: 1099px) {
  .ap-pricing .ap-price-box .ap-price-fold { display: inline-flex; align-items: center; position: absolute; top: 6px; right: 8px; width: auto; min-width: 0; min-height: 30px; margin: 0; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.78rem; font-weight: 700; box-shadow: none; z-index: 1; }
  .ap-pricing .ap-price-box.is-folded { padding: 6px 10px; }
  .ap-pricing .ap-price-box.is-folded > :not(.ap-price-fold):not(.ap-price-fold-line) { display: none; }
  .ap-pricing .ap-price-box.is-folded .ap-price-fold-line { display: block; width: 100%; min-height: 34px; margin: 0; padding: 4px 72px 4px 2px; border: 0; background: none; color: #111827; font-size: 0.92rem; font-weight: 800; text-align: left; box-shadow: none; }
}
/* セールスポイントは2列（2026-10-15）*/
.ap-paper .pp-stars { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 8px; }
.ap-paper .pp-stars .pp-star { font-size: 12px; overflow-wrap: anywhere; }
/* 査定を使える人（選んだ人）の名前の札（2026-10-15）*/
.ap-access-people { margin: 8px 0 4px; padding: 12px 14px; border: 1px solid #ece7dc; border-radius: 14px; background: #fff; }
.ap-access-list .ap-ps-group + .ap-ps-group { margin-top: 10px; }
/* 査定票を2本の指で広げたとき（2026-10-15）: 実物大と同じく、枠の中で横に動かせる */
.ap-paper-wrap.is-zoomed { overflow-x: auto; cursor: zoom-out; -webkit-overflow-scrolling: touch; }
/* 指で広げている間は、票が枠の上下にはみ出して見えてよい（横は切る）。ほかの物より上に描く */
.ap-paper-wrap.is-pinching { overflow-x: clip; overflow-y: visible; position: relative; z-index: 5; }
.ap-paper-wrap.is-pinching .ap-paper { position: relative; }
/* 査定票の印刷・PDF（2026-10-15）: 印刷のあいだは査定票だけを出す。画面では見せない */
.ap-print-sheet { display: none; }
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  body.ap-printing { background: #fff !important; }
  body.ap-printing > *:not(#apPrintSheet) { display: none !important; }
  body.ap-printing #apPrintSheet { display: block; }
  #apPrintSheet .ap-paper-tools, #apPrintSheet .ap-sheet-need { display: none !important; }
  #apPrintSheet .ap-paper-wrap { overflow: visible !important; }
  #apPrintSheet .ap-paper { zoom: 1 !important; margin: 0 auto; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* 案件の画面の「この案件の査定を見る」（2026-10-15）*/
.deal-appraisal-link { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 10px; padding: 10px 14px; border: 1px solid #e6d6b2; border-radius: 12px; background: #fffaf0; }
.deal-appraisal-link a { color: #6f5420; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.deal-appraisal-link span { color: #6b7280; font-size: 0.85rem; }
/* 送ったあとの査定票の見せ方（2026-10-15）: 入力した内容（くわしく）は閉じておく */
body.ap-sheet-mode:not(.ap-show-detail) #apForm, body.ap-sheet-mode:not(.ap-show-detail) #apProgress { display: none; }
/* スマホの展開図: 選んでいる間は、操作の所を画面の下からせり上げる（2026-10-15）*/
.ap-dg-sheet-close { display: none; }
@media (max-width: 760px) {
  .ap-dg-inline .ap-dg-tools.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 62vh; overflow-y: auto; margin: 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border: 0; border-top: 2px solid #17171a; border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -10px 28px rgba(17, 24, 39, 0.22); animation: apSheetUp 0.18s ease-out; -webkit-overflow-scrolling: touch; }
  .ap-dg-tools.is-sheet .ap-dg-sheet-close { display: inline-flex; align-items: center; float: right; width: auto; min-width: 0; min-height: 34px; margin: -2px 0 6px 8px; padding: 0 12px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.82rem; font-weight: 700; box-shadow: none; }
  .ap-dg-tools.is-sheet .ap-dg-photo .ap-big-sub { min-height: 50px; }
}
@keyframes apSheetUp { from { transform: translateY(30%); opacity: 0.6; } to { transform: none; opacity: 1; } }
/* 査定票のマイナスの所は赤字（2026-10-15）・展開図の下の自由に書く欄 */
.ap-paper .is-minus { color: #c00; }
.ap-ext-note { display: block; margin-top: 12px; }
/* 2026-10-15: スマホの展開図（見るだけ）で傷を押したときの写真は小さく（押すと全画面）。全画面の「← 戻る」は左上 */
@media (max-width: 760px) {
  .ap-dg-tools .ap-dg-ro-photo { width: auto; max-width: 70%; max-height: 150px; object-fit: contain; }
}
.ap-full .ap-full-top { gap: 10px; }
.ap-full button.ap-full-close { order: -1; flex: 0 0 auto; }

/* 便利機能「ローン審査」（loan.html。2026-10-15） */
.loan-fields { display: flex; flex-direction: column; gap: 12px; }
.loan-fields textarea { margin: 0; width: 100%; font-family: inherit; font-size: 16px; font-weight: 400; line-height: 1.6; }
.loan-url { margin: 12px 0 0; font-size: 0.82rem; color: #4b5563; word-break: break-all; }
.loan-msg { margin: 10px 0 0; color: #b91c1c; font-size: 0.9rem; }
.loan-h2 { margin: 0 0 8px; font-size: 1rem; }
.loan-empty { margin: 4px 0; color: #6b7280; font-size: 0.9rem; }
.loan-note { margin: 12px 0 0; font-size: 0.8rem; color: #6b7280; line-height: 1.6; }
.loan-meta { font-size: 0.8rem; color: #6b7280; font-weight: 400; }
.loan-item { margin: 0 0 8px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
.loan-item > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 12px; cursor: pointer; }
.loan-item[open] > summary { border-bottom: 1px solid #f3f4f6; }
.loan-answers { display: grid; grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr); gap: 6px 14px; margin: 0; padding: 10px 12px; font-size: 0.9rem; }
.loan-answers dt { color: #4b5563; font-weight: 700; }
.loan-answers dd { margin: 0; white-space: pre-wrap; word-break: break-word; }
.loan-answers dd.is-empty { color: #9ca3af; }
.loan-item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0 12px 10px; }
.loan-result { margin: 12px 12px 8px; padding-top: 6px; border-top: 1px dashed #e5e7eb; }
.loan-result .loan-sec { margin-left: 0; padding-left: 0; }
.loan-result-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.loan-result-btn.is-ok { color: #047857; border-color: #a7f3d0; }
.loan-result-btn.is-ng { color: #b91c1c; border-color: #fecaca; }
.loan-result-btn.is-call { color: #1d4ed8; border-color: #bfdbfe; }
.loan-result-btn.is-on { background: #f1f5f9; font-weight: 800; }
.loan-result-form { margin-top: 10px; }
.loan-result-form textarea { width: 100%; font-size: 16px; }
.loan-result-msg { margin: 6px 0 0; font-size: 0.85rem; color: #b91c1c; }
.loan-result-log { margin: 8px 0 0; padding-left: 1.2em; font-size: 0.82rem; color: #4b5563; }
.loan-result-chip { padding: 1px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; background: #f3f4f6; color: #374151; }
.loan-result-chip.is-ok { background: #d1fae5; color: #065f46; }
.loan-result-chip.is-ng { background: #fee2e2; color: #991b1b; }
.loan-result-chip.is-call { background: #dbeafe; color: #1e40af; }
.loan-del { margin-left: auto; padding: 5px 12px; font-size: 0.8rem; }
.loan-print { margin-left: auto; padding: 5px 14px; font-size: 0.85rem; }
.loan-print + .loan-del { margin-left: 0; }
.loan-wait .loan-del + .loan-del { margin-left: 0; }
.loan-sec { margin: 0; padding: 10px 12px 0; font-size: 0.85rem; font-weight: 800; color: #7a5c22; }
.loan-files { display: flex; flex-wrap: wrap; gap: 8px; }
.loan-file { display: flex; align-items: center; justify-content: center; width: 120px; height: 84px; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 8px; background: #f9fafb; font-size: 0.8rem; font-weight: 700; color: #374151; text-decoration: none; }
.loan-file img { width: 100%; height: 100%; object-fit: cover; }
.loan-waiting { margin-top: 10px; font-size: 0.9rem; }
.loan-waiting > summary { cursor: pointer; color: #374151; font-weight: 700; }
.loan-waiting ul { margin: 8px 0 0; padding: 0; list-style: none; }
.loan-wait { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
@media (max-width: 640px) {
  .loan-answers { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .loan-answers dd { margin-bottom: 8px; }
}

/* ===== 便利機能「カラーの見本の表」（開発者だけ。2026-10-15。color-book.html・admin-color-book.js） ===== */
.cb-wrap { max-width: 900px; }
.cb-tools { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.cb-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: #4b5563; min-width: 180px; }
.cb-field.cb-grow { flex: 1 1 220px; }
.cb-field select, .cb-field input { font-size: 1rem; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.cb-count { margin: 10px 0 0; font-size: 0.9rem; color: #374151; font-weight: 600; }
.cb-maker { margin-top: 14px; }
.cb-maker-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
body.theme-b1:not(.help-page) .panel h2.cb-maker-name, .cb-maker-name { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #111827; font-size: 1.15rem; }
.cb-maker-n { font-size: 0.85rem; color: #6b7280; }
.cb-plate { margin: 4px 0 10px; font-size: 0.88rem; color: #374151; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px 12px; }
.cb-plate summary { cursor: pointer; font-weight: 600; color: #1f2937; }
.cb-plate p { margin: 8px 0 0; line-height: 1.6; }
.cb-src { font-size: 0.8rem; color: #6b7280; word-break: break-all; }
.cb-table-wrap { overflow-x: auto; }
.cb-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.cb-table th { text-align: left; font-size: 0.8rem; color: #6b7280; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #e5e7eb; }
.cb-table td { padding: 7px 8px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.cb-code { white-space: nowrap; }
.cb-code-main { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.cb-code-short, .cb-en { display: block; font-size: 0.78rem; color: #6b7280; }
.cb-fam { white-space: nowrap; color: #374151; }
.cb-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid #cbd5e1; margin-right: 6px; vertical-align: -2px; }
.cb-swatch.is-two { background: linear-gradient(135deg, #111827 50%, #f8fafc 50%); }
.cb-swatch.is-none { background: repeating-linear-gradient(45deg, #fff 0 3px, #e5e7eb 3px 6px); }
@media (max-width: 640px) {
  .cb-table { font-size: 0.86rem; }
  .cb-table td, .cb-table th { padding: 6px 5px; }
}

/* ===== 査定: 骨格の部位の「？」と図（2026-10-15） ===== */
.ap-frame-q { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; padding: 0; border: 1px solid #cbd5e1; border-radius: 50%; background: #fff; color: #475569; font-size: 0.78rem; font-weight: 700; line-height: 1; cursor: pointer; vertical-align: 1px; }
.ap-frame-q:hover, .ap-frame-q:focus-visible { border-color: #1d4ed8; color: #1d4ed8; }
.ap-fh-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.55); }
.ap-fh-card { width: 100%; max-width: 420px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border-radius: 16px; padding: 16px 16px 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); }
.ap-fh-title { margin: 0 0 8px; font-size: 1.1rem; font-weight: 800; color: #111827; }
.ap-fh-fig { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 12px; padding: 6px; }
.ap-fh-svg { display: block; width: 100%; height: auto; }
.ap-fh-cap { font-size: 10px; fill: #6b7280; }
.ap-fh-front { font-size: 10px; fill: #6b7280; font-weight: 700; }
.ap-fh-body { fill: #fff; stroke: #94a3b8; stroke-width: 1.5; }
.ap-fh-wheel { fill: #e2e8f0; stroke: #94a3b8; stroke-width: 1.5; }
.ap-fh-part { fill: none; stroke: #cbd5e1; stroke-width: 4; stroke-linecap: round; }
.ap-fh-part.is-fill { fill: #f1f5f9; stroke-width: 1.5; }
.ap-fh-part.is-on { stroke: #dc2626; stroke-width: 6; }
.ap-fh-part.is-fill.is-on { fill: rgba(220, 38, 38, 0.18); stroke-width: 3; }
.ap-fh-text { margin: 10px 0 4px; font-size: 0.95rem; line-height: 1.6; color: #1f2937; }
.ap-fh-note { margin: 0 0 12px; font-size: 0.78rem; color: #6b7280; }
.ap-fh-close { display: block; width: 100%; padding: 11px; border: 0; border-radius: 10px; background: #1f2937; color: #fff; font-size: 1rem; font-weight: 700; cursor: pointer; }

/* ===== 展開図: 傷の種類ごとの色（2026-10-15 ユーザー「傷の種類によって色を変えて」）と手書き ===== */
/* A キズ=赤 / U へこみ=青 / B 傷を伴う凹み=紫 / W 補修跡・波=緑 / S サビ=茶 / C 腐食=こげ茶 / X 交換=黒 / Y 割れ=ピンク */
.k-A { --kc: #e1261c; --kd: #8f0e09; }
.k-U { --kc: #2563eb; --kd: #1e3a8a; }
.k-B { --kc: #7c3aed; --kd: #4c1d95; }
.k-W { --kc: #16a34a; --kd: #14532d; }
.k-S { --kc: #c2410c; --kd: #7c2d12; }
.k-C { --kc: #78350f; --kd: #451a03; }
.k-X { --kc: #111827; --kd: #000; }
.k-Y { --kc: #db2777; --kd: #831843; }
.k-sketch { --kc: #475569; --kd: #1e293b; }
.ad-pin[class*="k-"] circle:first-child { fill: var(--kc, #e1261c); stroke: var(--kd, #8f0e09); }
.ad-pin.is-selected[class*="k-"] circle:first-child { stroke: #176bff; stroke-width: 4; }
.ap-code[class*="k-"] { background: var(--kc, #e1261c); }
.ap-code-btn[class*="k-"] { border-color: color-mix(in srgb, var(--kc) 45%, #fff); }
.ap-code-btn[class*="k-"] b { color: var(--kc); }
.ap-code-btn.is-on[class*="k-"] { background: var(--kc); border-color: var(--kc); }
.ap-code-btn.is-on[class*="k-"] b, .ap-code-btn.is-on[class*="k-"] small { color: #fff; }
.ap-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.ap-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--kc); border: 1px solid var(--kd); }
.ad-stroke { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ap-sketch-btn { margin-bottom: 8px; }
/* 手書きの画面（全画面） */
body.ap-sk-open { overflow: hidden; }
.ap-sk-overlay { position: fixed; inset: 0; z-index: 9500; display: flex; flex-direction: column; background: #f8fafc; }
.ap-sk-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px 6px; font-size: 1.05rem; }
.ap-sk-stage { flex: 1 1 auto; min-height: 0; padding: 4px 12px; }
.ap-sk-svg { width: 100%; height: 100%; display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; touch-action: none; cursor: crosshair; }
.ap-sk-panel { fill: #fff; stroke: #586674; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ap-sk-marks { opacity: 0.45; pointer-events: none; }
.ap-sk-marks text { fill: #fff; font-size: 16px; font-weight: 900; }
.ap-sk-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ap-sk-bar { padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: #fff; border-top: 1px solid #e2e8f0; }
.ap-sk-colors { display: flex; gap: 8px; }
.ap-sk-color { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 2px solid #e2e8f0; border-radius: 12px; background: #fff; font-weight: 700; color: #1f2937; cursor: pointer; }
.ap-sk-color::before { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--pen); }
.ap-sk-color.is-on { border-color: var(--pen); background: color-mix(in srgb, var(--pen) 10%, #fff); }
.ap-sk-edit, .ap-sk-foot { display: flex; gap: 8px; }
.ap-sk-edit > *, .ap-sk-foot > * { flex: 1; min-height: 44px; }
.ap-sk-save { border: 0; border-radius: 12px; background: #111827; color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; }
/* 塗装（Pボケ・Pアセ・クリア浮き。2026-10-15）＝青緑。3文字の記号は字を小さく */
.k-P { --kc: #0d9488; --kd: #134e4a; }
.ad-pin text.is-long { font-size: 15px; }
.ap-code-btn.k-P b { font-size: 0.85rem; }
.ap-code.k-P { padding: 0 6px; font-size: 0.8rem; }
/* 記号のボタン: 見出しの右の枠の中で折り返す（2026-10-15） */
.ap-code-group { flex-wrap: nowrap; align-items: flex-start; }
.ap-code-group-label { flex: 0 0 auto; padding-top: 14px; }
.ap-code-group-btns { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ap-dg-tools .ap-codes { width: 100%; box-sizing: border-box; }

/* ===== 査定: チェックランプ（警告灯。2026-10-15） ===== */
.ap-lamps { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 14px; background: #fffbeb; }
.ap-lamps-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.ap-lamps-title { font-weight: 800; font-size: 0.92rem; color: #92400e; }
.ap-lamps-list-btn { padding: 5px 10px; border: 1px solid #f59e0b; border-radius: 999px; background: #fff; color: #92400e; font-size: 0.78rem; font-weight: 700; cursor: pointer; }
.ap-lamp-row { align-items: center; }
.ap-lamp-name { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font-size: 0.92rem; font-weight: 700; color: #1f2937; cursor: pointer; text-align: left; }
.ap-lamp-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 8px; background: #111827; }
.ap-lamp-ico svg { width: 26px; height: 26px; }
.ap-lamp-ico.is-amber { color: #fbbf24; }
.ap-lamp-ico.is-red { color: #f87171; }
.ap-lamp-card { max-width: 460px; }
.ap-lamp-grid { display: grid; gap: 8px; margin: 8px 0; }
.ap-lamp-cell { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.ap-lamp-cell .ap-lamp-ico { width: 52px; height: 52px; border-radius: 10px; }
.ap-lamp-cell .ap-lamp-ico svg { width: 40px; height: 40px; }
.ap-lamp-cell.is-item { border-color: #fcd34d; background: #fffbeb; }
.ap-lamp-cell.is-focus { border-color: #1d4ed8; box-shadow: 0 0 0 2px #bfdbfe; }
.ap-lamp-txt { display: flex; flex-direction: column; gap: 2px; font-size: 0.82rem; color: #4b5563; line-height: 1.5; }
.ap-lamp-txt b { font-size: 0.95rem; color: #111827; }
.ap-lamps-title { white-space: nowrap; }
.ap-lamp-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid #fde68a; }
.ap-lamp-row:first-of-type { border-top: 0; }
.ap-lamp-choices { flex-wrap: nowrap; margin: 0; }
.ap-lamp-choices .ap-choice { min-width: 0; padding-left: 14px; padding-right: 14px; }
.ap-lamp-row { flex-wrap: nowrap; }
.ap-lamp-name { flex: 1 1 auto; min-width: 0; }
.ap-lamp-name span:last-child { overflow-wrap: anywhere; }
.ap-lamp-choices .ap-choice { padding-left: 12px; padding-right: 12px; }
/* 査定票の傷の札も、種類の色（2026-10-15） */
.ap-paper .pp-dmg b[class*="k-"] { background: var(--kc); }
@media (max-width: 760px) { body.ap-dg-sheet-on { padding-bottom: 62vh; } }
/* 「まだ：…」の帯が出ている間は、ページの下に余白（帯がボタンにかぶらないように。2026-10-15） */
body:has(#apMissing:not(.hidden)) #apForm::after { content: ''; display: block; height: 72px; }
/* チェックランプ一覧: マスを押すと説明（2026-10-15） */
.ap-lamp-info { position: sticky; top: -16px; z-index: 1; margin: 8px -16px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e5e7eb; min-height: 64px; }
.ap-lamp-info-empty { margin: 14px 0; text-align: center; color: #6b7280; font-weight: 700; }
.ap-lamp-info-head { display: flex; align-items: center; gap: 12px; }
.ap-lamp-info-head .ap-lamp-ico { width: 64px; height: 64px; border-radius: 12px; }
.ap-lamp-info-head .ap-lamp-ico svg { width: 50px; height: 50px; }
.ap-lamp-info-name { display: flex; flex-direction: column; gap: 2px; }
.ap-lamp-info-name b { font-size: 1.1rem; color: #111827; }
.ap-lamp-color { font-size: 0.78rem; font-weight: 700; }
.ap-lamp-color.is-red { color: #b91c1c; }
.ap-lamp-color.is-amber { color: #b45309; }
.ap-lamp-info-desc { margin: 8px 0 4px; font-size: 0.9rem; line-height: 1.6; color: #1f2937; }
.ap-lamp-info-todo { margin: 0 0 4px; padding: 6px 10px; border-radius: 8px; background: #f8fafc; font-size: 0.84rem; line-height: 1.6; color: #374151; }
.ap-lamp-info-item { margin: 0; font-size: 0.78rem; color: #6b7280; }
.ap-lamp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.ap-lamp-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; font-size: 0.75rem; font-weight: 700; color: #374151; line-height: 1.3; text-align: center; cursor: pointer; }
.ap-lamp-tile .ap-lamp-ico { width: 46px; height: 46px; border-radius: 10px; }
.ap-lamp-tile .ap-lamp-ico svg { width: 36px; height: 36px; }
.ap-lamp-tile.is-item { border-color: #fcd34d; background: #fffbeb; }
.ap-lamp-tile.is-on { border-color: #1d4ed8; box-shadow: 0 0 0 2px #bfdbfe; }
.ap-code.k-P { white-space: nowrap; min-width: 0; padding: 0 8px; }

/* ===== 容量（2026-10-15。storage.html・admin-storage.js） ===== */
.su-wrap { max-width: 760px; }
.su-msg { margin: 12px 0; font-weight: 700; color: #374151; }
.su-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.su-label { flex: 1 1 10em; color: #4b5563; font-size: 0.9rem; }
.su-value { font-size: 1.05rem; color: #111827; }
.su-sub { flex-basis: 100%; font-size: 0.78rem; color: #6b7280; }
.su-bar { height: 12px; border-radius: 999px; background: #eef2f7; overflow: hidden; margin: 6px 0; }
.su-bar i { display: block; height: 100%; border-radius: 999px; background: #3b82f6; }
.su-bar.is-warn i { background: #f59e0b; }
.su-bar.is-danger i { background: #dc2626; }
.su-part { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.su-part-head { display: flex; align-items: baseline; gap: 10px; }
.su-part .su-bar { height: 8px; margin: 4px 0 2px; }
.su-left { margin: 10px 0 4px; padding: 10px 12px; border-radius: 12px; background: #ecfdf5; color: #065f46; font-size: 0.95rem; }
.su-left b { font-size: 1.3rem; }
.su-left.is-warn { background: #fffbeb; color: #92400e; }
.su-left.is-danger { background: #fef2f2; color: #991b1b; }
.su-note { margin: 6px 0 0; font-size: 0.8rem; color: #6b7280; }
.su-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.su-table th { text-align: left; font-size: 0.78rem; color: #6b7280; padding: 4px 6px; border-bottom: 1px solid #e5e7eb; }
.su-table td { padding: 6px; border-bottom: 1px solid #f1f5f9; }
.su-reload { margin-top: 10px; }
.su-disk-parts { margin-top: 10px; }
.su-h3 { margin: 14px 0 2px; font-size: 0.92rem; color: #111827; }
.su-bar.is-rest i { background: #9ca3af; }
.deal-expired { color: #b91c1c; font-weight: 700; }
.deal-extend { margin-left: 8px; }

/* アカウント管理: まとめて消す（2026-10-16） */
.user-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 6px 0 8px; }
.user-bulk .user-bulk-all { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; width: auto; margin: 0; white-space: nowrap; font-size: 0.9rem; }
.user-bulk .user-bulk-all input { width: auto; margin: 0; }
.user-sel-col { width: 36px; text-align: center; }
#userTable.no-select .user-sel-col { display: none; }

/* 査定票だけを画面いっぱいに（2026-10-16。admin-appraisal.js openSheetFull） */
dialog.ap-sheet-full { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #eef0f3; }
dialog.ap-sheet-full::backdrop { background: rgba(15, 23, 42, 0.6); }
.ap-sheet-full-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.ap-sheet-full-head b { font-size: 1.05rem; }
.ap-sheet-full-hint { flex: 1; font-size: 0.78rem; color: #6b7280; }
.ap-sheet-full-body { position: relative; height: calc(100dvh - 56px); overflow: auto; padding: 6px; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; -webkit-user-select: none; user-select: none; }
.ap-sheet-rot .ap-paper-wrap { overflow: visible; }
.ap-sheet-full-body .ap-sheet-outer { margin: 0; }
.ap-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 99999; max-width: 90vw; padding: 10px 16px; border-radius: 999px; background: rgba(17, 24, 39, 0.9); color: #fff; font-size: 0.88rem; font-weight: 700; pointer-events: none; }
/* アカウント管理の送信元メール: 店舗ごと（2026-10-16） */
.mail-store-h { margin: 14px 0 6px; font-size: 0.95rem; }
.mail-store-link { font-size: 0.82rem; white-space: nowrap; }
@media (max-width: 600px) { #storeFromList { grid-template-columns: 1fr; row-gap: 2px; } #storeFromList dd { margin-bottom: 10px; } }
/* 新しい色の確認（カラーの見本の表・開発者だけ。2026-10-16） */
.cb-watch-h { margin: 0 0 6px; font-size: 1.05rem; }
.cb-watch-lead { font-size: 0.86rem; color: #4b5563; margin: 0 0 8px; }
.cb-watch-status { font-size: 0.88rem; font-weight: 700; margin: 0 0 8px; }
.cb-watch-imports { display: flex; gap: 8px; align-items: flex-start; font-size: 0.86rem; margin-bottom: 8px; }
.cb-watch-imports input { width: auto; flex: 0 0 auto; margin-top: 3px; }
.cb-watch-msg { font-size: 0.86rem; color: #1d4ed8; min-height: 1em; }
.cb-watch-empty { font-size: 0.86rem; color: #6b7280; }
.cb-watch-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 10px 12px; margin-top: 8px; background: #fff; }
.cb-watch-head { margin-bottom: 6px; }
.cb-watch-model { color: #6b7280; font-size: 0.86rem; margin-left: 4px; }
.cb-watch-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cb-watch-row input { flex: 1 1 160px; font-size: 1rem; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 8px; }
.cb-watch-row select { font-size: 1rem; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; }
.cb-watch-src { display: inline-block; font-size: 0.82rem; margin-top: 6px; }
.cb-watch-btns { display: flex; gap: 8px; margin-top: 8px; }
.cb-extra { display: inline-block; margin-left: 6px; font-size: 0.75rem; color: #92400e; background: #fef3c7; border-radius: 999px; padding: 1px 8px; }
/* 17けたの車台番号のときの海外の照会サイト（査定。2026-10-16） */
.ap-vin-links { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: -4px 0 6px; }
.ap-vin-ttl { width: 100%; font-size: 0.8rem; color: #6b7280; }
/* AIの費用（開発者だけ。2026-10-16） */
.ai-days { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.ai-days .is-on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.ap-ai-cost { font-size: 0.8rem; color: #6b7280; margin: 4px 0 0; }
/* 内装の気になる所（なし／あり・場所→状態。2026-10-16 見落とし防止） */
.ap-int-row .ap-choice-label { display: flex; flex-direction: column; }
.ap-int-sub { font-size: 0.75rem; font-weight: 400; color: #6b7280; }
.ap-int-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.ap-int-row.is-need { background: #fff7ed; border: 1px solid #fdba74; border-radius: 12px; padding: 6px 8px; }
.ap-int-hint { margin: -4px 0 6px; font-size: 0.82rem; font-weight: 700; color: #b45309; }
.ap-int-step { margin: 8px 0 2px; font-size: 0.8rem; font-weight: 700; color: #374151; }
.ap-area.has-issue { border-color: #f59e0b; }
.ap-int-conds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.ap-int-cond { min-height: 48px; padding: 4px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #1f2937; font-weight: 700; font-size: 0.88rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ap-int-cond b { font-size: 0.75rem; }
.ap-int-cond.is-on { color: #fff; border-color: transparent; }
.ap-int-cond.sev-1 { background: #f59e0b; }
.ap-int-cond.sev-2 { background: #ea580c; }
.ap-int-cond.sev-3 { background: #dc2626; }
button.ap-tag { border: 0; cursor: pointer; }
.ap-int-none { font-size: 0.86rem; color: #374151; margin: 4px 0; }
/* お見積書をメールで送る（2026-10-16） */
.qd-dialog .qd-mail-wrap { display: block; margin-top: 8px; }
.qd-dialog .qd-mail-wrap > .qd-mail-btn { width: 100%; min-height: 46px; font-weight: 800; }
.qd-mail-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.qd-mail-row input { flex: 1 1 180px; min-width: 0; font-size: 1rem; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 10px; }
.qd-mail-row .qd-mail-send { min-width: 72px; min-height: 42px; border-radius: 10px; font-weight: 800; }
.qd-mail-note { flex: 1 0 100%; margin: 0; font-size: 0.82rem; color: #1d4ed8; }
.qd-mail-note:empty { display: none; }
/* 所在図の Google マップのキー（開発者だけ。2026-10-16） */
.sk-gmap { margin-top: 12px; padding: 10px 12px; border: 1px dashed #93c5fd; border-radius: 12px; background: #f8fbff; }
.sk-gmap-ttl { margin: 0 0 4px; font-weight: 700; font-size: 0.9rem; }
.sk-gmap .dm-error { overflow-wrap: anywhere; }
.sk-gmap-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-gmap-row input { flex: 1 1 220px; min-width: 0; font-size: 0.95rem; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; }
/* 車庫証明の入力を、申請書の紙と同じ並びに（2026-10-16 ユーザー「車庫証明の入力画面を車庫証明の紙みたいにして」） */
.sk-paper { margin: 10px 0 8px; padding: 14px 12px 12px; background: #fff; border: 1px solid #d6d3c9; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); color: #111; }
.sk-p-form { margin: 0 0 4px; font-size: 0.75rem; color: #444; }
.sk-p-title { margin: 0 0 10px; text-align: center; font-size: 1.12rem; font-weight: 700; letter-spacing: 0.35em; }
.sk-p-grid { border: 1.5px solid #111; }
.sk-p-row { border-top: 1px solid #111; }
.sk-p-row:first-child { border-top: 0; }
.sk-p-h { display: block; font-size: 0.78rem; font-weight: 700; color: #111; letter-spacing: 0.08em; }
.sk-paper input, .sk-paper select { width: 100%; box-sizing: border-box; margin: 0; padding: 7px 8px; border: 1px dashed #9ca3af; border-radius: 4px; background: #fffef8; font-size: 1rem; color: #111; }
.sk-paper input:focus, .sk-paper select:focus { outline: 2px solid #2563eb; outline-offset: 0; border-style: solid; background: #fff; }
.sk-p-car { display: grid; grid-template-columns: 1fr 1fr 1.3fr 1.2fr; }
.sk-p-cell { display: block; padding: 6px 8px 8px; border-left: 1px solid #111; }
.sk-p-car .sk-p-cell:first-child, .sk-p-foot .sk-p-cell:first-child { border-left: 0; }
.sk-p-car .sk-p-h { text-align: center; padding-bottom: 4px; margin-bottom: 4px; border-bottom: 1px solid #111; }
.sk-p-size label { display: grid; grid-template-columns: 2.4em 1fr 1.8em; align-items: center; gap: 4px; margin-top: 3px; font-size: 0.82rem; }
.sk-p-size input { padding: 4px 6px; text-align: right; }
.sk-p-size small { font-size: 0.75rem; }
.sk-p-line { display: grid; grid-template-columns: 14em 1fr; align-items: stretch; }
.sk-p-line > .sk-p-h { display: flex; align-items: center; padding: 8px; border-right: 1px solid #111; letter-spacing: 0.12em; }
.sk-p-line > input, .sk-p-line > .sk-p-val { margin: 6px 8px; width: auto; }
.sk-p-val { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-p-val input { flex: 1 1 200px; }
.sk-p-val .dm-mini { flex: 0 0 auto; }
.sk-p-body { display: grid; grid-template-columns: 1fr 1.2fr; grid-template-areas: 'text text' 'to date' 'to applicant'; gap: 6px 14px; padding: 10px; }
.sk-p-text { grid-area: text; margin: 0; font-size: 0.84rem; line-height: 1.6; }
.sk-p-date { grid-area: date; margin: 0; text-align: right; font-size: 0.9rem; letter-spacing: 0.06em; }
.sk-p-to { grid-area: to; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.sk-p-police { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 700; white-space: nowrap; }
.sk-p-police input { flex: 1 1 auto; min-width: 0; }
.sk-p-applicant { grid-area: applicant; display: grid; gap: 4px; }
.sk-p-applicant-h { letter-spacing: 0.3em; }
.sk-p-applicant-box { border: 1px dashed #111; padding: 6px 8px; display: grid; gap: 5px; }
.sk-p-in { display: grid; grid-template-columns: 3.4em 1fr; align-items: center; gap: 6px; font-size: 0.82rem; margin-top: 4px; }
.sk-p-zip { grid-template-columns: 1.2em 9em; }
.sk-p-foot { display: grid; grid-template-columns: 1fr 1.3fr 1.1fr; }
.sk-p-foot .sk-p-h { margin-bottom: 4px; }
.sk-p-radios { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.sk-p-radios label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.95rem; font-weight: 700; }
.sk-p-radios input { width: auto; margin: 0; }
.sk-p-note { display: block; margin-top: 4px; font-size: 0.75rem; color: #555; }
.sk-lease-ttl { margin-top: 10px; }
@media (max-width: 640px) {
  .sk-paper { padding: 10px 8px; }
  .sk-p-title { font-size: 1rem; letter-spacing: 0.15em; }
  .sk-p-car { grid-template-columns: 1fr 1fr; }
  .sk-p-car .sk-p-cell:nth-child(3) { border-left: 0; }
  .sk-p-car .sk-p-cell:nth-child(n + 3) { border-top: 1px solid #111; }
  .sk-p-line { grid-template-columns: 1fr; }
  .sk-p-line > .sk-p-h { border-right: 0; border-bottom: 1px dotted #999; padding: 6px 8px 4px; }
  .sk-p-body { grid-template-columns: 1fr; grid-template-areas: 'text' 'date' 'to' 'applicant'; }
  .sk-p-foot { grid-template-columns: 1fr; }
  .sk-p-foot .sk-p-cell { border-left: 0; border-top: 1px solid #111; }
  .sk-p-foot .sk-p-cell:first-child { border-top: 0; }
}
/* 委任状・譲渡証明書・申請依頼書を紙と同じ並びで入れる（2026-10-16 ユーザー「他の書式（委任状とか譲渡証明書とか）そういうのもそうして」） */
.dk-paper { margin: 12px 0; padding: 16px 14px 14px; background: #fff; border: 1px solid #d6d3c9; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); color: #111; }
.dk-paper input { width: 100%; box-sizing: border-box; margin: 0; padding: 7px 8px; border: 1px dashed #9ca3af; border-radius: 4px; background: #fffef8; font-size: 1rem; color: #111; }
.dk-paper input:focus { outline: 2px solid #2563eb; outline-offset: 0; border-style: solid; background: #fff; }
.dk-title { margin: 0 0 12px; text-align: center; font-size: 1.3rem; font-weight: 700; letter-spacing: 0.3em; }
.dk-lead { margin: 6px 0 10px; font-size: 0.9rem; line-height: 1.7; }
.dk-small { margin: 4px 0; font-size: 0.8rem; color: #333; }
.dk-to, .dk-to-line { display: inline-block; min-width: 14em; padding: 2px 6px; border-bottom: 1px solid #111; font-weight: 700; }
.dk-to.is-blank, .dk-to-line.is-blank { color: #6b7280; font-weight: 400; }
.dk-to-line { display: block; margin: 0 0 6px; }
.dk-box { display: grid; grid-template-columns: 8.5em 1fr; border: 1.5px solid #111; margin: 10px auto; max-width: 560px; }
.dk-box .dk-h { display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; border-right: 1px solid #111; font-size: 0.82rem; font-weight: 700; }
.dk-box-v { padding: 6px 8px; display: grid; gap: 4px; }
.dk-in { display: grid; grid-template-columns: 5.6em 1fr; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.82rem; }
.dk-in-wrap { display: flex; align-items: center; gap: 6px; }
.dk-mark { flex: 0 0 auto; width: 1.9em; height: 1.9em; display: inline-flex; align-items: center; justify-content: center; border: 1px dashed #9ca3af; border-radius: 50%; font-size: 0.75rem; color: #6b7280; }
.dk-date { margin: 10px 0; font-size: 0.92rem; letter-spacing: 0.06em; }
.dk-sign { margin-left: auto; max-width: 420px; display: grid; gap: 2px; }
.dk-sign .dk-h { font-weight: 700; font-size: 0.86rem; letter-spacing: 0.2em; }
.dk-table { border: 1.5px solid #111; }
.dk-tr { display: grid; border-top: 1px solid #111; }
.dk-tr:first-child { border-top: 0; }
.dk-td { display: block; padding: 6px; border-left: 1px solid #111; min-height: 2.4em; }
.dk-tr > .dk-td:first-child, .dk-tr > .dk-th:first-child { border-left: 0; }
.dk-th { display: block; text-align: center; font-size: 0.78rem; font-weight: 700; padding: 4px 6px; border-left: 1px solid #111; letter-spacing: 0.08em; }
.dk-car { grid-template-columns: 1fr 1fr 1.6fr 1fr; }
.dk-car .dk-th { border-left: 0; border-bottom: 1px solid #111; margin: -6px -6px 6px; }
.dk-head, .dk-row { grid-template-columns: 6.5em 1fr 5.5em; }
.dk-slash { background: linear-gradient(to top right, transparent calc(50% - 0.6px), #111 50%, transparent calc(50% + 0.6px)); }
.dk-seal { display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 0.8rem; }
.dk-jdate { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 0.82rem; }
.dk-blank { color: #6b7280; font-size: 0.82rem; display: flex; align-items: center; }
.dk-note { grid-template-columns: 1fr; }
.dk-note .dk-th { text-align: left; border-left: 0; padding: 8px; }
.dk-items { margin: 6px 0; }
.dk-irai-car { margin: 10px 0; }
.dk-kv { grid-template-columns: 6.5em 1fr; align-items: center; }
.dk-kv .dk-th { border-left: 0; border-right: 1px solid #111; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.dk-kv input { margin: 6px 8px; width: auto; }
@media (max-width: 640px) {
  .dk-paper { padding: 12px 8px; }
  .dk-title { font-size: 1.1rem; letter-spacing: 0.15em; }
  .dk-box { grid-template-columns: 1fr; }
  .dk-box .dk-h { border-right: 0; border-bottom: 1px solid #111; }
  .dk-car { grid-template-columns: 1fr 1fr; }
  .dk-car .dk-td:nth-child(3) { border-left: 0; }
  .dk-car .dk-td:nth-child(n + 3) { border-top: 1px solid #111; }
  .dk-head, .dk-row { grid-template-columns: 4.8em 1fr 3.4em; }
  .dk-in { grid-template-columns: 1fr; gap: 2px; }
}

/* AIで車名・グレードを調べるボタン（押したときだけAI。2026-10-16） */
.gl-msg .gl-ai { margin: 4px 6px 4px 0; }
.gl-msg .gl-small { display: block; }
.qd-ai-btn { margin: 6px 4px 0 0; }

/* 委任状の「登録番号又は車台番号」の説明（2026-10-16） */
.dk-box-v .dk-small { margin: 2px 0 0; font-size: 12px; color: #6b7280; }

/* 開発者メニュー（アカウント管理）: 項目ごとに開く・閉じる（2026-10-16。panel-fold.js） */
.users-title { margin: 8px 0 2px; font-size: 1.35rem; }
.users-fold-note { margin: 0 0 10px; font-size: 0.85rem; }
.panel.foldable:not(.is-open) > h2 { margin-bottom: -18px !important; border-bottom: 0 !important; border-radius: 16px !important; }
.panel.foldable { margin-bottom: 10px; }
.panel.foldable > h2 > .fold-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.panel.foldable > h2 > .fold-btn::after { content: '▾'; margin-left: auto; font-size: 0.9em; opacity: 0.6; transition: transform 0.15s; transform: rotate(-90deg); }
.panel.foldable.is-open > h2 > .fold-btn::after { transform: none; }
.panel.foldable > h2 > .fold-btn:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 2px; border-radius: 4px; }
.panel.foldable:not(.is-open) > :not(h2) { display: none !important; }

/* 管理者メニュー・開発者メニュー（2026-10-16）: ちがうほうのメニューの項目は隠す・ほかのページへのリンク */
.panel.menu-off { display: none !important; }
.users-menu-switch { margin: 0 0 10px; font-size: 0.9rem; }
.users-menu-switch a { font-weight: 700; }
.um-link-list { display: grid; gap: 8px; }
.um-link { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 10px; color: inherit; text-decoration: none; background: #fff; }
.um-link:hover { background: #f9fafb; }
.um-link b { font-size: 1rem; }
.um-link span { font-size: 0.82rem; color: #6b7280; }
#gmapKeyPanel .sk-gmap { border: 0; padding: 0; margin: 0; background: none; }

/* 修復歴「あり」のときの骨格の部位: たたまずに出す（見出しは押せない。2026-10-16） */
.ap-more.is-plain > summary { cursor: default; pointer-events: none; list-style: none; color: #b91c1c; }
.ap-more.is-plain > summary::-webkit-details-marker { display: none; }

/* 展開図の見出しの右の総合評価点（2026-10-16） */
.ap-h2-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: nowrap; margin: -18px -20px 12px; padding: 18px 20px 0; }
body.ap-s2.theme-b1 .ap-h2-row > h2.ap-h2 { margin: 0 !important; padding: 0 !important; flex: 1 1 auto; min-width: 0; }
.ap-score-inline { flex: 0 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 2px; font-size: 0.78rem; font-weight: 800; color: #b91c1c; white-space: nowrap; }
.ap-score-inline select { width: 7.5em; font-size: 18px; padding: 6px 8px; border: 2px solid #b91c1c !important; border-radius: 8px !important; background: #fff; font-weight: 800; }
/* 送る前の確かめ: 査定票の上の「この内容で送る」 */
.ap-sheet-confirm { background: #1d4ed8; color: #fff; border: 0; font-weight: 800; }
.ap-sheet-full-head.is-confirm { flex-wrap: wrap; }
.ap-sheet-full-head.is-confirm #apSheetFullClose { margin-left: auto; }
/* 「この内容で送る」: 画面の真ん中より下に浮かせる（2026-10-16） */
.ap-sheet-confirm-bar { position: fixed; left: 16px; right: 16px; bottom: calc(22vh + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; justify-content: center; pointer-events: none; }
.ap-sheet-confirm-bar.hidden { display: none; }
.ap-sheet-confirm-bar .ap-sheet-confirm { pointer-events: auto; width: min(100%, 420px); min-height: 56px; padding: 14px 18px; border-radius: 14px; font-size: 1.1rem; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35); }
dialog.ap-sheet-full.is-confirm .ap-sheet-full-body { padding-bottom: calc(22vh + 90px); }
.ap-sheet-full-head.is-confirm .ap-sheet-full-hint { order: 9; flex: 1 1 100%; display: block !important; font-size: 0.85rem; color: #b91c1c; font-weight: 700; }

/* プライシング金額（万円で入れる）の下の円での金額（2026-10-16） */
.ap-man-yen { display: block; margin-top: 4px; font-size: 0.85rem; font-weight: 700; color: #1d4ed8; }
.ap-man-yen.is-bad { color: #b91c1c; }

/* 評価点の決まりの説明・外装の評価（2026-10-16） */
.ap-score-hint { margin: -4px 0 10px; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 0.85rem; font-weight: 700; }
.ap-ext-grade { margin: 0 0 12px; }
.ap-ext-grade .ap-choice-label { display: block; margin-bottom: 4px; }

/* カラーの見本の表: 型式の表から足した色・型式で探す（2026-10-16） */
.cb-extra.cb-seed { background: #eef2ff; color: #3730a3; }
.cb-model-head { margin: 10px 0 4px; font-weight: 800; }
.cb-model-result .cb-table-wrap { margin-bottom: 8px; }

/* ===== 査定の画面の使いやすさ（2026-10-17 見直しの第2弾）===== */
/* 上の項目の名前: スマホは短い名前で1行に収める（「写真」「お客様」が初めから見えるように） */
.ap-step .ap-step-short { display: none; }
@media (max-width: 480px) {
  .ap-step .ap-step-long { display: none; }
  .ap-step .ap-step-short { display: inline; }
  body.ap-s2 .ap-progress { gap: 4px; }
  body.ap-s2 .ap-step { padding: 0 6px; gap: 1px; font-size: 0.76rem; min-height: 34px; }
  body.ap-s2 .ap-step .ap-step-mark { font-size: 0.72em; }
  body.ap-s2 .ap-step:not(.is-done) .ap-step-mark { display: none; }
}
/* 「あとNか所」の帯: 区ごとにまとめて全部。押すとその区へ、✕ で閉じる */
.ap-missing { display: flex; align-items: flex-start; gap: 8px; }
.ap-missing.hidden { display: none; }
.ap-missing-list { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.ap-missing-ttl { font-weight: 800; }
.ap-bottom button.ap-missing-grp { min-height: 32px; margin: 0; padding: 2px 8px; border: 1px solid #fcd34d; border-radius: 8px; background: #fff; color: #92400e; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.ap-missing-grp b { font-weight: 800; }
.ap-bottom button.ap-missing-grp:hover, .ap-bottom button.ap-missing-x:hover { background: #fef3c7; }
.ap-bottom button.ap-missing-x { flex: 0 0 auto; min-height: 0; width: 32px; height: 32px; margin: -4px -4px 0 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #92400e; font-size: 1rem; font-weight: 800; cursor: pointer; }
body.ap-step-mode.ap-page:has(#apMissing:not(.hidden)) .admin-wrap { padding-bottom: 280px; }
/* 車両情報の小さな目次 */
.ap-toc { display: flex; flex-wrap: wrap; gap: 5px; margin: -4px 0 12px; }
.ap-toc button { min-height: 34px; padding: 0 9px; border: 1px solid #e8e4da; border-radius: 999px; background: #fffdf8; color: #6f5420; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.ap-toc button:hover { background: #fbf4e4; }
.ap-sec .ap-h3 { scroll-margin-top: 64px; }
/* 装備: 「ほかの装備」（たたむ）・まだの装備・残りは全部 無 */
.ap-eq-more { margin: 10px 0 4px; border-top: 1px dashed #e6d6b2; padding-top: 6px; }
.ap-eq-more > summary { cursor: pointer; padding: 8px 0; font-size: 0.9rem; font-weight: 800; color: #6f5420; }
.ap-eq-more-n { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #f1dfb3; color: #17171a; font-size: 0.78rem; }
.ap-eq-left { display: block; margin: 0 0 6px; color: #b45309; font-size: 0.88rem; font-weight: 700; }
#apEquipmentCheck { flex-wrap: wrap; }
/* 査定票: 有・無を選んでいない装備（薄い字）・送る前の確かめで空いている大事なマス（黄色）・お名前が空 */
.ap-paper .pp-eq-unknown { display: block; margin-top: 4px; color: #9ca3af; font-size: 11px; font-weight: 600; }
.ap-paper .pp-c.is-missing { background: #fef9c3; }
.ap-paper .pp-cust b.pp-empty { padding: 0 4px; background: #fef9c3; color: #a16207; }
.ap-sheet-need-bar { flex: 1 1 100%; order: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 6px 0 0; border: 1px solid #f4c7a6; border-radius: 10px; }
.ap-sheet-need-bar.hidden { display: none; }
.ap-sheet-need-bar small { font-weight: 600; color: #8c3d14; }
button.ap-need-go { margin: 0; padding: 2px 10px; border: 1px solid #e8a77c; border-radius: 999px; background: #fff; color: #8c3d14; font: inherit; font-weight: 800; cursor: pointer; }
/* 送る前の「この内容で送る」・展開図の「これでよい」も黒に金の字（青をやめてそろえた） */
body.ap-s2 .ap-sheet-confirm, body.ap-s2 .ap-dg-inline button.ap-dg-ok { border: 0; background: linear-gradient(145deg, #2c2c32, #121215); color: #f1dfb3; }
body.ap-s2 .ap-dg-inline button.ap-dg-ok { min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 800; }
/* 評価点の決まり: ふだんは灰色の小さな案内。合わない点を外したときだけ赤 */
.ap-score-hint { margin: -4px 0 10px; padding: 0; background: none; color: #6b7280; font-size: 0.82rem; font-weight: 600; }
.ap-score-hint.is-warn { padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-weight: 700; }
/* 外装の評価: A〜E の小さなボタン1行（図のあと） */
.ap-ext-grade { margin: 4px 0 12px; }
.ap-ext-grade .ap-ext-grades { display: block; }
.ap-ext-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; max-width: 420px; }
.ap-ext-row .ap-grade { justify-content: center; min-height: 44px; padding: 0; }
.ap-ext-mean { margin: 4px 0 0; color: #6b7280; font-size: 0.82rem; }
/* 車検証の読み取り中のくるくる・読めた欄を一瞬黄色に */
.ap-spin { display: inline-block; width: 16px; height: 16px; margin-right: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -2px; animation: apSpin 0.8s linear infinite; }
@keyframes apSpin { to { transform: rotate(360deg); } }
.ap-sec input.ap-filled { background: #fef9c3 !important; transition: background 0.4s; }
/* 傷の写真: 「写真から選ぶ」は小さく */
.ap-dg-photo .ap-dg-lib { font-size: 0.85rem; }
.ap-color-more { margin: 4px 0 2px; font-size: 0.88rem; }
/* 入力中の「そのほかの操作」（たたむ） */
.ap-actions.is-folded { display: block; padding: 6px 16px; }
.ap-actions.is-folded.hidden { display: none; }
.ap-more-acts > summary { cursor: pointer; padding: 8px 0; color: #6b7280; font-size: 0.88rem; font-weight: 700; }
.ap-more-acts-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
/* 字が小さい所を少し大きく・入力欄の高さを 44px に */
.ap-grade small { font-size: 0.82rem; }
.ap-int-sub { font-size: 0.8rem; }
.ap-eq-label { font-size: 0.88rem; }
body.ap-s2 .ap-sec label.dm-field input[type="text"], body.ap-s2 .ap-sec label.dm-field select { min-height: 44px; }
/* スマホの展開図: 余白を詰めて図を大きく・部位名の字を少し大きく */
@media (max-width: 600px) {
  #sec-damage .ap-dg-inline { margin-left: -10px; margin-right: -10px; }
  #sec-damage .ap-dg-inline .ap-dg-svg { padding: 2px; }
  #sec-damage .ad-label { font-size: 19px; }
  #sec-damage .ad-label.is-two { font-size: 16px; }
  #sec-damage .ad-label.is-vertical { font-size: 15px; }
  /* バンパーは枠が低いので、今までの大きさ（字が枠の線に重なる）*/
  #sec-damage .ad-label[data-panel$="_bumper"] { font-size: 17px; }
}

/* 査定の設定: 使える人・プライシング担当の表（2026-10-17 ユーザー「表みたいに出来る？」）。スマホは横に動かせる（名前の列は止める） */
.ap-set-modes { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ap-set-scroll { overflow-x: auto; margin: 8px 0 10px; border: 1px solid #ece7dc; border-radius: 12px; background: #fff; -webkit-overflow-scrolling: touch; }
.ap-set-table { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
.ap-set-table th, .ap-set-table td { padding: 6px 8px; border-bottom: 1px solid #f0ebe1; text-align: center; white-space: nowrap; }
.ap-set-table thead th { min-width: 4.2em; max-width: 6em; white-space: normal; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.3; background: #faf7f0; color: #4a4a52; font-size: 0.76rem; font-weight: 800; }
.ap-set-table thead .ap-set-group { max-width: none; border-bottom: 1px solid #e6d6b2; color: #6f5420; }
.ap-set-table .ap-set-name { position: sticky; left: 0; z-index: 1; min-width: 7.5em; max-width: 11em; background: #fff; text-align: left; white-space: normal; box-shadow: 1px 0 0 #ece7dc; }
.ap-set-table thead .ap-set-name { background: #faf7f0; }
.ap-set-person { display: block; color: #17171a; font-weight: 700; }
.ap-set-name small { color: #8a8a92; font-size: 0.7rem; font-weight: 600; }
.ap-set-table .ap-set-use { border-right: 1px solid #ece7dc; }
.ap-set-table td.ap-set-all, .ap-set-table th.ap-set-all { background: #fffaf0; }
.ap-set-table td.is-own { background: #f5f9ff; }
.ap-set-table input[type="checkbox"] { display: inline-block; vertical-align: middle; width: 22px; min-width: 22px; height: 22px; margin: 0; accent-color: #17171a; cursor: pointer; }
.ap-set-table input[type="checkbox"]:disabled { cursor: default; opacity: 0.35; }
.ap-set-table[data-mode="all"] td.ap-set-use:has(input)::after { content: "全員"; color: #8a8a92; font-size: 0.7rem; }
.ap-set-table[data-mode="all"] td.ap-set-use input { display: none; }
.ap-set-always { color: #6f5420; font-size: 0.75rem; font-weight: 800; }
.ap-set-store td { position: sticky; left: 0; padding-top: 10px; background: #fff; color: #8a6a2c; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; text-align: left; }
.ap-set-table tfoot th, .ap-set-table tfoot td { border-bottom: 0; background: #faf7f0; font-size: 0.76rem; font-weight: 800; }
.ap-set-count.is-empty { color: #d6312a; }


/* ===== 代車管理（2026-10-17。loaner-cars.html・admin-loaner-cars.js）=====
   S2: 白地に細い線、大事なボタン（貸し出す・返す・足す）は黒に金の字。赤は返却予定を過ぎたときだけ。
   パソコンは1つの表（行が代車）、スマホ（幅640px以下）は行をカードにする */
body.lc-page { --lc-ink: #111827; --lc-sub: #6b7280; --lc-line: #e7e5df; --lc-soft: #faf8f3; --lc-gold-l: #f1dfb3; --lc-red: #d6312a; background: #fff; }
body.lc-page .panel.lc-panel { padding: 16px 18px; border: 1px solid var(--lc-line); border-radius: 16px; background: #fff; box-shadow: none; }
.lc-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.lc-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0; color: var(--lc-ink); font-size: 0.95rem; font-weight: 700; }
.lc-sum-store { padding-right: 14px; border-right: 1px solid var(--lc-line); color: #8a6a2c; font-size: 0.85rem; font-weight: 800; }
.lc-sum-n.is-late { color: var(--lc-red); }
.lc-msg { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #e6d6b2; border-radius: 10px; background: #fffaf0; color: #6f5420; font-size: 0.9rem; font-weight: 700; }
.lc-msg.is-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.lc-empty { margin: 8px 0 4px; color: var(--lc-sub); font-size: 0.92rem; }
.lc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ボタン: 黒に金の字（大事なもの）と、白に細い線 */
.lc-page button.lc-main, .lc-dlg button.lc-main { min-height: 40px; margin: 0; padding: 0 18px; border: 0; border-radius: 10px; background: linear-gradient(145deg, #2c2c32, #121215); color: #f1dfb3; font: inherit; font-weight: 800; white-space: nowrap; cursor: pointer; }
.lc-page button.lc-main:hover, .lc-dlg button.lc-main:hover { background: #0b0b0d; }
.lc-page button.lc-main:disabled, .lc-dlg button.lc-main:disabled { opacity: 0.5; cursor: default; }
.lc-page button.lc-btn, .lc-dlg button.lc-btn { min-height: 40px; margin: 0; padding: 0 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #111827; font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.lc-page button.lc-btn:hover, .lc-dlg button.lc-btn:hover { background: #faf8f3; }
.lc-page button.lc-small { min-height: 34px; padding: 0 12px; font-size: 0.85rem; }
.lc-dlg button.lc-danger { margin-right: auto; border-color: #f3c6c3; color: #b42318; }
.lc-dlg button.lc-danger:hover { background: #fef2f2; }
.lc-page button.lc-link { margin: 0 0 0 auto; padding: 2px 6px; border: 0; background: none; color: #8a6a2c; font: inherit; font-size: 0.82rem; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* 表 */
.lc-table-wrap { border: 1px solid var(--lc-line); border-radius: 12px; overflow: hidden; }
.lc-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.lc-table th { padding: 8px 10px; border-bottom: 1px solid var(--lc-line); background: var(--lc-soft); color: #4a4a52; font-size: 0.76rem; font-weight: 800; text-align: left; white-space: nowrap; }
.lc-table td { padding: 10px; border-bottom: 1px solid #f0eee8; vertical-align: middle; }
.lc-table tbody tr:last-child td, .lc-table tbody tr.lc-row:has(+ tr.lc-more-row[hidden]:last-child) td { border-bottom: 0; }
.lc-table tr.lc-row:has(+ tr.lc-more-row:not([hidden])) td { border-bottom-color: transparent; background: #fffdf8; }
.lc-car { display: flex; flex-direction: column; gap: 1px; min-width: 9em; }
.lc-car-name { font-weight: 800; color: var(--lc-ink); }
.lc-plate { color: #374151; font-size: 0.85rem; letter-spacing: 0.02em; }
.lc-store { align-self: flex-start; margin-top: 2px; padding: 0 8px; border: 1px solid #e6d6b2; border-radius: 999px; color: #8a6a2c; font-size: 0.75rem; font-weight: 800; }
.lc-none { color: #c4c4c8; }
.lc-pill { display: inline-block; min-width: 4.4em; padding: 2px 10px; border: 1px solid #d1d5db; border-radius: 999px; background: #fff; color: #374151; font-size: 0.8rem; font-weight: 800; text-align: center; white-space: nowrap; }
.lc-pill.is-lent { border-color: #17171a; background: #17171a; color: #f1dfb3; }
.lc-pill.is-maint { border-color: #e5e7eb; background: #f3f4f6; color: #6b7280; }
.lc-c-who { font-weight: 700; }
.lc-c-date, .lc-c-due, .lc-c-out { white-space: nowrap; }
.lc-due small { margin-left: 6px; font-size: 0.78rem; font-weight: 800; }
.lc-due.is-late { color: var(--lc-red); font-weight: 800; }
.lc-due.is-today { color: #8a6a2c; font-weight: 800; }
.lc-row.is-maint .lc-car-name { color: #6b7280; }
.lc-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.lc-page button.lc-more-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: 0; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--lc-sub); font: inherit; font-size: 0.82rem; font-weight: 700; white-space: nowrap; cursor: pointer; }
.lc-page button.lc-more-btn:hover { border-color: #e5e7eb; background: #faf8f3; }
.lc-chev { display: inline-block; }
.lc-more-btn[aria-expanded="true"] .lc-chev { transform: rotate(180deg); }

/* 「詳しく」で開く所 */
.lc-table tr.lc-more-row > td { padding: 0 10px 12px; background: #fffdf8; }
.lc-more { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; padding: 10px 12px; border: 1px solid #efe9dc; border-radius: 10px; background: #fff; }
.lc-more-btns { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: flex-end; gap: 6px; }
.lc-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin: 0; font-size: 0.86rem; }
.lc-facts dt { color: var(--lc-sub); font-weight: 700; white-space: nowrap; }
.lc-facts dd { margin: 0; color: var(--lc-ink); overflow-wrap: anywhere; white-space: pre-wrap; }
.lc-hist { grid-column: 1 / -1; }
.lc-hist-title { margin: 0 0 4px; color: #6f5420; font-size: 0.82rem; font-weight: 800; }
.lc-hist-item { padding: 6px 0; border-top: 1px dashed #ece7dc; font-size: 0.86rem; }
.lc-hist-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.lc-hist-who { font-weight: 700; }
.lc-hist-line, .lc-hist-sub, .lc-hist-note { margin: 2px 0 0; color: #374151; }
.lc-hist-sub, .lc-hist-note { color: var(--lc-sub); font-size: 0.8rem; }
.lc-hist-note.is-error { color: #b42318; }

/* 小窓 */
dialog.lc-dlg { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid #e7e5df; border-radius: 16px; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22); color: #111827; }
dialog.lc-dlg::backdrop { background: rgba(17, 17, 20, 0.45); }
.lc-dlg form { display: flex; flex-direction: column; max-height: calc(100dvh - 26px); }
.lc-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 10px 18px; border-bottom: 1px solid #efece5; }
.lc-dlg-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.lc-dlg button.lc-x { width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 10px; background: none; color: #6b7280; font-size: 1rem; cursor: pointer; }
.lc-dlg button.lc-x:hover { background: #f5f5f4; }
.lc-dlg-body { flex: 1 1 auto; overflow-y: auto; padding: 12px 18px 4px; }
.lc-dlg-car { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 10px; padding-left: 10px; border-left: 3px solid #c9a35a; }
.lc-dlg-car span { color: #4b5563; font-size: 0.88rem; }
.lc-field { display: block; margin: 0 0 12px; }
.lc-label { display: block; margin-bottom: 4px; color: #374151; font-size: 0.85rem; font-weight: 700; }
.lc-dlg input[type="text"], .lc-dlg input[type="date"], .lc-dlg select, .lc-dlg textarea { display: block; width: 100%; min-height: 44px; margin: 0; padding: 8px 10px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; color: #111827; font: inherit; font-size: 1rem; }
.lc-dlg textarea { min-height: 64px; resize: vertical; }
.lc-dlg input:focus, .lc-dlg select:focus, .lc-dlg textarea:focus { outline: 2px solid #c9a35a; outline-offset: 0; border-color: #c9a35a; }
.lc-hint { display: block; margin-top: 4px; color: #6b7280; font-size: 0.78rem; line-height: 1.5; }
.lc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.lc-fuels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lc-fuel { position: relative; display: block; margin: 0; }
.lc-fuel input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lc-fuel span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 2px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; color: #111827; font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
.lc-fuel input:checked + span { border-color: #17171a; background: #17171a; color: #f1dfb3; }
.lc-fuel input:focus-visible + span { outline: 2px solid #c9a35a; outline-offset: 1px; }
.lc-facts-box { margin-bottom: 12px; padding: 8px 10px; border: 1px solid #efe9dc; border-radius: 10px; background: #fffdf8; }
.lc-ran { margin: -6px 0 12px; color: #6f5420; font-size: 0.92rem; font-weight: 800; }
.lc-ran.is-error { color: #b42318; }
.lc-dlg-err { margin: 0 18px 8px; padding: 8px 10px; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 0.88rem; font-weight: 700; }
.lc-dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 18px 14px; border-top: 1px solid #efece5; }

/* スマホ: 行をカードに（車名と状態が上、その下に相手・日付・距離、いちばん下にボタン） */
@media (max-width: 640px) {
  body.lc-page .panel.lc-panel { padding: 12px 0 4px; border: 0; border-radius: 0; }
  .lc-table-wrap { border: 0; border-radius: 0; overflow: visible; }
  .lc-table, .lc-table tbody { display: block; }
  .lc-table thead { display: none; }
  .lc-table tr.lc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; margin-top: 10px; padding: 12px 12px 10px; border: 1px solid var(--lc-line); border-radius: 14px; background: #fff; }
  .lc-table tr.lc-row:has(+ tr.lc-more-row:not([hidden])) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
  .lc-table tr.lc-row:has(+ tr.lc-more-row:not([hidden])) td { background: none; }
  .lc-table td { display: block; padding: 0; border: 0; }
  .lc-table td.is-blank { display: none; }
  .lc-c-car { grid-column: 1; grid-row: 1; }
  .lc-c-state { grid-column: 2; grid-row: 1; align-self: start; text-align: right; }
  .lc-table td.lc-c-who, .lc-table td.lc-c-date, .lc-table td.lc-c-due, .lc-table td.lc-c-out { grid-column: 1 / -1; display: flex; gap: 10px; font-size: 0.9rem; }
  .lc-table td.is-blank.lc-c-who, .lc-table td.is-blank.lc-c-date, .lc-table td.is-blank.lc-c-due, .lc-table td.is-blank.lc-c-out { display: none; }
  .lc-c-who { margin-top: 6px; }
  .lc-table td[data-label]::before { content: attr(data-label); flex: 0 0 6.5em; color: var(--lc-sub); font-size: 0.8rem; font-weight: 700; }
  .lc-c-act { grid-column: 1 / -1; margin-top: 8px; }
  .lc-acts { justify-content: stretch; }
  .lc-acts button.lc-main, .lc-acts button.lc-btn { flex: 1 1 auto; min-height: 44px; }
  .lc-car { min-width: 0; }
  .lc-table tr.lc-more-row { display: block; }
  .lc-table tr.lc-more-row[hidden] { display: none; }
  .lc-table tr.lc-more-row > td { display: block; padding: 0 12px 12px; border: 1px solid var(--lc-line); border-top: 0; border-radius: 0 0 14px 14px; background: #fff; }
  .lc-more { grid-template-columns: 1fr; padding: 10px 0 0; border: 0; border-top: 1px dashed #ece7dc; border-radius: 0; }
  .lc-more-btns { justify-content: flex-start; }
  .lc-fuels { gap: 4px; }
  .lc-fuel span { font-size: 0.8rem; }
  .lc-dlg-foot button.lc-main { flex: 1 1 auto; }
}
/* スマホ: 題名が2行に折れないよう、左の「在庫・記録」の札は出さない */
@media (max-width: 480px) { body.lc-page.theme-b1 .admin-header h1::before { display: none; } body.lc-page .admin-header h1 { white-space: nowrap; } }
/* 日付2つを横に並べるとき、欄が枠からはみ出さないように */
.lc-two > .lc-field { min-width: 0; }
.lc-dlg input[type="date"] { min-width: 0; max-width: 100%; }
@media (max-width: 400px) { .lc-dlg input[type="date"] { padding-left: 8px; padding-right: 6px; font-size: 0.95rem; } }
/* 代車: 貸した相手の電話番号（押すとかけられる。2026-10-17） */
.lc-who { display: flex; flex-direction: column; gap: 2px; }
.lc-tel { color: #1d4ed8; font-size: 0.85rem; font-weight: 600; text-decoration: none; }
/* 代車: 車台番号・車検の有効期限・車検証の読み取り（2026-10-17） */
.lc-chassis { display: block; color: #6b7280; font-size: 0.75rem; letter-spacing: 0.02em; }
.lc-shaken-date { display: block; color: #4b5563; font-size: 0.75rem; }
.lc-shaken-date.is-soon { color: #a16207; font-weight: 700; }
.lc-shaken-date.is-late { color: #b91c1c; font-weight: 700; }
.lc-shaken { margin: 0 0 12px; padding: 10px 12px; border: 1px dashed #d8cfbd; border-radius: 12px; background: #fffaf0; }
.lc-shaken-btn { width: 100%; margin: 0; }
.lc-shaken-msg { margin: 6px 0 0; }
.lc-shaken-msg.is-working { color: #1d4ed8; }
.lc-shaken-msg.is-done { color: #15803d; font-weight: 700; }
.lc-shaken-msg.is-error { color: #b91c1c; font-weight: 700; }
.lc-req { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #fdecec; color: #b91c1c; font-size: 0.75rem; font-style: normal; font-weight: 800; vertical-align: 1px; }
/* 代車: 店舗のしぼりと、店舗ごとの見出し（2026-10-17 ユーザー「ほか店舗のやつも見れるように」） */
.lc-store-filter { width: auto; min-height: 36px; margin: 0 6px 0 0; padding: 4px 28px 4px 10px; border: 1px solid var(--lc-line); border-radius: 10px; background-color: #fff; color: #8a6a2c; font-size: 0.85rem; font-weight: 800; }
.lc-table tr.lc-store-row > td { padding: 14px 10px 6px; border-bottom: 1px solid var(--lc-line); background: #faf7f0; color: #8a6a2c; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.04em; }
.lc-table tr.lc-store-row small { margin-left: 6px; color: #9ca3af; font-weight: 600; }
@media (max-width: 640px) {
  .lc-table tr.lc-store-row { display: block; margin-top: 16px; }
  .lc-table tr.lc-store-row > td { display: block; padding: 0 2px; border: 0; background: none; }
}
/* 代車: ナンバーを4つに分けて入れる（地名・分類番号・ひらがな・番号。2026-10-17） */
.lc-plate-row { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr 1.3fr; gap: 6px; }
.lc-plate-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lc-plate-cell input { width: 100%; min-width: 0; text-align: center; }
.lc-plate-cell small { color: #8a8a92; font-size: 0.7rem; text-align: center; }
/* 所在図の画面の地図: Google マップが出ないときの知らせ（2026-10-18 国土地理院はやめた） */
.sk-gmap-notice { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 5; margin: 0; padding: 8px 10px; border: 1px solid #f3c2c2; border-radius: 10px; background: #fff5f5; color: #b91c1c; font-size: 0.85rem; font-weight: 700; }
/* 所在図の画面の地図を大きく（2026-10-18 ユーザー「もう少し地図の画面大きくできる？」）。
   Google の画像は1枚で幅640ピクセルまでなので、横は640までにして、縦を伸ばす */
.sk-map { height: clamp(380px, 64vh, 600px); max-width: 640px; }
/* 所在図の画面の地図: 印刷される範囲（PDF と同じ縮尺。地図のピクセルで 640×360。2026-10-18） */
.sk-print-frame { position: absolute; left: 50%; top: 50%; width: 640px; height: 359px; transform: translate(-50%, -50%); border: 2px dashed rgba(17, 24, 39, 0.75); border-radius: 4px; box-shadow: 0 0 0 9999px rgba(17, 24, 39, 0.12); pointer-events: none; }
.sk-print-frame span { position: absolute; left: 50%; top: 6px; transform: translateX(-50%); white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); color: #111827; font-size: 0.7rem; font-weight: 800; }


/* ===== 事務の書類（2026-10-18。office-docs.html・admin-office-docs.js）=====
   S2: 白地に細い線、大事なボタン（PDFを作る）と選んだものは黒に金の字。選んだ書類で使う欄だけを出す */
body.od-page { --od-ink: #111827; --od-sub: #6b7280; --od-line: #e7e5df; --od-soft: #faf8f3; --od-gold: #c9a35a; --od-gold-l: #f1dfb3; background: #fff; }
.od-wrap { max-width: 760px; }
body.od-page .panel.od-panel { padding: 16px 18px; border: 1px solid var(--od-line); border-radius: 16px; background: #fff; box-shadow: none; }
body.od-page.theme-b1:not(.help-page) .panel h2.od-h { display: block; margin: 0 0 12px; padding: 0 0 0 10px; border: 0; border-left: 3px solid var(--od-gold); border-radius: 0; background: none; color: var(--od-ink); font-size: 1.05rem; font-weight: 800; line-height: 1.3; }
.od-h-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
body.od-page.theme-b1:not(.help-page) .od-h-row h2.od-h { margin: 0; }
.od-hint { margin: 8px 0 0; color: var(--od-sub); font-size: 0.82rem; line-height: 1.55; }
.od-sub { margin: 12px 0 6px; color: #4b5563; font-size: 0.85rem; font-weight: 700; }
.od-label { display: block; margin-bottom: 4px; }

/* 作る書類（3つ。選んだものは黒に金の字） */
.od-docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.od-doc { position: relative; display: block; margin: 0; }
.od-doc input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.od-doc span { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 12px; border: 1px solid #d9d6cf; border-radius: 12px; background: #fff; color: var(--od-ink); }
.od-doc b { font-size: 0.98rem; font-weight: 800; }
.od-doc small { color: var(--od-sub); font-size: 0.76rem; font-weight: 600; }
.od-doc input:checked + span { border-color: #17171a; background: linear-gradient(145deg, #2c2c32, #121215); color: var(--od-gold-l); }
.od-doc input:checked + span small { color: #cdb98d; }
.od-doc input:focus-visible + span { outline: 2px solid var(--od-gold); outline-offset: 2px; }

/* 入れる欄 */
.od-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.od-field { display: block; min-width: 0; margin: 0 0 12px; color: #374151; font-size: 0.85rem; font-weight: 700; }
.od-wide { grid-column: 1 / -1; }
.od-page .od-field input[type="text"], .od-page .od-field input[type="tel"], .od-page .od-field input[type="date"], .od-page .od-field textarea, .od-page .od-deal select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; margin: 4px 0 0; padding: 8px 10px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; color: var(--od-ink); font: inherit; font-size: 1rem; font-weight: 400; }
.od-page .od-field textarea { min-height: 64px; resize: vertical; line-height: 1.6; }
.od-page .od-field input:focus, .od-page .od-field textarea:focus, .od-page .od-deal select:focus { outline: 2px solid var(--od-gold); outline-offset: 0; border-color: var(--od-gold); }
.od-unit { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-weight: 700; }
.od-page .od-unit input[type="text"] { width: 6em; margin: 0; }

/* 敬称・FAXのチェック（押すと黒に金の字） */
.od-seg, .od-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.od-seg label, .od-chips label { position: relative; display: block; margin: 0; }
.od-seg input, .od-chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.od-seg span, .od-chips span { display: flex; align-items: center; justify-content: center; min-width: 4.5em; min-height: 40px; padding: 0 14px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; color: var(--od-ink); font-size: 0.92rem; font-weight: 700; white-space: nowrap; }
.od-seg input:checked + span, .od-chips input:checked + span { border-color: #17171a; background: #17171a; color: var(--od-gold-l); }
.od-seg input:focus-visible + span, .od-chips input:focus-visible + span { outline: 2px solid var(--od-gold); outline-offset: 1px; }
.od-chips { margin: 0 0 12px; }

/* 案件から入れる（たたんでおく） */
.od-page button.od-link { width: auto; margin: 0; padding: 4px 2px; border: 0; background: none; color: #8a6a2c; font: inherit; font-size: 0.85rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.od-deal { margin: 0 0 14px; padding: 10px 12px; border: 1px solid #efe9dc; border-radius: 12px; background: #fffdf8; }
.od-deal .od-hint { margin-top: 6px; }

/* 送り主（店舗情報） */
.od-sender { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #efe9dc; border-radius: 12px; background: var(--od-soft); color: #374151; font-size: 0.88rem; line-height: 1.6; }
.od-sender b { display: block; color: var(--od-ink); font-size: 0.95rem; }
.od-sender .is-missing { color: #b42318; font-weight: 700; }

/* 送付状の書類の行 */
.od-items { display: grid; gap: 6px; margin-bottom: 8px; }
.od-item { display: grid; grid-template-columns: 1.6em minmax(0, 1fr) 5.2em 40px; align-items: center; gap: 6px; }
.od-item-no { color: var(--od-sub); font-size: 0.82rem; font-weight: 700; text-align: right; }
.od-page .od-item input { min-height: 42px; margin: 0; padding: 6px 10px; border: 1px solid #d9d6cf; border-radius: 10px; font-size: 1rem; }
.od-page .od-item input:focus { outline: 2px solid var(--od-gold); outline-offset: 0; border-color: var(--od-gold); }
.od-page button.od-x { width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; color: #9ca3af; font-size: 0.95rem; cursor: pointer; }
.od-page button.od-x:hover { border-color: #e5e7eb; background: var(--od-soft); color: #b42318; }
.od-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.od-page button.od-preset { width: auto; min-height: 36px; margin: 0; padding: 0 12px; border: 1px solid #e6d6b2; border-radius: 999px; background: #fff; color: #6f5420; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.od-page button.od-preset:hover { background: #fffaf0; }
.od-page button.od-preset.is-added { border-color: #e5e7eb; color: #9ca3af; }
.od-page button.od-btn { width: auto; min-height: 40px; margin: 0; padding: 0 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: var(--od-ink); font: inherit; font-weight: 700; cursor: pointer; }
.od-page button.od-btn:hover { background: var(--od-soft); }

/* 作る */
.od-make { margin: 4px 0 16px; }
.od-page button.od-main { display: block; width: 100%; min-height: 50px; margin: 0; padding: 0 18px; border: 0; border-radius: 12px; background: linear-gradient(145deg, #2c2c32, #121215); color: var(--od-gold-l); font: inherit; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.06em; cursor: pointer; }
.od-page button.od-main:hover { background: #0b0b0d; }
.od-page button.od-main:disabled { opacity: 0.55; cursor: default; }
.od-error { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #991b1b; font-size: 0.9rem; font-weight: 700; }
.od-result { margin: 0 0 16px; padding: 14px 16px; border: 1px solid #e6d6b2; border-radius: 14px; background: #fffaf0; }
.od-result-title { margin: 0 0 10px; color: #6f5420; font-size: 1.02rem; font-weight: 800; }
.od-result .dm-result-row { border: 1px solid #efe9dc; }
.od-result a.dl-open { background: #17171a; color: var(--od-gold-l); }
.od-result a.dl-open:hover { background: #0b0b0d; }

@media (max-width: 640px) {
  body.od-page .panel.od-panel { padding: 14px 14px; }
  .od-grid { grid-template-columns: minmax(0, 1fr); }
  .od-doc span { align-items: center; min-height: 52px; padding: 6px 4px; text-align: center; }
  .od-doc b { font-size: 0.86rem; letter-spacing: -0.02em; white-space: nowrap; }
  .od-doc small { display: none; }
  /* できた書類: 名前の下に「開く・印刷」「ダウンロード」を横に並べる */
  .od-result .dm-result-row b { flex-basis: 100%; }
}
/* スマホ: 題名の左の「業務支援」の札は出さない（1行に収める） */
@media (max-width: 480px) { body.od-page.theme-b1 .admin-header h1::before { display: none; } body.od-page .admin-header h1 { white-space: nowrap; } }

/* 「この業務をホーム画面に追加」（2026-10-18）: メニューのいちばん上と、ホームの区（スマホだけ） */
.m-sheet .m-sheet-addhome { display: block; width: 100%; min-height: 46px; margin: 6px 0 2px; padding: 0 12px; border: 1px solid #93c5fd; border-radius: 12px; background: #eff6ff; color: #1d4ed8; font-family: inherit; font-size: 0.92rem; font-weight: 800; cursor: pointer; }
.home-addapps { max-width: 1120px; margin: 14px auto 0; padding: 18px 20px 8px; border: 1px solid var(--eh-line, #e5e7eb); border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgba(20, 20, 20, 0.04); }
.home-addapps .home-dot { background: var(--eh-gold, #c9a45c); }
.home-addapps-note { margin: 2px 0 10px; color: #6b7280; font-size: 0.82rem; line-height: 1.5; }
.home-addapps-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding-bottom: 10px; }
.home-addapps-list a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; color: #111827; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.home-addapps-list img { width: 44px; height: 44px; border-radius: 10px; }
@media (min-width: 900px) {
  .home-addapps { display: none; }
}

/* 事務の書類: 保存した書類の一覧（2026-10-18） */
.od-count { margin-left: 6px; color: var(--od-sub, #6b7280); font-size: 0.85rem; font-weight: 700; }
.od-page .od-saved-search { display: block; width: 100%; min-height: 42px; margin: 0 0 10px; padding: 6px 10px; border: 1px solid #d9d6cf; border-radius: 10px; font: inherit; font-size: 1rem; }
.od-page .od-saved-search.hidden { display: none; }
.od-saved-list { display: grid; gap: 6px; }
.od-rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; border: 1px solid #efe9dc; border-radius: 12px; background: #fff; }
.od-page button.od-rec-open { display: block; width: 100%; min-width: 0; margin: 0; padding: 9px 12px; border: 0; border-radius: 12px; background: none; color: var(--od-ink, #111827); font: inherit; text-align: left; cursor: pointer; }
.od-page button.od-rec-open:hover { background: var(--od-soft, #faf8f3); }
.od-rec.is-current { border-color: var(--od-gold, #c9a35a); box-shadow: 0 0 0 1px var(--od-gold, #c9a35a) inset; }
.od-rec-title { display: block; overflow: hidden; font-size: 0.95rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.od-rec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; color: var(--od-sub, #6b7280); font-size: 0.78rem; }
.od-rec-tag { padding: 1px 7px; border: 1px solid #e6d6b2; border-radius: 999px; color: #6f5420; font-size: 0.75rem; font-weight: 700; }
.od-rec-sub { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.od-page .od-rec .od-x { margin-right: 4px; }
.od-editing { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid #e6d6b2; border-radius: 12px; background: #fffaf0; }
.od-editing.hidden { display: none; }
.od-editing p { margin: 0; color: #6f5420; font-size: 0.86rem; font-weight: 700; line-height: 1.5; }
.od-page button.od-save { display: block; width: 100%; margin-top: 8px; }
.od-saved-msg { text-align: center; color: #166534; font-weight: 700; }
.od-page .od-editing button.od-btn { flex: none; white-space: nowrap; }

/* お車ご購入後のご案内（2026-10-22）: 書類の名前・数・「通」の行 */
.kn-row .kn-label { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.dm-guide-row .kn-other { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 8px; font: inherit; font-size: 16px; }
.kn-trade-toggle { margin: 10px 0 8px; }
/* 書類の名前の入力欄がある行で、表が右にはみ出さないように */
#knSell, #knTrade { grid-template-columns: minmax(0, 1fr); }
.dm-guide-row .kn-other { width: 0; }

/* ===== 査定の入力画面 案B（2026-10-22 ユーザー「必須項目がわかりづらい」「システム感がない」→ 案B）=====
   紺と灰色の業務の表: 区の見出しは紺の帯、項目名は左の灰色のマス・入力は右。必須は赤い ●、足りない必須は赤い枠（.ap-miss）。
   admin-appraisal.js の decorateS3・renderS3。body.ap-s2.ap-s3（S2 の上に重ねる） */
body.ap-s3 { --s3-ink: #0f172a; --s3-head: #1e293b; --s3-line: #e2e8f0; --s3-box: #cbd5e1; --s3-cell: #f1f5f9; --s3-sub: #64748b; --s3-red: #dc2626; background: #f3f4f6; }
/* 上: 必須の棒・区のタブ */
body.ap-s3 .ap-req-bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; padding: 10px 12px; border-radius: 8px 8px 0 0; background: var(--s3-ink); color: #cbd5e1; font-size: 0.8rem; font-weight: 700; }
body.ap-s3 .ap-req-bar.hidden { display: none; }
body.ap-s3 .ap-req-num { color: #fff; white-space: nowrap; }
body.ap-s3 .ap-req-track { flex: 1; height: 7px; border-radius: 4px; background: #334155; overflow: hidden; }
body.ap-s3 .ap-req-track i { display: block; height: 100%; background: #38bdf8; transition: width 0.3s; }
body.ap-s3 .ap-req-bar.is-done .ap-req-track i { background: #22c55e; }
body.ap-s3 .ap-req-pct { min-width: 2.8em; text-align: right; }
body.ap-s3 .ap-progress { gap: 0; margin-top: 0; padding: 0; border: 1px solid var(--s3-line); border-top: 0; border-radius: 0 0 8px 8px; background: #fff; overflow: hidden; }
body.ap-s3.ap-s2 .ap-step, body.ap-s3.ap-s2 .ap-step:hover, body.ap-s3.ap-s2 .ap-step.is-done { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 1px; padding: 8px 2px 6px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: #fff; color: var(--s3-sub); font-size: 0.75rem; font-weight: 800; }
body.ap-s3.ap-s2 .ap-step.is-current, body.ap-s3.ap-s2 .ap-step.is-current:hover { border: 0; border-bottom: 3px solid var(--s3-ink); background: #fff; color: var(--s3-ink); }
body.ap-s3 .ap-step .ap-step-mark { display: none !important; }
body.ap-s3 .ap-step-left { display: block; color: var(--s3-red); font-size: 0.66rem; font-weight: 800; line-height: 1.2; }
body.ap-s3 .ap-step-left.is-ok { color: #16a34a; }
/* 区: 紺の見出しの帯・白い表 */
body.ap-s3.ap-s2 .ap-sec.panel { padding: 0 0 10px; border: 1px solid var(--s3-box); border-radius: 8px; background: #fff; overflow: hidden; }
body.ap-s3.ap-s2.theme-b1 .ap-sec h2.ap-h2 { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; padding: 11px 12px; background: var(--s3-head); color: #fff; font-size: 1rem; font-weight: 800; }
body.ap-s3.ap-s2 .ap-sec .ap-num { color: #fff; font-size: 1rem; }
body.ap-s3.ap-s2 .ap-sec .ap-num::before { content: ""; }
body.ap-s3.ap-s2 .ap-sec .ap-num::after, body.ap-s3.ap-s2 .ap-sec.is-done .ap-num::after { content: ". "; color: #fff; }
body.ap-s3 .ap-h2-left { margin-left: auto; color: #fca5a5; font-size: 0.74rem; font-weight: 800; white-space: nowrap; }
body.ap-s3 .ap-h2-left.is-ok { color: #86efac; }
body.ap-s3 .ap-h2-row { margin: 0 0 8px; padding: 0 12px 0 0; background: var(--s3-head); }
body.ap-s3 .ap-h2-row h2.ap-h2 { flex: 1; margin: 0 !important; }
body.ap-s3 .ap-h2-row .ap-score-inline { color: #fff; }
/* 中のものは左右を少し空ける。表の行（項目名・入力）は左右いっぱい */
body.ap-s3 .ap-sec > *:not(.ap-h2):not(.ap-h2-row):not(.ap-h3):not(.ap-choice-row):not(.ap-grid):not(label.dm-field):not(.ap-meter):not(.ap-import) { margin-left: 12px; margin-right: 12px; }
/* 小見出し: 灰色の帯 */
body.ap-s3.ap-s2 .ap-sec .ap-h3 { margin: 10px 0 0; padding: 7px 12px; border: 0; background: #e2e8f0; color: #475569; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; }
body.ap-s3.ap-s2 .ap-sec .ap-h3::before, body.ap-s3.ap-s2 .ap-sec .ap-h3::after { display: none; }
/* 表の行: 左＝項目名（灰色のマス）、右＝入力 */
body.ap-s3 .ap-sec .ap-grid { display: block; margin: 0; }
body.ap-s3.ap-s2 .ap-sec label.dm-field, body.ap-s3.ap-s2 .ap-sec .ap-choice-row { display: grid; grid-template-columns: 34% minmax(0, 1fr); align-items: stretch; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--s3-line); font-size: 0.86rem; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label { display: flex; flex-direction: column; justify-content: center; gap: 2px; margin: 0; padding: 9px 8px 9px 12px; border-right: 1px solid var(--s3-line); background: var(--s3-cell); color: #334155; font-size: 0.8rem; font-weight: 800; line-height: 1.35; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl small, body.ap-s3 .ap-sec .ap-choice-label small { font-size: 0.75rem; font-weight: 700; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > :not(.ap-lbl), body.ap-s3.ap-s2 .ap-sec .ap-choice-row > :not(.ap-choice-label) { margin: 6px 10px 6px 8px; align-self: center; }
/* 長い文の欄は、項目名を上・入力を下 */
body.ap-s3.ap-s2 .ap-sec label.dm-field:has(textarea) { grid-template-columns: 1fr; }
body.ap-s3.ap-s2 .ap-sec label.dm-field:has(textarea) > .ap-lbl { border-right: 0; border-bottom: 1px solid var(--s3-line); }
/* 入力欄: 細い四角の枠 */
body.ap-s3.ap-s2 .ap-sec input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.ap-s3.ap-s2 .ap-sec select, body.ap-s3.ap-s2 .ap-sec textarea { width: 100%; min-height: 40px; padding: 6px 8px; border: 1px solid var(--s3-box); border-radius: 4px; background: #fff; color: var(--s3-ink); font-weight: 600; }
body.ap-s3.ap-s2 .ap-sec input:focus, body.ap-s3.ap-s2 .ap-sec select:focus, body.ap-s3.ap-s2 .ap-sec textarea:focus { border-color: var(--s3-ink); box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12); }
body.ap-s3.ap-s2 .ap-sec input:disabled, body.ap-s3.ap-s2 .ap-sec select:disabled, body.ap-s3.ap-s2 .ap-sec textarea:disabled { border-color: var(--s3-line); background: #f8fafc; }
/* 選ぶボタン: 四角い小さめのボタン。選んだら紺 */
body.ap-s3 .ap-sec .ap-choices { gap: 4px; }
body.ap-s3.ap-s2 .ap-sec .ap-choice { min-height: 36px; padding: 4px 10px; border: 1px solid var(--s3-box); border-radius: 4px; background: #fff; color: var(--s3-ink); font-size: 0.82rem; font-weight: 700; }
body.ap-s3.ap-s2 .ap-sec .ap-choice.is-on, body.ap-s3.ap-s2 .ap-sec .ap-choice.is-on:hover, body.ap-s3.ap-s2 .ap-sec .ap-choice.is-on:disabled { border-color: var(--s3-ink); background: var(--s3-ink); color: #fff; }
body.ap-s3.ap-s2 .ap-eq.is-on, body.ap-s3.ap-s2 .ap-area.is-on, body.ap-s3.ap-s2 .ap-code-btn.is-on { border-color: var(--s3-ink); background: var(--s3-ink); color: #fff; }
/* 必須の印（赤い ●） */
body.ap-s3 .ap-req::after { content: " ●"; color: var(--s3-red); font-size: 0.7em; vertical-align: 0.15em; }
body.ap-s3 .ap-req-inline > :first-child::after { content: ""; }
/* 足りない必須: 赤い枠 */
body.ap-s3.ap-s2 .ap-sec .ap-miss input:not([type="checkbox"]):not([type="radio"]), body.ap-s3.ap-s2 .ap-sec .ap-miss select { border-color: #f87171; background: #fef2f2; }
body.ap-s3.ap-s2 .ap-sec .ap-miss .ap-choice:not(.is-on) { border-color: #f87171; }
body.ap-s3 .ap-sec .ap-miss > .ap-lbl, body.ap-s3 .ap-sec .ap-miss > .ap-choice-label { box-shadow: inset 3px 0 0 var(--s3-red); }
body.ap-s3 .ap-sec .ap-miss:not(label):not(.ap-choice-row):not(.ap-score-inline) { outline: 2px solid #fca5a5; outline-offset: 2px; border-radius: 6px; }
body.ap-s3 .ap-score-inline.ap-miss select { border-color: #f87171 !important; background: #fef2f2 !important; }
/* 大きなボタン（車検証を撮る など）: 点線の枠 */
body.ap-s3.ap-s2 .ap-sec .ap-big { border: 1px dashed #64748b; border-radius: 6px; background: #f8fafc; color: var(--s3-ink); font-weight: 800; }
/* 下のバー: 次へ＝紺 */
body.ap-s3.ap-s2 .ap-bottom { background: #fff; border-top: 1px solid var(--s3-line); }
body.ap-s3.ap-s2 .ap-bottom button.ap-prev { border: 1px solid var(--s3-box); border-radius: 6px; color: var(--s3-sub); }
body.ap-s3.ap-s2 .ap-bottom button.ap-next, body.ap-s3.ap-s2 .ap-bottom #apSubmit { border-radius: 6px; background: var(--s3-ink); color: #fff; box-shadow: none; }
body.ap-s3.ap-s2 .ap-bottom button.ap-next:hover, body.ap-s3.ap-s2 .ap-bottom #apSubmit:hover { background: #1e293b; }
body.ap-s3.ap-s2 .ap-bottom button.ap-bottom-left { color: var(--s3-red); }
/* 項目名のマス: ● を名前のすぐあとに。入力のマス: はみ出さない */
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label { flex-direction: row; flex-wrap: wrap; align-items: center; align-content: center; column-gap: 2px; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl small, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label small { flex-basis: 100%; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > input, body.ap-s3.ap-s2 .ap-sec label.dm-field > select, body.ap-s3.ap-s2 .ap-sec label.dm-field > textarea { width: auto; min-width: 0; justify-self: stretch; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-unit-wrap { min-width: 0; }
/* 入力の欄は、左右の空き（8px＋10px）を引いた幅に（input は stretch でも、まわりの空きを引かないので） */
body.ap-s3.ap-s2 .ap-sec label.dm-field > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), body.ap-s3.ap-s2 .ap-sec label.dm-field > select:not([multiple]) { box-sizing: border-box; width: calc(100% - 18px); justify-self: start; }
body.ap-s3.ap-s2 .ap-sec label.dm-field:has(textarea) > textarea:not([disabled]), body.ap-s3.ap-s2 .ap-sec label.dm-field:has(textarea) > textarea { box-sizing: border-box; width: calc(100% - 22px); margin: 8px 11px; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label { justify-content: flex-start; text-align: left; }
/* 小見出しの必須の印 */
body.ap-s3.ap-s2 .ap-sec .ap-h3.ap-req::after { display: inline; content: " ●"; color: var(--s3-red); }
/* 展開図の見出し: 左に「4. 展開図」と残り、右に評価点（小さく1行） */
body.ap-s3 .ap-h2-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; }
body.ap-s3.ap-s2.theme-b1 .ap-h2-row h2.ap-h2 { flex: 1 1 auto; min-width: 0; }
body.ap-s3.ap-s2 .ap-h2-row .ap-score-inline { display: flex; flex-direction: row; align-items: center; gap: 6px; margin: 6px 0; color: #fff; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
body.ap-s3.ap-s2 .ap-h2-row .ap-score-inline select { width: 6.5em; min-height: 34px; padding: 2px 6px; border-radius: 4px; }
body.ap-s3.ap-s2.theme-b1 .ap-sec .ap-h2-row h2.ap-h2 { padding: 11px 12px !important; }
body.ap-s3.ap-s2 .ap-h2-row .ap-score-inline { margin: 0 0 8px 12px; }

/* 査定 案B: 説明の文はふだんかくす（「説明を出す」で出る。2026-10-22 ユーザー「説明文が多いのかごちゃごちゃしている」）。
   大切なもの（必須 ●）が目立つよう、任意の項目名はうすく */
body.ap-s3:not(.ap-help-on) .ap-sec .ap-hint:not(.ap-drive-hint),
body.ap-s3:not(.ap-help-on) .ap-sec p.ap-muted,
body.ap-s3:not(.ap-help-on) .ap-sec .gl-small,
body.ap-s3:not(.ap-help-on) .ap-sec .ap-legend,
body.ap-s3:not(.ap-help-on) .ap-sec .ap-ext-mean,
body.ap-s3:not(.ap-help-on) .ap-sec #apInteriorHint,
body.ap-s3:not(.ap-help-on) .ap-sec .ap-eq-left,
body.ap-s3:not(.ap-help-on) .ap-sec .ap-int-sub,
body.ap-s3:not(.ap-help-on) .ap-ai-cost { display: none !important; }
body.ap-s3 .ap-view-toggle { display: flex; justify-content: flex-end; gap: 16px; }
body.ap-s3 .ap-view-toggle .ap-help-btn { color: #475569; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl:not(.ap-req), body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label:not(.ap-req) { color: #64748b; font-weight: 700; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl.ap-req, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label.ap-req { color: #0f172a; font-weight: 900; }

/* 装備の種類を選ぶ窓（2026-10-22。サンルーフ → シングル・ツイン、ナビ → メーカーナビ など）*/
.ap-sub-fields { display: grid; gap: 12px; }
.ap-sub-group { display: grid; gap: 6px; }
.ap-sub-label { margin: 0; color: #334155; font-size: 0.85rem; font-weight: 800; }
.ap-sub-head { margin: 4px 0 -4px; padding-top: 8px; border-top: 1px solid #e2e8f0; color: #1e293b; font-size: 0.9rem; font-weight: 900; }
.ap-sub-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ap-sub-choice { min-height: 48px; margin: 0; padding: 8px 10px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; color: #1e293b; font: inherit; font-size: 0.98rem; font-weight: 700; line-height: 1.3; cursor: pointer; }
.ap-sub-choice.is-on { border-color: #1e3a8a; background: #1e3a8a; color: #fff; }
.ap-sub-text input { font-size: 16px; }
.ap-sub-dialog .ap-dialog-actions button { min-width: 6em; }
.ap-sub-dialog .ap-dialog-actions #apSubRemove { margin-right: auto; color: #b91c1c; }
/* 選んだあとの1行（押すと窓をまた開く）*/
.ap-eq-rows .ap-eq-row.ap-eq-subsum { display: block !important; margin-left: 0 !important; padding: 4px 0 8px 12px !important; background: transparent; box-sizing: border-box; }
.ap-eq-rows .ap-eq-row.ap-eq-subsum > .ap-subsum { display: flex; width: 100%; justify-content: space-between; }
.ap-subsum { display: inline-flex; align-items: center; gap: 10px; width: auto; max-width: 100%; margin: 0; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; color: #1e293b; font: inherit; font-size: 0.92rem; font-weight: 700; text-align: left; cursor: pointer; }
.ap-subsum-val { min-width: 0; overflow-wrap: anywhere; }
.ap-subsum-edit { flex: none; color: #1d4ed8; font-size: 0.8rem; font-weight: 800; }
.ap-subsum.is-empty { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.ap-subsum:disabled { cursor: default; }
.ap-eq.is-ask { box-shadow: 0 0 0 2px #fca5a5 inset; }

/* ===== ENDLESS の決まりにそろえる（2026-10-22 ユーザー「Aのほうがいいけど色分けはしたい」「今確かに統一感ないしね」→ 案A＋色分け「これで」）=====
   ホーム（黒×金）と同じ決まりを、theme-b1 の画面（ホーム・ログイン以外の全部）に。
   ・地はうすいベージュ、カードは白、線はうすい茶色。押して進めるボタンは黒（前は青）。
   ・色は「種類」と「状態」を見分けるときだけ（案件の状態＝オレンジ・青・緑・紫・青緑・茶。業務支援の種類＝金・青・緑・灰）。赤は急ぎ・まだ。
   元に戻すときは、このまとまりを消す */
body.theme-b1 {
  --bg: #f3f1ec; --card: #fff; --border: #e6e1d6; --text: #17171a;
  --accent: #17171a; --accent-dark: #000;
  --eh-ink: #17171a; --eh-sub: #5f5f67; --eh-line: #e6e1d6; --eh-gold: #c9a35a; --eh-gold-d: #8a6a2c;
  /* 案件の状態の色（いまの色の仲間のまま、少し深く） */
  --st-pending: #c26a12; --st-pending-bg: #fdf1e3;
  --st-submitted: #2c5bb8; --st-submitted-bg: #e9effb;
  --st-contracted: #1f8a5e; --st-contracted-bg: #e5f4ec;
  --st-collected: #6d43b3; --st-collected-bg: #efe9f9;
  --st-paid: #1f7891; --st-paid-bg: #e3f1f5;
  --st-lien: #9a5a34; --st-lien-bg: #f6ebe3;
  --st-completed: #3f6b4f; --st-completed-bg: #e8f0ea;
  background: var(--bg);
  color: var(--text);
}
body.theme-b1[data-group="tools"] { --grp: #8a6a2c; --grp-soft: #fbf5e8; --grp-line: #ecdcb8; --grp-text: #5c4419; }
/* 上の帯: 題名は黒く大きく。ホームは白・メニューは黒・ログイン中の店舗は金（ホームと同じ） */
body.theme-b1 .admin-header h1 { color: var(--eh-ink); font-weight: 800; letter-spacing: 0.02em; }
body.theme-b1 .m-home-btn { border-color: var(--eh-line); background: #fff; color: var(--eh-ink); }
body.theme-b1 .m-home-btn:hover { background: #faf8f3; }
body.theme-b1 .m-menu-btn { border-color: var(--eh-ink); background: var(--eh-ink); color: #fff; }
body.theme-b1 .m-menu-btn:hover { background: #000; }
body.theme-b1 .m-store-btn { border-color: #ecdcb8; background: #fbf5e8; color: var(--eh-gold-d); }
body.theme-b1 .m-store-btn:hover { background: #f6ecd6; }
/* パネル: 白に細い線。見出しは白地に、左に種類の色の線（地の色はやめる） */
body.theme-b1 .panel { border-color: var(--eh-line); border-radius: 16px; box-shadow: none; }
body.theme-b1:not(.help-page) .panel h2:not(.nb-month-title) {
  background: #fff; color: var(--eh-ink); border-bottom-color: var(--eh-line);
}
/* 押して進めるボタン（黒）・枠だけのボタン（白） */
body.theme-b1 :where(.btn-ghost) { border-color: #d9d3c5; color: var(--eh-ink); background: #fff; }
body.theme-b1 :where(.btn-ghost):hover { background: #faf8f3; }
body.theme-b1 input:focus-visible, body.theme-b1 select:focus-visible, body.theme-b1 textarea:focus-visible { outline: 2px solid var(--eh-gold); outline-offset: 1px; }
/* 行の間（日本語は少し広め）と、句読点が行の頭に来ないように */
body.theme-b1 { line-height: 1.7; line-break: strict; }

/* --- 業務支援: 種類ごとの色（見出しの線・アイコンの字・下の帯）。アイコンの四角は黒（ホームと同じ）--- */
.support-page .home-group.sp-fav { --k: #b8914a; --k-ic: #c9a35a; }
.support-page .home-group.sp-calc { --k: #2c5bb8; --k-ic: #8fb0ee; }
.support-page .home-group.sp-doc { --k: #1f8a5e; --k-ic: #7fd1ad; }
.support-page .home-group.sp-help { --k: #6b6b73; --k-ic: #c4c4ca; }
.support-page .home-group[class*="sp-"] .home-group-title { gap: 8px; color: var(--k); font-size: 0.85rem; letter-spacing: 0.04em; }
.support-page .home-group[class*="sp-"] .home-group-title .home-dot { width: 4px; height: 15px; border-radius: 2px; background: var(--k); }
.support-page .home-group[class*="sp-"] .home-group-title::after { content: ""; flex: 1; height: 1px; background: var(--eh-line); }
.support-page .home-group[class*="sp-"] .home-cells > .home-cell {
  position: relative; overflow: hidden; border: 1px solid var(--eh-line); border-radius: 14px; box-shadow: none; color: var(--eh-ink); font-weight: 800;
}
.support-page .home-group[class*="sp-"] .home-cells > .home-cell::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--k); }
.support-page .home-group[class*="sp-"] .home-cells > .home-cell:hover { border-color: var(--k); box-shadow: none; }
.support-page .home-group[class*="sp-"] .home-cells > .home-cell svg { color: var(--k-ic); background: linear-gradient(#2b2b30, #141416); box-shadow: none; }

/* --- 案件一覧: 状態ごとの色（上の件数の札・カードの左の帯・パソコンの列の上の線）--- */
.deal-stage-chip-pending { --chip-color: var(--st-pending, #92400e); --chip-bg: var(--st-pending-bg, #fef3c7); }
.deal-stage-chip-submitted { --chip-color: var(--st-submitted, #1d4ed8); --chip-bg: var(--st-submitted-bg, #dbeafe); }
.deal-stage-chip-contracted { --chip-color: var(--st-contracted, #065f46); --chip-bg: var(--st-contracted-bg, #d1fae5); }
.deal-stage-chip-collected { --chip-color: var(--st-collected, #7c3aed); --chip-bg: var(--st-collected-bg, #ede9fe); }
.deal-stage-chip-paid { --chip-color: var(--st-paid, #0e7490); --chip-bg: var(--st-paid-bg, #cffafe); }
.deal-stage-chip-lien_waiting { --chip-color: var(--st-lien, #b45309); --chip-bg: var(--st-lien-bg, #ffedd5); }
body.theme-b1 .btn-open-contract { background: var(--eh-ink); }
body.theme-b1 .btn-open-contract:hover { background: #000; }
/* パソコンの列: 地は状態のうすい色、上に状態の色の線。カードは白 */
body.theme-b1 .deal-board-col { border-top: 4px solid var(--dot); }
body.theme-b1 .deal-board-col.is-pending { background: var(--st-pending-bg); --col: var(--st-pending); --dot: var(--st-pending); --line: var(--eh-line); }
body.theme-b1 .deal-board-col.is-submitted { background: var(--st-submitted-bg); --col: var(--st-submitted); --dot: var(--st-submitted); --line: var(--eh-line); }
body.theme-b1 .deal-board-col.is-contracted { background: var(--st-contracted-bg); --col: var(--st-contracted); --dot: var(--st-contracted); --line: var(--eh-line); }
body.theme-b1 .deal-board-col.is-collected { background: var(--st-collected-bg); --col: var(--st-collected); --dot: var(--st-collected); --line: var(--eh-line); }
body.theme-b1 .deal-board-col.is-paid { background: var(--st-paid-bg); --col: var(--st-paid); --dot: var(--st-paid); --line: var(--eh-line); }
body.theme-b1 .deal-board-card { border-left: 4px solid var(--dot); }
body.theme-b1 .deal-board-name { font-size: 0.95rem; }
@media (max-width: 640px) {
  /* スマホのカード: 細い線＋左に状態の色の帯（前は黒い太い枠）。上の帯は状態のうすい色 */
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr,
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage] { border: 1px solid var(--eh-line); border-left: 5px solid #cbd5e1; border-radius: 12px; box-shadow: none; }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="pending"] { border-left-color: var(--st-pending); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="submitted"] { border-left-color: var(--st-submitted); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="contracted"] { border-left-color: var(--st-contracted); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="collected"] { border-left-color: var(--st-collected); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="paid"] { border-left-color: var(--st-paid); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="completed"] { border-left-color: var(--st-completed); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="pending"] td.c-status { background: var(--st-pending-bg); color: var(--st-pending); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="submitted"] td.c-status { background: var(--st-submitted-bg); color: var(--st-submitted); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="contracted"] td.c-status { background: var(--st-contracted-bg); color: var(--st-contracted); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="collected"] td.c-status { background: var(--st-collected-bg); color: var(--st-collected); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="paid"] td.c-status { background: var(--st-paid-bg); color: var(--st-paid); }
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody tr[data-stage="completed"] td.c-status { background: var(--st-completed-bg); color: var(--st-completed); }
  /* お客様の名前: 黒く大きく（下線はやめ、押しやすい広さと「›」はそのまま） */
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody td.c-name > a {
    color: var(--eh-ink); font-weight: 800; text-decoration: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 13'%3E%3Cpath d='M1.5 1.5l5 5-5 5' fill='none' stroke='%2317171a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
  /* 「概要を見る」: 白に細い線（黒いボタンは「次にやること」1つだけ） */
  body.theme-b1.design-v2 #dealListDetails .deal-table tbody td.c-name .deal-summary-btn { background: #fff; color: var(--eh-ink); border-color: #d9d3c5; }
}
/* 次にやることのボタン（入庫済み・振込依頼済み・完了・所有権解除）も黒にそろえる（前は状態の色で塗っていた。色は帯と札で見分ける） */
body.theme-b1 :is(.btn-stage-collected, .btn-stage-paid, .btn-stage-completed, .btn-lien-next, .deal-table td button.deal-next-mobile[class*="btn-stage-"], .tr-paid) { background: var(--eh-ink); color: #fff; }
body.theme-b1 :is(.btn-stage-collected, .btn-stage-paid, .btn-stage-completed, .btn-lien-next, .tr-paid):hover { background: #000; }
/* 小さなリンク（リピーター様はこちら など）: 黒の下線 */
body.theme-b1 .deal-h2-link { color: var(--eh-ink); }
/* アプリ追加の案内: 白に細い線（前は青） */
body.theme-b1 .install-banner { border-color: var(--eh-line); background: #fff; box-shadow: inset 4px 0 0 var(--eh-gold); }
/* 業務支援の中の画面（自動車税・書類を作る・名刺 など）で、前の業務支援の色（オレンジ）で塗っていたもの:
   押して進めるボタンは黒、選んでいる印は黒の枠、強調の字は濃い金 */
body.theme-b1 :is(.dm-make button, a.dl-open, label.dm-shaken-btn, a.kanpu-open) { background: var(--eh-ink); color: #fff; }
body.theme-b1 :is(button.ct-kind.is-on, button.sb-q.is-open, .bc-seg button[aria-pressed="true"]) { background: var(--eh-ink); border-color: var(--eh-ink); color: #fff; }
body.theme-b1 :is(label.sk-pick:has(input:checked), button.bc-car[aria-pressed="true"], button.bc-tpl[aria-pressed="true"]) { border-color: var(--eh-ink); background: #faf6ec; }
body.theme-b1 .sb-spec-choices label:has(input:checked) { border-color: var(--eh-ink); background: #faf6ec; color: var(--eh-ink); }
body.theme-b1 :is(.ct-line.is-main .ct-line-value, .rl-more summary, a.sb-records-link, .sb-top-links a) { color: var(--eh-gold-d); }
body.theme-b1 :is(button.ac-copy, label.rl-shaken-btn) { border-color: #d9d3c5; color: var(--eh-ink); }
body.theme-b1 .gs-consent button.gs-go { border-color: var(--eh-ink); color: var(--eh-ink); }
/* パソコンの左のメニュー（黒×金）を、ホーム以外の画面にも（2026-10-22。admin-sidebar.js の buildEhSide）。中身の見た目はホームの .eh-side と同じ */
body.has-eh-side { --eh-red: #d6312a; }
body.has-eh-side .eh-side svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1024px) {
  body.has-eh-side { padding-left: 232px; }
}
@media (min-width: 1024px) {
  body.has-eh-side .ap-bottom { left: 232px; }
}
/* 査定の入力（案B の紺）も、黒×金に（2026-10-22 ユーザー「2はそろえて」）。形（表・必須の ●・赤い枠）はそのまま、色だけ */
body.ap-s3 { --s3-ink: #17171a; --s3-head: #26262b; --s3-line: #e6e1d6; --s3-box: #d9d3c5; --s3-cell: #f7f5f0; --s3-sub: #6e6e76; background: #f3f1ec; }
body.ap-s3 .ap-req-track { background: #3a3a40; }
body.ap-s3 .ap-req-track i { background: #c9a35a; }
body.ap-s3.ap-s2 .ap-sec .ap-h3 { background: #ece8de; color: #5c5850; }
body.ap-s3.ap-s2 .ap-sec input:disabled, body.ap-s3.ap-s2 .ap-sec select:disabled, body.ap-s3.ap-s2 .ap-sec textarea:disabled, body.ap-s3.ap-s2 .ap-sec .ap-big { background: #faf8f3; }
body.ap-s3.ap-s2 .ap-sec .ap-big { border-color: #b9b2a3; }
body.ap-s3.ap-s2 .ap-bottom button.ap-next:hover, body.ap-s3.ap-s2 .ap-bottom #apSubmit:hover { background: #000; }
body.ap-s3 .ap-view-toggle .ap-help-btn { color: #5c5850; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl:not(.ap-req), body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label:not(.ap-req) { color: #6e6e76; }
body.ap-s3.ap-s2 .ap-sec label.dm-field > .ap-lbl.ap-req, body.ap-s3.ap-s2 .ap-sec .ap-choice-row > .ap-choice-label.ap-req { color: #17171a; }
body.ap-s3 .ap-sub-label { color: #3a3a40; }
body.ap-s3 .ap-sub-head { border-top-color: #e6e1d6; color: #17171a; }
body.ap-s3 .ap-sub-choice { border-color: #d9d3c5; color: #17171a; }
body.ap-s3 .ap-sub-choice.is-on { border-color: #17171a; background: #17171a; color: #fff; }
body.ap-s3 .ap-subsum { border-color: #d9d3c5; background: #faf8f3; color: #17171a; }
body.ap-s3 .ap-subsum-edit { color: #8a6a2c; }
/* 契約書の画面（deal.html）の大見出し: 色の地をやめて白に。左の線と ▸ の色で種類を見分ける（案件情報＝青・お客様提出＝青緑・担当者入力＝紫・PDF＝緑・危険＝赤）。2026-10-22 */
body.theme-b1 #mainPanel > summary { --panel-accent: #2c5bb8; }
body.theme-b1 #submissionPanel > summary { --panel-accent: #1f7891; }
body.theme-b1 #staffPanel > summary { --panel-accent: #6d43b3; }
body.theme-b1 #pdfPanel > summary { --panel-accent: #1f8a5e; }
body.theme-b1 .danger-panel > summary { --panel-accent: #c62a23; }
body.theme-b1 :is(#mainPanel, #submissionPanel, #staffPanel, #pdfPanel, .danger-panel) > summary { background: #fff; color: var(--eh-ink); }
body.theme-b1 .deal-summary-head, body.theme-b1.design-v2 .deal-summary-head { background: var(--eh-ink); }
body.theme-b1 .deal-page .staff-group-details input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.theme-b1.deal-page .staff-group-details input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) { border-color: #9c9586; }
body.theme-b1 :is(.deal-hero-msg button, .deal-hero-msg a, .profit-sim-link, .gl-ext a) { color: var(--eh-ink); border-color: #d9d3c5; }
/* 左の黒い帯（.eh-side）の中のリンク（「業務支援」の見出し・下の「使い方」）は除く。黒地に黒い字になっていた（2026-10-22 全体テスト） */
body.theme-b1 a:not([class]):where(:not(.eh-side a)), body.theme-b1 .customer-name-short a { color: var(--eh-ink); }
/* 青のまま残っていたボタン・選んでいる印を、黒にそろえる（2026-10-22 全体テスト）
   案件の画面の「お見積書」「書類を作る」「連絡文」（ボタンそのものが .deal-hero-msg） */
body.theme-b1 :is(button.deal-hero-msg, a.deal-hero-msg) { color: var(--eh-ink); border-color: #d9d3c5; }
body.theme-b1 :is(button.deal-hero-msg, a.deal-hero-msg):hover { background: #faf8f3; }
/* AI の費用の日数・統計の切り替え（選んでいるものは黒地に白） */
body.theme-b1 .ai-days .is-on, body.theme-b1 button.stat-tab.is-active { background: var(--eh-ink); border-color: var(--eh-ink); color: #fff; }
/* 通知の設定のスイッチ */
body.theme-b1 .notify-check input[type="checkbox"]:checked { background: var(--eh-ink); }
body.theme-b1 .notify-check input[type="checkbox"]:focus-visible { outline-color: var(--eh-gold); }
/* ダウンロードのあとのお知らせ（黒い帯）の「開く」は金、「メールで送る」は黒い字 */
body.theme-b1 .dl-toast .dl-toast-main { background: var(--eh-gold); color: var(--eh-ink); }
body.theme-b1 .dl-toast .dl-toast-mail-btn { color: var(--eh-ink); }
/* 案件の画面の段階: いまの段階の丸のまわり（前は青）と「次にやること」の地（前はうすい青）を金の仲間に */
body.theme-b1 .deal-step.is-current .deal-step-num { box-shadow: 0 0 0 4px rgba(201, 163, 90, 0.35); }
body.theme-b1 .deal-steps-next:not(.is-complete) { background: #faf6ec; }
/* メニュー: いま開いている画面の枠は黒、「ホーム画面に追加」は黒いボタン、「かんたん表示にする」は白に細い線 */
:is(body.theme-b1, body.eh-home) .m-sheet-tile.active { border-color: var(--eh-ink); }
:is(body.theme-b1, body.eh-home) .m-sheet .m-sheet-addhome { border-color: var(--eh-ink); background: var(--eh-ink); color: #fff; }
:is(body.theme-b1, body.eh-home) .m-sheet .m-sheet-chip.m-sheet-simple { border-color: #d9d3c5; color: var(--eh-ink); }
/* ホームのアプリ追加の案内も、ほかの画面と同じ白に細い線・黒い字（前は青） */
body.eh-home .install-banner { border-color: var(--eh-line); background: #fff; box-shadow: inset 4px 0 0 var(--eh-gold); }
body.eh-home .install-banner .install-lead { color: var(--eh-ink); }
body.theme-b1 :is(.sl-bystaff-btn, .lc-tel a) { color: var(--eh-ink); }
body.theme-b1 .shaken-view-btn { border-color: #d9d3c5; }
body.theme-b1 #trSummary.tr-summary, body.theme-b1 .tr-summary-count, body.theme-b1 .tr-summary-total { color: var(--eh-ink); }
/* 査定: 車検証がないとき（2026-10-22）。切り替えのボタン・コーションプレートの写真の枠 */
.ap-noshaken { margin: 8px 0 0; }
button.ap-noshaken-toggle { width: auto; margin: 0; padding: 8px 14px; border: 1px dashed #b9b2a3; border-radius: 999px; background: #fff; color: #5c5850; font-size: 0.88rem; font-weight: 700; }
button.ap-noshaken-toggle.is-on { border-style: solid; border-color: #c62a23; background: #fdecea; color: #b42318; }
.ap-noshaken-box { margin: 10px 0 4px; padding: 12px 14px; border: 2px solid #c62a23; border-radius: 12px; background: #fff7f6; }
.ap-noshaken-title { margin: 0 0 4px; color: #b42318; font-size: 1rem; font-weight: 900; }
.ap-noshaken-text { margin: 0 0 10px; color: #3a3a40; font-size: 0.88rem; line-height: 1.7; }
.ap-noshaken-plate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ap-noshaken-state { font-size: 0.9rem; font-weight: 800; color: #b42318; }
.ap-noshaken-state.is-ok { color: #1f8a5e; }
button.ap-big.ap-noshaken-shot { width: auto; flex: 1 1 200px; margin: 0; }
.ap-noshaken-box.ap-miss { box-shadow: 0 0 0 3px rgba(198, 42, 35, 0.25); }
/* 車検証がないときは「車検証を撮る」をかくす（.ap-shaken-actions.hidden） */
.ap-shaken-actions.hidden { display: none !important; }
p.ap-noshaken-state { margin: 0 0 8px; }
.ap-noshaken-box .ap-photos-one { margin: 0 0 10px; }
/* 書類を作る: お客様の名前・住所の字体（2026-10-22）。毛筆は名刺と同じ Yuji Syuku（上の @font-face） */
.dm-fontpick { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--eh-line, #e6e1d6); }
.dm-fontpick-h { margin: 0 0 6px; font-size: 0.85rem; font-weight: 800; }
.dm-fontpick-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.dm-fontopt { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.dm-fontopt input { position: absolute; opacity: 0; pointer-events: none; }
.dm-fontopt-name { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid #d9d3c5; border-radius: 10px; background: #fff; font-size: 1rem; }
.dm-fontopt input:checked + .dm-fontopt-name { border-color: #17171a; box-shadow: inset 0 0 0 1px #17171a; background: #faf6ec; font-weight: 700; }
.dm-fontopt input:focus-visible + .dm-fontopt-name { outline: 2px solid #c9a35a; outline-offset: 2px; }
.is-mincho { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif CJK JP", serif; }
.is-gothic { font-family: "Hiragino Sans", "Noto Sans CJK JP", sans-serif; }
.is-brush { font-family: 'Yuji Syuku', serif; }
.dm-font-sample { display: grid; gap: 2px; margin: 10px 0 0; padding: 10px 14px; border: 1px solid #e6e1d6; border-radius: 10px; background: #fff; }
.dm-font-sample-name { font-size: 1.35rem; }
.dm-font-sample-addr { font-size: 0.95rem; }
.dm-fontpick { margin-top: 0; padding-top: 0; border-top: 0; }

/* 保険請求管理（2026-10-22。幡野さんのアプリ。中の見た目は /assets/insurance/invoice.css） */
.insurance-wrap { max-width: 860px; }
.insurance-status { margin: 0 0 8px; font-size: 12px; color: var(--muted, #6b6b70); }
.insurance-status.is-error { color: #b42318; font-weight: 600; }
/* 色だけ ENDLESS の決まり（黒）にそろえる */
body.insurance-page .inv-app { --inv-main: var(--accent, #17171a); --inv-main-d: var(--accent, #17171a); --inv-bg: transparent; border-radius: 12px; overflow: clip; }
/* ボタンの字の色（.inv-app button の color: inherit が .inv-btn の白に勝ってしまうため） */
body.insurance-page .inv-app .inv-btn { color: #fff; }
body.insurance-page .inv-app .inv-btn.sub { color: var(--inv-main); }
body.insurance-page .inv-app .inv-btn.gray { color: var(--inv-text); }
body.insurance-page .inv-app .inv-btn.danger { color: var(--inv-danger); }

/* 代車管理の保険代車（2026-10-22。保険請求管理に取り込む） */
.lc-ins { margin: 4px 0 12px; padding: 10px 12px; border: 1px solid var(--line, #e2ded5); border-radius: 10px; background: #fff; }
.lc-ins-check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.lc-ins-check input { width: 20px; height: 20px; margin: 0; }
.lc-ins-more { margin-top: 10px; }
.lc-ins-more .lc-hint { margin: 0; font-size: 12px; color: var(--muted, #6b6b70); }
.lc-ins-badge { display: inline-block; align-self: flex-start; padding: 1px 8px; border-radius: 99px; background: #e8f0fe; color: #1e40af; font-size: 12px; font-weight: 600; }
/* 保険請求管理: 代車管理とつないだので、見本の取り込みボタンは出さない */
body.insurance-page .inv-app [data-act="demoRentals"] { display: none; }

/* ===== 受注リスト（2026-10-23。public/admin/want-list.html）: 白いカード・細い線・黒×金のボタン（ENDLESS の決まり）。スマホ優先 ===== */
body.wl-page .panel.wl-panel { padding: 14px 16px 18px; border: 1px solid var(--eh-line, #e6e1d6); border-radius: 16px; background: #fff; box-shadow: none; }
.wl-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.wl-lead { flex: 1 1 260px; margin: 0; color: #5f5f67; font-size: 0.88rem; }
.wl-page a.wl-main-btn, .wl-page button.wl-main-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 18px; border: 0; border-radius: 10px; background: linear-gradient(145deg, #2c2c32, #121215); color: #f1dfb3; font: inherit; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer; }
.wl-page a.wl-main-btn:hover, .wl-page button.wl-main-btn:hover { background: #0b0b0d; }
.wl-page button.wl-main-btn:disabled { opacity: 0.5; cursor: default; }
.wl-page a.wl-btn, .wl-page button.wl-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid #d9d3c5; border-radius: 10px; background: #fff; color: #17171a; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.wl-page button.wl-danger { margin-right: auto; border-color: #f3c6c3; color: #b42318; }
.wl-page button.wl-link { margin: 6px 0 0; padding: 4px 0; border: 0; background: none; color: #8a6a2c; font: inherit; font-size: 0.86rem; font-weight: 700; text-decoration: underline; cursor: pointer; }
.wl-msg { margin: 0 0 10px; padding: 8px 12px; border: 1px solid #e6d6b2; border-radius: 10px; background: #fffaf0; color: #6f5420; font-size: 0.9rem; font-weight: 700; }
.wl-msg.is-error, .wl-error { border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #991b1b; }
.wl-error { margin: 8px 0 0; padding: 8px 12px; font-size: 0.9rem; font-weight: 700; }
.wl-empty { margin: 10px 0; color: #5f5f67; font-size: 0.92rem; }
.wl-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 8px; padding: 2px; scrollbar-width: none; }
.wl-tabs::-webkit-scrollbar { display: none; }
.wl-page button.wl-tab { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 38px; margin: 0; padding: 0 12px; border: 1px solid #e6e1d6; border-radius: 999px; background: #fff; color: #3f3f46; font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer; }
.wl-tab b { min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: #f3f1ec; font-size: 0.78rem; text-align: center; }
.wl-page button.wl-tab[aria-selected="true"] { border-color: #17171a; background: #17171a; color: #f1dfb3; }
.wl-tab[aria-selected="true"] b { background: #33333a; color: #f1dfb3; }
.wl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 12px; }
.wl-page input.wl-search { flex: 1 1 220px; min-width: 0; min-height: 42px; margin: 0; padding: 0 12px; border: 1px solid #d9d3c5; border-radius: 10px; font: inherit; font-size: 16px; }
.wl-mine { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700; white-space: nowrap; }
.wl-mine input { width: 20px; height: 20px; margin: 0; }
.wl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.wl-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid #e6e1d6; border-left: 5px solid #c9a35a; border-radius: 12px; background: #fff; color: #17171a; text-decoration: none; }
.wl-card:hover { border-color: #c9a35a; background: #fffdf8; }
.wl-card.is-found { border-left-color: #1f8a5e; }
.wl-card.is-dropped { border-left-color: #b8b8be; opacity: 0.8; }
.wl-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 0.82rem; }
.wl-card-who { color: #5f5f67; font-weight: 700; }
.wl-own { padding: 0 7px; border-radius: 999px; background: #fbf5e8; color: #8a6a2c; font-size: 0.74rem; font-weight: 800; }
.wl-card-title { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wl-card-foot { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: 0; color: #6b6b73; font-size: 0.8rem; }
.wl-due.is-late { color: #c0262d; font-weight: 800; }
.wl-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; background: #17171a; color: #f1dfb3; font-size: 0.76rem; font-weight: 800; white-space: nowrap; }
.wl-pill.is-found { background: #e5f4ec; color: #1f6f4c; }
.wl-pill.is-dropped { background: #f1f1f3; color: #6b6b73; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.wl-chip { padding: 1px 9px; border: 1px solid #e6e1d6; border-radius: 999px; background: #faf8f3; color: #3f3f46; font-size: 0.8rem; font-weight: 700; line-height: 1.7; }
.wl-chip.is-car { border-color: #17171a; background: #17171a; color: #f1dfb3; }
.wl-chip.is-not { border-color: #f3c6c3; background: #fef2f2; color: #b42318; }
.wl-chip.is-money { border-color: #ecdcb8; background: #fbf5e8; color: #6f5420; }
.wl-chip.is-more { background: #fff; color: #8a8a92; }
.wl-back { display: inline-block; margin: 0 0 10px; color: #8a6a2c; font-weight: 800; text-decoration: none; }
.wl-detail { display: flex; flex-direction: column; gap: 10px; }
.wl-detail-title { margin: 0; padding: 0; border: 0; background: none; font-size: 1.2rem; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.wl-cap { margin: 0 0 4px; color: #8a6a2c; font-size: 0.8rem; font-weight: 800; }
.wl-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid #efe9dc; font-size: 0.95rem; }
.wl-facts dt { color: #6b6b73; font-weight: 700; white-space: nowrap; }
.wl-facts dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.wl-facts dd a { color: #17171a; font-weight: 800; }
.wl-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-page button.wl-seg-btn { min-height: 42px; margin: 0; padding: 0 14px; border: 1px solid #d9d3c5; border-radius: 10px; background: #fff; color: #17171a; font: inherit; font-weight: 700; cursor: pointer; }
.wl-page button.wl-seg-btn[aria-pressed="true"] { border-color: #17171a; background: #17171a; color: #f1dfb3; }
.wl-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.wl-note { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: #f6f4ef; color: #5f5f67; font-size: 0.88rem; }
.wl-form { display: flex; flex-direction: column; gap: 12px; }
.wl-form-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.wl-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wl-lbl { font-size: 0.86rem; font-weight: 800; color: #17171a; }
.wl-hint { color: #6b6b73; font-size: 0.8rem; }
.wl-form input, .wl-form textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 8px 12px; border: 1px solid #d9d3c5; border-radius: 10px; background: #fff; font: inherit; font-size: 16px; }
.wl-form textarea { line-height: 1.6; resize: vertical; }
.wl-form textarea.wl-free { min-height: 92px; border-color: #c9a35a; background: #fffdf8; }
.wl-read { padding: 10px 12px; border: 1px dashed #e0cfa6; border-radius: 12px; background: #fffdf8; }
.wl-set { margin: 0; padding: 10px 12px 12px; border: 1px solid #e6e1d6; border-radius: 12px; }
.wl-set legend, .wl-set summary { padding: 0 4px; color: #3f3f46; font-size: 0.88rem; font-weight: 800; }
.wl-set summary { min-height: 32px; cursor: pointer; }
.wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 14px; }
.wl-set .wl-grid { margin-top: 8px; }
.wl-pair { display: flex; align-items: center; gap: 6px; }
.wl-pair input { flex: 1 1 0; }
.wl-unit { flex: 0 0 auto; color: #5f5f67; font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 640px) {
  body.wl-page .panel.wl-panel { padding: 12px; }
  .wl-list { grid-template-columns: 1fr; }
  .wl-acts > * { flex: 1 1 0; }
  .wl-page button.wl-danger { margin-right: 0; }
}

/* --- プライシングの画面の「※受注リストと該当している可能性があります！！」の帯（admin-appraisal.js）--- */
.ap-want-band { margin: 4px 0 14px; padding: 10px 12px; border: 1px solid #f0c9c6; border-left: 4px solid #c0262d; border-radius: 10px; background: #fff; }
.ap-want-band.hidden { display: none; }
.ap-want-top { display: inline-block; margin: 0 0 6px; color: #c0262d; font-size: 0.85rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.ap-want-top.hidden { display: none; }
.ap-want-band { scroll-margin-top: 80px; }
.ap-want-title { margin: 0 0 6px; color: #b3121b; font-size: 0.92rem; font-weight: 800; line-height: 1.5; }
.ap-want-scroll { overflow-x: auto; }
.ap-want-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; line-height: 1.45; }
.ap-want-table th { padding: 4px 6px; border-bottom: 1px solid #e6e1d6; color: #6b6b73; font-size: 0.75rem; font-weight: 700; text-align: left; white-space: nowrap; }
.ap-want-table td { padding: 6px; border-bottom: 1px solid #f1eee7; vertical-align: top; overflow-wrap: anywhere; }
.ap-want-table tbody tr { cursor: pointer; }
.ap-want-table tbody tr:hover { background: #fff7f6; }
.ap-want-who { white-space: nowrap; font-weight: 700; }
.ap-want-who em { display: block; color: #c0262d; font-style: normal; font-size: 0.75rem; }
.ap-want-text a { color: #17171a; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.ap-want-facts { color: #3f3f46; }
.ap-want-reasons { color: #1f6f4c; font-weight: 700; }
/* スマホ: 1件を2〜3行に（担当・希望 → 予算など → 当てはまり）。表の列だと希望がせまくなる */
@media (max-width: 640px) {
  .ap-want-table thead { display: none; }
  .ap-want-table, .ap-want-table tbody { display: block; }
  .ap-want-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid #f1eee7; }
  .ap-want-table td { padding: 0; border: 0; }
  .ap-want-table .ap-want-text { grid-column: 1; grid-row: 1; font-size: 0.9rem; }
  .ap-want-table .ap-want-who { grid-column: 2; grid-row: 1; text-align: right; white-space: normal; font-size: 0.78rem; }
  .ap-want-table .ap-want-facts { grid-column: 1 / -1; }
  .ap-want-table .ap-want-facts.is-empty { display: none; }
  .ap-want-table .ap-want-reasons { grid-column: 1 / -1; font-size: 0.78rem; }
}

/* 代車の車検証（2026-10-23。保険請求の PDF に付く） */
.lc-shaken-file { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line, #e2ded5); border-radius: 10px; background: #fff; }
.lc-shaken-file-title { margin: 0 0 6px; font-weight: 700; font-size: 0.9rem; }
.lc-shaken-file .lc-more-btns { margin: 0; }
.lc-danger-text { color: #b42318 !important; }

/* ホームの検索欄（2026-10-23。機能・使い方をさがす。home-search.js） */
.eh-search { position: relative; margin: 0 0 14px; }
.eh-search-ic { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); fill: none; stroke: #8a8a93; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.eh-search input[type="search"] { display: block; width: 100%; min-height: 48px; margin: 0; padding: 10px 14px 10px 42px; border: 1px solid #ddd8cc; border-radius: 14px; background: #fff; color: #17171a; font: inherit; font-size: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.eh-search input[type="search"]:focus { outline: 2px solid #c9a35a; outline-offset: 0; border-color: #c9a35a; }
.eh-search-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: min(60vh, 420px); overflow-y: auto; padding: 6px; border: 1px solid #e6e1d6; border-radius: 14px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.eh-search-list.hidden { display: none; }
.eh-search-h { margin: 6px 8px 2px; color: #8a6a2c; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
a.eh-search-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px; border-radius: 10px; color: #17171a; text-decoration: none; }
a.eh-search-item b { font-size: 15px; }
a.eh-search-item span { color: #6b6b73; font-size: 12.5px; }
a.eh-search-item:hover, a.eh-search-item.is-active { background: #f6f1e6; }
a.eh-search-item.is-help b { font-weight: 600; font-size: 14px; }
.eh-search-empty { margin: 8px; color: #6b6b73; font-size: 13px; }

/* ほかのプライシング担当に回す（2026-10-23）: 帯・ボタン・小窓の文 */
.ap-handoff { margin: 0 0 10px; padding: 10px 14px; border: 1px solid #bfdbfe; border-left: 5px solid #2563eb; border-radius: 12px; background: #eff6ff; color: #1e3a8a; }
.ap-handoff.hidden { display: none; }
.ap-handoff-title { display: block; font-size: 0.8rem; color: #1d4ed8; }
.ap-handoff-msg { margin: 4px 0 0; font-size: 1rem; font-weight: 800; line-height: 1.5; }
.ap-handoff-when { margin: 4px 0 0; font-size: 0.78rem; color: #475569; }
.ap-handoff-earlier { margin: 2px 0 0; font-size: 0.75rem; color: #64748b; }
.ap-price-box .ap-handoff-btn { display: block; margin: 8px auto 0; }
.ap-handoff-preview { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #f1f5f9; color: #1f2937; font-size: 0.85rem; line-height: 1.5; }
.ap-handoff-preview.hidden { display: none; }

/* 査定一覧の「設定」（プライシング担当だけ。金額の単位・通知。2026-10-23） */
.ap-my-set-btn { margin-left: auto; }
.ap-unit-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0 4px; }
.ap-unit-pick label { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid #ddd8cc; border-radius: 12px; background: #fff; color: #17171a; font-weight: 800; font-size: 1rem; cursor: pointer; }
.ap-unit-pick input { width: 20px; height: 20px; margin: 0; }
.ap-unit-pick label.is-on { border-color: #c9a35a; background: #fbf6ea; box-shadow: inset 0 0 0 1px #c9a35a; }
.ap-set-sample { margin: 2px 0 0; color: #6b6b73; font-size: 0.82rem; }
.ap-notify-state { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0; font-weight: 700; font-size: 0.9rem; line-height: 1.5; }
.ap-notify-state i { flex: 0 0 auto; display: inline-block; width: 10px; height: 10px; margin-top: 0.45em; border-radius: 50%; background: #9ca3af; }
.ap-notify-state.is-on i { background: #16a34a; }
.ap-notify-state.is-off i { background: #dc2626; }
.ap-my-set .ap-set-h { margin: 14px 0 4px; font-size: 0.95rem; }
.ap-my-set .ap-set-h:first-of-type { margin-top: 4px; }
.ap-my-set .notify-check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.ap-my-set .notify-check input { width: 22px; height: 22px; margin: 0; }
.ap-list-tools { gap: 8px; }
@media (max-width: 600px) {
  .ap-list-tools .ap-new-sub { width: auto; flex: 1 1 auto; }
  .ap-list-tools .ap-my-set-btn { flex: 0 0 auto; padding: 0 16px; }
}
.ap-list-tools .ap-my-set-btn.hidden { display: none; }

/* 査定の設定（?view=settings。歯車の四角から。2026-10-23）: 白いカードを縦に並べる */
.ap-settings-view { max-width: 980px; margin: 0 auto; }
.ap-set-card { margin: 0 0 16px; padding: 14px 16px 16px; border: 1px solid #e6e1d6; border-radius: 16px; background: #fff; }
.ap-set-card.hidden { display: none; }
.ap-set-title { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; }
.ap-settings-view .ap-access { margin-top: 0; }

/* 陸送依頼（2026-10-23。transport.html。事務の書類（od-）の見た目を使い、足りない所だけ）。
   入れる所は紙と同じ並び（10/23 ユーザー「書式っぽくして委任状みたいに」。委任状の dk-paper と同じ白い紙） */
.tp-page .tp-paper { padding: 18px 16px 14px; font-size: 0.9rem; }
.tp-page .tp-paper input { min-height: 34px; padding: 5px 7px; font-size: 0.95rem; }
.tp-title { margin: 2px 0 14px; text-align: center; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.12em; text-decoration: underline; text-underline-offset: 5px; }
.tp-sub { margin: 16px 0 6px; text-align: center; font-size: 1rem; font-weight: 800; }
.tp-tbl { border: 2px solid #111; background: #fff; }
.tp-tr { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); border-top: 1px solid #111; }
.tp-tr:first-child { border-top: 0; }
.tp-tr3 { grid-template-columns: 6.6em minmax(0, 1.4fr) minmax(0, 1fr); }
.tp-th { display: flex; align-items: center; justify-content: center; padding: 4px; border-right: 1px solid #111; font-size: 0.82rem; font-weight: 700; text-align: center; white-space: nowrap; }
.tp-th-blank small { color: #9ca3af; font-weight: 400; }
.tp-td { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 4px 6px; }
.tp-td + .tp-td { border-left: 1px solid #111; }
.tp-tall .tp-td { min-height: 54px; }
.tp-date { flex-wrap: wrap; }
.tp-page .tp-date input[type="date"] { width: auto; flex: 0 1 11em; }
.tp-date i, .tp-sama i { flex: 0 0 auto; font-style: normal; font-weight: 700; font-size: 0.82rem; }
.tp-date input[type="text"] { flex: 1 1 9em; }
.tp-wd { flex: 0 0 auto; font-size: 0.85rem; font-weight: 700; }
.tp-kv b { flex: 0 0 auto; font-size: 0.76rem; white-space: nowrap; }
.tp-zipaddr input:first-child { flex: 0 0 6.5em; width: 6.5em; }
.tp-down { width: 22px; height: 30px; margin: 8px auto; background: #111; clip-path: polygon(30% 0, 70% 0, 70% 50%, 100% 50%, 50% 100%, 0 50%, 30% 50%); }
.tp-right { align-self: center; width: 26px; height: 46px; margin: 0 4px; border: 0; background: #111; clip-path: polygon(0 32%, 50% 32%, 50% 0, 100% 50%, 50% 100%, 50% 68%, 0 68%); }
/* 車の表 */
.tp-cars { margin-top: 2px; border: 2px solid #111; }
.tp-car-tr { position: relative; display: grid; grid-template-columns: 1.3fr 0.6fr 1.6fr; border-top: 1px solid #111; }
.tp-car-tr:first-child { border-top: 0; }
.tp-car-th { padding: 5px 4px; border-left: 1px solid #111; text-align: center; font-size: 0.8rem; font-weight: 700; }
.tp-car-th:first-child { border-left: 0; }
.tp-car-td { display: flex; min-width: 0; padding: 3px 4px; border-left: 1px solid #111; }
.tp-car-td:first-child { border-left: 0; }
.tp-car-tr.is-deal { background: #fffaf0; }
.tp-page button.tp-car-x { position: absolute; top: 50%; right: -30px; width: 26px; height: 26px; margin: -13px 0 0; padding: 0; border: 0; border-radius: 50%; background: none; color: #9ca3af; font-size: 0.85rem; cursor: pointer; }
.tp-page button.tp-car-x:hover { color: #b42318; background: #fef2f2; }
.tp-paper { position: relative; }
.tp-cars { margin-right: 26px; }
.tp-gen-foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; margin-top: 16px; }
.tp-greet { margin: 0; font-size: 0.85rem; line-height: 1.9; }
.tp-from { display: grid; gap: 4px; }
.tp-inl { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; white-space: nowrap; }
.tp-page .tp-from .tp-big { font-size: 1.1rem; }
/* シーリンク（横の紙） */
.tp-sea-top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 10px; }
.tp-sea-to { display: grid; padding: 4px 8px; border: 1.5px solid #111; font-weight: 800; }
.tp-sea-to span { font-size: 1.05rem; letter-spacing: 0.04em; }
.tp-sea-top .tp-title { margin: 0; text-decoration-style: double; }
.tp-sea-date { justify-self: end; }
.tp-sea-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; margin-bottom: 10px; }
.tp-sea-places { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0; }
.tp-sea-notes { display: grid; grid-template-columns: 1.8em minmax(0, 1fr); }
.tp-vlabel { display: flex; align-items: center; justify-content: center; padding: 4px 2px; border-right: 1px solid #111; font-size: 0.78rem; font-weight: 700; line-height: 1.15; text-align: center; }
.tp-notes { display: grid; }
.tp-note-row { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 4px 8px; border-top: 1px solid #111; }
.tp-note-row:first-child { border-top: 0; }
.tp-note-row i { font-style: normal; font-weight: 800; font-size: 1.1rem; }
.tp-cars-sea .tp-car-tr { grid-template-columns: 2.2em 1.1fr 1.2fr 0.7fr 1.9fr 0.7fr 0.7fr; }
.tp-car-no { display: flex; align-items: center; justify-content: center; font-weight: 800; }
.tp-two { flex-direction: column; gap: 3px; }
.tp-car-them { background: repeating-linear-gradient(135deg, #f8f8f6 0 6px, #fff 6px 12px); }
.tp-sea-notice { margin: 8px 0 0; font-size: 0.72rem; line-height: 1.6; color: #333; }
.tp-car-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
@media (max-width: 760px) {
  .tp-sea-row, .tp-sea-places { grid-template-columns: minmax(0, 1fr); }
  .tp-right { width: 30px; height: 26px; margin: 6px auto; clip-path: polygon(32% 0, 68% 0, 68% 50%, 100% 50%, 50% 100%, 0 50%, 32% 50%); }
  .tp-sea-top { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .tp-sea-date { justify-self: center; }
  /* 狭いと横の紙の表は入らないので、1台ずつのかたまりにする（見出しは隠し、欄に名前を出す） */
  .tp-cars-sea .tp-car-head { display: none; }
  .tp-cars-sea .tp-car-tr { grid-template-columns: 2em minmax(0, 1fr) minmax(0, 1fr); }
  .tp-cars-sea .tp-car-td:nth-child(4) { grid-column: 2; border-left: 1px solid #111; border-top: 1px solid #ddd; }
  .tp-cars-sea .tp-car-td:nth-child(5) { grid-column: 2 / 4; border-top: 1px solid #ddd; }
  .tp-cars-sea .tp-car-them { display: none; }
  .tp-car-no { grid-row: span 3; }
}
@media (max-width: 480px) {
  .tp-page .tp-paper { padding: 12px 8px; }
  .tp-tr, .tp-tr3 { grid-template-columns: 5.4em minmax(0, 1fr); }
  .tp-tr3 > .tp-td:last-child { grid-column: 2; border-left: 0; border-top: 1px dashed #bbb; }
  .tp-th { font-size: 0.74rem; white-space: normal; }
  .tp-gen-foot { grid-template-columns: minmax(0, 1fr); }
  .tp-car-tr { grid-template-columns: 1.2fr 0.6fr 1.4fr; }
}
.tp-deals { margin-top: 10px; }
.tp-deal-list { display: grid; gap: 6px; max-height: 360px; overflow-y: auto; }
.tp-page button.tp-deal { display: block; width: 100%; margin: 0; padding: 8px 10px; border: 1px solid #e7e5df; border-radius: 10px; background: #fff; color: var(--od-ink); font: inherit; text-align: left; cursor: pointer; }
.tp-page button.tp-deal:hover { background: var(--od-soft); }
.tp-page button.tp-deal.is-added { opacity: 0.6; cursor: default; }
.tp-deal-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tp-deal-top b { font-size: 0.95rem; }
.tp-deal-sub { display: block; margin-top: 2px; color: var(--od-sub); font-size: 0.8rem; overflow-wrap: anywhere; }
.tp-added { color: #166534; font-size: 0.78rem; font-weight: 700; }
.tp-send { margin-top: 12px; padding-top: 4px; border-top: 1px dashed #e6d6b2; }
.tp-send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tp-send-k { min-width: 3.5em; color: #6f5420; font-size: 0.85rem; font-weight: 800; }
.tp-send-v { flex: 1 1 10em; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; }
.tp-page .tp-mail-row input { flex: 1 1 14em; min-width: 0; min-height: 42px; margin: 0; padding: 6px 10px; border: 1px solid #d9d6cf; border-radius: 10px; font: inherit; font-size: 1rem; }
.tp-copy { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 0.85rem; overflow-wrap: anywhere; }
.tp-copy.hidden { display: none; }
.tp-copy input { width: auto; margin: 0; }
.tp-sent { color: #166534; font-weight: 700; }
.tp-unsent { color: #b45309; font-weight: 700; }
.tp-sum { cursor: pointer; margin: 0; }
.tp-page .od-wrap { max-width: 1040px; }
/* 案件の「次にやること」（お客様の入力待ち）の QRで渡す・LINEで送る・コピー・メール（2026-10-23） */
.deal-link-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.deal-link-quick .deal-steps-next-btn { margin: 0; }
.deal-link-quick .deal-link-line { background: #06c755; }
.deal-link-quick .deal-steps-next-btn:last-child:not(.deal-link-qr):not(.deal-link-line) { background: #fff; color: var(--accent); border: 1px solid #bfdbfe; }
@media (max-width: 640px) {
  .deal-link-quick { display: grid; grid-template-columns: 1fr 1fr; }
  .deal-link-quick .deal-steps-next-btn:last-child:not(.deal-link-qr):not(.deal-link-line) { grid-column: 1 / -1; }
}
/* 案件の画面のタブ（2026-10-23 ユーザー「複雑に感じる」→ 案A「タブで分ける」。deal-tabs.js） */
.deal-tabs { position: sticky; top: 0; z-index: 40; display: flex; gap: 4px; margin: 12px 0 12px; padding: 4px; border: 1px solid var(--border, #e5e7eb); border-radius: 14px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }
.deal-tabs .deal-tab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: auto; min-width: 0; min-height: 46px; margin: 0; padding: 6px 2px; border: 0; border-radius: 10px; background: none; color: #4b5563; font: inherit; font-size: 0.92rem; font-weight: 800; cursor: pointer; }
.deal-tabs .deal-tab:hover { background: #f3f4f6; }
.deal-tabs .deal-tab.is-on { background: #17171a; color: #f1dfb3; }
.deal-tab-badge { max-width: 100%; overflow: hidden; padding: 0 6px; border-radius: 99px; font-size: 0.68rem; font-weight: 700; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.deal-tab-badge.hidden { display: none; }
.deal-tabs .deal-tab.is-on .deal-tab-badge { opacity: 0.9; }
.tab-off { display: none !important; }
/* 担当入力のタブでは、欄の見出し（長い名前）は出さない（タブが見出し） */
body.deal-tabbed #staffPanel > summary { display: none; }
/* 「保存」「入力を決定する」は担当入力の物なので、ほかのタブでは出さない */
body.deal-tabbed:not([data-deal-tab="staff"]) #dealActionBar { display: none !important; }
/* 担当入力の中の ①②③ のタブ（2026-10-23 ユーザー「担当入力も1,2,3もタブみたいにできる？」。deal-tabs.js） */
.deal-subtabs { display: flex; gap: 6px; margin: 10px 0 8px; }
.deal-subtabs .deal-subtab { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 2px; width: auto; min-width: 0; min-height: 44px; margin: 0; padding: 6px 4px; border: 1px solid #d9d6cf; border-radius: 10px; background: #fff; color: #374151; font: inherit; font-size: 0.85rem; font-weight: 800; cursor: pointer; }
.deal-subtabs .deal-subtab.is-on { border-color: #17171a; background: #fffaf0; box-shadow: inset 0 -3px 0 #17171a; color: #111; }
.deal-subtabs .deal-tab-badge { background: #fef3c7; color: #92400e; }
.deal-subtabs .deal-tab-badge.is-done { background: #dcfce7; color: #166534; }
body.deal-tabbed #staffForm > details.staff-group-details > summary { display: none; }
.deal-group-next { display: block; width: 100%; margin: 14px 0 4px; padding: 11px 0; border: 1px solid #17171a; border-radius: 10px; background: #fff; color: #111; font: inherit; font-weight: 800; cursor: pointer; }
.deal-group-next:hover { background: #fffaf0; }
