/* ========================================
   CareLink — Design System
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1d4ed8;
  --sidebar-active-bg: rgba(29, 78, 216, 0.15);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #f1f5f9;
  --sidebar-width: 220px;

  --main-bg: #f0f4f8;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);

  --primary: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-dark: #1e40af;
  --primary-bg: #eff6ff;
  --primary-bg-hover: #dbeafe;

  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-on-primary: #ffffff;

  --border: #e2e8f0;
  --border-focus: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  --font-sans: 'Noto Sans JP', 'Inter', -apple-system, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--main-bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #7c8ba1;
  padding: 0 10px;
  margin-bottom: 6px;
  margin-top: 18px;
}

.nav-section-label:first-child { margin-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

/* 選んでいるメニュー: 青い背景・白い太字・左端の線ではっきり示す */
.nav-item.active {
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 4px 0 0 #bfdbfe;
}

.nav-item.active:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Top Header ── */
.top-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  /* 右のボタンに押されても折り返さず、1行で省略する（iPad 縦で上が切れていた。2026-10-28） */
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 12px;
}

.ai-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--success);
}

.ai-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.api-key-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--primary-bg);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.api-key-btn:hover {
  background: var(--primary-bg-hover);
  border-color: var(--primary);
}

.api-key-btn svg { width: 14px; height: 14px; }

/* ── Page Content Scroll Area ── */
.page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

/* ── Page Title ── */
.page-title {
  text-align: center;
  margin-bottom: 24px;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

/* ── Settings Bar ── */
.settings-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.pill-group {
  display: flex;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.pill-btn {
  padding: 5px 14px;
  border-radius: 16px;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}

.pill-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
}

.pill-btn:hover:not(.active) {
  background: #e2e8f0;
}

/* ── Upload Card ── */
.upload-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.upload-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.upload-card-title svg { width: 15px; height: 15px; color: var(--primary); }

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  background: #fafbfc;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.drop-zone.dragover { transform: scale(1.01); }

.drop-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
  transition: transform var(--transition);
}

.drop-zone:hover .drop-icon { transform: scale(1.1) rotate(-5deg); }

.drop-icon svg { width: 20px; height: 20px; color: white; }

.drop-text-main {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.drop-text-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.drop-text-formats {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.format-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
}

#file-input { display: none; }

/* ── File List ── */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  animation: slide-in 0.2s ease;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-item:hover { background: var(--primary-bg); border-color: #bfdbfe; }

.file-type-icon {
  min-width: 40px;
  height: 32px;
  padding: 0 6px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.file-type-icon.audio { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; }
.file-type-icon.pdf   { background: linear-gradient(135deg, #ef4444, #b91c1c); color: white; }
.file-type-icon.text  { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.file-type-icon.image { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: white; }

.file-info { flex: 1; min-width: 0; }
.file-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.file-error { font-size: 12px; color: #b91c1c; margin-top: 2px; white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.file-item-rejected { border-color: #fecaca; background: #fef2f2; flex-wrap: wrap; }
.file-item-rejected > .file-error { flex-basis: 100%; margin-top: 0; }
.file-type-icon.unknown { background: #fee2e2; color: #b91c1c; font-weight: 700; }

.file-status {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
}
.file-status.pending  { background: #fef3c7; color: #92400e; }
.file-status.loading  { background: #dbeafe; color: #1e40af; }
.file-status.done     { background: #d1fae5; color: #065f46; }
.file-status.error    { background: #fee2e2; color: #991b1b; }

.file-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
}
.file-remove:hover { background: #fee2e2; color: var(--danger); }
.file-remove svg { width: 14px; height: 14px; }

/* ── Hint Bar ── */
.hint-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #1e40af;
  line-height: 1.5;
  margin-top: 14px;
}

.hint-bar svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; color: #3b82f6; }

/* ── Generate Button ── */
.generate-section {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.generate-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.35);
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 78, 216, 0.45);
}

.generate-btn:active:not(:disabled) { transform: translateY(0); }

.generate-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.generate-btn svg { width: 16px; height: 16px; }

.reset-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: white;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-family: var(--font-sans);
}

.reset-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.reset-btn:active {
  transform: translateY(1px);
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress ── */
.progress-bar-wrap {
  background: #e2e8f0;
  border-radius: 4px;
  height: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 4px;
  transition: width 0.4s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  animation: shimmer 1.5s ease infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ── Result Card ── */
.result-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  animation: fade-up 0.4s ease;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #eff6ff, #f0fdf4);
}

.result-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-icon svg { width: 14px; height: 14px; color: white; }

.result-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.result-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.result-actions { display: flex; gap: 6px; }

.result-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: white;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.result-btn:hover { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
.result-btn svg { width: 13px; height: 13px; }
.result-btn.copied { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }

.result-body {
  padding: 24px;
}

.result-text {
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Editable result textarea ── */
.result-textarea {
  width: 100%;
  min-height: 360px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--text-primary);
  font-family: var(--font-sans);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 8px;
  resize: vertical;
  background: transparent;
  transition: border-color var(--transition), background var(--transition);
  outline: none;
}

.result-textarea:focus {
  border-color: var(--border-focus);
  background: #fafbff;
}

/* ── API Key Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fade-in 0.2s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  width: 420px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: slide-up 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  /* 画面より高い窓は、見出しとボタンを残して中身だけをスクロールする（スマホで上下が切れて保存できなかったため） */
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
}

.modal-box > .modal-header,
.modal-box > .modal-footer { flex-shrink: 0; }

.modal-box > .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-header p  { font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.modal-body { padding: 20px 24px; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: #fafbfc;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--border-focus); background: white; }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}
.form-hint a { color: var(--primary); text-decoration: none; }
.form-hint a:hover { text-decoration: underline; }

.modal-footer {
  padding: 14px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-secondary {
  padding: 9px 18px;
  border: 1px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
}
.btn-secondary:hover { background: #f1f5f9; }

.btn-primary {
  padding: 9px 18px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  box-shadow: 0 2px 8px rgba(29,78,216,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(29,78,216,0.4); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 99999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-left: 3px solid var(--primary);
  min-width: 240px;
  max-width: 340px;
  animation: toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg   { color: var(--danger); }
.toast.info svg    { color: var(--primary); }

/* ── History List ── */
.history-section {
  margin-top: 0;
}

#clear-history-btn:hover {
  color: var(--danger) !important;
}

.history-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.history-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 6px;
  background: white;
}

.history-item:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.history-item-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  opacity: 0.4;
}

.empty-state p { font-size: 13px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Two Pane Layout ── */
.pane-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  flex: 1;
  min-height: 0;
}

#input-pane-view, #output-pane-view {
  width: 100%;
}

@media (min-width: 1024px) {
  .page-scroll {
    height: calc(100vh - 56px);
    overflow-y: auto; /* 全体スクロールを有効化 */
    padding: 24px;
    display: flex;
    flex-direction: column;
  }

  .pane-container {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }
}


/* ── Responsive ── */
@media (max-width: 1023px) {
  .settings-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .menu-toggle-btn {
    display: flex !important;
  }
  .sidebar {
    display: flex !important;
    position: fixed;
    top: 0;
    left: -210px;
    bottom: 0;
    width: 200px;
    z-index: 999;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.active {
    left: 0 !important;
  }
}

/* ── Tabs Style ── */
.tabs-bar {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

.tab-btn {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-sans);
  outline: none;
}

.tab-btn.active {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 2px 4px rgba(29, 78, 216, 0.08);
}

.tab-btn:hover:not(.active) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ケアプラン指示カード */
.careplan-instruction-card {
  animation: slide-in 0.3s ease;
}

/* ── 印刷用スタイル ── */
@media print {
  /* 既定値。!important を付けると、印刷直前に JavaScript（beforeprint）が入れる余白（帳票ごとに 10mm / 0）が効かなくなる */
  @page {
    size: A4 portrait; /* デフォルトは縦向き */
    margin: 0;
  }

  /* 印刷用の用紙設定は JavaScript 側で動的に制御されます */

  /* 操作ボタン等（no-print）は印刷しない */
  .no-print {
    display: none !important;
  }
  
  .facesheet-page {
    width: 210mm !important;
    height: 297mm !important;
    max-height: 297mm !important;
    padding: 10mm 12mm !important; /* 印刷時の余白を詰める */
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  
  /* 印刷時に背景色や線画を確実に表示する */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  
  /* 不要な要素を非表示 */
  .sidebar,
  .top-header,
  .client-bar,
  [id^="input-pane-view-"],
  .settings-bar,
  .page-title,
  .result-header,
  .result-actions,
  #result-textarea,
  .result-textarea,
  #careplan-tabs-bar,
  #supportplan-tabs-bar,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }
  
  /* 親コンテナのレイアウトをリセットして印刷エリアいっぱいに広げる */
  html, body,
  .app-layout,
  .main-content,
  .page-scroll,
  .pane-container,
  .right-pane,
  #output-pane-view,
  #result-section,
  .result-card,
  .result-body {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    background: transparent !important;
  }

  /* デフォルトは非表示 */
  #result-textarea,
  .result-textarea,
  #meeting-form-view, 
  #facesheet-form-view,
  #care-facesheet-form-view,
  #assessment-form-view,
  #kadai-form-view,
  #careplan-form-view,
  #support-basic-info-view,
  #support-analysis-view,
  #support-checklist-view,
  #support-plan-view,
  #yobo-plan-view,
  #hosp-info-view,
  #disc-info-view,
  #support-evaluation-view {
    display: none !important;
  }

  /* 印刷対象のみ表示 */
  body[data-print-template="meeting"] #meeting-form-view,
  body[data-print-template="facesheet"] #facesheet-form-view,
  body[data-print-template="assessment"] #assessment-form-view,
  body[data-print-template="care_plan_2"][data-print-tab="facesheet"] #care-facesheet-form-view,
  body[data-print-template="care_plan_2"][data-print-tab="assessment"] #assessment-form-view,
  body[data-print-template="care_plan_2"][data-print-tab="kadai"] #kadai-form-view,
  body[data-print-template="care_plan_2"][data-print-tab="careplan"] #careplan-form-view,
  body[data-print-template="care_plan_1"][data-print-tab="support_basic_info"] #support-basic-info-view,
  body[data-print-template="care_plan_1"][data-print-tab="support_analysis"] #support-analysis-view,
  body[data-print-template="care_plan_1"][data-print-tab="support_plan"] #support-plan-view,
  body[data-print-template="care_plan_1"][data-print-tab="support_yobo_plan"] #yobo-plan-view,
  body[data-print-template="care_plan_1"][data-print-tab="support_evaluation"] #support-evaluation-view,
  body[data-print-template="hospitalization"] #hosp-info-view,
  body[data-print-template="discharge"] #disc-info-view {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* 1枚に収まる大きさ（print.js の beforeprint が --ck-print-zoom・--ck-print-width を入れる） */
  body[data-print-template="care_plan_1"][data-print-tab="support_checklist"] #support-checklist-view .sheet-container {
    zoom: var(--ck-print-zoom, 1);
    width: var(--ck-print-width, 100%) !important;
    max-width: none !important;
  }

  body[data-print-template="care_plan_1"][data-print-tab="support_checklist"] #support-checklist-view {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10mm 15mm !important;
    box-sizing: border-box !important;
    background: white !important;
    border: none !important;
    box-shadow: none !important;
  }
  
  .sheet-container {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .facesheet-page table {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border-collapse: collapse !important;
  }

  
  
  /* 2ページ目の縮小調整 (1枚目と2枚目を綺麗に分離し、見出しちぎれを完全に解消) */
  #facesheet-page-2 {
    page-break-before: always !important;
    break-before: page !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  
  
  /* 1枚目と2枚目を本来の境界線で綺麗に分離し、見出しちぎれを完全に解消 */
  #facesheet-page-2 {
    page-break-before: always !important;
    break-before: page !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .print-section-group {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #facesheet-form-view {
    position: static !important;
    width: 100% !important;
    height: auto !important;
  }

  /* テーブルの見出しセルの背景色印刷対応 */
  td[style*="background: #f8fafc"],
  td[style*="background: rgb(248, 250, 252)"],
  td[style*="background:#f8fafc"],
  td.sheet-header-cell {
    background-color: #f8fafc !important;
  }
}

/* ── Facesheet Layout Helper ── */
.image-drop-area {
  transition: all var(--transition);
}
.image-drop-area:hover {
  background: var(--primary-bg) !important;
  border-color: var(--primary) !important;
}

[contenteditable="true"]:empty:before {
  content: attr(placeholder);
  color: #94a3b8;
  cursor: text;
}

/* ── Assessment Analysis Section ── */
#assessment-analysis-section textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#assessment-analysis-section .generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

#assessment-analysis-section .generate-btn:active:not(:disabled) {
  transform: translateY(0);
}

/* 印刷時に課題分析ボタンセクションを非表示 */
@media print {
  #assessment-analysis-section {
    display: none !important;
  }
}

/* ── アセスメントシートの列幅・行高さ固定 ── */
#assessment-form-view table {
  table-layout: fixed !important;
  width: 100% !important;
}

/* 全セル共通：枠を広げない */
#assessment-form-view td {
  border: 1px solid #1e293b !important;
  padding: 4px 6px !important;
  vertical-align: top !important;
  box-sizing: border-box;
  word-break: break-all;
  white-space: pre-wrap;
  overflow: hidden !important;
  font-size: 11px;
  line-height: 1.5;
}

/* 判定セレクト：余白を詰めて上に寄せる */
#assessment-form-view select[id$="-fact-select"] {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  padding: 1px 2px !important;
}

/* なぜ？・できること・見通し列：高さ60px固定 */
#assessment-form-view td[id$="-why"],
#assessment-form-view td[id$="-can"],
#assessment-form-view td[id$="-goal"] {
  height: 60px !important;
  max-height: 60px !important;
  min-height: 60px !important;
}

/* 事実・状況の入力div：50px固定 */
#assessment-form-view div[id$="-fact"] {
  height: 50px !important;
  max-height: 50px !important;
  overflow: hidden !important;
  word-break: break-all;
  white-space: pre-wrap;
  font-size: 11px;
}

/* 根本的な課題ボックス：高さ固定 */
[id^="as-issue-"] {
  max-height: 60px !important;
  overflow: hidden !important;
}

/* ── 要支援アセスメント・分析レポート (Vercel風UI) ── */
.analysis-header {
  margin-bottom: 24px;
}
.analysis-title {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}
.analysis-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}
.analysis-container {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 24px;
  overflow: hidden;
}
.analysis-section-title {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.analysis-section-title .bar {
  width: 4px;
  height: 18px;
  background: #4f46e5;
  border-radius: 2px;
}
.analysis-section-title .bar.green {
  background: #10b981;
}

.analysis-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .analysis-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.domain-card {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
}
.domain-card.mobility { border-top: 4px solid #3b82f6; }
.domain-card.dailyLife { border-top: 4px solid #f97316; }
.domain-card.social { border-top: 4px solid #10b981; }
.domain-card.health { border-top: 4px solid #f43f5e; }

.domain-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.domain-header.mobility { color: #2563eb; background: #eff6ff; }
.domain-header.dailyLife { color: #ea580c; background: #fff7ed; }
.domain-header.social { color: #059669; background: #ecfdf5; }
.domain-header.health { color: #e11d48; background: #fff1f2; }

.domain-body {
  display: flex;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
}
.domain-col {
  font-size: 12px;
  line-height: 1.6;
}
.domain-col:not(:first-child) {
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}
.domain-col-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}
.domain-col-label.current { color: #64748b; }
.domain-col-label.wishes { color: #ec4899; }
.domain-col-label.challenges { color: #f97316; }

.comprehensive-card {
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  border-left: 6px solid #4f46e5;
  padding: 24px;
  margin-bottom: 32px;
}
.comprehensive-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin: 0;
}

.proposals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .proposals-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.proposal-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01);
  border-bottom: 4px solid #ecfdf5;
}
.proposal-card-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: block;
}
.proposal-card-goal {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.5;
}
.proposal-card-measure-box {
  background: #f0fdf4;
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 12px;
}
.proposal-card-measure-label {
  font-size: 9px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 4px;
  display: block;
}
.proposal-card-measure {
  font-size: 12px;
  color: #065f46;
  line-height: 1.5;
}

.intentions-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  border-left: 6px solid #ec4899;
  padding: 24px;
  margin-bottom: 32px;
}
.intentions-card p {
  font-size: 16px;
  font-weight: 700;
  color: #334155;
  line-height: 1.6;
  font-style: italic;
  margin: 0;
}

.final-goal-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 32px;
  border-left: 6px solid #2563eb;
}
.final-goal-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.5;
  margin: 0;
}

.support-details-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 32px;
  border-top: 6px solid #4f46e5;
}
.support-details-header {
  padding: 20px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.support-details-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: #312e81;
  margin: 0;
}
.support-details-body {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .support-details-body {
    grid-template-columns: 1fr 1fr;
  }
}
.support-details-col {
  padding: 24px;
}
.support-details-col:first-child {
  border-bottom: 1px solid #f1f5f9;
}
@media (min-width: 768px) {
  .support-details-col:first-child {
    border-bottom: none;
    border-right: 1px solid #f1f5f9;
  }
}
.support-details-col-title {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.support-details-col-title.green { color: #047857; }
.support-details-col-title.blue { color: #1d4ed8; }
.support-details-col-content {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
  white-space: pre-wrap;
}

.life-goals-card {
  background: #0f172a;
  border-radius: 24px;
  padding: 24px;
  color: white;
  margin-bottom: 32px;
}
.life-goals-header {
  font-size: 14px;
  font-weight: 700;
  color: #818cf8;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.life-goals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .life-goals-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.life-goal-subcard {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
}
.life-goal-subcard-label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
  display: block;
}
.life-goal-subcard-content {
  font-size: 14px;
  font-weight: 700;
  color: #e0e7ff;
  line-height: 1.5;
}

.preventive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .preventive-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.preventive-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 24px;
}
.preventive-card-header {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.preventive-card-header.blue { color: #0369a1; }
.preventive-card-header.rose { color: #be123c; }
.preventive-card-content {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* フェイスシート用 画面プレビュー時のA4縦制約 */
.facesheet-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 820px;
  min-height: 297mm;
  padding: 20px 24px;
  margin: 0 auto 20px;
  background: white;
  position: relative;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  color: #000;
}

/* 通常画面（プレビュー時）のみ、セルやコンテナを高さを引き伸ばすルール（印刷時はインラインが小さいため自動で縮小される） */
@media screen {
  #facesheet-consultant-title-cell,
  #facesheet-consultant-name,
  #facesheet-consultant-address-title-cell,
  #facesheet-consultant-address,
  #facesheet-consultant-relation {
    height: 70px !important;
  }
  #facesheet-emergency-title-cell {
    height: 30px !important;
  }
  #facesheet-emergency-name-1, #facesheet-emergency-relation-1, #facesheet-emergency-contact-1,
  #facesheet-emergency-name-2, #facesheet-emergency-relation-2, #facesheet-emergency-contact-2,
  #facesheet-emergency-name-3, #facesheet-emergency-relation-3, #facesheet-emergency-contact-3,
  #facesheet-emergency-name-4, #facesheet-emergency-relation-4, #facesheet-emergency-contact-4 {
    height: 95px !important;
  }
  #facesheet-family-title-cell {
    height: 420px !important;
  }
  #facesheet-family-structure {
    min-height: 360px !important;
  }
  #facesheet-special-notes-cell {
    height: 120px !important;
  }
  #facesheet-special-notes {
    min-height: 90px !important;
  }
  #facesheet-current-life-time,
  #facesheet-current-life-user,
  #facesheet-current-life-family {
    height: 230px !important;
  }
  #facesheet-hobbies,
  #facesheet-social-relations {
    height: 110px !important;
  }
  #facesheet-hosp-date-1, #facesheet-hosp-disease-1, #facesheet-hosp-name-1, #facesheet-hosp-treatment-1,
  #facesheet-hosp-date-2, #facesheet-hosp-disease-2, #facesheet-hosp-name-2, #facesheet-hosp-treatment-2,
  #facesheet-hosp-date-3, #facesheet-hosp-disease-3, #facesheet-hosp-name-3, #facesheet-hosp-treatment-3,
  #facesheet-hosp-date-4, #facesheet-hosp-disease-4, #facesheet-hosp-name-4, #facesheet-hosp-treatment-4 {
    height: 60px !important;
  }
}

/* フェイスシート内のテーブル整列・ネスト崩れ防止 */
.facesheet-page table {
  margin: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}
.facesheet-page table table {
  border: none !important;
}


/* 用紙上の選択肢を丸で囲む用のクラス（A4用紙再現） */
.choice-circle {
  border: 1.5px solid #000 !important;
  border-radius: 50% !important;
  padding: 1px 4px !important;
  display: inline-block !important;
  margin: 0 -2px !important;
  background: transparent !important;
  font-weight: bold !important;
}

/* 家族構成セル内の埋め込み画像スタイル */
#facesheet-family-structure img {
  max-width: 100% !important;
  max-height: 350px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 6px auto !important;
  border: 1px dashed #d1d5db;
  border-radius: 4px;
}
/* 印刷時は点線枠を消して綺麗に出力 */
@media print {
  #facesheet-family-structure img {
    border: none !important;
  }
}

/* ドラッグ＆ドロップ時のハイライト枠 */
.drag-over-active {
  background-color: #eff6ff !important;
  border: 2px dashed #2563eb !important;
  transition: all 0.2s ease;
}

/* カプセル型トグルボタン（はい／いいえ）のモダンなスタイル */
.toggle-button-group {
  display: inline-flex !important;
  gap: 2px !important;
  background: #f1f5f9 !important;
  padding: 2px !important;
  border-radius: 9999px !important;
  border: 1px solid #e2e8f0 !important;
}

.toggle-button-group label {
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
}

.toggle-btn-label {
  display: inline-block !important;
  padding: 3px 11px !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  color: #94a3b8 !important;
  background-color: transparent !important;
  border-radius: 9999px !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
  min-width: 40px !important;
  cursor: pointer !important;
  user-select: none !important;
  border: 1px solid transparent !important;
}

/* ラジオボタンがチェックされたときの反転カラー */
.toggle-button-group label input[type="radio"]:checked + .toggle-btn-label {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
}

/* 印刷時のスタイル定義 */
@media print {
  .toggle-button-group {
    background: transparent !important;
    border: none !important;
  }
  .toggle-button-group label input[type="radio"]:checked + .toggle-btn-label {
    background-color: #e2e8f0 !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
  }
}

/* 基本チェックリストの太線枠リセットとドット下線（グローバル!important撃破用） */
.checklist-modern-table,
.checklist-modern-table tr,
.checklist-modern-table td,
.checklist-modern-table th,
.checklist-modern-table tbody,
.checklist-modern-table thead {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* 質問項目 td のみに薄いドット下線とバランスの良いパディングを強制描画 */
.checklist-modern-table td.checklist-item-td {
  border: none !important;
  border-bottom: 1px dotted #cbd5e1 !important;
  background: transparent !important;
  padding: 10.5px 12px 10.5px 2px !important; /* 印刷時の padding: 6px 強制上書きを撃破 */
  font-size: 11px !important;
  line-height: 1.4 !important;
}

/* カテゴリヘッダー td の枠線を強制消去および余白の維持 */
.checklist-modern-table td.checklist-header-td {
  border: none !important;
  background: transparent !important;
  padding: 16px 4px 6px 0 !important; /* 印刷時の padding 縮みを防止 */
}

/* 基本チェックリストのテーブルコンテナ（左右配置の自動調節） */
.checklist-modern-table-container {
  display: flex !important;
  justify-content: space-between !important;
  gap: 3% !important;
  width: 100% !important;
}

/* 印刷時のグローバルテーブル幅100%化を無効化し、左右均等幅（48.5%）を維持 */
.checklist-modern-table {
  width: 48.5% !important;
}

/* col の!importantによる幅の確実な固定 */
.checklist-modern-table col {
  box-sizing: border-box !important;
}

/* 印刷時に左右が切れるのを完全に防ぐため、用紙内側の安全余白内に収める */
@media print {
  /* 1. Remove parent table and cell borders to prevent double borders */
  .facesheet-page td[colspan="4"] > table {
    border: none !important;
  }
  .facesheet-page td[colspan="4"] > table > tbody > tr > td {
    border: none !important;
  }

  /* 2. Assign borders directly on child cells for page 1 lower table */
  /* Central vertical border */
  #facesheet-family-title-cell,
  #facesheet-special-notes-cell {
    border-left: 1.5px solid #000 !important;
  }
  

  

  

  
  /* Bottom edge outer borders */
  #facesheet-emergency-name-4,
  #facesheet-emergency-relation-4,
  #facesheet-emergency-contact-4,
  #facesheet-special-notes-cell {
    border-bottom: 1.5px solid #000 !important;
  }

  /* 3. Remove parent table left/right borders for page 2 life style block */
  #facesheet-current-life-container {
    border-left: none !important;
    border-right: none !important;
  }
  #facesheet-current-life-container > table {
    border: none !important;
  }
  #facesheet-current-life-container > table > tbody > tr > td {
    border-left: none !important;
    border-right: none !important;
  }
  /* 真ん中の縦線（左の「1日の生活・すごし方」と右の「趣味」「友人」の境）は残す（2026-10-24 まで印刷で消えていた） */
  #facesheet-current-life-container > table > tbody > tr > td[rowspan] {
    border-right: 1.5px solid #000 !important;
  }

  /* 4. Assign borders directly on child cells for page 2 life style block */

  /* Center border and right borders */
  #facesheet-current-life-container #facesheet-current-life-title-cell,
  #facesheet-current-life-container #facesheet-current-life-family-header,
  #facesheet-current-life-container #facesheet-current-life-family {
    border-right: 1.5px solid #000 !important;
  }
  
  /* Hobbies and Friends borders (右枠、上枠、内側横線、底辺の横線) */
  #facesheet-current-life-container #facesheet-hobbies-header,
  #facesheet-current-life-container #facesheet-hobbies,
  #facesheet-current-life-container #facesheet-social-relations-header,
  #facesheet-current-life-container #facesheet-social-relations {
    border-right: 1.5px solid #000 !important;
  }
  #facesheet-current-life-container #facesheet-hobbies-header,
  #facesheet-current-life-container #facesheet-hobbies,
  #facesheet-current-life-container #facesheet-social-relations-header {
    border-bottom: 1px solid #000 !important;
  }
  #facesheet-current-life-container #facesheet-current-life-title-cell,
  #facesheet-current-life-container #facesheet-current-life-time-header,
  #facesheet-current-life-container #facesheet-current-life-family-header {
    border-bottom: 1px solid #000 !important;
  }

  /* 印刷時にキャラクターカウンターバッジを完全に非表示にする */
  .no-print-counter {
    display: none !important;
  }
}

/* ── 📱 モバイルメニュー用（ドロワー）追加スタイル ── */
.menu-toggle-btn {
  display: none; /* デフォルト（PC）は非表示 */
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
  margin-right: 12px;
  transition: all 0.2s ease;
}

.menu-toggle-btn:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #cbd5e1;
}

.menu-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.sidebar-overlay {
  display: none; /* デフォルトは非表示 */
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 998;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── 📋 結果表示用レスポンシブヘッダー ── */
.result-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: white;
  flex-wrap: wrap;
}

.result-header-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.result-actions-wrapper {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .result-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
  }
  
  .result-header-title {
    font-size: 16px;
    white-space: normal;
    text-align: center;
  }
  
  .result-actions-wrapper {
    justify-content: center;
    width: 100%;
  }
  
  .result-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .ai-editable-cell {
    padding-bottom: 28px !important;
  }
  
  .copy-trigger-btn {
    top: auto !important;
    bottom: 4px !important;
    right: 4px !important;
    font-size: 10px;
    padding: 3px;
  }
}

/* ── 📋 インライン要素コピー用スタイル ── */
.ai-editable-cell {
  position: relative !important;
}

.copy-trigger-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.copy-trigger-btn svg {
  width: 15px;
  height: 15px;
}

.copy-trigger-btn:hover {
  background: white;
  border-color: #94a3b8;
  color: #1e293b;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.copy-trigger-btn.success {
  background: #d1fae5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}

/* ── 厚労省 課題分析標準項目（23項目）アセスメントシート ── */
.mhlw-toolbar {
  background: #0f172a;
  color: white;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #334155;
}

.mhlw-toolbar-title {
  font-weight: 800;
  font-size: 15px;
  color: #fde047;
}

.mhlw-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mhlw-btn {
  background: #475569;
  color: white;
  font-weight: bold;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.mhlw-btn-primary {
  background: #16a34a;
}

.mhlw-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.mhlw-btn-link {
  background: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.mhlw-activity-row > td {
  padding: 6px 8px 10px;
  background: #f8fafc;
}

.mhlw-activity-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
  background: white;
}

.mhlw-activity-table caption {
  text-align: left;
  font-weight: bold;
  font-size: 11.5px;
  padding: 2px 0 4px;
}

.mhlw-activity-table th,
.mhlw-activity-table td {
  border: 1px solid #94a3b8;
  padding: 3px 5px;
  vertical-align: top;
}

.mhlw-activity-table thead th {
  background: #e2e8f0;
}

.mhlw-level-select {
  width: 100%;
  font-size: 11px;
  padding: 1px 2px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: white;
}

/* ── フェイスシート（課題分析標準項目 No.1〜9 の別紙） ── */
.mhlw-face-lead {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin: -6px 0 12px;
}

.mhlw-face-section {
  margin-bottom: 14px;
}

.mhlw-face-section h3 {
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 6px;
  padding: 4px 8px;
  background: #f1f5f9;
  border-left: 4px solid #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mhlw-item-tag {
  font-size: 10px;
  font-weight: bold;
  color: #1e40af;
  background: #dbeafe;
  border-radius: 3px;
  padding: 1px 6px;
}

.mhlw-item-tag-ref {
  color: #475569;
  background: #e2e8f0;
}

.mhlw-face-fields {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  margin-top: 6px;
}

.mhlw-face-fields th,
.mhlw-face-fields td {
  border: 1px solid #334155;
  padding: 4px 6px;
  vertical-align: top;
}

.mhlw-face-fields th {
  width: 17%;
  background: #f8fafc;
  text-align: left;
  font-size: 11px;
  font-weight: bold;
}

.mhlw-face-table {
  margin-top: 6px;
}

.mhlw-face-table thead th {
  font-size: 10.5px;
}

/* 画像欄のある区分: 記入欄（左）＋ 正方形の画像欄（右） */
.mhlw-face-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 70mm; /* 左: 図の枠（広い） / 右: 記入欄 */
  gap: 8px;
  margin-top: 6px;
  align-items: stretch;
}

.mhlw-face-split-fields {
  display: flex;
}

/* まとめ欄（氏名＋ふりがな・生年月日＋年齢・自宅＋携帯） */
.mhlw-face-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mhlw-face-group-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.mhlw-face-part {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.mhlw-face-part .mhlw-field {
  flex: 1;
  min-width: 0;
}

.mhlw-face-sub {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: bold;
  color: #64748b;
  white-space: nowrap;
}

.mhlw-face-group-stack .mhlw-face-sub {
  width: 4.5em;
}

/* ふりがなは氏名の上に小さく、点線で区切る */
.mhlw-face-part-kana {
  border-bottom: 1px dashed #cbd5e1;
  padding-bottom: 2px;
}

.mhlw-face-part-kana .mhlw-field {
  font-size: 10px;
  min-height: 1.4em;
}

.mhlw-face-part-kana + .mhlw-face-part .mhlw-field {
  font-size: 14px;
  font-weight: bold;
}

.mhlw-face-group-stack .mhlw-face-part-kana + .mhlw-face-part {
  padding-left: 51px; /* 小見出しの幅（4.5em × 10px）＋すき間 6px */
}

.mhlw-face-fields-stacked {
  height: 100%;
  margin-top: 0;
}

.mhlw-face-fields-stacked th {
  width: auto;
}

.mhlw-face-row-grow {
  height: 100%;
}

.mhlw-face-image {
  border: 1px solid #334155;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mhlw-face-image-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: #f8fafc;
  border-bottom: 1px solid #334155;
}

.mhlw-face-image-title {
  font-size: 11px;
  font-weight: bold;
}

.mhlw-face-image-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mhlw-face-image-actions .mhlw-btn {
  font-size: 11px;
  padding: 3px 8px;
}

/* 図の枠は横長（4:3）。横の記入欄が縦に伸びすぎないよう高さを抑える。画像は縦横比を保って枠内に収める */
.mhlw-face-image-drop {
  aspect-ratio: 4 / 3;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.mhlw-face-image-drop img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.mhlw-face-image-empty {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 0 8px;
}

@media (max-width: 720px) {
  .mhlw-face-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.mhlw-sheet {
  width: 210mm;
  max-width: 100%;
  margin: 0 auto;
  background: white;
  padding: 12mm 10mm;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  color: #0f172a;
  box-sizing: border-box;
}

.mhlw-sheet-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: 0.1em;
}

.mhlw-header-table,
.mhlw-items-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.mhlw-header-table {
  margin-bottom: 10px;
}

.mhlw-header-table th,
.mhlw-header-table td,
.mhlw-items-table th,
.mhlw-items-table td {
  border: 1px solid #334155;
  padding: 4px 6px;
  vertical-align: top;
}

.mhlw-header-table th {
  width: 12%;
  background: #f1f5f9;
  white-space: nowrap;
  vertical-align: middle;
}

.mhlw-items-table thead th {
  background: #e2e8f0;
}

.mhlw-field {
  min-height: 1.6em;
  outline: none;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
}

.mhlw-item-field {
  min-height: 3.2em;
}

/* フェイスシートの生活歴・現在の生活状況（4行分ほどの高さ） */
.mhlw-face-tall {
  min-height: 6.5em;
}

.mhlw-field:focus {
  background: #fefce8;
}

.mhlw-source {
  font-size: 9px;
  color: #64748b;
  margin: 8px 0 0;
}

@media print {
  .mhlw-toolbar {
    display: none !important;
  }

  .mhlw-sheet {
    box-shadow: none;
    padding: 0;
    width: 100%;
  }

  .mhlw-items-table > tbody > tr:not(.mhlw-activity-row),
  .mhlw-activity-table tr,
  .mhlw-face-fields tr,
  .mhlw-face-image {
    page-break-inside: avoid;
  }
}

/* ── 課題整理総括表 ── */
.kadai-sheet {
  width: 277mm;
}

.kadai-factors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.kadai-factor {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid #cbd5e1;
  padding: 2px 0;
}

.kadai-factor .mhlw-field {
  flex: 1;
}

.kadai-factor-no {
  font-weight: bold;
  font-size: 13px;
}

.kadai-box {
  border: 1px solid #334155;
  padding: 4px 6px;
}

.kadai-table th,
.kadai-table td {
  font-size: 11px;
}

.kadai-table thead th:nth-child(2),
.kadai-table thead th:nth-child(3),
.kadai-table thead th:nth-child(4) {
  width: 11%;
}

.kadai-group {
  width: 8%;
  background: #f8fafc;
  text-align: left;
}

.kadai-item {
  width: 13%;
  background: #f8fafc;
  text-align: left;
  font-weight: normal;
}

.kadai-outlook-table {
  margin-top: 10px;
}

.kadai-priority {
  width: 8%;
  text-align: center;
}

/* ── 居宅サービス計画書（第1表〜第3表） A4横 ── */
.cp-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cp-page {
  width: 277mm;
  max-width: 100%;
  margin: 0 auto;
  background: white;
  padding: 8mm;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  color: #0f172a;
  font-size: 11px;
}

.cp-page-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  margin-bottom: 6px;
}

.cp-sheet-no {
  font-size: 11px;
  border: 1px solid #0f172a;
  padding: 1px 8px;
  justify-self: start;
}

.cp-title {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.15em;
}

.cp-created {
  justify-self: end;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.cp-status-row {
  text-align: right;
  margin-bottom: 4px;
}

.cp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cp-table th,
.cp-table td {
  border: 1px solid #0f172a;
  padding: 3px 5px;
  vertical-align: top;
  font-size: 11px;
}

.cp-table th {
  background: #f8fafc;
  font-weight: normal;
  text-align: left;
}

/* 第1表の上部: 様式どおり枠なしで「見出し＋下線の入力欄」を並べる */
.cp-t1-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
}

.cp-line {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px 24px;
}

.cp-seg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border-bottom: 1px solid #0f172a;
  padding-bottom: 1px;
  min-width: 0;
}

.cp-seg-label,
.cp-seg-suffix {
  white-space: nowrap;
  font-size: 11.5px;
}

.cp-seg-field {
  flex: 1;
  min-width: 20mm;
  min-height: 1.5em;
  padding: 0 4px;
  font-size: 12px;
}

.cp-seg-field:empty::before {
  content: attr(data-hint);
  color: #94a3b8;
}

.cp-seg-name { flex: 0 1 70mm; }
.cp-seg-date { flex: 0 1 52mm; }
.cp-seg-period { flex: 0 1 110mm; }
.cp-seg-half { flex: 0 1 50%; }
.cp-seg-grow { flex: 1 1 60mm; }

/* 日付の欄は和暦の日付（令和8年10月21日）を1行に収める（2026-11-07 代表「要支援プランの認定年月日がズレている」）。
   .cp-seg は min-width: 0 のため、行が狭いと欄が日付より細く縮み、「日」だけが次の行に落ちて 📅 が右上に浮いていた。
   日付の欄を持つ区切りは中身より細くせず（入りきらなければ区切りごと次の行へ回る）、日付の文字は折り返さない */
.cp-seg-date,
.cp-seg-nowrap {
  min-width: max-content;
}

.cp-seg-date .cp-seg-field,
.cp-seg-nowrap .cp-seg-field {
  flex: 1 0 auto;
  white-space: nowrap;
}

.cp-choice-cell {
  vertical-align: middle !important;
}

.cp-t1-main {
  margin-top: 6px;
}

/* 第1表の説明・同意・交付の署名欄 */
.cp-consent {
  margin-top: 10px;
}

.cp-consent-text {
  width: 64%;
  font-size: 10.5px;
  line-height: 1.6;
  vertical-align: middle;
}

.cp-consent th {
  width: 12%;
  text-align: center;
  vertical-align: middle;
}

.cp-consent-date .cp-cell {
  text-align: center;
}

/* 手書きの署名が入る高さ */
.cp-sign {
  min-height: 14mm;
  font-size: 18px;
}

.cp-t1-main th {
  width: 14%;
  text-align: center;
  vertical-align: middle;
}

.cp-inline {
  display: inline-block;
  min-width: 36mm;
  border-bottom: 1px dotted #94a3b8;
  min-height: 1.4em;
  vertical-align: baseline;
}

.cp-inline-wide {
  min-width: 60mm;
}

.cp-box {
  min-height: 22mm;
}

.cp-box-sm {
  min-height: 12mm;
}

.cp-choices {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
}

.cp-choice {
  cursor: pointer;
  padding: 0 5px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  user-select: none;
}

.cp-choice:hover {
  background: #eff6ff;
}

.cp-choice.is-selected {
  border-color: #0f172a;
  font-weight: bold;
}

.cp-choice-sep {
  color: #64748b;
}

.cp-t2 thead th {
  text-align: center;
  vertical-align: middle;
}

.cp-need-col {
  width: 14%;
}

.cp-period {
  width: 7%;
}

.cp-mark {
  width: 3.5%;
  text-align: center;
}

/* 第2表の列幅（見出しが結合セルのため colgroup で指定する）。※1は他の列の半分 */
.cp-t2 .cp-mark-col {
  width: 4.3%;
}

.cp-t2 .cp-row-actions-col {
  width: 0;
}

.cp-freq {
  width: 6.5%;
}

.cp-cell {
  min-height: 1.6em;
}

/* 第2表の行の操作ボタン: 列の幅は取らず、行にマウスを乗せたとき（入力中のとき）だけ行の右下に重ねて出す（右上のカレンダーのボタンと重ならないように） */
.cp-row-actions {
  width: 0;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  position: relative;
}

.cp-row-actions-inner {
  position: absolute;
  bottom: 2px;
  right: 2px;
  display: flex;
  gap: 3px;
  padding: 2px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.cp-t2 tbody tr:hover .cp-row-actions-inner,
.cp-t2 tbody tr:focus-within .cp-row-actions-inner {
  opacity: 1;
  pointer-events: auto;
}

/* 第2表の順番の入れ替え: 上の枠との境目（枠の上の線の真ん中）に ↕ を出す */
.cp-t2 td.cp-swap-host {
  position: relative;
}

/* ↕ が1行目の字に重ならないよう、上を少し空ける（画面だけ。PDF を作るときは print.js がボタンを display: none にするので空けない） */
@media screen {
  .cp-t2 td.cp-swap-host.has-swap:has(> .cp-swap-btn:not([style*="none"])) {
    padding-top: 12px;
  }
}

.cp-swap-btn {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 50%;
  background: white;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}

.cp-swap-btn:hover,
.cp-swap-btn:focus-visible {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0369a1;
}

.cp-row-actions-inner .cp-mini-btn {
  width: auto;
  margin-bottom: 0;
  white-space: nowrap;
}

.cp-mini-btn {
  display: block;
  width: 100%;
  margin-bottom: 2px;
  font-size: 10px;
  padding: 1px 4px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background: white;
  cursor: pointer;
}

.cp-mini-danger {
  color: #b91c1c;
  border-color: #fca5a5;
}

.cp-empty {
  text-align: center;
  color: #64748b;
  padding: 12px !important;
}

.cp-footnote {
  font-size: 10px;
  margin-top: 4px;
}

.cp-add-need {
  margin-top: 6px;
}

.cp-t3 th,
.cp-t3 td {
  padding: 1px 3px;
  height: 5mm;
}

.cp-t3 thead th {
  text-align: center;
}

.cp-band {
  width: 4%;
  text-align: center !important;
  vertical-align: middle !important;
}

.cp-hour {
  width: 6%;
  text-align: right !important;
  font-size: 10px !important;
}

.cp-slot {
  background: #eff6ff;
  vertical-align: middle !important;
}

.cp-slot-item + .cp-slot-item {
  margin-top: 2px;
  border-top: 1px dashed #93c5fd;
}

.cp-slot-time {
  display: block;
  font-size: 9px;
  color: #475569;
}

.cp-activity {
  width: 20%;
}

.cp-t3-nonweekly {
  margin-top: 6px;
}

.cp-t3-nonweekly th {
  width: 10%;
  text-align: center;
  vertical-align: middle;
}

.cp-weekly-editor {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px dashed #cbd5e1;
}

.cp-editor-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 4px;
}

.cp-editor-block .mhlw-btn {
  margin-top: 6px;
}

.cp-time {
  width: 100%;
  font-size: 11px;
}

@media (max-width: 720px) {
  .cp-weekly-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media print {
  .cp-page {
    box-shadow: none;
    padding: 0;
    width: 100%;
    page-break-after: always;
  }

  .cp-page:last-child {
    page-break-after: auto;
  }

  .cp-choice {
    cursor: default;
  }

  .kadai-sheet {
    width: 100%;
  }
}

/* ── 日付・期間のカレンダー入力（📅） ── */
.cp-cal-btn {
  flex: 0 0 auto;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  align-self: center;
}

.cp-cal-btn:hover,
.cp-cal-btn:focus-visible {
  background: #eff6ff;
  border-color: #2563eb;
}

/* 期間の列は幅が狭いので、📅 は欄の上に置き、文字は列の幅いっぱいに使う */
.cp-period-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-period-wrap .cp-cell {
  flex: 1;
  min-width: 0;
}

.cp-period-wrap .cp-cal-btn {
  order: -1;
  align-self: flex-end;
  padding: 0 2px;
  font-size: 10px;
}

/* 評価表の評価期間: 📅 は欄の右上に置く */
.evaluation-cal-btn {
  display: block;
  margin: 0 0 4px auto;
  font-size: 10px;
  padding: 0 2px;
}

.cp-created .cp-seg-field {
  min-width: 32mm;
}

.cp-date-popover {
  position: fixed;
  z-index: 1000;
  background: white;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  padding: 10px 12px;
  font-size: 12px;
  color: #0f172a;
  min-width: 260px;
}

.cp-date-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
}

.cp-date-row label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: bold;
}

.cp-date-row input[type="date"] {
  font-size: 13px;
  padding: 3px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.cp-date-sep {
  padding-bottom: 5px;
}

.cp-date-quick {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #475569;
}

.cp-date-quick button,
.cp-date-actions button {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: white;
  cursor: pointer;
}

.cp-date-preview {
  margin-top: 8px;
  padding: 4px 6px;
  background: #f8fafc;
  border-radius: 4px;
  min-height: 1.4em;
}

.cp-date-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.cp-date-actions .cp-date-apply {
  background: #16a34a;
  border-color: #16a34a;
  color: white;
  font-weight: bold;
}

/* スマート解析: ケアプランまで一括で作成する */
.full-pipeline-option {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 12px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

.full-pipeline-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #166534;
  cursor: pointer;
}

.full-pipeline-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #16a34a;
}

.full-pipeline-note {
  margin: 4px 0 0 24px;
  font-size: 11px;
  color: #475569;
}

/* ── 介護予防サービス・支援計画書（様式5）・経過記録（様式6） A4横 ── */
.yobo-page {
  font-size: 10px;
}

.yobo-title {
  font-size: 14px;
  letter-spacing: 0.05em;
  text-align: center;
  line-height: 1.4;
}

.yobo-form-no {
  justify-self: end;
  font-size: 11px;
}

.yobo-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0;
}

.yobo-status-box {
  border: 1px solid #0f172a;
  padding: 1px 8px;
}

.yobo-center {
  text-align: center !important;
  vertical-align: middle !important;
}

.yobo-main th {
  font-size: 9.5px;
  text-align: center;
  vertical-align: middle;
}

.yobo-main td {
  font-size: 10px;
}

.yobo-cell-field {
  min-height: 7em;
}

/* 総合的課題・提案・意向・目標は列ごとに枠 1 つ（全部の行にまたがる） */
.yobo-summary-cell {
  vertical-align: top;
}

.yobo-summary-field {
  min-height: 28em;
}

.yobo-goal-field {
  min-height: 3em;
}

.yobo-policy-field {
  min-height: 5em;
}

.yobo-domain-label {
  font-weight: 700;
  margin-bottom: 2px;
}

.yobo-has-issue {
  margin-bottom: 2px;
}

.yobo-issue-no {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.yobo-row-remove {
  border: none;
  background: none;
  color: #dc2626;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.yobo-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 6px 0;
}

.yobo-bottom,
.yobo-consent {
  margin-top: 6px;
}

.yobo-foot {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.yobo-note {
  font-size: 9.5px;
}

.yobo-count {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.yobo-inline-field {
  display: inline-block;
  min-width: 2.5em;
  min-height: 1.4em;
  border-bottom: 1px dotted #94a3b8;
  text-align: center;
}

.yobo-vertical {
  width: 2.4em;
  writing-mode: vertical-rl;
}

.yobo-stamp {
  height: 3em;
}

/* 計画に関する同意: 署名を書けるよう行を高くし、日付・氏名は下線の上に書く */
.yobo-consent th,
.yobo-consent td {
  height: 20mm;
  vertical-align: bottom;
}

.yobo-consent th,
.yobo-consent td:nth-child(2) {
  vertical-align: middle !important;
}

/* 印刷では様式5をA4横1枚に収まる最大の大きさにする（倍率と幅は印刷の直前に ui.js の fitYoboPage で求める。
   縮小した分だけ幅を広げて組み、用紙の幅いっぱいにする） */
@media print {
  .yobo-page {
    zoom: var(--yobo-print-zoom, 0.7);
    width: var(--yobo-print-width, calc(100% / 0.7)) !important;
  }
}

/* 印刷・PDF 用の様式5 A4 縦2枚（yoboplan.js の renderYoboA4Pages。画面では見せない。2026-10-08 代表の決定） */
.yobo-a4-page {
  width: 190mm;
  font-size: 10px;
}

.yobo-a4-weekly {
  width: 277mm;
}

.yobo-a4-page + .yobo-a4-page {
  margin-top: 8mm;
}

.yobo-a4-value {
  min-width: 4em;
}

.yobo-a4-life td {
  height: 9mm;
}

.yobo-a4-main th {
  font-size: 9.5px;
  text-align: center;
  vertical-align: middle;
}

.yobo-a4-main td {
  font-size: 10px;
  height: 32mm;
}

.yobo-a4-assess td {
  height: 38mm;
}

.yobo-a4-policy {
  height: 16mm;
}

/* 地域包括支援センターの縦書きが収まる高さ */
.yobo-a4-page .yobo-opinion {
  height: 22mm;
}

.yobo-a4-page .yobo-stamp {
  height: 12mm;
}

@media print {
  body[data-print-template="care_plan_1"][data-print-tab="support_yobo_plan"] #yobo-sheet {
    display: none !important;
  }

  body[data-print-template="care_plan_1"][data-print-tab="support_yobo_plan"] #yobo-a4-print {
    display: block !important;
  }

  .yobo-a4-page {
    box-shadow: none;
    padding: 0;
    margin: 0 !important;
    zoom: var(--yobo-a4-zoom, 1);
    width: var(--yobo-a4-width, 100%) !important;
    max-width: none;
    page-break-after: always;
    break-after: page;
  }

  .yobo-a4-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* 週間サービス計画表（A4 横の形）は、縦の紙に 90 度回して載せる（紙を回すと A4 横で読める。2026-11-07 代表「印刷プレビューの余白が多い」）。
     前は名前付きの用紙（@page yoboWeekly）でこの1枚だけ横にしていたが、Chrome の印刷プレビューは縦と横の混じった印刷を、
     いちばん大きい横の紙が縦の紙に収まる倍率（210 ÷ 297 ≒ 0.71）で全部のページを縮め、様式5の2枚も紙の 2/3 ほどになっていた。
     回す前の幅は 267mm（倍率は print.js の fitYoboPage）で、回したあとは幅 約180mm・高さ 267mm（縦の紙の内側 190 × 277mm に収まる）。
     translateX(-100%) で左へ幅の分ずらしてから左上を軸に -90 度回すと、回したあとの左上が元の左上に来る。PDF（saveYoboA4Pdf）は今までどおり A4 横 */
  .yobo-a4-weekly {
    transform-origin: top left;
    transform: rotate(-90deg) translateX(-100%);
  }
}

/* AI が作成中の案内 */
.yobo-busy {
  max-width: 277mm;
  margin: 0 auto;
  padding: 10px 14px;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  font-weight: 600;
}

.tab-btn.is-busy::after {
  content: ' ⏳';
}

/* 要介護・要支援プランのタブ: 番号付きの手順の形（2026-11-20 代表の決定）。選んでいるタブは青い番号と下線 */
#careplan-tabs-bar,
#supportplan-tabs-bar {
  counter-reset: cl-step;
  flex-wrap: nowrap;
  justify-content: flex-start !important;
  overflow-x: auto;
  scrollbar-width: thin;
}
/* 入るときは真ん中、入らないときは左から並べて横にずらす（justify-content: safe center の代わり） */
#careplan-tabs-bar .tab-btn:first-child,
#supportplan-tabs-bar .tab-btn:first-child { margin-left: auto; }
#careplan-tabs-bar .tab-btn:last-child,
#supportplan-tabs-bar .tab-btn:last-child { margin-right: auto; }
#careplan-tabs-bar .tab-btn,
#supportplan-tabs-bar .tab-btn {
  counter-increment: cl-step;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px 11px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
}
#careplan-tabs-bar .tab-btn::before,
#supportplan-tabs-bar .tab-btn::before {
  content: counter(cl-step);
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
#careplan-tabs-bar .tab-btn:hover:not(.active),
#supportplan-tabs-bar .tab-btn:hover:not(.active) {
  background: transparent;
  color: #1e293b;
}
#careplan-tabs-bar .tab-btn:hover:not(.active)::before,
#supportplan-tabs-bar .tab-btn:hover:not(.active)::before {
  background: #cbd5e1;
}
#careplan-tabs-bar .tab-btn.active,
#supportplan-tabs-bar .tab-btn.active {
  color: var(--primary);
  background: transparent;
  box-shadow: inset 0 -3px 0 var(--primary);
}
#careplan-tabs-bar .tab-btn.active::before,
#supportplan-tabs-bar .tab-btn.active::before {
  background: var(--primary);
  color: #fff;
}
#careplan-tabs-bar .tab-btn:focus-visible,
#supportplan-tabs-bar .tab-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}


/* ── 入院時情報提供書＜在宅版＞ A4縦・2ページ ── */
.hosp-help {
  max-width: 190mm;
  margin: 0 auto 10px;
  font-size: 12px;
  color: #475569;
}

.hosp-sheet {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hosp-page {
  width: 190mm;
  max-width: 100%;
  margin: 0 auto;
  background: white;
  padding: 8mm;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  color: #0f172a;
  font-size: 10px;
  line-height: 1.5;
}

.hosp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 6px;
}

.hosp-title {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.05em;
}

.hosp-dates {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
}

.hosp-dates > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.hosp-date-label {
  white-space: nowrap;
}

.hosp-address {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr);
  align-items: center;
  gap: 8px;
}

.hosp-address-box {
  border: 1.5px solid #0f172a;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
}

.hosp-line {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.hosp-address-label {
  white-space: nowrap;
}

.hosp-arrow {
  font-size: 22px;
}

.hosp-lead {
  margin: 6px 0 4px;
  font-size: 10.5px;
}

.hosp-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.hosp-table th,
.hosp-table td {
  border: 1px solid #0f172a;
  padding: 2px 4px;
  vertical-align: middle;
}

.hosp-table th {
  background: #dfe4ec;
  font-weight: normal;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.35;
}

.hosp-table td.hosp-sec {
  background: #8fa3bf;
  font-weight: 800;
  font-size: 10.5px;
  padding: 2px 6px;
}

.hosp-sec-note {
  font-weight: 700;
  font-size: 9.5px;
}

.hosp-note,
.hosp-hint-text,
.hosp-th-note {
  font-size: 9px;
  color: #334155;
}

.hosp-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
}

/* 記入欄（下線付き） */
.hosp-field {
  display: inline-block;
  min-width: 10mm;
  min-height: 1.4em;
  border-bottom: 1px dotted #94a3b8;
  padding: 0 2px;
  vertical-align: bottom;
}

.hosp-field:empty::before {
  content: attr(data-hint);
  color: #94a3b8;
}

.hosp-w-xxs { min-width: 8mm; }
.hosp-w-xs { min-width: 14mm; }
.hosp-w-sm { min-width: 24mm; }
.hosp-w-md { min-width: 36mm; }
.hosp-w-lg { min-width: 70mm; }
.hosp-w-date { min-width: 26mm; }

.hosp-grow {
  display: block;
  flex: 1;
  min-width: 0;
}

.hosp-box {
  min-height: 2.8em;
  padding: 1px 2px;
}

.hosp-box-tall {
  min-height: 5.5em;
}

.hosp-paren {
  white-space: normal;
}

/* □のチェック欄（クリックで付け外し） */
.hosp-check {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin-right: 8px;
  cursor: pointer;
  user-select: none;
  border-radius: 3px;
}

.hosp-check::before {
  content: '☐';
  font-size: 1.15em;
  line-height: 1;
}

.hosp-check.is-checked::before {
  content: '☑';
  color: #1d4ed8;
}

.hosp-check.is-checked {
  font-weight: 700;
}

.hosp-check:hover {
  background: #eff6ff;
}

.hosp-check:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 1px;
}

.hosp-stack {
  line-height: 1.6;
}

.hosp-cogs {
  padding: 0 !important;
}

.hosp-cog + .hosp-cog {
  border-top: 1px solid #0f172a;
}

.hosp-cog-title {
  padding: 2px 4px;
  border-bottom: 1px dotted #64748b;
}

.hosp-cog-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 8px;
  padding: 2px 4px;
}

.hosp-page .cp-cal-btn {
  font-size: 11px;
  padding: 0 2px;
}

@media (max-width: 720px) {
  .hosp-page {
    padding: 4mm;
  }

  .hosp-address {
    grid-template-columns: minmax(0, 1fr);
  }

  .hosp-arrow {
    display: none;
  }
}

/* 印刷では1ページずつ A4縦 に収まる最大の大きさにする（倍率と幅は印刷の直前に ui.js で求める） */
@media print {
  .hosp-help {
    display: none !important;
  }

  .hosp-page {
    box-shadow: none;
    padding: 0;
    zoom: var(--hosp-print-zoom, 1);
    width: var(--hosp-print-width, 100%) !important;
    max-width: none;
    page-break-after: always;
    break-after: page;
  }

  .hosp-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .hosp-check.is-checked::before {
    color: #0f172a;
  }

  .hosp-field {
    border-bottom-color: transparent;
  }

  .hosp-table th,
  .hosp-table td.hosp-sec {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── 利用者の登録・切り替え ── */
/* 開いている利用者の帯（画面上の見出しのすぐ下。画面を下へ動かしても残る。2026-10-29 代表「いま開いている利用者が誰なのかがすぐに分かる位置がいい」） */
/* 開いている利用者。パソコン・iPad の幅では上の見出しの右側に置く（2026-11-20 代表の決定。前は見出しの下の帯）。
   スマホの幅（720px 以下）では見出しの下の帯にする（下の @media） */
.client-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  /* 利用者名を題名より先に見せる（題名のほうを省略する） */
  flex: 0 0 auto;
  max-width: 72%;
  min-width: 0;
}

.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 16px;
  border: 1px solid #93c5fd;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

#client-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-chip.is-draft {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.client-chip:hover {
  filter: brightness(0.97);
}

/* 新しい利用者の作業を始める（画面上部。登録した利用者を開いているときだけ） */
.client-new-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background: #fff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.client-new-chip[hidden] {
  display: none;
}

.client-new-chip:hover {
  background: #f8fafc;
}

.client-box {
  max-width: 680px;
  width: 100%;
}

#client-modal-body {
  max-height: 65vh;
  overflow-y: auto;
}

/* 支援経過記録（progress.js。2026-10-25）。画面いっぱいに出す（2026-10-25 代表「見ずらい。画面いっぱいに表示して」） */
.progress-box {
  width: calc(100vw - 24px);
  max-width: calc(100vw - 24px);
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
}

#progress-modal-body {
  overflow-y: auto;
}

/* 閉じるは右上（右下は知らせに隠れるため。画面いっぱいなので下の段も置かない） */
.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 12px;
}

.progress-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.progress-toolbar-gap {
  flex: 1;
}

.progress-field-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #334155;
}

.progress-field-inline input,
.progress-field-inline select,
.progress-field input,
.progress-field select,
.progress-field textarea {
  font: inherit;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.progress-count {
  font-size: 12.5px;
  color: #64748b;
}

.progress-form {
  border: 1px solid #bfdbfe;
  background: var(--primary-bg);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.progress-form[hidden],
.progress-full[hidden] {
  display: none;
}

.progress-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 12px;
  margin-bottom: 8px;
}

.progress-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: #334155;
}

.progress-field-wide textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  line-height: 1.6;
}

.progress-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.progress-row {
  border-bottom: 1px solid var(--border);
}

.progress-row-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 13.5px;
}

.progress-row-line:hover {
  background: #f8fafc;
}

.progress-when {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-width: 5.5em;
  white-space: nowrap;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

/* 日付と時刻は2行に分ける（2026-10-25 代表「日時と時間で２行にして」） */
.progress-when-time {
  color: #475569;
}

.progress-kind {
  flex: 0 0 auto;
  min-width: 7.5em;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary-dark);
}

.progress-row-line {
  align-items: flex-start;
}

/* 内容は 1 行で切らず、3 行まで見せる（押すと全文） */
.progress-snippet {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  color: #334155;
}

/* 開いた行は内容を全部見せる（下に同じ文を二重に出さない） */
.progress-row.is-open .progress-snippet {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
}

.progress-row.is-open .progress-full-text {
  display: none;
}

.progress-author {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  color: #64748b;
}

.progress-actions {
  flex: 0 0 auto;
  display: inline-flex;
  gap: 6px;
}

.progress-btn {
  font: inherit;
  font-size: 12.5px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.progress-btn:hover {
  background: #f1f5f9;
}

.progress-btn-danger {
  color: #b91c1c;
}

.progress-full {
  padding: 4px 8px 12px;
}

.progress-full-text,
.progress-edit-text {
  white-space: pre-wrap;
  font-size: 13.5px;
  line-height: 1.7;
  color: #0f172a;
}

.progress-edits {
  margin-top: 8px;
  font-size: 12.5px;
  color: #475569;
}

.progress-edits ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.progress-edit-meta {
  color: #64748b;
}

.progress-edit-text {
  font-size: 12.5px;
  color: #475569;
  margin-bottom: 6px;
}

.progress-empty {
  font-size: 13.5px;
  color: #64748b;
  padding: 12px 4px;
}

.progress-template-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.progress-template-menu {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.progress-template-menu[hidden] {
  display: none;
}

.progress-template-group + .progress-template-group {
  margin-top: 8px;
}

.progress-template-group-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.progress-template-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.progress-template-choice {
  font: inherit;
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-template-choice:hover {
  background: #dbeafe;
}

.progress-templates {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: #f8fafc;
}

.progress-templates[hidden] {
  display: none;
}

.progress-template-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-template-section {
  margin-top: 10px;
}

.progress-template-section h3 {
  font-size: 14px;
  margin: 0 0 2px;
}

.progress-template-note {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 6px;
}

.progress-template-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}

.progress-template-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.progress-template-item-editing > .progress-template-editor {
  flex: 1 1 auto;
  min-width: 0;
}

.progress-template-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.progress-template-title {
  font-weight: 600;
  font-size: 13px;
}

.progress-template-text {
  white-space: pre-wrap;
  font-size: 12.5px;
  color: #475569;
  overflow-wrap: anywhere;
}

.progress-template-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 定型文の分類（2026-10-26） */
.progress-template-category + .progress-template-category {
  margin-top: 6px;
}

.progress-template-category-name {
  display: block;
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 3px;
}

.progress-template-category-head {
  font-size: 12.5px;
  color: #475569;
  margin: 10px 0 0;
  padding-bottom: 2px;
  border-bottom: 2px solid #cbd5e1;
}

.progress-template-category-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 640px) {
  .progress-row-line {
    flex-wrap: wrap;
  }

  .progress-snippet {
    flex-basis: 100%;
    order: 5;
  }
}

.client-current {
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 14px;
}

.client-current-title {
  font-size: 13.5px;
  color: #0f172a;
}

.client-current-docs {
  font-size: 12px;
  color: #475569;
  margin: 4px 0 10px;
}

.client-register {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.client-register .form-input {
  flex: 1 1 200px;
}

.client-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

/* 利用者のフォルダ（あ行〜わ行・その他） */
.client-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.client-folders[hidden] {
  display: none;
}

.client-folder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.client-folder:hover:not(:disabled) {
  border-color: #d9a441;
  background: #fffbeb;
}

.client-folder-icon {
  width: 30px;
  height: 30px;
  fill: #fef3c7;
  stroke: #d9a441;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.client-folder-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.client-folder-count {
  font-size: 12px;
  color: #64748b;
}

.client-folder.is-empty {
  cursor: default;
  opacity: 0.55;
}

.client-folder-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #1e293b;
}

.client-folder-head[hidden] {
  display: none;
}

.client-folder-head .btn-secondary {
  padding: 4px 12px;
  font-size: 12px;
}

/* プランの版が 2 つ以上ある人の行（clientstore-list.js の clientPersonRowHtml）。2026-11-20 代表の決定で、フォルダの印・色をやめ、
   ほかの人と同じ 1 行にして「版 N つ」の札を添える */
.client-person-count {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

/* 版の一覧の中の行（clientRowHtml の person）。上に版の名前の欄、下に「最新」・作った日・書類の札の 2 段 */
.client-row-line.client-version-row .client-row-main {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.client-row-line.client-version-row .client-row-name {
  max-width: none;
  overflow: visible;
}
.client-row-line.client-version-row .client-label-input {
  max-width: 30em;
}
.client-row-line.client-version-row .client-row-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  white-space: normal;
  overflow: visible;
}
.client-version-latest {
  padding: 1px 8px;
  border-radius: 9999px;
  background: #16a34a;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
/* スマホの幅でも、版の一覧の中では書類の札を出す（ふつうの行は 480px 以下で書類を省く） */
.client-row-line.client-version-row .client-doc-tags {
  display: inline-flex;
}
.client-doc-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.client-doc-tag {
  padding: 0 7px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
}

.client-label-input {
  width: 100%;
  box-sizing: border-box;
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #fff;
}

.client-label-input::placeholder {
  font-weight: 400;
  color: #94a3b8;
}

.client-row-label {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: #475569;
}

.client-list-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.client-register-box {
  width: 480px;
}

.progress-target-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: #334155;
}

.progress-target-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.client-register-open-btn {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
  font-weight: 600;
}

.client-register .client-kana-input {
  flex: 1 1 140px;
}

.client-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}

.client-owner-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 10px;
}

.client-owner-filter select {
  width: auto;
  min-width: 160px;
  max-width: 100%;
  padding: 6px 10px;
}

.client-sort-btn {
  padding: 2px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}

.client-sort-btn.is-active {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}

.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.client-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.client-row.is-current {
  border-color: #93c5fd;
  background: #eff6ff;
}

.client-row-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.client-row-badge {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 10.5px;
  vertical-align: middle;
}

.client-row-meta {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.client-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.client-delete-btn {
  color: #dc2626 !important;
}

.client-empty {
  font-size: 13px;
  color: #64748b;
}

/* 利用者の一覧は1人1行（clientstore.js の clientRowHtml）。入りきらない分は「…」で省き、行にマウスを重ねると全部出る */
.client-row.client-row-line {
  padding: 6px 10px;
}

.client-row-line .client-row-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.client-row-line .client-row-name {
  flex: 0 0 auto;
  max-width: 70%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-line .client-row-meta {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-row-line .client-row-actions .btn-primary,
.client-row-line .client-row-actions .btn-secondary {
  padding: 4px 10px;
  font-size: 12px;
}

/* 「開く」は、どの行でも同じ列（左端）に出す（2026-10-27 代表「開くの位置がバラバラ」）。
   ボタンは決まった列に置き、無いボタンの所は空けておく（作業中の行・フォルダの行・まだ記録なしの行・終了した利用者の行） */
.client-row-line .client-row-actions {
  display: grid;
  grid-template-columns: 3.6em 5.6em 5.6em 3.8em 3.8em;
  justify-content: end;
  font-size: 12px;
}
.client-row-line .client-row-actions > * { grid-row: 1; width: 100%; justify-content: center; text-align: center; white-space: nowrap; }
.client-row-line .client-row-actions > .btn-primary { grid-column: 1; }
.client-row-line .client-row-actions > [data-client-kana-edit] { grid-column: 2; }
.client-row-line .client-row-actions > [data-client-copy] { grid-column: 3; }
.client-row-line .client-row-actions > [data-client-close],
.client-row-line .client-row-actions > [data-client-reopen] { grid-column: 4; }
.client-row-line .client-row-actions > [data-client-delete] { grid-column: 5; }
.client-row-line .client-row-actions > [data-client-undelete] { grid-column: 4 / span 2; }
/* 支援経過記録の利用者を選ぶ画面は「開く」だけなので、列は 1 つ */
#client-modal[data-for-progress="1"] .client-row-line .client-row-actions { grid-template-columns: 3.6em; }

@media (max-width: 720px) {
  .client-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* 利用者の一覧は、スマホでも1人1行のまま */
  .client-row.client-row-line {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  /* プランの版の一覧の中の行だけは、版の名前の欄がつぶれないよう、ボタンを次の段へ回す（2026-11-20） */
  .client-row.client-row-line.client-version-row {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .client-row-line.client-version-row .client-row-main {
    flex-basis: 100%;
  }
  /* 「開く」だけの行（版が 2 つ以上の人・LuminaCare のまだ記録の無い人）は、スマホでは列を 1 つにして名前と同じ段に収める */
  .client-person-row .client-row-actions,
  .client-row-line[data-client-lumina-pending] .client-row-actions {
    grid-template-columns: 3.6em;
  }
}

@media (max-width: 480px) {
  /* 狭い画面では書類の名前を省き、名前・更新日・ボタンだけにする */
  .client-row-line .client-row-docs {
    display: none;
  }

  .client-row-line .client-row-actions {
    gap: 4px;
  }

  .client-row-line .client-row-actions .btn-primary,
  .client-row-line .client-row-actions .btn-secondary {
    padding: 4px 7px;
  }
}

/* ── 資料の本文に見当たらない数字・語を含む欄の印（フェイスシート・アセスメント）。印刷・PDF には出さない ── */
.mhlw-field.is-unverified {
  background: #ffedd5;
  box-shadow: 0 0 0 1px #fb923c inset;
  border-radius: 2px;
}

@media print {
  .mhlw-field.is-unverified {
    background: transparent !important;
    box-shadow: none !important;
  }
}

}

/* ── AI が書いた欄（確認が必要な欄）の色。印刷・PDF には出さない ── */
.hosp-field.is-ai,
.hosp-box.is-ai,
.hosp-check.is-ai {
  background: #fef08a;
  box-shadow: 0 0 0 1px #facc15 inset;
  border-radius: 2px;
}

.ai-legend {
  background: #fef08a;
  box-shadow: 0 0 0 1px #facc15 inset;
  padding: 0 4px;
  border-radius: 2px;
  font-weight: 700;
}

@media print {
  .hosp-field.is-ai,
  .hosp-box.is-ai,
  .hosp-check.is-ai {
    background: transparent !important;
    box-shadow: none !important;
  }
}

/* ── 退院・退所情報記録書（A4縦・1ページ） ── */
.disc-title {
  flex: 1;
  text-align: center;
  letter-spacing: 0.15em;
}

.disc-part {
  font-size: 11px;
  font-weight: 700;
  margin: 2px 0 2px;
}

.hosp-table td.disc-part-row {
  border-left: none;
  border-right: none;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0 2px;
}

.hosp-table th.disc-group {
  padding: 2px 0;
  font-size: 9.5px;
  vertical-align: middle;
}

.disc-group span {
  writing-mode: vertical-rl;
  display: inline-block;
  letter-spacing: 0.1em;
}

.disc-table > tbody > tr > th:not(.disc-group) {
  text-align: left;
  padding-left: 6px;
}

.disc-sub {
  display: inline-block;
  margin: 0 4px 0 10px;
  padding: 0 4px;
  background: #dfe4ec;
  font-size: 9.5px;
}

.disc-hearing {
  margin-top: 6px;
}

.disc-hearing th {
  text-align: center;
}

.disc-center {
  text-align: center;
}

.disc-footnote {
  margin: 4px 0 0;
}

@media print {
  .disc-sub,
  .hosp-table th.disc-group {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* 狭い画面では上部の表示を減らし、題名は1行で省略する（利用者ボタンを常に見せる） */
@media (max-width: 720px) {
  .top-header {
    gap: 8px;
  }

  .top-header .header-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-header {
    flex-wrap: wrap;
    height: auto;
    row-gap: 0;
  }

  .top-header .header-title {
    line-height: 56px;
  }

  .client-bar {
    order: 10;
    flex: 1 0 100%;
    max-width: none;
    margin: 0 -16px;
    padding: 6px 12px;
    gap: 8px;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
  }

  .client-bar:has(.client-chip.is-draft) {
    background: #fffbeb;
    border-top-color: #fcd34d;
  }

  .client-chip {
    flex: 1 1 auto;
    padding: 6px 12px;
    font-size: 16px;
  }

  .client-new-chip {
    flex: 0 0 auto;
  }

  .account-toggle {
    max-width: 110px;
    padding: 4px 8px;
    font-size: 11.5px;
  }

  .account-role {
    display: none;
  }
}

/* ── サービス担当者会議の要点（第4表・A4横・1ページ）。meeting.js の renderMeetingPage ── */
.mtg-page {
  width: 277mm;
  min-width: 240mm;
  margin: 0 auto;
  background: white;
  padding: 8mm 10mm;
  box-sizing: border-box;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  color: #000;
  font-size: 11px;
  line-height: 1.5;
}

.mtg-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}

.mtg-form-no {
  justify-self: start;
  align-self: start;
  border: 1px solid #000;
  padding: 1px 8px;
  font-size: 11px;
}

.mtg-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mtg-created {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.mtg-created .hosp-field {
  min-width: 34mm;
}

.mtg-lines {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  font-size: 12.5px;
}

.mtg-u {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  border-bottom: 1px solid #000;
  padding-bottom: 1px;
  min-width: 0;
}

.mtg-u-label {
  white-space: nowrap;
  font-weight: 700;
}

.mtg-u-user { flex: 0 0 34%; }
.mtg-u-creator { flex: 0 0 52%; }
.mtg-u-date { flex: 0 0 22%; }
.mtg-u-place { flex: 1 1 30%; }
.mtg-u-time { flex: 0 0 22%; }
.mtg-u-count { flex: 0 0 13%; }

.mtg-page .hosp-field.mtg-grow {
  flex: 1;
  min-width: 0;
  border-bottom: none;
}

.mtg-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  border: 2px solid #000;
}

.mtg-table th,
.mtg-table td {
  border: 1px solid #000;
  padding: 3px 5px;
  vertical-align: top;
}

.mtg-member-head th {
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  font-size: 12.5px;
  border-bottom-width: 1.5px;
}

.mtg-table th.mtg-attend {
  vertical-align: top;
  border-bottom-width: 1px;
  padding: 4px 5px;
}

.mtg-attend-title {
  font-size: 13px;
  margin-bottom: 6px;
}

.mtg-family {
  display: inline-block;
  text-align: left;
  font-size: 10.5px;
  line-height: 1.9;
}

.mtg-family-line {
  white-space: nowrap;
}

.mtg-family .hosp-check {
  margin-right: 2px;
}

.mtg-page .hosp-field.mtg-relation {
  min-width: 12mm;
}

.mtg-note {
  text-align: left;
  font-size: 10px;
  margin-top: 6px;
}

.mtg-note-box {
  min-height: 2.6em;
}

.mtg-member-row td {
  height: 13mm;
  vertical-align: middle;
}

.mtg-member {
  min-height: 1.5em;
}

.mtg-table th.mtg-label {
  font-weight: normal;
  font-size: 13px;
  text-align: center;
  padding-top: 6px;
}

.mtg-box {
  min-height: 16mm;
}

.mtg-next-label {
  display: block;
  margin-top: 4.5em;
  font-size: 11px;
}

.mtg-next {
  display: flex;
  margin-top: 4px;
  padding-top: 2px;
  border-top: 1px dotted #94a3b8;
}

@media print {
  .mtg-page {
    box-shadow: none;
    padding: 0;
    min-width: 0;
    max-width: none;
    zoom: var(--mtg-print-zoom, 1);
    width: var(--mtg-print-width, 100%) !important;
  }

  .mtg-page .hosp-field:empty::before {
    content: none;
  }

  .mtg-page .hosp-check.is-checked::before {
    color: #000;
  }

  .mtg-next {
    border-top-color: transparent;
  }
}

/* ── 全社協様式で書き出す（zenshakyo.js の確認画面。ほかの画面の要素は動かさない） ── */
/* 確認画面は画面の高さに収め、中身（#zsk-modal-body）だけをスクロールする。
   以前は中身を 68vh にしていたため、説明・ボタンと合わせると画面より高くなり、上下が画面の外に出た。
   スマホ（iPhone）では「PDF を書き出す」などのボタンに届かず、スクロールもできなかった（2026-10-09 代表の報告） */
.zsk-box { max-width: 980px; width: 100%; display: flex; flex-direction: column; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.zsk-box > .modal-header, .zsk-box > .modal-footer { flex-shrink: 0; }
.zsk-box > .modal-header { max-height: 30vh; max-height: 30dvh; overflow-y: auto; }
#zsk-modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.zsk-warnings { border: 1px solid #f59e0b; background: #fffbeb; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 12.5px; color: #92400e; }
.zsk-warnings ul { margin: 6px 0 0 18px; }
.zsk-sec { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.zsk-sec h3 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
.zsk-page { font-size: 11.5px; font-weight: 400; color: var(--text-muted); }
.zsk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.zsk-table th, .zsk-table td { border-top: 1px solid #eef0f4; padding: 6px 8px; vertical-align: top; text-align: left; }
.zsk-table th { width: 30%; font-weight: 600; color: var(--text-secondary); }
.zsk-table td.zsk-from { width: 26%; font-size: 11px; color: var(--text-muted); }
.zsk-ro td:nth-child(2) { background: #f3f4f6; }
.zsk-ro-text { white-space: pre-wrap; word-break: break-all; }
.zsk-empty { color: #9ca3af; }
.zsk-flag { display: inline-block; margin-left: 6px; font-size: 10.5px; color: #b45309; background: #fef3c7; border-radius: 4px; padding: 0 4px; font-weight: 600; }
.zsk-link { display: block; margin-top: 4px; border: none; background: none; color: var(--primary); cursor: pointer; padding: 0; font-size: 11px; text-decoration: underline; }
.zsk-input.form-input { padding: 6px 8px; font-size: 12.5px; }
.zsk-date { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.zsk-date .zsk-date-y { width: 84px; }
.zsk-date .zsk-date-md { width: 52px; }
.zsk-multi { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.zsk-check { font-size: 12.5px; white-space: nowrap; }
.zsk-confirm { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 600; color: #065f46; }
.zsk-footer { align-items: center; }
.zsk-status { margin-right: auto; font-size: 12.5px; color: var(--text-muted); }
#zsk-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.zsk-ai td:nth-child(2) { background: #fef9c3; }
.zsk-ai .zsk-input.form-input { background: #fefce8; border-color: #facc15; }
.zsk-ai-label { display: inline-block; font-size: 10.5px; font-weight: 600; color: #854d0e; background: #fef08a; border-radius: 4px; padding: 0 4px; }
.zsk-quote { margin-top: 4px; font-size: 11px; color: var(--text-secondary); }
.zsk-quote summary { cursor: pointer; color: #854d0e; }
.zsk-quote q { display: block; margin-top: 2px; white-space: pre-wrap; word-break: break-all; }
.zsk-human-only { display: block; font-size: 10.5px; color: #9ca3af; }
.zsk-bulk-note { font-size: 11px; color: var(--text-muted); }
@media (max-width: 640px) {
  .zsk-table th, .zsk-table td { display: block; width: auto !important; }
  .zsk-footer { flex-wrap: wrap; }
  .zsk-footer button { white-space: nowrap; }
  .zsk-status, .zsk-bulk-note { flex-basis: 100%; }
}

/* ── CareDoc に送る（caredoc.js） ── */
/* 全社協様式の確認画面（あとから body に足される）の上に出す */
#caredoc-modal { z-index: 10001; }
.caredoc-box { width: 460px; }
.caredoc-send-btn { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; font-weight: 600; }
.caredoc-send-btn:disabled, #zsk-caredoc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.caredoc-note { font-size: 13px; color: var(--text-secondary); margin: 0 0 8px; word-break: break-all; }
.caredoc-message { font-size: 13px; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius-sm); padding: 8px 10px; margin: 0 0 12px; }
@media print { #caredoc-send-btn, #caredoc-modal { display: none !important; } }

/* ケアプラン（第1〜3表・様式5）の欄ごとのコピーのボタンは 2026-10-21 に外した（代表「消して」） */
.cp-sheet {
  position: relative;
}

/* ── 利用者の画面の下：予備の保存・戻すの説明（clientstore.js の exportClients / importClients） ── */
#client-modal .modal-footer {
  flex-wrap: wrap;
}

#client-modal .modal-footer .btn-secondary {
  white-space: nowrap;
}


/* ── 処理の途中の進み具合のバー（ui.js の setProgress が is-working を付ける） ──
   文字起こしなど、AI の返事を待つあいだはバーの長さが変わらないため、斜めの縞を流して「動いている」ことを見せる */
.progress-bar.is-working {
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,0.28) 0 8px, transparent 8px 16px), linear-gradient(90deg, #4f46e5, #818cf8) !important;
  background-size: 22.6px 22.6px, 100% 100% !important;
  animation: progress-stripes 0.8s linear infinite;
  min-width: 24px;
}

@keyframes progress-stripes {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 22.6px 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar.is-working { animation: none; }
}

/* ── スマホの幅 ──
   iPhone は 16px 未満の入力欄を押すと画面を勝手に拡大するため、入力欄の文字を 16px にする（パソコンの見た目は変えない） */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* 要介護・要支援プランのタブは、幅が足りないときに文字が縦につぶれないよう、1 行のまま横にずらして見る（2026-11-20。前は折り返して並べていた） */
  #careplan-tabs-bar,
  #supportplan-tabs-bar {
    padding: 0 8px !important;
    margin-bottom: 12px;
  }
  #careplan-tabs-bar .tab-btn,
  #supportplan-tabs-bar .tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 12px 10px 11px;
    font-size: 13px;
  }
}

/* ── CareLink のログイン・二段階認証（auth.js。2026-10-12） ── */
.auth-overlay { z-index: 10050; background: rgba(15, 23, 42, 0.85); }
/* ログインを確かめている間は窓を見せない（押せないまま待つ。auth.js の QUIET_LOADING_MS） */
.auth-overlay.is-quiet { background: transparent; cursor: progress; }
.auth-overlay.is-quiet .auth-box { visibility: hidden; }
.auth-box { width: 440px; }
.caredoc-message.is-info { color: #065f46; background: #ecfdf5; border-color: #a7f3d0; }
.auth-enroll-steps { font-size: 13px; color: var(--text-secondary); margin: 0 0 10px; padding-left: 20px; line-height: 1.6; }
.auth-enroll-qr { display: block; width: 180px; height: 180px; margin: 0 auto 10px; background: white; }
/* 共通ログイン（LuminaCare でログイン）のボタン。ログインの欄の下に横いっぱいで置く */
.auth-hub-login { width: 100%; justify-content: center; margin-top: 4px; }
#auth-enroll-secret { word-break: break-all; font-size: 12px; }
/* ログイン中の人（右上。押したときだけ中身を出す。2026-10-13） */
.account-menu { position: relative; }
.account-toggle { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-primary); background: white; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-family: var(--font-sans); white-space: nowrap; }
.account-toggle:hover { background: #f8fafc; }
#account-name { overflow: hidden; text-overflow: ellipsis; }
.account-role { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.account-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1000; min-width: 240px; padding: 6px; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15); }
.account-menu-list[hidden] { display: none; }
.account-btn { display: block; width: 100%; padding: 8px 10px; font-size: 13px; text-align: left; background: transparent; border: none; border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer; font-family: var(--font-sans); }
.account-btn:hover:not(:disabled) { background: #f1f5f9; }
.account-btn:disabled { cursor: default; color: var(--text-secondary); }
.staff-box { width: 720px; }
.staff-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 14px; }
.staff-table th, .staff-table td { border-bottom: 1px solid var(--border); padding: 6px 4px; text-align: left; vertical-align: middle; }
.staff-table tr.is-inactive td { color: var(--text-muted); }
.staff-table .btn-secondary { padding: 4px 10px; font-size: 12px; }
.staff-email { word-break: break-all; }
.staff-sub { font-size: 11px; color: var(--text-muted); }
.staff-note { font-size: 12px; color: var(--text-muted); margin: 6px 0 0; }
.staff-h { font-size: 13px; font-weight: 700; margin: 14px 0 8px; color: var(--text-primary); }
@media print { .auth-overlay, #staff-modal, .sidebar-account { display: none !important; } }

/* サービス評価表: 計画書の目標を写すボタン（2026-10-14） */
.evaluation-tools { display: flex; justify-content: flex-end; max-width: 800px; margin: 0 auto 10px; }
.evaluation-goal-copy-btn { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.evaluation-goal-copy-btn:hover { background: #dbeafe; }

/* ── アセスメントシート（全社協「居宅サービス計画ガイドライン ver.3」の様式の形。zskform.js） ──
   様式のページの画像に、zsklayout.js の書き込み位置で欄を重ねる。--zs は 1pt あたりの px（幅に合わせて zskform.js が決める） */
.zf-sheet {
  --zs: 1.45;
  width: 100%;
}
.zf-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
  /* スクロールしても画面の上に残す（2026-10-21 代表の指示） */
  position: sticky;
  top: -28px; /* .page-scroll の上の余白の分だけ上げ、画面の上端に付ける */
  z-index: 20;
  background: #fff;
  padding: 6px 0;
  border-bottom: 1px solid #e2e8f0;
}
.zf-jump-btn.is-current { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
/* 固定したボタンの並びの下に、ページの見出し・入力中の欄が隠れないように */
.page-scroll:has(#zsk-form-sheet[data-rendered="true"]) { scroll-padding-top: calc(var(--zf-nav-h, 70px) + 8px); }
@media (min-width: 1024px) { .zf-jump { top: -24px; } }
/* スマホの幅では1行にし、横にずらして選ぶ（固定した並びで画面が狭くならないように） */
@media (max-width: 720px) {
  .zf-jump { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .zf-jump-btn { flex: 0 0 auto; white-space: nowrap; }
}
.zf-jump-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.zf-jump-btn:hover { background: #f1f5f9; }
.zf-legend {
  font-size: 12px;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 8px;
}
.zf-chip {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  vertical-align: -2px;
  margin: 0 3px 0 8px;
  border: 1px solid #cbd5e1;
}
.zf-chip-ai { background: rgba(253, 224, 71, 0.55); }
.zf-chip-ro { background: rgba(203, 213, 225, 0.55); }
.zf-chip-rule { background: rgba(147, 197, 253, 0.35); }
.zf-warnings {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 8px;
}
.zf-warnings ul { margin: 4px 0 0; padding-left: 18px; }
.zf-tip {
  position: sticky;
  /* 上に固定したページのボタンの並び（.zf-jump）のすぐ下に付ける（重ならないように。2026-10-21 代表の指示） */
  top: calc(var(--zf-nav-h, 70px) - 28px);
  z-index: 5;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 8px;
}
@media (min-width: 1024px) { .zf-tip { top: calc(var(--zf-nav-h, 70px) - 24px); } }
.zf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.zf-page-title {
  font-size: 12px;
  font-weight: bold;
  color: #475569;
  margin-bottom: 4px;
}
.zf-page {
  position: relative;
  background: #fff no-repeat 0 0 / 100% 100%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
}
.zf-text {
  position: absolute;
  box-sizing: border-box;
  padding: 0 1px;
  color: #0b3d91;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  outline: none;
  border-radius: 2px;
  background: rgba(253, 224, 71, 0.12);
  cursor: text;
}
/* 押すたびに ✓ → ○ → 空 になる欄（1日のスケジュールの要援助） */
.zf-text.zf-cycle {
  border: 0;
  margin: 0;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
}
.zsk-sparse-note { margin: 6px 0 0; font-size: 12px; color: #6b7280; }
.zf-text.zf-wrap {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-y: auto;
}
.zf-text:hover { background: rgba(253, 224, 71, 0.28); }
.zf-text:focus {
  background: #fff;
  box-shadow: 0 0 0 2px #2563eb;
  z-index: 2;
}
.zf-text.zf-rule { background: rgba(147, 197, 253, 0.2); }
.zf-text.zf-ai, .zf-mark.zf-ai:not(.is-on) { background: rgba(253, 224, 71, 0.5); }
.zf-text.zf-ro, .zf-text.zf-ro:hover {
  background: rgba(203, 213, 225, 0.3);
  color: #1e293b;
  cursor: default;
}
.zf-flag { box-shadow: 0 0 0 1.5px #f97316; }
/* 最小の字でも枠に入りきらない欄（中はスクロールで読める。PDF では続きを別紙に書く） */
.zf-text.zf-over { box-shadow: inset 0 -2px 0 #dc2626; }
.zf-unmatched { box-shadow: 0 0 0 1.5px #dc2626; }
.zf-mark {
  position: absolute;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.zf-mark:hover:not(.zf-ro) { outline: 1px dashed #2563eb; }
.zf-mark.zf-ro { cursor: default; }
.zf-mark.is-on.zf-circle::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% + var(--zs) * 5px);
  height: calc(100% + var(--zs) * 4px);
  transform: translate(-50%, -50%);
  border: calc(var(--zs) * 1px) solid #c2410c;
  border-radius: 50%;
}
.zf-mark.is-on.zf-check::after {
  content: '✓';
  position: absolute;
  inset: 0;
  color: #c2410c;
  font-weight: bold;
  font-size: calc(var(--zs) * 10px);
  line-height: calc(var(--zs) * 8px);
  text-align: center;
}
.zf-image {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zf-image-del {
  position: absolute;
  top: 2px;
  right: 2px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #b91c1c;
  background: #fff;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  cursor: pointer;
}
.zf-image-del:hover { background: #fef2f2; }
.zf-image.is-drop { outline: 2px dashed #2563eb; outline-offset: -2px; background: rgba(37, 99, 235, 0.08); }
.zf-image img {
  max-width: 100%;
  max-height: 100%;
  /* 添付した図の白い地で、様式の方眼の点線・枠が消えないよう、重ねて見せる（2026-10-21 代表「点線が消えている」。PDF も同じ） */
  mix-blend-mode: multiply;
}

/* 障害等の部位の人の図（2026-10-21）。左上で印の種類を選び、図を押すと印が付く */
.zf-body { position: absolute; cursor: crosshair; }
.zf-body-tools {
  position: absolute;
  left: calc(var(--zs) * 2px);
  top: calc(var(--zs) * 2px);
  display: flex;
  flex-direction: column;
  gap: calc(var(--zs) * 2px);
  z-index: 1;
}
.zf-body-tool {
  width: max(22px, calc(var(--zs) * 14px));
  height: max(22px, calc(var(--zs) * 14px));
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  color: #1e3a8a;
  font-size: max(13px, calc(var(--zs) * 9px));
  line-height: 1;
  cursor: pointer;
}
.zf-body-tool.is-on { background: #1e3a8a; border-color: #1e3a8a; color: #fff; }
.zf-body-marks { position: absolute; inset: 0; pointer-events: none; }
.zf-body-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  background: transparent;
  color: #0d1a59;
  font-size: calc(var(--zs) * 12px);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.zf-body-mark.zf-body-dot { font-size: calc(var(--zs) * 16px); }

.zf-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 16px auto 0;
  max-width: 863px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
}
.zf-pick-title { width: 100%; font-weight: bold; color: #334155; }
.zf-pick-item { display: flex; align-items: center; gap: 6px; }
.zf-pick-item select { width: auto; min-width: 160px; }

/* スマホの幅（zskform.js の PHONE_MIN_SCALE より小さくなる幅。.zf-narrow）: 様式を縮めすぎず、欄の中で横にずらして見る（2026-10-22） */
.zf-sheet.zf-narrow .zf-pages {
  align-items: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}
@media (hover: none) and (pointer: coarse) {
  /* 書いている欄だけ 16px の字で広げる（iPhone が画面を拡大しないように・読めるように）。離れると様式の大きさに戻る */
  .zf-sheet.zf-narrow .zf-text:focus {
    font-size: 16px !important;
    line-height: 1.35 !important;
    height: auto !important;
    min-height: calc(1.35em + 4px);
    max-height: 40vh;
    min-width: min(16em, 85vw);
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    z-index: 6;
  }
  /* ○・□は小さいため、押せる範囲を少し広げる（見た目は変えない） */
  .zf-sheet.zf-narrow .zf-mark::before {
    content: '';
    position: absolute;
    inset: -4px;
  }
}

@media print {
  .zf-sheet { --zs: 1.2; }
  .zf-sheet.zf-narrow .zf-pages { overflow: visible; padding-bottom: 0; }
  .zf-pages { display: block; }
  .zf-page-wrap { break-after: page; page-break-after: always; }
  .zf-page-wrap:last-child { break-after: auto; page-break-after: auto; }
  .zf-page { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .zf-text, .zf-text.zf-ai, .zf-text.zf-ro, .zf-text.zf-rule, .zf-text.zf-over, .zf-mark.zf-ai { background: transparent !important; box-shadow: none !important; }
}

/* ツールバーの PDF ダウンロードで写すページ（zskform.js の buildZskFormPdf）。印刷と同じく欄の色・AI の黄色・操作のボタンを出さない */
.zf-page.zf-pdf { box-shadow: none; }
.zf-page.zf-pdf .zf-text, .zf-page.zf-pdf .zf-mark { background: transparent !important; box-shadow: none !important; outline: none !important; }
.zf-page.zf-pdf .no-print { display: none !important; }

/* スマート解析のやり方を聞く窓（2026-10-22） */
.care-update-box {
  max-width: 520px;
}

.care-update-lead {
  margin: 0 0 12px;
  font-size: 13px;
  color: #475569;
}

.care-update-choice {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  text-align: left;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.care-update-choice strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
}

.care-update-choice span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
}

.care-update-choice:hover,
.care-update-choice:focus-visible {
  border-color: #4f46e5;
  background: #eef2ff;
}

.care-update-choice.is-primary {
  border-color: #4f46e5;
}

/* ── 前の style="…"（index.html の書き方）を移したクラス（2026-10-24 作りの直し 段階5。計画 /mnt/project-files/carelink/作りの直し_計画.md） ──
   ねらい: CSP の style-src から unsafe-inline を外す下ごしらえ。見た目・動きは 1px も変えない（test/visual/compare.js で前後の写真と計算済みのスタイルを比べる）。
   - 前の style="…" は、:hover や幅ごとの規則（例 .drop-zone:hover・@media の .settings-bar）より強かった。同じ強さにするため、
     クラスに :not(#_) を 3 つ付けて ID 3 つ分の強さにしている（#_ という要素は無いので、いつでも当てはまる）。!important は使わない
     （JS の el.style.○○ = … が今までどおり勝つように。!important の規則に負けるのも前と同じ）
   - JS が el.style.display を書き換える要素（id のある要素）の display は、まだ style="…" に残している（後の段階で移す）
   - 前の style="…" に !important が書いてあったもの（利用者基本情報の枠線・基本チェックリストの列の幅）だけは、そのまま !important で移した
   - ip- … 入力の画面（input-pane-view-○○）。7 つの入力の画面すべて（モニタリング記録の画面の分を、ほかの 6 つでも使い回す）
   - sb-・ck-・ev-・sa-・op- … 結果の書式（利用者基本情報・基本チェックリスト・サービス評価表・分析レポート・結果の欄）。2026-10-24。
     数が多いので、名前は「頭の文字-要素名-番号」で機械的に付けた（中身が同じ style="…" は 1 つのクラスにまとめた）。それぞれの節は下の方にある
   - gm- … ジェノグラムの簡易エディタの窓（genogram-modal）。2026-10-24。名前の付け方は上と同じ
   - hd-・fv-・md- … 画面の上の見出しとタブの並び・結果の書式の入れ物と書き換えの指示の欄・職員の管理と API キーの窓。2026-10-24。
     これで index.html の style="…" は、JS が書き換える id のある要素の display だけになった（後の段階で移す） */

.ip-pane:not(#_):not(#_):not(#_) {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
}
.ip-intro:not(#_):not(#_):not(#_) {
  text-align: center;
  margin-bottom: 24px;
}
.ip-intro-text:not(#_):not(#_):not(#_) {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.ip-settings-bar:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01);
}
.ip-setting-group:not(#_):not(#_):not(#_) {
  align-items: center;
  gap: 12px;
}
.ip-setting-label:not(#_):not(#_):not(#_) {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ip-setting-value:not(#_):not(#_):not(#_) {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.ip-setting-group-divided:not(#_):not(#_):not(#_) {
  align-items: center;
  gap: 12px;
  border-left: 1px solid #e2e8f0;
  padding-left: 24px;
}
/* 文字数を隠したとき（会話メモ・要約）は、出力形式の左の区切り線を消す（ui.js の syncMonitoringModeView） */
#monitoring-mode-setting.is-alone:not(#_):not(#_):not(#_) {
  border-left: 0;
  padding-left: 0;
}
.ip-cards:not(#_):not(#_):not(#_) {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.ip-upload-card:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01);
  display: flex;
  flex-direction: column;
  min-height: 250px;
}
.ip-card-title:not(#_):not(#_):not(#_) {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ip-card-icon:not(#_):not(#_):not(#_) {
  width: 18px;
  height: 18px;
  color: #4f46e5;
}
.ip-drop-zone:not(#_):not(#_):not(#_) {
  flex: 1;
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius-md);
  background: #fafbff;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  min-height: 120px;
}
.ip-file-overlay:not(#_):not(#_):not(#_) {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}
.ip-drop-icon:not(#_):not(#_):not(#_) {
  background: #e0e7ff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
  color: #4f46e5;
}
.ip-drop-icon-svg:not(#_):not(#_):not(#_) {
  width: 24px;
  height: 24px;
}
.ip-drop-main:not(#_):not(#_):not(#_) {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.ip-drop-sub:not(#_):not(#_):not(#_) {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 12px;
}
.ip-file-list:not(#_):not(#_):not(#_) {
  margin-top: 12px;
}
.ip-progress:not(#_):not(#_):not(#_) {
  margin-top: 16px;
}
.ip-progress-head:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ip-progress-text:not(#_):not(#_):not(#_) {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}
.ip-progress-track:not(#_):not(#_):not(#_) {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.ip-progress-bar:not(#_):not(#_):not(#_) {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #4f46e5, #818cf8);
  transition: width 0.3s;
}
.ip-memo-card:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01);
  flex-direction: column;
}
.ip-memo-head:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.ip-memo-title:not(#_):not(#_):not(#_) {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ip-visit-bar:not(#_):not(#_):not(#_) {
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.ip-visit-select:not(#_):not(#_):not(#_) {
  font-size: 12px;
}
.ip-memo-textarea:not(#_):not(#_):not(#_) {
  flex: 1;
  width: 100%;
  min-height: 150px;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
  outline: none;
  background: white;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.ip-generate-section:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 380px;
  width: 100%;
}
.ip-generate-btn:not(#_):not(#_):not(#_) {
  flex: 1;
  height: 48px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ip-reset-btn:not(#_):not(#_):not(#_) {
  height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}
.ip-reset-icon:not(#_):not(#_):not(#_) {
  width: 16px;
  height: 16px;
  color: #64748b;
}
.ip-generate-section-wrap:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 560px;
  flex-wrap: wrap;
  width: 100%;
}
.ip-open-sheet-btn:not(#_):not(#_):not(#_) {
  height: 48px;
  padding: 0 16px;
  border-radius: 24px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

/* sb- … 要支援プランの利用者基本情報（以前のフェイスシートの 2 ページ。印刷・PDF あり）（#support-basic-info-view）。前の style="…" をそのまま移した（名前は 要素名-番号。中身が同じものは 1 つにまとめた） */
.sb-div-1:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  width: 100%;
}
.sb-div-2:not(#_):not(#_):not(#_) {
  border: 2px solid #000;
  font-family: 'Noto Sans JP', sans-serif;
  color: #000;
  font-size: 11px;
  line-height: 1.3;
  position: relative;
}
.sb-div-3:not(#_):not(#_):not(#_) {
  font-size: 11px;
  margin-bottom: 2px;
  text-align: left;
}
.sb-div-4:not(#_):not(#_):not(#_) {
  text-align: center;
  margin-bottom: 15px;
}
.sb-h1-1:not(#_):not(#_):not(#_) {
  font-size: 19px;
  font-weight: bold;
  letter-spacing: 6px;
  margin: 0;
  display: inline-block;
}
.sb-div-5:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
  font-size: 11px;
}
.sb-span-1:not(#_):not(#_):not(#_) {
  border-bottom: 1px solid #000;
  min-width: 100px;
  text-align: center;
}
.sb-table-1:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
  margin-bottom: 0;
  table-layout: fixed;
}
.sb-td-1:not(#_):not(#_):not(#_) {
  width: 10%;
  padding: 8px 4px;
  border: 1px solid #000;
  font-weight: bold;
  text-align: center;
  letter-spacing: 2px;
}
.sb-td-2:not(#_):not(#_):not(#_) {
  width: 42%;
  padding: 8px 6px;
  border: 1px solid #000;
  vertical-align: middle;
}
.sb-span-2:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 140px;
}
.sb-td-3:not(#_):not(#_):not(#_) {
  width: 25%;
  padding: 8px 6px;
  border: 1px solid #000;
  vertical-align: middle;
}
.sb-span-3:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 60px;
}
.sb-td-4:not(#_):not(#_):not(#_) {
  width: 23%;
  padding: 8px 6px;
  border: 1px solid #000;
  vertical-align: middle;
}
.sb-td-5:not(#_):not(#_):not(#_) {
  padding: 8px 4px;
  border: 1px solid #000;
  font-weight: bold;
  text-align: center;
}
.sb-td-6:not(#_):not(#_):not(#_) {
  padding: 8px 6px;
  border: 1px solid #000;
  vertical-align: middle;
}
.sb-td-7:not(#_):not(#_):not(#_) {
  padding: 8px 4px;
  border: 1px solid #000;
  font-weight: bold;
  text-align: center;
  height: 50px;
}
.sb-td-8:not(#_):not(#_):not(#_) {
  padding: 4px 6px;
  border: 1px solid #000;
  vertical-align: top;
}
.sb-div-6:not(#_):not(#_):not(#_) {
  font-size: 8.5px;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 2px;
  margin-bottom: 4px;
  min-height: 12px;
}
.sb-div-7:not(#_):not(#_):not(#_) {
  font-size: 14px;
  font-weight: bold;
  outline: none;
}
.sb-td-9:not(#_):not(#_):not(#_) {
  padding: 8px 6px;
  border: 1px solid #000;
  text-align: center;
  vertical-align: middle;
}
.sb-span-4:not(#_):not(#_):not(#_) {
  outline: none;
}
.sb-span-5:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 15px;
  text-align: center;
}
.sb-tr-1:not(#_):not(#_):not(#_) {
  height: 35px;
}
.sb-td-10:not(#_):not(#_):not(#_) {
  padding: 8px 4px;
  border: 1px solid #000;
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
}
.sb-td-11:not(#_):not(#_):not(#_) {
  padding: 8px 6px;
  border: 1px solid #000;
  vertical-align: top;
}
.sb-span-6:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 150px;
}
.sb-td-12:not(#_):not(#_):not(#_) {
  padding: 8px 4px;
  border: 1px solid #000;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
}
.sb-div-8:not(#_):not(#_):not(#_) {
  margin-bottom: 6px;
}
.sb-span-7:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 90px;
}
.sb-span-8:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 40px;
}
.sb-td-13:not(#_):not(#_):not(#_) {
  padding: 0;
  border-left: 1.5px solid #000 !important;
  border-right: 1.5px solid #000 !important;
  border-top: none !important;
  border-bottom: none !important;
  vertical-align: top;
}
.sb-table-2:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: none;
  table-layout: fixed;
  font-size: 11px;
  margin: 0;
  box-sizing: border-box;
}
.sb-td-14:not(#_):not(#_):not(#_) {
  width: 52%;
  border-right: 1.5px solid #000;
  padding: 0;
  vertical-align: top;
  height: 1px;
}
.sb-table-3:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: none;
  table-layout: fixed;
  font-size: 11px;
  height: 100%;
}
.sb-td-15:not(#_):not(#_):not(#_) {
  width: 19.2%;
  padding: 6px 4px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  font-weight: bold;
  text-align: center;
  height: 50px;
  line-height: 1.2;
}
.sb-td-16:not(#_):not(#_):not(#_) {
  width: 80.8%;
  padding: 6px 6px;
  border-bottom: 1px solid #000;
  vertical-align: middle;
}
.sb-td-17:not(#_):not(#_):not(#_) {
  padding: 6px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  vertical-align: top;
  font-size: 10px;
}
.sb-td-18:not(#_):not(#_):not(#_) {
  padding: 6px;
  border-bottom: 1px solid #000;
  vertical-align: middle;
  text-align: center;
  font-size: 11px;
}
.sb-td-19:not(#_):not(#_):not(#_) {
  padding: 6px 4px;
  font-weight: bold;
  text-align: center;
  line-height: 1.2;
  border-right: 1px solid #000;
  border-bottom: 1.5px solid #000;
  height: 50px;
}
.sb-td-20:not(#_):not(#_):not(#_) {
  width: 30%;
  padding: 4px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  text-align: center;
  font-weight: bold;
  font-size: 9.5px;
}
.sb-td-21:not(#_):not(#_):not(#_) {
  width: 18%;
  padding: 4px;
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  text-align: center;
  font-weight: bold;
  font-size: 9.5px;
}
.sb-td-22:not(#_):not(#_):not(#_) {
  width: 32%;
  padding: 4px;
  border-bottom: 1px solid #000;
  text-align: center;
  font-weight: bold;
  font-size: 9.5px;
}
.sb-td-23:not(#_):not(#_):not(#_) {
  padding: 4px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  height: 60px;
  vertical-align: top;
}
.sb-td-24:not(#_):not(#_):not(#_) {
  padding: 4px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  vertical-align: top;
}
.sb-td-25:not(#_):not(#_):not(#_) {
  padding: 4px;
  border-bottom: 1px solid #000;
  vertical-align: top;
  font-size: 9.5px;
  line-height: 1.3;
}
.sb-td-26:not(#_):not(#_):not(#_) {
  padding: 4px;
  border-right: 1px solid #000;
  height: 60px;
  vertical-align: top;
  border-bottom: 1.5px solid #000;
}
.sb-td-27:not(#_):not(#_):not(#_) {
  padding: 4px;
  border-right: 1px solid #000;
  vertical-align: top;
  border-bottom: 1.5px solid #000;
}
.sb-td-28:not(#_):not(#_):not(#_) {
  padding: 4px;
  vertical-align: top;
  font-size: 9.5px;
  line-height: 1.3;
  border-bottom: 1.5px solid #000;
}
.sb-td-29:not(#_):not(#_):not(#_) {
  width: 48%;
  padding: 0;
  vertical-align: top;
  height: 1px;
}
.sb-table-4:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: none;
  table-layout: fixed;
  height: 100%;
}
.sb-col-1:not(#_):not(#_):not(#_) {
  width: 8.5%;
}
.sb-col-2:not(#_):not(#_):not(#_) {
  width: 91.5%;
}
.sb-td-30:not(#_):not(#_):not(#_) {
  padding: 6px 2px;
  border-bottom: 1px solid #000;
  border-left: 1.5px solid #000;
  border-right: 1px solid #000;
  font-weight: bold;
  text-align: center;
  line-height: 1.3;
  vertical-align: middle;
  height: 260px;
}
.sb-td-31:not(#_):not(#_):not(#_) {
  padding: 6px 8px;
  border-bottom: 1px solid #000;
  vertical-align: top;
  position: relative;
}
.sb-div-9:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.sb-div-10:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 4px;
  align-items: center;
}
.sb-a-1:not(#_):not(#_):not(#_) {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 4px 8px;
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
  font-size: 10px;
  text-decoration: none;
  font-weight: bold;
  border: 1px solid #1d4ed8;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sb-svg-1:not(#_):not(#_):not(#_) {
  width: 11px;
  height: 11px;
}
.sb-button-1:not(#_):not(#_):not(#_) {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 4px 8px;
  background: #fff;
  color: #374151;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sb-div-11:not(#_):not(#_):not(#_) {
  font-size: 7.5px;
  color: #000;
  line-height: 1.1;
  text-align: right;
  font-family: sans-serif;
  transform: scale(0.95);
  transform-origin: right top;
}
.sb-div-12:not(#_):not(#_):not(#_) {
  outline: none;
  font-size: 11px;
  line-height: 1.3;
  min-height: 220px;
  width: 100%;
}
/* 要支援の利用者基本情報: ジェノグラムの家族の表（「ジェノグラム作成」のすぐ下に重ねて出す。2026-10-27） */
.fg-panel {
  position: absolute;
  top: 34px;
  left: 4px;
  z-index: 50;
  width: min(460px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid #93c5fd;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  padding: 8px;
  font-size: 12px;
  color: #1e293b;
}
.fg-title { font-weight: bold; margin-bottom: 6px; }
.fg-table { width: 100%; border-collapse: collapse; }
.fg-table th { font-size: 11px; font-weight: bold; text-align: left; padding: 2px 3px; color: #475569; }
.fg-table td { padding: 2px 3px; }
.fg-table .form-input { padding: 4px 6px; font-size: 12px; width: 100%; }
.fg-table th:nth-child(1) { width: 36%; }
.fg-table th:nth-child(2) { width: 26%; }
.fg-table th:nth-child(3) { width: 20%; }
.fg-center { text-align: center; }
.fg-row-del { border: none; background: none; color: #94a3b8; font-size: 15px; cursor: pointer; padding: 0 4px; }
.fg-row-del:hover { color: #dc2626; }
.fg-actions { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.fg-spacer { flex: 1; }
.fg-note { margin-top: 6px; font-size: 11px; color: #64748b; line-height: 1.4; }
.sb-td-32:not(#_):not(#_):not(#_) {
  padding: 6px 8px;
  vertical-align: top;
  border-left: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  height: 110px;
}
.sb-div-13:not(#_):not(#_):not(#_) {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 6px;
}
.sb-div-14:not(#_):not(#_):not(#_) {
  outline: none;
  font-size: 11px;
  line-height: 1.3;
  min-height: 80px;
  width: 100%;
}
.sb-div-15:not(#_):not(#_):not(#_) {
  border: 2px solid #000;
  font-family: 'Noto Sans JP', sans-serif;
  color: #000;
  font-size: 11px;
  line-height: 1.3;
}
.sb-div-16:not(#_):not(#_):not(#_) {
  font-weight: bold;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.sb-table-5:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
  margin-bottom: 12px;
  table-layout: fixed;
}
.sb-td-33:not(#_):not(#_):not(#_) {
  width: 12%;
  padding: 8px 4px;
  font-weight: bold;
  border: 1px solid #000;
  text-align: center;
  line-height: 1.3;
}
.sb-td-34:not(#_):not(#_):not(#_) {
  padding: 6px;
  border: 1px solid #000;
  outline: none;
  vertical-align: top;
  height: 90px;
  font-size: 11px;
  position: relative;
}
.sb-div-17:not(#_):not(#_):not(#_) {
  outline: none;
  width: 100%;
  height: 100%;
  padding-top: 0;
}
.sb-td-35:not(#_):not(#_):not(#_) {
  padding: 8px 4px;
  font-weight: bold;
  border: 1px solid #000;
  text-align: center;
  line-height: 1.3;
}
.sb-span-9:not(#_):not(#_):not(#_) {
  font-size: 8.5px;
  font-weight: normal;
}
.sb-td-36:not(#_):not(#_):not(#_) {
  padding: 0;
  border: 1px solid #000;
  vertical-align: top;
}
.sb-table-6:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: none;
  font-size: 11px;
  table-layout: fixed;
}
.sb-col-3:not(#_):not(#_):not(#_) {
  width: 58%;
}
.sb-col-4:not(#_):not(#_):not(#_) {
  width: 42%;
}
.sb-td-37:not(#_):not(#_):not(#_) {
  border-right: 1.5px solid #000;
  padding: 0;
  vertical-align: top;
  height: 1px;
}
.sb-table-7:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: none;
  font-size: 10.5px;
  table-layout: fixed;
  height: 100%;
}
.sb-td-38:not(#_):not(#_):not(#_) {
  padding: 4px;
  font-weight: bold;
  text-align: center;
  background: #fafafa;
  border-bottom: 1px solid #000;
}
.sb-td-39:not(#_):not(#_):not(#_) {
  padding: 6px;
  vertical-align: top;
  height: 80px;
  font-size: 11px;
  border-bottom: 1px solid #000;
}
.sb-tr-2:not(#_):not(#_):not(#_) {
  background: #fafafa;
  text-align: center;
  font-weight: bold;
}
.sb-td-40:not(#_):not(#_):not(#_) {
  width: 20%;
  padding: 4px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}
.sb-td-41:not(#_):not(#_):not(#_) {
  width: 40%;
  padding: 4px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
}
.sb-td-42:not(#_):not(#_):not(#_) {
  width: 40%;
  padding: 4px;
  border-bottom: 1px solid #000;
}
.sb-td-43:not(#_):not(#_):not(#_) {
  padding: 2px 4px;
  border-right: 1px solid #000;
  border-bottom: 1px dotted #999;
  height: 18px;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.sb-td-44:not(#_):not(#_):not(#_) {
  padding: 2px 4px;
  border-bottom: 1px dotted #999;
  height: 18px;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.sb-td-45:not(#_):not(#_):not(#_) {
  padding: 2px 4px;
  border-right: 1px solid #000;
  height: 18px;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.sb-td-46:not(#_):not(#_):not(#_) {
  padding: 2px 4px;
  height: 18px;
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
}
.sb-td-47:not(#_):not(#_):not(#_) {
  border-bottom: 1px solid #000;
  padding: 4px;
  font-weight: bold;
  text-align: center;
  background: #fafafa;
}
.sb-td-48:not(#_):not(#_):not(#_) {
  border-bottom: 1px solid #000;
  padding: 6px;
  vertical-align: top;
  height: 80px;
  font-size:11px;
}
.sb-td-49:not(#_):not(#_):not(#_) {
  padding: 6px;
  vertical-align: top;
  height: 90px;
  font-size:11px;
}
.sb-span-10:not(#_):not(#_):not(#_) {
  font-size: 10px;
  font-weight: normal;
}
.sb-table-8:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
  margin-bottom: 12px;
  font-size: 10.5px;
  table-layout: fixed;
}
.sb-tr-3:not(#_):not(#_):not(#_) {
  background: #fafafa;
  font-weight: bold;
  text-align: center;
}
.sb-th-1:not(#_):not(#_):not(#_) {
  width: 12%;
  padding: 6px;
  border: 1px solid #000;
}
.sb-th-2:not(#_):not(#_):not(#_) {
  width: 23%;
  padding: 6px;
  border: 1px solid #000;
}
.sb-th-3:not(#_):not(#_):not(#_) {
  width: 25%;
  padding: 6px;
  border: 1px solid #000;
}
.sb-span-11:not(#_):not(#_):not(#_) {
  font-size: 8px;
  font-weight: normal;
}
.sb-th-4:not(#_):not(#_):not(#_) {
  width: 22%;
  padding: 6px;
  border: 1px solid #000;
}
.sb-th-5:not(#_):not(#_):not(#_) {
  width: 18%;
  padding: 6px;
  border: 1px solid #000;
}
.sb-td-50:not(#_):not(#_):not(#_) {
  padding: 4px;
  border: 1px solid #000;
  vertical-align: middle;
  text-align: center;
  height: 50px;
}
.sb-td-51:not(#_):not(#_):not(#_) {
  padding: 4px;
  border: 1px solid #000;
  vertical-align: middle;
}
.sb-td-52:not(#_):not(#_):not(#_) {
  padding: 4px;
  border: 1px solid #000;
  vertical-align: top;
}
.sb-div-18:not(#_):not(#_):not(#_) {
  border-bottom: 1px dashed #ccc;
  padding-bottom: 2px;
  font-size: 8.5px;
}
.sb-span-12:not(#_):not(#_):not(#_) {
  outline:none;
  min-width:60px;
}
.sb-div-19:not(#_):not(#_):not(#_) {
  padding-top: 3px;
  font-size: 9.5px;
  text-align: center;
}
.sb-div-20:not(#_):not(#_):not(#_) {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 4px;
}
.sb-table-9:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid #000;
  margin-bottom: 12px;
  font-size: 11px;
  table-layout: fixed;
}
.sb-td-53:not(#_):not(#_):not(#_) {
  width: 50%;
  padding: 4px;
  border: 1px solid #000;
}
.sb-td-54:not(#_):not(#_):not(#_) {
  padding: 6px;
  border: 1px solid #000;
  outline: none;
  vertical-align: top;
  height: 120px;
  line-height: 1.4;
}
.sb-div-21:not(#_):not(#_):not(#_) {
  border: 1.5px solid #000;
  padding: 10px 12px;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: justify;
  margin-top: 25px;
}
.sb-div-22:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
}
.sb-span-13:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 160px;
  text-align: center;
}
.sb-span-14:not(#_):not(#_):not(#_) {
  margin-left: 20px;
}
.sb-span-15:not(#_):not(#_):not(#_) {
  outline: none;
  min-width: 150px;
  border-bottom: 1px solid #000;
  font-size: 12px;
  font-weight: bold;
}
.sb-span-16:not(#_):not(#_):not(#_) {
  margin-left: 10px;
  width: 22px;
  height: 22px;
  border: 1px solid #999;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 8px;
  color: #999;
  background: white;
}

/* ck- … 要支援プランの基本チェックリスト（印刷・PDF あり）（#support-checklist-view）。前の style="…" をそのまま移した（名前は 要素名-番号。中身が同じものは 1 つにまとめた） */
.ck-div-1:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  width: 100%;
}
.ck-div-2:not(#_):not(#_):not(#_) {
  background: white;
  border: 2px solid #1e293b;
  padding: 24px;
  font-family: 'Noto Sans JP', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  min-width: 650px;
  max-width: 800px;
  margin: 0 auto 20px;
}
.ck-div-3:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.ck-h2-1:not(#_):not(#_):not(#_) {
  font-size: 20px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  line-height: 1.1;
}
.ck-div-4:not(#_):not(#_):not(#_) {
  font-size: 8px;
  color: #64748b;
  margin-top: 4px;
  text-align: left;
}
.ck-div-5:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: #1e293b;
  font-weight: bold;
}
.ck-span-1:not(#_):not(#_):not(#_) {
  outline:none;
  border-bottom: 1px solid #1e293b;
  min-width: 140px;
  text-align: center;
}
.ck-span-2:not(#_):not(#_):not(#_) {
  outline:none;
  border-bottom: 1px solid #1e293b;
  min-width: 150px;
  text-align: center;
}
.ck-div-6:not(#_):not(#_):not(#_) {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.ck-div-7:not(#_):not(#_):not(#_) {
  font-size: 10px;
  font-weight: bold;
  color: #475569;
  margin-bottom: 6px;
  border-left: 3px solid #2563eb;
  padding-left: 5px;
  line-height: 1;
  text-align: left;
}
.ck-div-8:not(#_):not(#_):not(#_) {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 9px;
  line-height: 1.2;
}
.ck-div-9:not(#_):not(#_):not(#_) {
  border-right: 1px solid #e2e8f0;
  padding: 2px;
}
.ck-div-10:not(#_):not(#_):not(#_) {
  font-weight: bold;
  color: #64748b;
}
.ck-div-11:not(#_):not(#_):not(#_) {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin: 2px 0;
}
.ck-div-12:not(#_):not(#_):not(#_) {
  font-weight: bold;
  color: #16a34a;
}
.ck-div-13:not(#_):not(#_):not(#_) {
  padding: 2px;
}
.ck-div-14:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 3%;
  margin-bottom: 8px;
  width: 100%;
}
.ck-table-1:not(#_):not(#_):not(#_) {
  width: 48.5%;
  border-collapse: collapse;
  font-size: 10.5px;
  table-layout: fixed;
  border: none;
}
.ck-col-1:not(#_):not(#_):not(#_) {
  width: 7% !important;
}
.ck-col-2:not(#_):not(#_):not(#_) {
  width: 60% !important;
}
.ck-col-3:not(#_):not(#_):not(#_) {
  width: 33% !important;
}
.ck-div-15:not(#_):not(#_):not(#_) {
  font-size: 7.5px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
  margin-top: 10px;
  text-align: left;
  font-family: sans-serif;
}

/* ev- … 要支援プランのサービス評価表（印刷・PDF あり）（#support-evaluation-view）。前の style="…" をそのまま移した（名前は 要素名-番号。中身が同じものは 1 つにまとめた） */
.ev-div-1:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  width: 100%;
  overflow-x: auto;
}
.ev-div-2:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid #cbd5e1;
  padding: 24px;
  font-family: 'Noto Sans JP', sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  min-width: 650px;
  max-width: 800px;
  margin: 0 auto 20px;
  color: #1e293b;
}
.ev-div-3:not(#_):not(#_):not(#_) {
  text-align: center;
  margin-bottom: 24px;
}
.ev-h2-1:not(#_):not(#_):not(#_) {
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid #1e293b;
  display: inline-block;
  padding-bottom: 4px;
  margin: 0;
}
.ev-div-4:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 8px;
  font-size: 12px;
}
.ev-span-1:not(#_):not(#_):not(#_) {
  outline:none;
  border-bottom: 1px solid #1e293b;
  min-width: 150px;
}
.ev-div-5:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 24px;
}
.ev-span-2:not(#_):not(#_):not(#_) {
  outline:none;
  border-bottom: 1px solid #1e293b;
  min-width: 120px;
  text-align: center;
}
.ev-table-1:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  border: 1px solid #1e293b;
  margin-bottom: 24px;
}
.ev-th-1:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  font-weight: normal;
  text-align: center;
  width: 18%;
}
.ev-th-2:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  font-weight: normal;
  text-align: center;
  width: 12%;
}
.ev-span-3:not(#_):not(#_):not(#_) {
  font-size: 9px;
}
.ev-th-3:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  font-weight: normal;
  text-align: center;
  width: 22%;
}
.ev-th-4:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  font-weight: normal;
  text-align: center;
  width: 14%;
  position: relative;
}
.ev-button-1:not(#_):not(#_):not(#_) {
  position: absolute;
  right: 4px;
  top: 4px;
  background: #eff6ff;
  color: #3b82f6;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  line-height: 1;
}
.ev-td-1:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  vertical-align: top;
  outline: none;
  min-height: 80px;
}
.ev-td-2:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  vertical-align: middle;
  text-align: center;
}
.ev-div-6:not(#_):not(#_):not(#_) {
  outline: none;
  margin-bottom: 4px;
}
.ev-div-7:not(#_):not(#_):not(#_) {
  text-align: center;
  margin: 4px 0;
}
.ev-div-8:not(#_):not(#_):not(#_) {
  outline: none;
}
.ev-td-3:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  vertical-align: top;
  text-align: center;
}
.ev-select-1:not(#_):not(#_):not(#_) {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: menulist;
  font-size: 11px;
}
.ev-td-4:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  vertical-align: top;
  outline: none;
}
.ev-table-2:not(#_):not(#_):not(#_) {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  border: 1px solid #1e293b;
}
.ev-td-5:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  font-weight: bold;
  width: 40%;
  vertical-align: top;
}
.ev-div-9:not(#_):not(#_):not(#_) {
  margin-bottom: 4px;
}
.ev-div-10:not(#_):not(#_):not(#_) {
  outline: none;
  min-height: 150px;
  font-weight: normal;
}
.ev-td-6:not(#_):not(#_):not(#_) {
  border: 1px solid #1e293b;
  padding: 8px;
  width: 20%;
  vertical-align: top;
  font-weight: normal;
  line-height: 1.6;
}
.ev-div-11:not(#_):not(#_):not(#_) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ev-label-1:not(#_):not(#_):not(#_) {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.ev-div-12:not(#_):not(#_):not(#_) {
  border-top: 1px dashed #cbd5e1;
  margin: 8px 0;
}
.ev-label-2:not(#_):not(#_):not(#_) {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  letter-spacing: -0.5px;
}

/* op- … 結果の欄（output-pane-view）の見出しとボタン・結果の文の欄（#output-pane-view。中の #support-analysis-view・#meeting-form-view は除く）。前の style="…" をそのまま移した（名前は 要素名-番号。中身が同じものは 1 つにまとめた） */
.op-div-1:not(#_):not(#_):not(#_) {
  background: white;
  border: none;
  box-shadow: none;
  width: 100%;
}
.op-div-2:not(#_):not(#_):not(#_) {
  border: none;
  box-shadow: none;
  background: white;
  width: 100%;
}
.op-button-1:not(#_):not(#_):not(#_) {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.op-svg-1:not(#_):not(#_):not(#_) {
  width: 14px;
  height: 14px;
}
.op-button-2:not(#_):not(#_):not(#_) {
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
  color: white;
  border: none;
}
.op-textarea-1:not(#_):not(#_):not(#_) {
  width: 100%;
  min-height: 500px;
  font-family: inherit;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  outline: none;
  resize: vertical;
}

/* sa- … 要支援プランの分析レポート（2026-10-08 にタブを外し、今は表示しない）（#support-analysis-view）。前の style="…" をそのまま移した（名前は 要素名-番号。中身が同じものは 1 つにまとめた） */
.sa-div-1:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 24px;
  width: 100%;
}
.sa-div-2:not(#_):not(#_):not(#_) {
  padding: 24px;
  background: white;
}
.sa-div-3:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.sa-span-1:not(#_):not(#_):not(#_) {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sa-span-2:not(#_):not(#_):not(#_) {
  font-size: 24px;
  font-weight: bold;
  color: #0f172a;
}
.sa-div-4:not(#_):not(#_):not(#_) {
  text-align: right;
  display: flex;
  gap: 24px;
}
.sa-span-3:not(#_):not(#_):not(#_) {
  font-size: 14px;
  font-weight: 700;
  color: #4b5563;
}
.sa-p-1:not(#_):not(#_):not(#_) {
  margin: 0;
}
.sa-p-2:not(#_):not(#_):not(#_) {
  font-weight: 700;
  font-style: italic;
  color: #db2777;
  margin: 0;
}
.sa-span-4:not(#_):not(#_):not(#_) {
  font-size: 10px;
  color: #4f46e5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}
.sa-div-5:not(#_):not(#_):not(#_) {
  margin-bottom: 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid #bbf7d0;
}
.sa-div-6:not(#_):not(#_):not(#_) {
  color: #16a34a;
}
.sa-div-7:not(#_):not(#_):not(#_) {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #bbf7d0;
}
.sa-span-5:not(#_):not(#_):not(#_) {
  color: #15803d;
}
.sa-div-8:not(#_):not(#_):not(#_) {
  color: #1e293b;
  font-weight: 500;
}
.sa-div-9:not(#_):not(#_):not(#_) {
  margin-top: 24px;
}
.sa-div-10:not(#_):not(#_):not(#_) {
  background: #8b5cf6;
}
.sa-div-11:not(#_):not(#_):not(#_) {
  margin-bottom: 16px;
  border: 1px solid #c084fc;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}
.sa-div-12:not(#_):not(#_):not(#_) {
  color: #6b21a8;
  background: #faf5ff;
  padding: 12px 16px;
  font-weight: bold;
  border-bottom: 1px solid #f3e8ff;
}
.sa-div-13:not(#_):not(#_):not(#_) {
  padding: 16px;
  color: #1e293b;
  font-size: 12px;
  line-height: 1.6;
}
.sa-div-14:not(#_):not(#_):not(#_) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.sa-div-15:not(#_):not(#_):not(#_) {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  position: relative;
}
.sa-div-16:not(#_):not(#_):not(#_) {
  color: #0f766e;
  background: #f0fdfa;
  padding: 12px 16px;
  font-weight: bold;
  border-bottom: 1px solid #ccfbf1;
}
.sa-div-17:not(#_):not(#_):not(#_) {
  color: #1d4ed8;
  background: #eff6ff;
  padding: 12px 16px;
  font-weight: bold;
  border-bottom: 1px solid #dbeafe;
}
.sa-div-18:not(#_):not(#_):not(#_) {
  color: #818cf8;
}
.sa-div-19:not(#_):not(#_):not(#_) {
  color: #0369a1;
}
.sa-div-20:not(#_):not(#_):not(#_) {
  color: #be123c;
}

/* gm- … ジェノグラムの簡易エディタの窓（genogram-modal）。2026-10-24 */
.gm-div-1:not(#_):not(#_):not(#_) {
  z-index: 1000;
}
.gm-div-2:not(#_):not(#_):not(#_) {
  width: 800px;
  max-width: 90%;
  height: 600px;
  display: flex;
  flex-direction: column;
}
.gm-h3-1:not(#_):not(#_):not(#_) {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}
.gm-div-3:not(#_):not(#_):not(#_) {
  flex: 1;
  display: flex;
  gap: 16px;
  min-height: 0;
  padding: 16px;
}
.gm-div-4:not(#_):not(#_):not(#_) {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  background: #f8fafc;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}
.gm-span-1:not(#_):not(#_):not(#_) {
  font-size: 11px;
  font-weight: bold;
  color: #64748b;
  margin-bottom: 4px;
}
.gm-button-1:not(#_):not(#_):not(#_) {
  font-size: 11px;
  padding: 6px;
  text-align: left;
  align-items: center;
  gap: 6px;
}
.gm-span-2:not(#_):not(#_):not(#_) {
  width: 12px;
  height: 12px;
  border: 1.5px solid #2563eb;
  display: inline-block;
}
.gm-span-3:not(#_):not(#_):not(#_) {
  width: 12px;
  height: 12px;
  border: 1.5px solid #ef4444;
  border-radius: 50%;
  display: inline-block;
}
.gm-button-2:not(#_):not(#_):not(#_) {
  font-size: 11px;
  padding: 6px;
  text-align: left;
  align-items: center;
  gap: 6px;
  background: #e0e7ff;
}
.gm-span-4:not(#_):not(#_):not(#_) {
  width: 12px;
  height: 12px;
  border: 3px double #4f46e5;
  display: inline-block;
}
.gm-hr-1:not(#_):not(#_):not(#_) {
  border: none;
  border-top: 1px solid #cbd5e1;
  margin: 8px 0;
}
.gm-span-5:not(#_):not(#_):not(#_) {
  font-size: 11px;
  font-weight: bold;
  color: #64748b;
}
.gm-span-6:not(#_):not(#_):not(#_) {
  width: 14px;
  height: 1.5px;
  background: #475569;
  display: inline-block;
}
.gm-span-7:not(#_):not(#_):not(#_) {
  width: 14px;
  height: 4px;
  border-bottom: 1.5px solid #475569;
  border-top: 1.5px solid #475569;
  display: inline-block;
}
.gm-button-3:not(#_):not(#_):not(#_) {
  font-size: 11px;
  padding: 6px;
  color: #ef4444;
  text-align: left;
}
.gm-div-5:not(#_):not(#_):not(#_) {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fafafa;
  position: relative;
  overflow: hidden;
  flex-direction: column;
}
.gm-svg-1:not(#_):not(#_):not(#_) {
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: default;
  user-select: none;
}
.gm-div-6:not(#_):not(#_):not(#_) {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gm-span-8:not(#_):not(#_):not(#_) {
  font-size: 11px;
  color: #64748b;
}
.gm-div-7:not(#_):not(#_):not(#_) {
  display: flex;
  gap: 8px;
}
.gm-button-4:not(#_):not(#_):not(#_) {
  padding: 6px 12px;
  font-size: 12px;
}
.gm-button-5:not(#_):not(#_):not(#_) {
  padding: 6px 12px;
  font-size: 12px;
  background: #6366f1;
}

/* hd- … 画面の上の見出し・メインの題・プランのタブの並び。2026-10-24 */
.hd-div-1:not(#_):not(#_):not(#_) {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hd-div-2:not(#_):not(#_):not(#_) {
  text-align: center;
  margin-top: 4px;
  margin-bottom: 12px;
}
.hd-h1-1:not(#_):not(#_):not(#_) {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}
.hd-div-3:not(#_):not(#_):not(#_) {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* fv- … 結果の書式の入れ物（担当者会議・アセスメント・課題整理総括表・ケアプラン・様式5・入院時・退院時）と書き換えの指示の欄。2026-10-24 */
.fv-div-1:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  width: 100%;
}
.fv-div-2:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
}
.fv-div-3:not(#_):not(#_):not(#_) {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fv-svg-1:not(#_):not(#_):not(#_) {
  width: 18px;
  height: 18px;
  color: #4f46e5;
}
.fv-p-1:not(#_):not(#_):not(#_) {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 10px;
}
.fv-textarea-1:not(#_):not(#_):not(#_) {
  width: 100%;
  min-height: 110px;
  font-size: 13px;
  font-family: 'Noto Sans JP', sans-serif;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  outline: none;
  background: white;
  line-height: 1.6;
}
.fv-div-4:not(#_):not(#_):not(#_) {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.fv-div-5:not(#_):not(#_):not(#_) {
  background: #fafbfc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 16px;
  width: 100%;
  overflow-x: auto;
}

/* md- … 職員の管理の窓・API キーの窓。2026-10-24 */
.md-div-1:not(#_):not(#_):not(#_) {
  font-size: 12px;
  margin-top: 4px;
}
.md-table-1:not(#_):not(#_):not(#_) {
  margin-top: 8px;
}

/* ── JS が作る HTML の style="…" を移したクラス（2026-10-24 作りの直し 段階5 の続き）。強さは上と同じ（:not(#_) 3 つ）。
   - cw-○ … 表の列の幅（<col>。様式5・退院・退所情報記録書・担当者会議の要点・第2表）。小数点は _（16.5% → cw-16_5）
   - ckj- … 基本チェックリストの行と区分の見出し（ui-checklist.js。区分の色は ckj-head-<見出しの番号>）
   - uij- … 結果の欄のボタンの絵・AI の印（ui.js）
   - csj- … 利用者の窓の説明の文・ボタン・検索の欄・書類の履歴の中身（clientstore-list.js・clientstore-history.js）
   - iej- … AI の部分修正の吹き出しの見出し（inlineedit.js）
   - asj- … 要支援プランの分析の「提案はありません」（app-support.js） */
.cw-4:not(#_):not(#_):not(#_) {
  width: 4%;
}
.cw-5:not(#_):not(#_):not(#_) {
  width: 5%;
}
.cw-6:not(#_):not(#_):not(#_) {
  width: 6%;
}
.cw-7:not(#_):not(#_):not(#_) {
  width: 7%;
}
.cw-8:not(#_):not(#_):not(#_) {
  width: 8%;
}
.cw-9:not(#_):not(#_):not(#_) {
  width: 9%;
}
.cw-12:not(#_):not(#_):not(#_) {
  width: 12%;
}
.cw-12_17:not(#_):not(#_):not(#_) {
  width: 12.17%;
}
.cw-13:not(#_):not(#_):not(#_) {
  width: 13%;
}
.cw-14:not(#_):not(#_):not(#_) {
  width: 14%;
}
.cw-15:not(#_):not(#_):not(#_) {
  width: 15%;
}
.cw-16:not(#_):not(#_):not(#_) {
  width: 16%;
}
.cw-16_5:not(#_):not(#_):not(#_) {
  width: 16.5%;
}
.cw-17:not(#_):not(#_):not(#_) {
  width: 17%;
}
.cw-19:not(#_):not(#_):not(#_) {
  width: 19%;
}
.cw-24:not(#_):not(#_):not(#_) {
  width: 24%;
}
.cw-33:not(#_):not(#_):not(#_) {
  width: 33%;
}
.cw-34:not(#_):not(#_):not(#_) {
  width: 34%;
}
.cw-35:not(#_):not(#_):not(#_) {
  width: 35%;
}
.cw-40:not(#_):not(#_):not(#_) {
  width: 40%;
}
.cw-50:not(#_):not(#_):not(#_) {
  width: 50%;
}
.cw-55:not(#_):not(#_):not(#_) {
  width: 55%;
}
.cw-78:not(#_):not(#_):not(#_) {
  width: 78%;
}
.cw-79:not(#_):not(#_):not(#_) {
  width: 79%;
}
.cw-84:not(#_):not(#_):not(#_) {
  width: 84%;
}
.ckj-td-head:not(#_):not(#_):not(#_) {
  padding: 16px 4px 6px 0;
  border: none;
  text-align: left;
}
.ckj-head:not(#_):not(#_):not(#_) {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 11.5px;
  padding-bottom: 1px;
}
.ckj-head-1:not(#_):not(#_):not(#_) {
  color: #2563eb;
  border-bottom: 2px solid #2563eb;
}
.ckj-head-6:not(#_):not(#_):not(#_) {
  color: #0ea5e9;
  border-bottom: 2px solid #0ea5e9;
}
.ckj-head-11:not(#_):not(#_):not(#_) {
  color: #f97316;
  border-bottom: 2px solid #f97316;
}
.ckj-head-13:not(#_):not(#_):not(#_) {
  color: #10b981;
  border-bottom: 2px solid #10b981;
}
.ckj-head-16:not(#_):not(#_):not(#_) {
  color: #0d9488;
  border-bottom: 2px solid #0d9488;
}
.ckj-head-18:not(#_):not(#_):not(#_) {
  color: #8b5cf6;
  border-bottom: 2px solid #8b5cf6;
}
.ckj-head-21:not(#_):not(#_):not(#_) {
  color: #ec4899;
  border-bottom: 2px solid #ec4899;
}
.ckj-head-icon:not(#_):not(#_):not(#_) {
  font-size: 11.5px;
  font-style: normal;
  line-height: 1;
}
.ckj-td-no:not(#_):not(#_):not(#_) {
  width: 7%;
  padding: 10.5px 0 10.5px 2px;
  font-size: 11px;
  color: #64748b;
  font-weight: bold;
  text-align: left;
  vertical-align: middle;
}
.ckj-td-q:not(#_):not(#_):not(#_) {
  width: 60%;
  padding: 10.5px 2px;
  font-size: 11px;
  color: #1e293b;
  line-height: 1.4;
  vertical-align: middle;
  text-align: left;
}
.ckj-td-answer:not(#_):not(#_):not(#_) {
  width: 33%;
  padding: 10.5px 12px 10.5px 0;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}
.uij-icon-13:not(#_):not(#_):not(#_) {
  width: 13px;
  height: 13px;
}
.uij-badge-dot-off:not(#_):not(#_):not(#_) {
  background: #94a3b8;
  animation: none;
}
.csj-note:not(#_):not(#_):not(#_) {
  margin: 0 0 8px;
}
.csj-small-btn:not(#_):not(#_):not(#_) {
  padding: 4px 12px;
  font-size: 12px;
}
.csj-link-btn:not(#_):not(#_):not(#_) {
  margin-top: 10px;
  padding: 4px 12px;
  font-size: 12px;
}
.csj-search:not(#_):not(#_):not(#_) {
  margin-bottom: 8px;
}
.csj-summary:not(#_):not(#_):not(#_) {
  cursor: pointer;
}
.csj-pre:not(#_):not(#_):not(#_) {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.6;
  background: #f8fafc;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 6px 0 0;
  max-height: 240px;
  overflow: auto;
}
.iej-label:not(#_):not(#_):not(#_) {
  font-size: 11px;
  font-weight: bold;
  color: #475569;
}
.asj-empty:not(#_):not(#_):not(#_) {
  color: #64748b;
  font-size: 12px;
}

/* ── index.html の初めの表示（2026-10-24 作りの直し 段階5 の続き）。前の style="display: …" の代わり。
   initial-display.js が読み込みの最後に el.style.display へ同じ値を入れてクラスを外す（JS は前と同じく el.style.display を読み書きする）。
   それまでの間も前の style="…" と同じ表示にするため、強さは上と同じ（:not(#_) 3 つ） */
.js-display-none:not(#_):not(#_):not(#_) {
  display: none;
}
.js-display-flex:not(#_):not(#_):not(#_) {
  display: flex;
}
.js-display-inline-block:not(#_):not(#_):not(#_) {
  display: inline-block;
}
.js-display-none-important:not(#_):not(#_):not(#_) {
  display: none !important;
}

/* この画面での録音（recorder.js。2026-10-27） */
.rec-card:not(#_):not(#_):not(#_) {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-card.rec-card-recording:not(#_):not(#_):not(#_) {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.rec-status:not(#_):not(#_):not(#_) {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
}

.rec-status:empty:not(#_):not(#_):not(#_) {
  display: none;
}
.rec-time:not(#_):not(#_):not(#_) {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.rec-buttons:not(#_):not(#_):not(#_) {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rec-btn:not(#_):not(#_):not(#_) {
  min-height: 48px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-primary);
  cursor: pointer;
}
.rec-btn:disabled:not(#_):not(#_):not(#_) {
  opacity: 0.5;
  cursor: not-allowed;
}
.rec-btn-start:not(#_):not(#_):not(#_) {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}
.rec-btn-finish:not(#_):not(#_):not(#_) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.rec-btn-discard:not(#_):not(#_):not(#_) {
  color: var(--danger);
}
.rec-option:not(#_):not(#_):not(#_) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
}
.rec-note:not(#_):not(#_):not(#_) {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
@media (max-width: 640px) {
  .rec-btn:not(#_):not(#_):not(#_) {
    flex: 1 1 calc(50% - 10px);
  }
}
.progress-target-warn:not(#_):not(#_):not(#_) {
  color: var(--danger);
}
.rec-template-box:not(#_):not(#_):not(#_) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rec-template-pick:not(#_):not(#_):not(#_) {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.rec-template-current:not(#_):not(#_):not(#_) {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  cursor: pointer;
  max-width: 100%;
}
.rec-template-choices[hidden]:not(#_):not(#_):not(#_) {
  display: none;
}
.rec-template-label:not(#_):not(#_):not(#_) {
  font-size: 14px;
  color: var(--text-primary);
}
.rec-template-choices:not(#_):not(#_):not(#_) {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rec-template-choice:not(#_):not(#_):not(#_) {
  min-height: 40px;
  padding: 6px 12px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-primary);
  cursor: pointer;
}
.rec-template-choice.is-selected:not(#_):not(#_):not(#_) {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
}
.rec-template-empty:not(#_):not(#_):not(#_) {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}
/* 録音の枠は見出しの下を詰め、ボタンと「支援経過記録に入れる」を横 1 列に並べる（2026-10-27 代表「おさまりが悪い」） */
.rec-card .ip-card-title:not(#_):not(#_):not(#_) {
  margin-bottom: 2px;
}
.rec-row:not(#_):not(#_):not(#_) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
}
.rec-row > .rec-option:not(#_):not(#_):not(#_),
.rec-row > .rec-template-box:not(#_):not(#_):not(#_) {
  flex: 1 1 260px;
  min-width: 0;
  min-height: 48px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.rec-row > .rec-template-box:not(#_):not(#_):not(#_) {
  align-items: flex-start;
  flex-wrap: nowrap;
  padding-top: 4px;
}
.rec-row .rec-template-label:not(#_):not(#_):not(#_) {
  line-height: 40px;
  white-space: nowrap;
}
.rec-row .rec-template-empty:not(#_):not(#_):not(#_) {
  padding-top: 10px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .rec-row > .rec-option:not(#_):not(#_):not(#_),
  .rec-row > .rec-template-box:not(#_):not(#_):not(#_) {
    flex-basis: 100%;
    min-height: 0;
    padding-left: 0;
    border-left: none;
  }
  .rec-row:not(#_):not(#_):not(#_) {
    gap: 10px;
  }
  .rec-row > .rec-buttons:not(#_):not(#_):not(#_) {
    flex: 1 1 100%;
  }
  .rec-row > .rec-template-box:not(#_):not(#_):not(#_) {
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0;
  }
}

/* 利用者の行の中でふりがなを入れる・直す欄（2026-10-27） */
.client-row:has(.client-kana-edit) {
  flex-wrap: wrap;
}
.client-kana-edit {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.client-kana-edit .client-kana-input {
  flex: 1 1 180px;
  min-width: 0;
}

/* スマホの幅（2026-10-27 代表「スマホ・iPad にきちんと表示させて」）
   - 結果の上のボタン（やり直す・コピー・印刷プレビュー・PDF…）が 4 つ横に詰まり、字が 1 字ずつ折り返して縦書きのようだった → 2 つずつ並べ、字は折り返さない
   - 画面の左右の余白（page-scroll 28px＋入力の画面 24px）が広く、入力の欄が画面の 7 割ほどだった → 余白を 12px にする
   - モニタリングの「出力形式」が詰まって「モニタ/リング/記録」と折り返していた → 文字数と出力形式を縦に並べる
   - 支援経過記録の窓の「期間」の日付の欄が右にはみ出し、「閉じる」が「閉じ/る」と折り返していた
   パソコン・iPad の幅（641px 以上）は変わらない */
@media (max-width: 640px) {
  .page-scroll { padding: 16px 12px; }
  .ip-pane:not(#_):not(#_):not(#_) { padding: 0; }

  .result-actions-wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .result-actions-wrapper .result-btn {
    white-space: nowrap;
    min-height: 40px;
    font-size: 12px;
  }
  .result-actions-wrapper .result-btn svg { flex-shrink: 0; }

  .ip-settings-bar:not(#_):not(#_):not(#_) {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .ip-setting-group-divided:not(#_):not(#_):not(#_) {
    border-left: 0;
    padding-left: 0;
  }
  .pill-group .pill-btn { white-space: nowrap; }

  .progress-header { padding: 12px 14px 10px; }
  .progress-header > .btn-secondary { flex-shrink: 0; white-space: nowrap; }
  .progress-field-inline { flex-wrap: wrap; max-width: 100%; }
  .progress-field-inline input[type="date"] { flex: 1 1 130px; min-width: 0; }
}

/* 支援経過記録の窓から利用者を切り替えて読み込み直す間は、後ろの画面を隠す（progress-reopen-boot.js・progress.js。2026-10-27 代表「1瞬…表示される」） */
html.cl-progress-reopening .app-layout { visibility: hidden; }

/* iPad・スマホではサイドバーを細くして右を広くする（2026-10-28 代表の指示） */
@media (max-width: 1199px) {
  :root { --sidebar-width: 176px; }
  .sidebar-logo { padding: 16px 12px; gap: 8px; }
  .logo-text { font-size: 16px; }
  .sidebar-nav { padding: 12px 6px; }
  .nav-item { gap: 7px; padding: 8px 7px; font-size: 12.5px; }
  .top-header { padding: 0 16px; }
}
@media (min-width: 769px) and (max-width: 1199px) {
  .page-scroll { padding: 16px; }
}

/* 要支援の利用者基本情報: iPad の幅で見出しの列が細くなり字が縦に折り返していた。基本チェックリストと同じく紙の幅を保ち、
   入りきらない幅では左右に動かして見る（2026-10-28 代表「基本チェックリストみたいに画面を動かせるようにして」） */
/* 様式5（サービス計画書）・第1〜3表・課題整理総括表（A4 横）も同じく、紙の幅を保って左右に動かす（代表「サービス計画書も同様です」）。
   入院時情報提供書（A4 縦）は iPad の幅だけ（スマホは 720px 以下の並べ方のまま） */
/* 様式5の PDF 用 A4 縦（.yobo-a4-page、190mm＝約718px）は外す。900px に広がり、PDF の右端が切れていた（2026-10-30 代表「要支援プランをPDFにすると端が切れてしまう」） */
@media screen {
  #support-basic-info-view .facesheet-page:not(#_):not(#_):not(#_) { min-width: 760px; }
  .cp-page:not(.yobo-a4-page),
  .mhlw-sheet.kadai-sheet { min-width: 900px; }
}
@media screen and (min-width: 721px) {
  .hosp-page { min-width: 680px; }
}

/* モニタリング・担当者会議録の入力画面をすっきりさせる（2026-11-21 代表「この画面もすっきりできない？」→ ①〜④ すべて）。
   上の .ip-… の規則（ID 3 つ分の強さ）より強くするため、行の頭の規則は .page-scroll を前に付けている（@media の中は ID 4 つ分） */

/* ① 「文字数・出力形式」の白い枠をやめ、説明文のすぐ下に 1 行で置く */
.page-scroll .ip-intro:not(#_):not(#_):not(#_) {
  margin-bottom: 12px;
}
.page-scroll .ip-settings-bar:not(#_):not(#_):not(#_) {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 16px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

/* ④ 枠と枠の間をそろえる（前は枠の下の余白 20px と並びの間 20px が重なり、40px になっていた） */
.page-scroll .ip-cards:not(#_):not(#_):not(#_) {
  gap: 16px;
}
.page-scroll .ip-cards:not(#_):not(#_):not(#_) > .upload-card {
  margin-bottom: 0;
}

/* ② 録音と資料を、パソコンの幅では横に 2 つ並べる（面談メモは下に横いっぱい）。資料の枠は低くし、印を左に置く。
   押せる広さ・ドラッグはそのまま。スマホ・iPad の縦の幅は今までどおり縦に並べる */
@media (min-width: 1024px) {
  .ip-cards:not(#_):not(#_):not(#_):not(#_):has(> .rec-card) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
  .ip-cards:not(#_):not(#_):not(#_):not(#_):has(> .rec-card) > :not(.rec-card):not(.ip-upload-card) {
    grid-column: 1 / -1;
  }
  .ip-cards:has(> .rec-card) .rec-row:not(#_):not(#_):not(#_):not(#_) {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .ip-cards:has(> .rec-card) .rec-row > .rec-option:not(#_):not(#_):not(#_):not(#_),
  .ip-cards:has(> .rec-card) .rec-row > .rec-template-box:not(#_):not(#_):not(#_):not(#_) {
    flex: 0 0 auto;
    min-height: 0;
    padding-left: 0;
    border-left: none;
  }
  /* 担当者会議録の「支援経過記録に入れる」（定型文を選ぶ欄）は、狭い列では見出しを上・中身を下にする */
  .ip-cards:has(> .rec-card) .rec-row > .rec-template-box:not(#_):not(#_):not(#_):not(#_) {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-top: 0;
  }
  .ip-cards:has(> .rec-card) .rec-row .rec-template-label:not(#_):not(#_):not(#_):not(#_) {
    line-height: 1.5;
  }
  .ip-cards:has(> .rec-card) .rec-row .rec-template-empty:not(#_):not(#_):not(#_):not(#_) {
    padding-top: 0;
  }
  .ip-cards:has(> .rec-card) .rec-btn-start:not(#_):not(#_):not(#_):not(#_) {
    flex: 1 1 auto;
  }
  .ip-cards:has(> .rec-card) .ip-upload-card:not(#_):not(#_):not(#_):not(#_) {
    min-height: 0;
  }
  .ip-cards:has(> .rec-card) .ip-drop-zone:not(#_):not(#_):not(#_):not(#_) {
    flex: 0 0 auto;
    min-height: 88px;
    align-items: flex-start;
    padding: 16px 16px 16px 72px;
  }
  .ip-cards:has(> .rec-card) .ip-drop-icon:not(#_):not(#_):not(#_):not(#_) {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    margin: 0;
  }
  .ip-cards:has(> .rec-card) .ip-drop-main:not(#_):not(#_):not(#_):not(#_) {
    font-size: 14px;
    margin-bottom: 2px;
  }
  .ip-cards:has(> .rec-card) .ip-drop-sub:not(#_):not(#_):not(#_):not(#_) {
    margin-bottom: 0;
    text-align: left;
  }
}

/* ③ 面談の場所・方法・相手・利用票の交付の欄を、押しやすい大きさにそろえる */
.page-scroll .ip-memo-head:not(#_):not(#_):not(#_) {
  flex-wrap: wrap;
  gap: 10px 16px;
}
.page-scroll .ip-visit-bar:not(#_):not(#_):not(#_) {
  gap: 8px 14px;
  font-size: 12.5px;
}
.page-scroll .ip-visit-select:not(#_):not(#_):not(#_) {
  height: 34px;
  margin-left: 4px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background-color: #fff;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}
.page-scroll .ip-visit-select:not(#_):not(#_):not(#_):focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

/* 要介護認定項目の番号の○の押せる範囲（見た目は変えない。広さは zskform.js の zfHitPad がとなりの欄との間で決める。2026-11-24） */
.zf-sheet .zf-page .zf-mark.zf-hit::before {
  content: '';
  position: absolute;
  left: calc(var(--zs) * var(--zf-hl) * -1px);
  right: calc(var(--zs) * var(--zf-hr) * -1px);
  top: calc(var(--zs) * var(--zf-ht) * -1px);
  bottom: calc(var(--zs) * var(--zf-hb) * -1px);
}
