/* 修繕・原状回復 進捗管理 - スタイル
   方針: 実務ツールとして読みやすく、地味に。スマホ縦1カラムを基本にPCで横に広げる。
   ダークモード/ライトモードどちらでも崩れないよう、配色はCSS変数で固定する（prefers-color-schemeに依存しない）。 */

:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --text: #1a2129;
  --muted: #667085;
  --border: #dde1e6;
  --primary: #1d5fd6;
  --primary-dark: #16469f;
  --danger: #d92d20;
  --danger-bg: #fdecea;
  --success: #17824e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo,
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .6em; color: var(--text); }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; margin-top: 1.2em; }

button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- レイアウト共通 ---------- */

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow);
}
.app-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  flex-wrap: wrap;
}
.app-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.app-title:hover { text-decoration: none; }
.app-title { margin-right: auto; }
/* 「✏️ここ直して」（報告ステーションの要望ページへ。新しいタブ） */
.btn-fix-this {
  display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: #6b4fbb; color: #fff; font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.btn-fix-this:hover { text-decoration: none; filter: brightness(1.08); color: #fff; }
.app-header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-name { color: var(--muted); font-size: .9rem; }
.app-nav {
  display: flex;
  gap: 4px;
  padding: 0 8px 8px;
}
.app-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
  font-size: .95rem;
}
.app-nav a.active {
  background: var(--primary);
  color: #fff;
}
.app-nav a:hover { text-decoration: none; background: var(--bg); }
.app-nav a.active:hover { background: var(--primary-dark); }

#main {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 16px;
}

.loading, .empty { color: var(--muted); padding: 16px 0; }
.error, .error-box {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 10px 0;
  font-size: .92rem;
}
.text-danger { color: var(--danger); }

/* ---------- ボタン ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  min-height: 44px;
}
.btn:hover { background: var(--bg); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 7px 12px; min-height: 36px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-action {
  flex: 1 1 auto;
  min-width: 130px;
}

/* ---------- ログイン画面 ---------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  width: 100%;
  max-width: 360px;
}
.login-card h1 { text-align: center; margin-bottom: 1.2em; }
#login-form label, .edit-form label, .quick-form label, .modal-box label, .filter-form label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 12px;
}
#login-form input, #login-form select, .edit-form input, .edit-form select, .edit-form textarea,
.quick-form input, .quick-form textarea, .modal-box input, .modal-box select,
.filter-form input, .filter-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
}
#login-form input:focus, #login-form select:focus, .edit-form input:focus, .edit-form select:focus, .edit-form textarea:focus,
.quick-form input:focus, .quick-form textarea:focus, .modal-box input:focus, .modal-box select:focus,
.filter-form input:focus, .filter-form select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* ---------- 件数の大表示 ---------- */

.big-count {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}
.big-count-unit { font-size: 1.4rem; font-weight: 700; margin-left: 4px; }
.big-count-label { color: var(--muted); margin: 6px 0 16px; font-size: .95rem; }

/* ---------- バッジ ---------- */

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge-kubun { background: #eaf1ff; color: var(--primary-dark); border-color: #cfe0ff; }
.badge-status { background: #f1f1f4; color: var(--text); }
.badge-kind { background: #eef7f0; color: var(--success); border-color: #cdeed6; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.badge-muted { color: var(--muted); }

/* ---------- 案件カード一覧（自社のボール） ---------- */

.anken-list { list-style: none; margin: 0; padding: 0; }
.anken-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.anken-card.is-stale { border-color: var(--danger); }
.anken-card-link { display: block; padding: 12px 14px; color: var(--text); }
.anken-card-link:hover { background: var(--bg); text-decoration: none; }
.anken-card-top { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; align-items: center; }
.anken-card-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.anken-card-sub {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .88rem;
}

/* ---------- 全体（フィルタ＋一覧） ---------- */

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.checkbox-label input { width: auto; margin: 0; }
.filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.all-count { color: var(--muted); margin: 10px 0; font-weight: 700; }

.anken-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.anken-table th, .anken-table td {
  text-align: left;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
}
.anken-table thead th { color: var(--muted); font-weight: 700; font-size: .82rem; }
.anken-table tr.is-stale td:first-child { border-left: 3px solid var(--danger); }
.anken-table tr.is-stale { background: var(--danger-bg); }

/* ---------- 案件詳細 ---------- */

.back-link {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  padding: 8px 0;
  cursor: pointer;
  font-size: .95rem;
}
.anken-head-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.anken-id { color: var(--muted); font-size: .85rem; }
.anken-head-title { margin-bottom: 4px; }
.anken-head-titlerow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.anken-head-naiyo { font-size: 1.1rem; font-weight: 700; color: var(--accent, #1a56db); }
.anken-head-tel { color: var(--text, inherit); font-weight: 600; white-space: nowrap; }
.anken-card-naiyo { margin-left: 10px; font-weight: 600; font-size: .9rem; color: var(--accent, #1a56db); }
.anken-head-sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }

.status-ball-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.status-ball-item {
  flex: 1 1 140px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 14px;
}
.status-ball-label { font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.status-ball-value { font-size: 1.2rem; font-weight: 800; }

.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }

.quick-form {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}
.quick-form-title { font-weight: 700; margin-bottom: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
  border-left: 2px solid var(--border);
  padding: 4px 0 14px 14px;
  margin-left: 4px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.timeline-at { color: var(--muted); font-size: .85rem; }
.timeline-author { color: var(--muted); font-size: .85rem; font-weight: 600; }
.timeline-body { white-space: pre-wrap; font-size: .95rem; }
.timeline-attachments { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.timeline-img { max-width: 160px; max-height: 160px; border-radius: 8px; border: 1px solid var(--border); display: block; }

/* ---------- 編集フォーム ---------- */

details.panel summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::before { content: "▶ "; color: var(--muted); }
details.panel[open] summary::before { content: "▼ "; }

.edit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 16px;
  margin-top: 10px;
}
.edit-grid-full { grid-column: 1 / -1; }

.gyosha-list { display: flex; flex-direction: column; gap: 10px; }
.gyosha-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
}

/* ---------- 新規起票モーダル ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  z-index: 50;
  overflow-y: auto;
}
.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%;
  max-width: 480px;
}

/* ---------- PC幅での拡張 ---------- */

@media (min-width: 700px) {
  #main { padding: 20px; }
  .edit-grid { grid-template-columns: 1fr 1fr; }
  .anken-table thead th, .anken-table td { font-size: .92rem; }
}

@media (min-width: 640px) {
  .filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-items: end;
    gap: 10px;
  }
  .filter-form .filter-buttons { grid-column: 1 / -1; }
}

/* 全体一覧: 狭い画面ではテーブルをカード風に積む */
@media (max-width: 640px) {
  .anken-table thead { display: none; }
  .anken-table, .anken-table tbody, .anken-table tr, .anken-table td { display: block; width: 100%; }
  .anken-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 6px 10px;
  }
  .anken-table tr.is-stale td:first-child { border-left: none; }
  .anken-table td {
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 2px;
  }
  .anken-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .8rem;
    flex: 0 0 auto;
  }
}

/* ---------- 会社（案件の管理元 SPEC §26）---------- */
.badge-company { font-weight: 700; letter-spacing: 0.02em; }
.badge-company-sb { background: #e8f0fe; color: #1a4fb3; border-color: #b9cdf5; }
.badge-company-re { background: #fff1e0; color: #a35400; border-color: #f3cf9f; }
.company-count { color: var(--muted); font-size: .9rem; font-weight: 700; margin: -10px 0 16px; }
.field-static { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; }
.field-static-label { font-size: 0.85rem; color: var(--muted); }
.field-static-note { font-size: 0.8rem; color: var(--muted); }

/* ---------- §31-5 スマホのヘッダーを1段に詰める（700px未満） ----------
   PC幅は従来どおり（2段・名前とボタンを並べる）。スマホ幅では「修繕｜自社のボール 全体 集計｜☰」の1段にし、
   名前・新規起票・ログアウトは ☰ の中（下に開くメニュー）へ畳む。 */
.hdr-menu-btn { display: none; }
.app-title-short { display: none; }
.hdr-menu-name { display: none; }

@media (max-width: 699.98px) {
  .app-header { display: flex; align-items: center; gap: 4px; padding: 4px 6px; }
  .app-header-top { display: contents; }
  .app-title { order: 0; flex: 0 0 auto; padding: 0 4px; font-size: 1rem; }
  .app-title-full { display: none; }
  .app-title-short { display: inline; }
  .app-nav { order: 1; flex: 1 1 auto; min-width: 0; padding: 0; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .app-nav::-webkit-scrollbar { display: none; }
  .btn-fix-this { order: 3; flex: 0 0 auto; min-width: 40px; min-height: 40px; padding: 0 8px; font-size: 1.1rem; }
  .btn-fix-this .fix-long { display: none; }
  .app-nav a { padding: 7px 10px; font-size: .9rem; white-space: nowrap; }
  .hdr-menu-btn {
    order: 2; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; min-height: 40px; padding: 0 8px;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
    font-size: 1.15rem; line-height: 1; cursor: pointer;
  }
  .app-header.menu-open .hdr-menu-btn { background: var(--bg); }
  .app-header-user {
    display: none; position: absolute; right: 6px; top: calc(100% + 4px); z-index: 30;
    flex-direction: column; align-items: stretch; gap: 8px; min-width: 210px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(16, 24, 40, .18);
  }
  .app-header.menu-open .app-header-user { display: flex; }
  .app-header-user .user-name { padding: 2px 2px 6px; border-bottom: 1px solid var(--border); }
  .app-header-user .btn { width: 100%; min-height: 44px; }
}

/* 日程パネル（SPEC §36） */
.nittei-summary { margin-bottom: 10px; font-size: 1.05em; }

/* ステータスのプルダウン・写真のドラッグ＆ドロップ（2026-10-02 善林さん指摘） */
.status-change { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.status-change label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.status-change select { min-width: 12em; }
.photo-drop { border: 2px dashed var(--border, #c9ced6); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted, #667); margin: 8px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-drop.photo-drop-small { padding: 10px; }
.photo-drop.is-over { border-color: var(--accent, #1a56db); background: rgba(26, 86, 219, .06); }
.photo-pick { cursor: pointer; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.photo-thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border, #c9ced6); }

/* ---------- 報告書（SPEC §39） ---------- */
.hk-muted { color: var(--muted); font-size: .85rem; font-weight: normal; }
.hk-reports, .hk-links { list-style: none; margin: 0; padding: 0; }
.hk-reports li, .hk-links li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.hk-link-off { color: var(--muted); }
.hk-url-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.hk-url { flex: 1 1 260px; min-width: 0; font-size: .85rem; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; }
.hk-new { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--primary); border-radius: var(--radius); background: rgba(29, 95, 214, .05); }
.hk-photos { list-style: none; margin: 0 0 12px; padding: 0; }
.hk-photo { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; opacity: .75; }
.hk-photo.is-checked { opacity: 1; border-color: var(--primary); background: rgba(29, 95, 214, .04); }
.hk-check { display: flex; flex-direction: column; align-items: center; font-size: .8rem; white-space: nowrap; }
.hk-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); display: block; }
.hk-photo-body { flex: 1 1 auto; min-width: 0; }
.hk-photo-inputs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.hk-photo-inputs select { flex: 0 0 auto; }
.hk-photo-inputs input { flex: 1 1 160px; min-width: 0; }
.hk-move { display: flex; flex-direction: column; gap: 4px; }
/* 下請けの送り先ページ（/u/<トークン>）。ログインの無い1枚ページ。スマホ幅を基本にする */
.u-body { min-height: 100vh; }
.u-main { max-width: 560px; margin: 0 auto; padding: 16px 12px 40px; }
.u-title { font-size: 1.25rem; }
.u-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0 0 14px; }
.u-info dt { color: var(--muted); }
.u-info dd { margin: 0; font-weight: bold; }
.u-label { display: block; margin-bottom: 8px; }
.u-label input { display: block; width: 100%; margin-top: 4px; padding: 10px; font-size: 16px; border: 1px solid var(--border); border-radius: 8px; }
.u-note { color: var(--muted); font-size: .85rem; }
.u-send { width: 100%; min-height: 48px; font-size: 1.05rem; }
.u-progress { margin-top: 12px; white-space: pre-wrap; }
.photo-pick input[type=file], input[type=file][hidden] { display: none !important; }
.hk-new { scroll-margin-top: 80px; }

/* ---------- 写真のまとめ取り込み（SPEC §40） ---------- */
.imp-drop { padding: 28px 16px; min-height: 120px; justify-content: center; }
.imp-drop-title { font-size: 1.05rem; font-weight: bold; }
.imp-link { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 8px 0; }
.imp-link label { flex: 1 1 320px; }
.imp-link input { width: 100%; }
.imp-progress { margin: 10px 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.imp-progress progress { width: 100%; height: 14px; }
.imp-ok { background: #ecf8ef; border: 1px solid #9bd3a8; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.imp-failed { margin-top: 6px; }
.imp-failed ul { margin: 4px 0 0; padding-left: 20px; max-height: 200px; overflow: auto; }
.timeline-more { display: inline; }
.timeline-more summary { cursor: pointer; color: var(--accent, #1a56db); margin: 4px 0; }
.imp-progress[hidden] { display: none; }
.imp-memo { display: block; margin: 8px 0; }
.imp-memo input { display: block; width: 100%; margin-top: 4px; }

/* ---------- いまの状況（SPEC §42） ---------- */
.ima-box { margin-top: 12px; border: 2px solid #f0b429; background: #fffbea; border-radius: 10px; padding: 10px 12px; }
.ima-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.ima-label { font-weight: 700; color: #8d5b00; }
.ima-meta { color: var(--muted, #667); font-size: .85rem; }
.ima-head .btn { margin-left: auto; }
.ima-text { white-space: pre-wrap; font-size: 1rem; line-height: 1.6; }
.ima-empty { color: var(--muted, #667); font-size: .9rem; }
.ima-box textarea { width: 100%; box-sizing: border-box; }
.anken-ima-line { font-size: .88rem; color: #8d5b00; margin: 2px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 2026-10-02 大和の点検（§40）：写真を選ぶをボタンらしく／スマホの時系列の写真は2列 */
.photo-pick { border: 1px solid var(--accent, #1a56db) !important; color: var(--accent, #1a56db) !important; background: #fff; padding: 8px 18px; border-radius: 8px; font-weight: 600; }
.imp-partial { background: #fff8e1; border-color: #f0c36d; }
@media (max-width: 600px) {
  .timeline-attachments { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .timeline-attachments .timeline-img { max-width: 100%; width: 100%; max-height: 150px; object-fit: cover; }
  .timeline-more { grid-column: 1 / -1; }
  .timeline-more[open] { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .timeline-more[open] summary { grid-column: 1 / -1; }
}

/* 2026-10-02 キムタクの点検（§42）：長い「いま」で全体の表が広がらないように */
td .anken-ima-line { max-width: 24em; }
@media (max-width: 600px) {
  td .anken-ima-line { max-width: none; width: 100%; flex-basis: 100%; }
}

.edit-form select:disabled, .edit-form input:disabled { background: #eee; color: #777; }
.anken-head-tanto { margin-top: 6px; font-size: .9rem; color: #666; }

/* ---------- 埋めてほしい（SPEC §45） ---------- */
.umete-lead { color: #666; font-size: .9rem; }
.umete-group { margin-top: 16px; }
.umete-group h3 { margin: 0 0 6px; font-size: 1.05rem; border-bottom: 1px solid #e5e5ea; padding-bottom: 4px; }
.umete-group.is-mine h3 { color: var(--primary); }
.umete-count { font-weight: normal; font-size: .85rem; color: #666; }
.umete-list { list-style: none; margin: 0; padding: 0; }
.umete-item { padding: 8px 0; border-bottom: 1px dashed #e5e5ea; }
.umete-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.umete-title { font-weight: bold; }
.umete-missing { margin-top: 4px; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.umete-chip { display: inline-block; background: #fdecea; color: #a02020; border-radius: 10px; padding: 1px 8px; font-size: .85rem; }
.umete-chip small { margin-left: 4px; color: #7a3a3a; }
.umete-checks { margin: 4px 0 0; padding-left: 18px; font-size: .85rem; color: #6a4a00; }
.umete-notes { margin-top: 4px; font-size: .85rem; }
.umete-note { white-space: pre-wrap; color: #555; background: #fafafa; padding: 4px 8px; margin-top: 4px; }
/* 重複として中止（SPEC §49） */
.dup-choice { flex-basis: 100%; padding: 8px 10px; border: 1px solid #e3c98a; background: #fffaf0; border-radius: 8px; }
.dup-choice[hidden] { display: none; }
.dup-choice select { min-width: 16em; }
.dup-choice-hint { margin-top: 4px; font-size: .8rem; color: var(--muted, #667); font-weight: 400; }
.dup-note { margin: 0 0 10px; padding: 6px 10px; background: #f1f1f4; border-radius: 6px; font-weight: 600; color: #555; }

/* 自社のボール：兼務の人の会社ごとの見出し（SPEC §51） */
.jibun-ball-head { font-size: 1rem; margin: 14px 0 6px; display: flex; gap: 6px; align-items: center; }

/* 業者未記入（SPEC §56） */
.badge-gyosha-missing { margin-left: 4px; font-weight: 700; }

/* 問い合わせの見出しと分類（SPEC §57） */
.midashi-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 2px; }
.midashi-text { font-weight: 700; color: var(--accent, #1a56db); margin-left: 2px; }
.midashi-kakunin { font-size: .75rem; color: #8a5a00; background: #fff5d6; border: 1px solid #f0d58a; border-radius: 4px; padding: 0 5px; }
.midashi-head { margin: 4px 0 10px; }
.midashi-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.midashi-note { font-size: .8rem; color: var(--muted); }
.midashi-naiyo { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.midashi-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.midashi-form input[type="text"] { min-width: 16em; flex: 1 1 16em; }
.midashi-help { flex-basis: 100%; font-size: .8rem; color: var(--muted); }
.bunrui { display: inline-block; font-size: .75rem; line-height: 1.6; padding: 0 6px; border-radius: 10px; border: 1px solid #d6d9e0; background: #f4f5f8; color: #444; white-space: nowrap; }
.bunrui.is-alert { background: #d93025; border-color: #b3261e; color: #fff; font-weight: 700; }
.bunrui-kankisen { background: #e8f4fd; border-color: #b6dcf5; color: #0b5c8f; }
.bunrui-kyutoki { background: #fff0e6; border-color: #f6c9a8; color: #a14a0d; }
.bunrui-aircon { background: #e6f7f7; border-color: #a9dede; color: #0d6e6e; }
.bunrui-denki { background: #fff9db; border-color: #f1df8a; color: #7a6000; }
.bunrui-mizumawari { background: #e9eefc; border-color: #bccaf3; color: #2a46a0; }
.bunrui-kagi { background: #f3e9fb; border-color: #d9c0ef; color: #6b2fa0; }
.bunrui-tategu { background: #f1ece4; border-color: #d9cbb5; color: #6b4e22; }
.bunrui-gaiju { background: #fde8ef; border-color: #f3bccd; color: #a02152; }
.bunrui-seiso { background: #eaf6ea; border-color: #bfe2bf; color: #2d6b2d; }
.bunrui-kabi { background: #eef3e2; border-color: #cddcb0; color: #5a6b22; }
.bunrui-naiso { background: #f2f2f2; border-color: #d0d0d0; color: #555; }
.gyosha-missing-note { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--danger); background: var(--danger-bg); color: var(--danger); border-radius: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* 中止の理由（SPEC §59） */
.chushi-choice { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 8px 10px; border: 1px solid #d9b3b3; background: #fff6f6; border-radius: 8px; }
.chushi-choice[hidden] { display: none; }
.chushi-choice select { min-width: 14em; }
.chushi-choice .chushi-memo { flex: 1 1 18em; }
.chushi-choice textarea { width: 100%; box-sizing: border-box; }
.chushi-reason { margin-left: 4px; font-size: .8rem; color: #666; }
.badge-chushi-unset { background: #fff3cd; color: #8a6200; border-color: #e0b84d; }
.chushi-note { margin: 0 0 10px; padding: 6px 10px; background: #f1f1f4; border-radius: 6px; color: #555; }
.chushi-note.is-unset { background: #fff3cd; color: #8a6200; }
