:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --bg: #f5f5f4;
  --card: #ffffff;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-sub: #737373;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --dp-bg: #eff6ff;
  --dp-border: #bfdbfe;
  --struct-color: #2563eb;
  --chouki-color: #059669;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --thread-width: 480px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Hiragino Sans',sans-serif; background:var(--bg); color:var(--text); min-height:100vh; }
a { color:var(--primary); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ---- Buttons ---- */
.btn { display:inline-flex; align-items:center; gap:6px; padding:7px 14px; border-radius:var(--radius); font-size:13px; font-weight:500; cursor:pointer; border:none; transition:all .15s; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-hover); }
.btn-outline-white { background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background:rgba(255,255,255,0.15); }
.btn-sm { padding:5px 10px; font-size:12px; }
.btn-icon { padding:7px; min-width:32px; justify-content:center; }
.btn:disabled { opacity:.5; cursor:not-allowed; }

/* ---- Login / Setup ---- */
.fullpage-view { display:none; min-height:100vh; background:var(--bg); }
.fullpage-view.active { display:block; }
.login-container { max-width:400px; margin:80px auto; padding:0 20px; }
.login-card { background:var(--card); border-radius:12px; padding:32px; box-shadow:var(--shadow); border:1px solid var(--border); }
.login-title { font-size:22px; font-weight:700; text-align:center; margin-bottom:4px; }
.login-subtitle { font-size:13px; color:var(--text-sub); text-align:center; margin-bottom:24px; }
.form-group { margin-bottom:16px; }
.form-label { display:block; font-size:13px; font-weight:500; margin-bottom:4px; }
.form-input { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius); font-size:14px; outline:none; transition:border-color .15s; }
.form-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,0.1); }
.form-error { color:var(--danger); font-size:13px; margin-top:4px; display:none; }
.login-btn { width:100%; padding:12px; font-size:15px; margin-top:8px; }
.login-footer { text-align:center; margin-top:16px; font-size:12px; color:var(--text-sub); }

/* ---- Setup ---- */
.setup-container { max-width:480px; margin:60px auto; padding:0 20px; }
.setup-card { background:var(--card); border-radius:16px; padding:0; box-shadow:0 4px 24px rgba(37,99,235,0.08); border:1px solid var(--dp-border); overflow:hidden; }
.setup-card-header { background:linear-gradient(135deg,#1e3a5f,#2563eb); padding:20px 32px; display:flex; align-items:center; justify-content:space-between; }
.setup-card-header-title { font-size:16px; font-weight:700; color:#fff; letter-spacing:0.02em; }
.setup-step-badge { background:rgba(255,255,255,0.2); color:#fff; font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px; letter-spacing:0.05em; border:1px solid rgba(255,255,255,0.35); }
.setup-welcome { padding:24px 32px 16px; background:var(--primary-light); border-bottom:1px solid var(--dp-border); }
.setup-welcome-title { font-size:18px; font-weight:700; color:var(--primary); margin-bottom:4px; }
.setup-welcome-name { font-size:14px; color:var(--text); font-weight:600; margin-bottom:8px; }
.setup-welcome-desc { font-size:13px; color:var(--text-sub); line-height:1.6; }
.setup-form-body { padding:24px 32px 28px; }
.setup-form-body .form-group { margin-bottom:16px; }
.setup-form-body .form-error { margin-bottom:12px; }
.setup-done-icon { width:64px; height:64px; background:#dcfce7; color:#16a34a; border-radius:50%; font-size:28px; display:flex; align-items:center; justify-content:center; margin:40px auto 16px; font-weight:700; }
.setup-done-title { font-size:18px; font-weight:700; text-align:center; margin-bottom:8px; }
.setup-done-body { font-size:13px; color:var(--text-sub); line-height:1.6; text-align:center; margin-bottom:4px; }
.setup-done-inner { padding:0 32px 40px; text-align:center; }
.setup-error-card { background:var(--card); border-radius:16px; padding:40px 32px; text-align:center; box-shadow:0 4px 24px rgba(220,38,38,0.08); border:1px solid #fee2e2; }
.setup-error-icon { font-size:40px; color:var(--danger); margin-bottom:16px; }
.setup-error-title { font-size:18px; font-weight:700; color:var(--text); margin-bottom:12px; }
.setup-error-body { font-size:13px; color:var(--text-sub); line-height:1.7; margin-bottom:20px; }
.setup-error-contact { background:#f9fafb; border:1px solid var(--border); border-radius:var(--radius); padding:16px; font-size:13px; line-height:1.8; text-align:left; }

/* ---- App shell ---- */
#app-shell { display:none; flex-direction:column; min-height:100vh; }
#app-shell.active { display:flex; }

/* ---- Header ---- */
.app-header {
  background:linear-gradient(135deg,#1e3a5f,#2563eb);
  padding:0 20px; height:56px;
  display:flex; align-items:center; justify-content:space-between;
  flex-shrink:0; z-index:200;
}
.header-left { display:flex; align-items:center; gap:12px; }
.header-logo { font-size:18px; font-weight:700; color:#fff; display:flex; align-items:center; gap:8px; }
.header-logo-img { height:28px; width:auto; filter:brightness(10); }
.header-company { font-size:13px; color:rgba(255,255,255,0.75); }
.header-right { display:flex; align-items:center; gap:8px; }

/* ---- Container / Page body ---- */
.container { padding:16px; }
.page-body { display:flex; gap:16px; align-items:flex-start; }

/* ---- Sidebar ---- */
.sidebar {
  width:200px; min-width:200px;
  position:sticky; top:16px;
  max-height:calc(100vh - 88px); overflow-y:auto;
  background:var(--card); border:1px solid var(--border);
  border-radius:10px; box-shadow:var(--shadow); padding:8px 0;
}
.sidebar::-webkit-scrollbar { width:4px; }
.sidebar::-webkit-scrollbar-thumb { background:#d1d5db; border-radius:4px; }

/* Assignee toggle */
.assignee-toggle { display:flex; margin:8px; border-radius:6px; overflow:hidden; border:1px solid var(--border); }
.at-btn { flex:1; padding:5px 8px; font-size:11px; font-weight:600; cursor:pointer; border:none; background:var(--card); color:var(--text-sub); transition:all .15s; text-align:center; }
.at-btn.active { background:var(--primary); color:#fff; }
.at-btn:hover:not(.active) { background:var(--primary-light); }
.sort-toolbar { display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.sort-toolbar input { flex:1; min-width:180px; }
.sort-toggle { display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--card); flex-shrink:0; }
.sort-toggle button { border:none; background:transparent; color:var(--text-sub); cursor:pointer; font-size:0.78rem; font-weight:700; padding:8px 12px; white-space:nowrap; }
.sort-toggle button.active { background:var(--primary); color:#fff; }

/* Sidebar headings */
.sidebar-heading {
  font-size:0.7rem; font-weight:700; color:#6b7280; text-transform:uppercase;
  letter-spacing:0.08em; padding:14px 14px 6px;
  display:flex; align-items:center; gap:6px;
}
.sidebar-heading::before {
  content:""; display:inline-block; width:3px; height:12px;
  background:linear-gradient(180deg,#2563eb,#1e3a5f); border-radius:2px; flex-shrink:0;
}

/* Month / company tabs */
.sidebar-tabs { display:flex; flex-direction:column; gap:1px; padding:0 8px; }
.month-tab {
  display:flex; align-items:center; justify-content:space-between;
  width:100%; text-align:left; padding:6px 10px; border:none; border-radius:6px;
  font-size:0.78rem; font-family:inherit; cursor:pointer;
  background:transparent; color:var(--text-sub);
  transition:background 0.15s, color 0.15s; white-space:nowrap; line-height:1.4;
}
.month-tab:hover { background:#f5f7fa; color:#374151; }
.month-tab.active { background:linear-gradient(135deg,#eff6ff 0%,#dbeafe 100%); color:var(--primary); font-weight:600; }
.month-tab.active .tab-count { background:var(--primary); color:#fff; }
.tab-count {
  font-size:0.65rem; font-weight:600; min-width:20px; text-align:center;
  padding:1px 6px; border-radius:10px; background:#f1f3f5; color:#6b7280;
  margin-left:auto; line-height:1.5;
}
.dp-member {
  display:flex; align-items:center; justify-content:space-between;
  padding:3px 10px; font-size:0.72rem; color:#9ca3af;
  border:none; background:transparent; cursor:pointer; width:100%;
  border-radius:4px; transition:background 0.15s, color 0.15s;
  font-family:inherit; text-align:left; white-space:nowrap;
}
.dp-member:hover { background:#f5f7fa; color:#6b7280; }
.dp-member.active { background:#eff6ff; color:var(--primary); font-weight:600; }
.dp-member.active .tab-count { background:var(--primary); color:#fff; }
.dp-member .tab-count { font-size:0.6rem; min-width:16px; padding:0 4px; border-radius:8px; background:#f1f3f5; color:#9ca3af; margin-left:auto; font-weight:600; }

/* ---- Main content ---- */
.main-content { flex:1; min-width:0; }

/* ---- Table ---- */
table { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--border); border-radius:10px; overflow:hidden; }
th, td { padding:11px 14px; text-align:left; border-bottom:1px solid var(--border); }
th { background:#f9fafb; font-size:0.82rem; color:var(--text-sub); font-weight:600; }
td { font-size:0.88rem; }
tr.data-row { cursor:pointer; }
tr.data-row:hover td { background:#f9fafb; }
tr.data-row.open td { background:#f0f7ff; }
.detail-row { display:none; }
.detail-row.open { display:table-row; }
.detail-row td { background:#f9fafb; padding:16px 20px; }

/* Source badge */
.source-badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:0.72rem; font-weight:700; color:#fff; }
.source-badge.struct { background:var(--struct-color); }
.source-badge.chouki { background:var(--chouki-color); }
.source-badge.kakunin { background:#7c3aed; }

/* 東京ゼロエミ住宅の印。source-badge の隣に並ぶため、塗りつぶし系で
   揃えつつ省エネ（chouki）と取り違えない橙にする。 */
.zeroemi-badge { display:inline-block; margin-left:4px; padding:2px 8px; border-radius:4px; font-size:0.72rem; font-weight:700; background:#ea580c; color:#fff; }

/* Unread badge */
.unread-badge { display:inline-block; background:var(--danger); color:#fff; font-size:0.68rem; font-weight:700; padding:1px 6px; border-radius:8px; margin-left:6px; vertical-align:middle; }

/* Thread badge */
.thread-badge {
  display:inline-flex; align-items:center; gap:4px; padding:4px 10px;
  border-radius:8px; font-size:0.78rem; cursor:pointer;
  border:1px solid var(--border); background:var(--card); transition:all 0.15s; white-space:nowrap;
}
.thread-badge:hover { background:#f0f0f0; }
.thread-badge.has-dp-unread { background:#fef3c7; border-color:#fbbf24; color:#92400e; font-weight:700; }
.ball-indicator { display:inline-block; font-size:0.68rem; font-weight:700; padding:1px 6px; border-radius:4px; margin-left:4px; vertical-align:middle; }
.ball-reply { background:#fef2f2; color:#dc2626; border:1px solid #fca5a5; }
.ball-sent { background:#f0fdf4; color:#16a34a; border:1px solid #86efac; }

.status-mini { font-size:0.72rem; color:var(--text-sub); }
.property-main { font-weight:500; }
.property-assignee { display:none; margin-top:2px; font-size:11px; color:var(--text-sub); }
.archive-property-wrap { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.archive-property-text { min-width:0; overflow-wrap:anywhere; }
.final-doc-list-badge { display:inline-flex; align-items:center; min-height:20px; padding:2px 8px; border:1px solid #86efac; border-radius:999px; background:#dcfce7; color:#166534; font-size:0.7rem; font-weight:700; line-height:1.2; white-space:nowrap; }
.status-compact { min-width:150px; }
.status-compact-track { display:flex; align-items:center; gap:3px; margin-bottom:4px; }
.status-compact-step { flex:1; min-width:14px; height:6px; border-radius:999px; background:#d1d5db; }
.status-compact-step.done { background:#10b981; }
.status-compact-step.current { background:#2563eb; box-shadow:0 0 0 2px #bfdbfe; }
.status-compact-label { font-size:11px; color:var(--text-sub); line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.status-compact-date { font-size:10px; color:#6b7280; line-height:1.2; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.loading { text-align:center; padding:48px; color:var(--text-sub); }
.spinner { display:inline-block; width:24px; height:24px; border:3px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin .6s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.empty { text-align:center; padding:48px; color:var(--text-sub); }

/* ---- Expanded row ---- */
.detail-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px 24px; margin-bottom:12px; }
.detail-field-label { font-size:11px; color:var(--text-sub); text-transform:uppercase; letter-spacing:.5px; margin-bottom:2px; }
.detail-field-value { font-size:13px; }

/* Status progress */
.status-progress { display:flex; align-items:flex-start; padding:10px 0 12px; gap:0; margin-bottom:12px; }
.sp-step { display:flex; flex-direction:column; align-items:center; flex:1; position:relative; gap:4px; }
.sp-step::after { content:''; position:absolute; top:10px; left:50%; width:100%; height:2px; background:#d1d5db; z-index:0; }
.sp-step:last-child::after { display:none; }
.sp-step.done::after { background:#10b981; }
.sp-dot { width:20px; height:20px; border-radius:50%; background:#d1d5db; color:#fff; font-size:.65rem; font-weight:700; display:flex; align-items:center; justify-content:center; position:relative; z-index:1; flex-shrink:0; }
.sp-step.done .sp-dot { background:#10b981; }
.sp-step.current .sp-dot { background:var(--primary); box-shadow:0 0 0 3px rgba(37,99,235,.2); }
.sp-label { font-size:.6rem; text-align:center; color:#9ca3af; line-height:1.2; white-space:nowrap; }
.sp-step.done .sp-label { color:#10b981; }
.sp-step.current .sp-label { color:var(--primary); font-weight:700; }
.sp-sub { font-size:.54rem; color:var(--text-sub); text-align:center; line-height:1.2; }
/* やり取りパネル内のプログレス（一覧パネルに追加するのはプログレスのみ。2026-07-31 決定4） */
.thread-panel .status-progress { padding:10px 14px 8px; margin-bottom:0; background:#f8fafc; border-bottom:1px solid var(--border); flex-shrink:0; }
.thread-panel .sp-dot { width:18px; height:18px; font-size:.6rem; }
.thread-panel .sp-step::after { top:9px; }
.thread-panel .sp-label { font-size:.56rem; white-space:normal; }

/* Detail sections */
.detail-section { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:10px; overflow:hidden; }
.detail-section-title { font-size:13px; font-weight:600; padding:10px 14px; border-bottom:1px solid var(--border); background:#fafafa; cursor:pointer; display:flex; align-items:center; gap:6px; }
.detail-section-title::before { content:"\25BC"; font-size:10px; transition:transform .2s; }
.detail-section.collapsed .detail-section-title::before { transform:rotate(-90deg); }
.detail-section.collapsed .detail-section-body { display:none; }
.detail-section-body { padding:14px; }
.deliverable-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.deliverable-card { border:1px solid var(--border); border-radius:8px; padding:12px; background:#fff; min-width:0; display:flex; flex-direction:column; gap:8px; }
.deliverable-card-header { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.deliverable-card-title { font-size:13px; font-weight:700; min-width:0; overflow-wrap:anywhere; }
.deliverable-card-status { flex-shrink:0; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; border:1px solid var(--border); color:var(--text-sub); background:#f9fafb; white-space:nowrap; }
.deliverable-card-status.ready { color:#166534; border-color:#86efac; background:#dcfce7; }
.deliverable-card-status.waiting { color:#92400e; border-color:#fcd34d; background:#fffbeb; }
.deliverable-card-count { font-size:22px; font-weight:800; line-height:1; }
.deliverable-card-note { font-size:12px; color:var(--text-sub); line-height:1.5; min-height:36px; overflow-wrap:anywhere; }
.deliverable-card-actions { display:flex; flex-wrap:wrap; gap:6px; margin-top:auto; }
.deliverable-link, .deliverable-action { display:inline-flex; align-items:center; justify-content:center; min-height:28px; padding:5px 10px; border-radius:6px; border:1px solid var(--dp-border); background:var(--primary-light); color:var(--primary); font-size:12px; font-weight:600; line-height:1.25; cursor:pointer; overflow-wrap:anywhere; max-width:100%; }
.deliverable-action { font-family:inherit; }
.deliverable-action:disabled { color:var(--text-sub); border-color:var(--border); background:#f9fafb; cursor:not-allowed; }
.deliverable-summary { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.deliverable-summary-item { font-size:12px; padding:4px 8px; border-radius:6px; border:1px solid var(--border); background:#f9fafb; color:#374151; }

/* Files */
.file-list { display:flex; flex-direction:column; gap:4px; }
.file-item { display:flex; align-items:center; gap:8px; padding:7px 10px; background:var(--primary-light); border:1px solid var(--dp-border); border-radius:6px; font-size:13px; }
.file-item a { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-item .file-size { font-size:11px; color:var(--text-sub); white-space:nowrap; }

/* Checklist */
.checklist-items { display:flex; flex-wrap:wrap; gap:6px; }
.checklist-item { font-size:12px; padding:3px 8px; border-radius:4px; border:1px solid; }
.checklist-item.checked { background:#dcfce7; border-color:#86efac; color:#166534; }

/* ---- Thread Panel ---- */
.thread-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:300; }
.thread-overlay.open { display:block; }
.thread-panel {
  position:fixed; top:0; right:-100%; width:var(--thread-width); max-width:100vw; height:100vh;
  background:var(--card); box-shadow:-4px 0 24px rgba(0,0,0,0.15); z-index:301;
  display:flex; flex-direction:column; transition:right .25s ease;
}
.thread-panel.open { right:0; }
.thread-header { padding:16px 20px; border-bottom:1px solid var(--border); display:flex; align-items:center; gap:12px; flex-shrink:0; background:#fafafa; }
.thread-header-title { flex:1; font-size:15px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thread-close-btn { width:32px; height:32px; border-radius:50%; border:none; background:none; cursor:pointer; font-size:18px; color:var(--text-sub); display:flex; align-items:center; justify-content:center; transition:background .15s; }
.thread-close-btn:hover { background:var(--bg); }
.thread-messages { flex:1; min-height:80px; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; }
.message { max-width:85%; padding:10px 14px; border-radius:12px; }
/* バブル色味は3窓（単独ページ/一覧パネル/adminパネル）とも admin 踏襲で統一（2026-07-31 決定1）:
   admin=右・緑、DP=左・青左ボーダー＋DPバッジ。自分=右への反転はしない canonical 表示 */
.message.dp { align-self:flex-start; background:#dbeafe; border:1px solid #93c5fd; border-left:4px solid #2563eb; border-bottom-left-radius:4px; }
.message.admin { align-self:flex-end; background:#f0fdf4; border:1px solid #bbf7d0; border-bottom-right-radius:4px; }
.message-sender { font-size:11px; font-weight:600; margin-bottom:2px; }
.message.dp .message-sender { color:#374151; }
.message.admin .message-sender { color:#166534; }
.dp-label { display:inline-block; background:#2563eb; color:#fff; font-size:10px; font-weight:700; padding:1px 5px; border-radius:3px; margin-right:4px; vertical-align:middle; }
.message-body { font-size:14px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.message-files { margin-top:6px; display:flex; flex-direction:column; gap:3px; }
.message-file { font-size:12px; padding:4px 8px; background:rgba(255,255,255,.6); border-radius:4px; display:inline-flex; align-items:center; gap:4px; }
.message-recipients { font-size:12px; color:var(--text-sub); margin:2px 0 4px; }
.message-recipients.is-me { font-weight:700; color:#1d4ed8; }
.message-time { font-size:10px; color:var(--text-sub); margin-top:4px; }
.message.dp .message-time { text-align:left; }
.message.admin .message-time { text-align:right; }
.thread-compose { border-top:1px solid var(--border); padding:12px 16px; background:var(--card); display:flex; flex-direction:column; flex-shrink:1; min-height:0; max-height:70%; }
.compose-row { display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-rows:minmax(0,1fr); gap:8px; align-items:end; min-height:64px; max-height:min(300px,34dvh); }
.compose-textarea { min-width:0; width:100%; padding:10px; border:1px solid var(--border); border-radius:var(--radius); font-size:14px; line-height:1.6; font-family:inherit; box-sizing:border-box; resize:vertical; min-height:min(160px,22dvh); max-height:min(300px,34dvh,100%); }
.compose-textarea:focus { outline:2px solid var(--primary); outline-offset:1px; }
@media (max-height:600px) { .compose-textarea { min-height:64px; } }
.compose-actions { display:flex; flex-direction:column; gap:4px; }
.file-attach-btn { cursor:pointer; font-size:18px; padding:6px; border-radius:var(--radius); border:1px solid var(--border); background:var(--card); line-height:1; }
.file-attach-btn:hover { background:var(--primary-light); }
.upload-guidance { margin-top:8px; padding:8px 10px; border-radius:var(--radius); background:#eff6ff; color:#1e3a5f; font-size:11px; line-height:1.5; }
.upload-guidance strong { display:inline-block; margin-right:6px; color:var(--primary); }
.attached-files { margin-top:6px; display:flex; flex-wrap:wrap; gap:4px; max-height:min(96px,8dvh); overflow-y:auto; flex-shrink:0; }
.attached-file { font-size:12px; padding:3px 8px; background:var(--primary-light); border:1px solid var(--dp-border); border-radius:4px; display:inline-flex; align-items:center; gap:4px; }
.attached-file .remove-file { cursor:pointer; color:var(--danger); font-weight:bold; }
.upload-summary { margin-top:6px; font-size:11px; color:var(--text-sub); }
.upload-summary.has-files { color:var(--primary); font-weight:600; }
.upload-error { margin-top:6px; padding:7px 9px; border-radius:6px; background:#fef2f2; color:var(--danger); font-size:11px; line-height:1.45; max-height:4.5em; overflow-y:auto; flex-shrink:0; }
.upload-error:empty { display:none; }
.compose-hint { font-size:11px; color:var(--text-sub); margin-top:4px; }
.drop-zone { border:2px dashed var(--border); border-radius:var(--radius); padding:10px; text-align:center; font-size:12px; color:var(--text-sub); margin-top:8px; transition:all .15s; cursor:pointer; }
.drop-zone.dragover { border-color:var(--primary); background:var(--primary-light); }

/* ---- Responsive ---- */
@media (max-width:768px) {
  .page-body { flex-direction:column; }
  .sidebar { width:100%; min-width:unset; position:static; max-height:none; padding:4px 0; }
  .sidebar-heading { padding:8px 10px 4px; font-size:0.65rem; }
  .sidebar-tabs { flex-direction:row; gap:4px; overflow-x:auto; padding:0 8px 4px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
  .sidebar-tabs::-webkit-scrollbar { display:none; }
  .month-tab, .dp-member { flex:0 0 auto; width:auto; min-width:max-content; padding:6px 10px; }
  .thread-panel { width:100vw; }
  table { font-size:0.78rem; }
  th, td { padding:8px 8px; }
  .dp-assignee-col { display:none; }
  .property-assignee { display:block; }
  .status-compact { min-width:112px; }
  .status-compact-label { max-width:120px; }
  .detail-grid { grid-template-columns:1fr; }
  .deliverable-grid { grid-template-columns:1fr; }
  .deliverable-card { padding:10px; }
}
#searchBox:focus { border-color: var(--primary) !important; }

/* 通知設定ダイアログ (やり取り宛先選択PRD §5.2) */
.notify-setting-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:400; }
.notify-setting-overlay[hidden] { display:none; }
.notify-setting-dialog {
  position:fixed; top:50%; left:50%; transform:translate(-50%,-50%);
  width:min(420px, calc(100vw - 32px)); background:var(--card); border-radius:12px;
  box-shadow:0 12px 40px rgba(0,0,0,0.2); padding:20px; z-index:401;
}
.notify-setting-dialog[hidden] { display:none; }
.notify-setting-title { font-size:1rem; font-weight:700; margin-bottom:14px; }
.notify-setting-row { display:flex; align-items:center; gap:8px; font-size:0.9rem; cursor:pointer; }
.notify-setting-row input { cursor:pointer; }
.notify-setting-note { margin:8px 0 0 24px; font-size:0.78rem; color:var(--text-sub); }
.notify-setting-status { margin-top:12px; font-size:0.8rem; color:var(--text-sub); min-height:1.2em; }
.notify-setting-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
