/* ==========================================
   signalHub v1.1 - 青ベース上品デザイン
   ========================================== */
:root {
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  --text-900: #0f172a;
  --text-700: #1e293b;
  --text-500: #64748b;
  --text-400: #94a3b8;

  --bg-white:  #ffffff;
  --bg-50:     #f8fafc;
  --bg-100:    #f1f5f9;
  --border:    #e2e8f0;
  --border-light: #f1f5f9;

  --green:  #10b981;
  --amber:  #f59e0b;
  --red:    #ef4444;
  --cyan:   #06b6d4;
  --violet: #8b5cf6;

  --shadow-sm: 0 1px 3px rgba(37,99,235,.08);
  --shadow-md: 0 4px 12px rgba(37,99,235,.10);
  --shadow-lg: 0 8px 24px rgba(37,99,235,.13);
  --shadow-xl: 0 16px 40px rgba(37,99,235,.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: all .2s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: linear-gradient(140deg, #f8fafc 0%, #eff6ff 100%);
  color: var(--text-700);
  line-height: 1.6;
  min-height: 100vh;
  font-size: 15px;
}

/* ── ヘッダー ── */
.header {
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-900) 100%);
  color: #fff;
  padding: 1.75rem 0;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}
.header-content { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.app-title    { font-size: 1.9rem; font-weight: 700; letter-spacing: .4px; }
.app-subtitle { font-size: .9rem; opacity: .9; margin-top: .15rem; }

/* ── コンテナ ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem 3rem; }
.screen { display: none; }
.screen.active { display: block; }

.screen-header {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.screen-header h2 { font-size: 1.6rem; color: var(--text-900); font-weight: 600; }
.screen-description { color: var(--text-500); font-size: .9rem; margin-top: .25rem; }

/* ── アップロードグリッド ── */
.upload-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(360px,1fr));
  gap: 1.5rem; margin-bottom: 1.5rem;
}
.upload-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-md); transition: var(--transition);
}
.upload-card:hover { box-shadow: var(--shadow-lg); border-color: var(--blue-400); }
.upload-card.loaded { border-color: var(--blue-600); background: linear-gradient(to bottom, #fff, var(--blue-50)); }

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-900); }

.clear-btn {
  background: none; border: none; color: var(--text-500);
  cursor: pointer; font-size: .85rem; padding: .25rem .6rem;
  border-radius: var(--radius-sm); transition: var(--transition);
}
.clear-btn:hover { color: var(--red); background: rgba(239,68,68,.08); }

.upload-area {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 2.5rem 1.5rem; text-align: center; cursor: pointer;
  background: var(--bg-50); transition: var(--transition);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--blue-600); background: var(--blue-50);
}
.upload-text { font-size: .95rem; font-weight: 500; color: var(--text-700); margin-bottom: .4rem; }
.upload-hint { font-size: .8rem; color: var(--text-500); }

.file-info {
  margin-top: 1rem; padding: .65rem 1rem;
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm); color: var(--blue-700); font-size: .875rem;
}
.file-info.error { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.3); color: var(--red); }

/* ── 金額フィルタカード ── */
.filter-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.filter-card-header {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
}
.filter-card-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-900); }
.filter-badge {
  background: var(--blue-100); color: var(--blue-700);
  font-size: .75rem; font-weight: 600; padding: .2rem .65rem;
  border-radius: 999px; letter-spacing: .3px;
}
.filter-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filter-label { font-size: .9rem; color: var(--text-700); font-weight: 500; white-space: nowrap; }
.filter-input-group { display: flex; align-items: center; gap: .5rem; }
.filter-input {
  width: 140px; padding: .55rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; color: var(--text-900); background: var(--bg-white);
  transition: var(--transition);
}
.filter-input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.filter-unit { font-size: .9rem; color: var(--text-500); }
.filter-hint { font-size: .8rem; color: var(--text-500); margin-top: .5rem; width: 100%; }

/* ── 列マッピング ── */
.mapping-section {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.mapping-section h3 { font-size: 1rem; font-weight: 600; margin-bottom: .4rem; }
.mapping-hint { font-size: .82rem; color: var(--text-500); margin-bottom: 1rem; }
.mapping-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 1rem; }
.mapping-item { display: flex; flex-direction: column; }
.mapping-item label { font-size: .82rem; color: var(--text-500); margin-bottom: .3rem; font-weight: 500; }
.mapping-item select {
  padding: .5rem .65rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .875rem;
  background: var(--bg-white); color: var(--text-900); transition: var(--transition);
}
.mapping-item select:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* ── アクションバー ── */
.action-bar { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 2rem; }

.btn-primary, .btn-secondary {
  padding: .7rem 1.6rem; border: none; border-radius: var(--radius-md);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); letter-spacing: .2px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: #fff; box-shadow: var(--shadow-md);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--blue-700), #1e3a8a);
  box-shadow: var(--shadow-lg); transform: translateY(-1px);
}
.btn-primary:disabled { background: var(--text-400); cursor: not-allowed; }
.btn-secondary {
  background: var(--bg-white); color: var(--blue-600); border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--blue-50); border-color: var(--blue-600); }

/* ── KPIカード ── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 1rem; margin-bottom: 1.75rem;
}
.kpi-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.2rem 1rem;
  text-align: center; box-shadow: var(--shadow-sm); transition: var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kpi-label { font-size: .8rem; color: var(--text-500); margin-bottom: .4rem; font-weight: 500; }
.kpi-value { font-size: 1.9rem; font-weight: 700; color: var(--blue-600); margin-bottom: .2rem; }
.kpi-sub { font-size: .75rem; color: var(--text-400); }
.kpi-card.highlight { border-color: var(--blue-600); background: linear-gradient(to bottom, #fff, var(--blue-50)); }
.kpi-card.warning { border-color: var(--amber); }
.kpi-card.warning .kpi-value { color: var(--amber); }

/* ── ビュー切替 ── */
.view-controls { display: flex; gap: .75rem; align-items: center; }
.view-select, .filter-select, .fy-select {
  padding: .5rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .875rem;
  background: var(--bg-white); color: var(--text-700); cursor: pointer; transition: var(--transition);
}
.view-select:focus, .filter-select:focus, .fy-select:focus { outline: none; border-color: var(--blue-600); }
.fy-select { background: #eff6ff; font-weight: 600; color: #1e3a8a; }

/* ── フィルタバー ── */
.filter-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: .75rem;
}
.filter-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-chip {
  padding: .4rem .9rem; border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text-500);
  border-radius: 999px; font-size: .82rem; cursor: pointer;
  transition: var(--transition); font-weight: 500;
}
.filter-chip:hover { border-color: var(--blue-600); background: var(--blue-50); }
.filter-chip.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.toggle-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .875rem; color: var(--text-500); }
.toggle-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }

/* ── テーブル ── */
.table-container {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: auto;
  box-shadow: var(--shadow-md); max-height: 580px;
  -webkit-overflow-scrolling: touch; /* iOSスムーススクロール */
}
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.data-table thead {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900)); color: #fff;
}
.data-table th { padding: .875rem 1rem; text-align: left; font-weight: 600; font-size: .82rem; letter-spacing: .3px; }
.data-table td { padding: .8rem 1rem; border-top: 1px solid var(--border-light); font-size: .875rem; }
.data-table tbody tr:hover { background: var(--blue-50); }

/* バッジ */
.diff-badge {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap; margin: 1px;
}
.diff-badge.new    { background: rgba(16,185,129,.12); color: var(--green); }
.diff-badge.gone   { background: rgba(239,68,68,.10);  color: var(--red);  }
.diff-badge.month  { background: rgba(6,182,212,.12);  color: var(--cyan); }
.diff-badge.amount { background: rgba(245,158,11,.12); color: var(--amber);}
.diff-badge.stage  { background: rgba(139,92,246,.12); color: var(--violet); }

.status-badge {
  display: inline-block; padding: .2rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; margin-right: .4rem;
}
.status-badge.completed   { background: rgba(16,185,129,.12); color: var(--green); }
.status-badge.uncompleted { background: rgba(245,158,11,.12); color: var(--amber); }

.change-text {
  font-size: .82rem; color: var(--text-500); line-height: 1.6;
  display: flex; align-items: baseline; gap: .3rem;
}
.change-text.changed { color: var(--text-900); font-weight: 600; }
.change-text .ct-label { color: var(--text-400); font-size: .75rem; flex-shrink: 0; }
.change-text .amt-diff { font-size: .78rem; font-weight: 700; }
.amt-diff-cell { font-size: .85rem; text-align: right; }

/* ── ソートバー ── */
.sort-bar {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .75rem; flex-wrap: wrap;
}
.sort-label { font-size: .82rem; color: var(--text-400); }
.sort-btn {
  padding: .28rem .75rem; font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--bg-white); color: var(--text-500);
  cursor: pointer; transition: var(--transition);
}
.sort-btn:hover { border-color: var(--blue-600); color: var(--blue-600); }
.sort-btn.active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }

.btn-edit {
  padding: .3rem .8rem; background: var(--blue-600); color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: .8rem;
  cursor: pointer; transition: var(--transition); font-weight: 500; margin-top: .25rem;
}
.btn-edit:hover { background: var(--blue-800); }

/* ── モバイル営業 ── */
.person-selector { margin-top: .75rem; }
.person-select {
  width: 100%; max-width: 280px; padding: .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: .95rem; background: var(--bg-white); color: var(--text-900);
}
.personal-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr));
  gap: 1rem; margin-bottom: 1.75rem;
}
.diff-cards { display: grid; gap: 1rem; }
.diff-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.diff-card:hover { box-shadow: var(--shadow-md); }
.diff-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .875rem; }
.diff-card-title { font-size: .95rem; font-weight: 600; color: var(--text-900); margin-bottom: .2rem; }
.diff-card-id { font-size: .78rem; color: var(--text-400); }
.diff-card-row { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--border-light); font-size: .875rem; }
.diff-card-row:last-child { border-bottom: none; }
.diff-card-label { color: var(--text-500); }
.diff-card-value { color: var(--text-900); font-weight: 500; text-align: right; }
.reason-status { padding: .7rem; border-radius: var(--radius-sm); margin: .875rem 0; font-size: .82rem; }
.reason-status.completed   { background: rgba(16,185,129,.1); color: var(--green); }
.reason-status.uncompleted { background: rgba(245,158,11,.1); color: var(--amber); }

/* ── モーダル ── */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal.active {
  display: flex; justify-content: center; align-items: center; padding: 1rem;
  animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
  background: var(--bg-white); border-radius: var(--radius-lg);
  max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl); animation: slideUp .25s ease-out;
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.15rem; font-weight: 600; }
.modal-close {
  background: none; border: none; font-size: 1.4rem; color: var(--text-500);
  cursor: pointer; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.modal-close:hover { background: var(--bg-100); }
.modal-body { padding: 1.25rem 1.5rem; }

.deal-info {
  background: var(--blue-50); border: 1px solid var(--blue-200);
  border-radius: var(--radius-md); padding: .875rem 1rem; margin-bottom: 1.25rem;
}
.deal-info-row { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .875rem; }
.deal-info-label { color: var(--text-500); font-weight: 500; }
.deal-info-value { color: var(--text-900); font-weight: 600; }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .875rem; }
.required { color: var(--red); }
.form-control {
  width: 100%; padding: .65rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .925rem; font-family: inherit;
  background: var(--bg-white); color: var(--text-900); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea.form-control { resize: vertical; min-height: 90px; }

.modal-footer {
  display: flex; gap: 1rem; justify-content: flex-end;
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--border);
}

/* ── 担当者マスタータブ用モーダル ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-overlay[style*="flex"] { display: flex; }
.modal-box {
  background: var(--bg-white); border-radius: var(--radius-lg);
  padding: 1.5rem; width: 100%; box-shadow: var(--shadow-lg);
}
/* ── import-area（担当者マスタードロップ） ── */
.import-area {
  border: 2px dashed var(--border); border-radius: var(--radius-md);
  padding: 1.5rem; text-align: center; cursor: pointer;
  color: var(--text-400); transition: var(--transition);
}
.import-area:hover, .import-area.dragover {
  border-color: var(--blue-600); background: var(--blue-50); color: var(--blue-600);
}
.import-icon { font-size: 2rem; margin-bottom: .5rem; }
/* ── 削除ボタン ── */
.btn-danger {
  padding: .3rem .8rem; background: #dc2626; color: #fff;
  border: none; border-radius: var(--radius-sm); font-size: .8rem;
  cursor: pointer; transition: var(--transition);
}
.btn-danger:hover { background: #b91c1c; }

/* ── コメント入力ヒント ── */
.comment-hint {
  background: var(--blue-50);
  border-left: 3px solid var(--blue-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .6rem .875rem;
  font-size: .82rem;
  color: var(--text-700);
  margin-bottom: .6rem;
  line-height: 1.5;
}

/* ── 文字数カウンター ── */
.char-counter-row {
  display: flex;
  justify-content: flex-end;
  margin-top: .35rem;
}
.char-counter {
  font-size: .75rem;
  color: var(--text-400);
  font-weight: 500;
  transition: var(--transition);
}
.char-counter.warning {
  color: var(--red);
  font-weight: 700;
}

/* ── トースト ── */
.toast {
  position: fixed; bottom: 1.75rem; right: 1.75rem;
  background: var(--text-900); color: #fff;
  padding: .875rem 1.4rem; border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl); z-index: 2000;
  opacity: 0; transform: translateY(12px);
  transition: var(--transition); pointer-events: none; max-width: 380px; font-size: .9rem;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red);   }
.toast.warning { background: var(--amber); }
.toast.info    { background: var(--cyan);  }

/* ── 1ファイルアップロード（全幅） ── */
.upload-single { margin-bottom: 1.5rem; }
.upload-single .upload-card { max-width: 680px; }

/* アップロードカード + 統括部カード を横並びに */
.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  align-items: start;
}
.upload-row .upload-card { max-width: none; }

.org-select-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.org-select-card .card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.org-select-card .card-header h3 { margin: 0; font-size: 1rem; color: var(--navy, #1E3A8A); }
.org-select-card .filter-badge {
  background: var(--blue-50, #DBEAFE); color: var(--blue-600);
  font-size: .7rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 999px;
}
.org-select-card .org-select-body { padding-top: .25rem; }
.org-select {
  width: 100%;
  padding: .55rem .7rem;
  font-size: .95rem;
  border: 1.5px solid var(--blue-400, #93C5FD);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: var(--transition);
}
.org-select:hover  { border-color: var(--blue-600); }
.org-select:focus  { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.org-select-hint {
  margin: .65rem 0 0;
  font-size: .77rem;
  color: var(--gray, #6B7280);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .upload-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════
   ファイル作り方ガイド
══════════════════════════════════════ */
.upload-guide {
  margin: .75rem 0 1rem;
  padding: .85rem 1rem;
  background: linear-gradient(180deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-sm);
}
.upload-guide-title {
  font-size: .92rem; font-weight: 700;
  color: var(--blue-600);
  margin-bottom: .5rem;
}
.upload-guide-steps {
  margin: 0; padding-left: 1.4rem;
  font-size: .87rem;
  line-height: 1.65;
  color: #1f2937;
}
.upload-guide-steps li { margin: .25rem 0; }
.upload-guide-cond {
  margin: .35rem 0 .25rem;
  padding: .35rem 0 .35rem .25rem;
  list-style: none;
}
.upload-guide-cond li {
  display: flex;
  gap: .6rem;
  margin: .25rem 0;
  font-size: .85rem;
}
.upload-guide-cond .ug-key {
  flex: 0 0 5em;
  font-weight: 700;
  color: #374151;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: .05rem .5rem;
  text-align: center;
  font-size: .8rem;
}
.upload-guide-cond .ug-val { color: #1f2937; }

/* ── 担当者別合計（PC・2行） ── */
.person-totals-section {
  margin-bottom: 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.person-totals-heading {
  font-size: 1rem; font-weight: 600; color: var(--text-900);
  margin-bottom: .875rem;
}
.person-totals-table-wrap { max-height: 320px; }
.person-totals-tbl { width: 100%; border-collapse: collapse; }
.person-totals-tbl th {
  text-align: right; font-size: .8rem; font-weight: 600;
  padding: .7rem 1rem; color: #fff;
}
.person-totals-tbl th:first-child,
.person-totals-tbl th:nth-child(2) { text-align: left; }
.person-totals-tbl td { padding: .6rem 1rem; font-size: .875rem; border-top: 1px solid var(--border-light); }
.person-totals-tbl .person-name-cell {
  font-weight: 600; color: var(--text-900); vertical-align: middle;
  border-right: 2px solid var(--border); background: var(--bg-50);
}
.rank-cell { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.rank-c   { color: var(--blue-600); }
.rank-all { color: var(--text-400); }
.amt-cell { text-align: right; white-space: nowrap; }
.diff-cell { font-weight: 700; }

/* ── 担当者合計モバイル ── */
.summary-kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: .75rem; margin-bottom: 1.25rem;
}
.person-totals-mobile {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}

/* ── 担当者別合計カード（旧・後方互換） ── */
.person-totals-card {
  background: var(--bg-white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm); grid-column: 1 / -1;
}
.person-totals-title {
  font-size: .85rem; font-weight: 600; color: var(--text-500);
  margin-bottom: .75rem;
}

/* ── タブナビ ── */
.tab-nav {
  display: flex; gap: 0; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}
.tab-btn {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .875rem 2rem; background: none; border: none;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  cursor: pointer; transition: var(--transition); color: var(--text-500);
  font-family: inherit;
}
.tab-btn:hover { color: var(--blue-600); background: var(--blue-50); }
.tab-btn.active {
  color: var(--blue-700); border-bottom-color: var(--blue-600);
  font-weight: 700; background: linear-gradient(to bottom,var(--blue-50),transparent);
}
.tab-label { font-size: .95rem; font-weight: 600; }
.tab-month { font-size: .78rem; color: var(--blue-500); font-weight: 500; }
.tab-btn.active .tab-month { color: var(--blue-700); }

/* ── タブパネル ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── タブコントロールバー（ビュー切替エリア） ── */
.tab-control-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: .75rem;
}

/* ── 先月レビューテーブル専用 ── */
.id-cell   { font-size: .78rem; color: var(--text-400); white-space: nowrap; }
.name-cell { max-width: 220px; font-size: .875rem; }
.empty-cell { text-align:center; padding: 2rem; color: var(--text-500); font-size: .9rem; }
.row-uncompleted { background: rgba(245,158,11,.04); }
.row-uncompleted:hover { background: rgba(245,158,11,.09) !important; }

/* 理由コードチップ */
.reason-code-chip {
  display: inline-block; background: var(--blue-100); color: var(--blue-700);
  font-size: .75rem; font-weight: 600; padding: .18rem .6rem;
  border-radius: 999px; white-space: nowrap;
}
/* 保存日時 */
.saved-at { font-size: .72rem; color: var(--text-400); margin-top: .15rem; }
/* コメントテキスト */
.comment-text { font-size: .82rem; color: var(--text-700); line-height: 1.45; margin-top: .2rem; }

/* ── モーダル内：履歴エリア ── */
.reason-history {
  background: var(--bg-50); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .875rem 1rem;
  margin-bottom: 1.25rem;
}
.history-label { font-size: .78rem; color: var(--text-400); font-weight: 600; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .5px; }
.history-row   { display: flex; align-items: center; gap: .75rem; margin-bottom: .35rem; }
.history-date  { font-size: .75rem; color: var(--text-400); }
.history-comment { font-size: .875rem; color: var(--text-700); }

/* ── 起点月表示 ── */
.base-month-display {
  background: var(--blue-100); color: var(--blue-700);
  font-size: .85rem; font-weight: 600; padding: .4rem 1rem;
  border-radius: var(--radius-md); white-space: nowrap; align-self: flex-start;
}

/* ── DB状態インジケーター ── */
.db-status {
  position: fixed; bottom: 1.75rem; left: 1.75rem;
  font-size: .72rem; font-weight: 600; padding: .3rem .85rem;
  border-radius: 999px; z-index: 1500; opacity: .85;
}
.db-status.online { background: rgba(16,185,129,.15); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
.db-status.local  { background: rgba(245,158,11,.12); color: var(--amber); border: 1px solid rgba(245,158,11,.3); }

/* ── モバイル：セクションラベル ── */
.mobile-section-label {
  font-size: .85rem; font-weight: 700; padding: .5rem 0 .5rem;
  margin-top: 1rem; border-bottom: 2px solid currentColor; margin-bottom: .75rem;
  opacity: .85;
}

/* ══════════════════════════════════════
   認証画面
══════════════════════════════════════ */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #f8fafc 0%, #eff6ff 100%);
  padding: 1.5rem;
}
.auth-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-xl);
}
.auth-card-wide { max-width: 500px; }

.auth-logo       { text-align: center; margin-bottom: 2rem; }
.auth-logo-title { font-size: 1.9rem; font-weight: 700; color: var(--blue-700); letter-spacing: .4px; }
.auth-logo-sub   { font-size: .875rem; color: var(--text-500); margin-top: .25rem; }

.auth-icon     { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }
.auth-title    { font-size: 1.4rem; font-weight: 700; text-align: center; color: var(--text-900); margin-bottom: .5rem; }
.auth-subtitle { font-size: .875rem; color: var(--text-500); text-align: center; margin-bottom: 1.25rem; line-height: 1.6; }
.auth-email    { font-size: .875rem; font-weight: 600; color: var(--blue-600); text-align: center; margin-bottom: 1.25rem; }
.auth-hint     { font-size: .82rem; color: var(--text-500); line-height: 1.6; }

.auth-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .35rem; color: var(--text-700); }

.auth-input {
  width: 100%; padding: .7rem .875rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit;
  background: var(--bg-white); color: var(--text-900);
  transition: var(--transition);
}
.auth-input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.auth-input-center { text-align: center; font-size: 1.5rem; letter-spacing: .4rem; }

.auth-btn {
  width: 100%; padding: .8rem;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
  color: #fff; border: none; border-radius: var(--radius-md);
  font-size: 1rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); margin-top: .5rem;
  font-family: inherit;
}
.auth-btn:hover:not(:disabled) { background: linear-gradient(135deg, var(--blue-700), #1e3a8a); transform: translateY(-1px); }
.auth-btn:disabled { background: var(--text-400); cursor: not-allowed; }

.auth-error {
  color: var(--red); font-size: .82rem;
  margin: .5rem 0; min-height: 1.2em; line-height: 1.4;
}
.auth-link {
  display: block; width: 100%; background: none; border: none;
  color: var(--blue-600); font-size: .875rem; cursor: pointer;
  text-align: center; margin-top: .75rem; padding: .4rem;
  border-radius: var(--radius-sm); transition: var(--transition);
  font-family: inherit;
}
.auth-link:hover { background: var(--blue-50); }

/* パスワード表示トグル */
.password-wrapper { position: relative; }
.pw-toggle {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--text-400); padding: .2rem;
}

/* MFAセットアップ */
.qr-wrapper { text-align: center; margin: 1.25rem 0; }
.qr-image   { border: 3px solid var(--blue-200); border-radius: var(--radius-md); }
.qr-canvas  {
  border: 3px solid var(--blue-200);
  border-radius: var(--radius-md);
  display: block;
  margin: 0 auto;
}
/* qrcodejs が生成するdivラッパー */
.qr-div-wrapper {
  display: inline-block;
  padding: 6px;
  background: #fff;
  border: 3px solid var(--blue-200);
  border-radius: var(--radius-md);
}
.qr-div-wrapper img,
.qr-div-wrapper canvas {
  display: block;
}
.mfa-secret-box {
  background: var(--bg-50); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .75rem 1rem;
  text-align: center; margin-bottom: 1.25rem;
}
.mfa-secret-label { font-size: .75rem; color: var(--text-400); margin-bottom: .3rem; }
.mfa-secret-code  { font-size: .95rem; font-weight: 700; color: var(--blue-700); letter-spacing: .1rem; word-break: break-all; }

/* MFA追加後の結果ボックス */
.mfa-result-box {
  margin-top: 1.5rem; background: var(--blue-50);
  border: 1px solid var(--blue-200); border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.mfa-result-box h4 { font-size: 1rem; margin-bottom: .75rem; color: var(--blue-700); }

/* ══════════════════════════════════════
   ヘッダーアクション（ログアウト・管理者リンク）
══════════════════════════════════════ */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
.header-actions { display: flex; align-items: center; gap: .75rem; }
.header-logout-btn {
  background: rgba(255,255,255,.15); color: #fff;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm); padding: .45rem 1rem;
  font-size: .875rem; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: inherit;
}
.header-logout-btn:hover { background: rgba(255,255,255,.25); }
.header-admin-link {
  color: rgba(255,255,255,.9); font-size: .875rem; font-weight: 600;
  text-decoration: none; padding: .45rem 1rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm); transition: var(--transition);
}
.header-admin-link:hover { background: rgba(255,255,255,.15); }

/* Claude バッジ（バージョン情報表示） */
.claude-badge {
  position: relative;
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.95);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-sm);
  padding: .35rem .7rem;
  font-size: .78rem; font-weight: 600;
  letter-spacing: .02em;
  cursor: help;
  user-select: none;
  transition: var(--transition);
}
.claude-badge:hover { background: rgba(255,255,255,.22); }
.claude-badge .claude-badge-emoji { font-size: .9rem; line-height: 1; }
.claude-badge .claude-badge-tooltip {
  position: absolute; top: calc(100% + .4rem); right: 0;
  background: #1f2937; color: #fff;
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  font-size: .72rem; font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
  z-index: 100;
}
.claude-badge:hover .claude-badge-tooltip { opacity: 1; }
.claude-badge .claude-badge-tooltip::before {
  content: ''; position: absolute; top: -4px; right: 14px;
  width: 8px; height: 8px; background: #1f2937;
  transform: rotate(45deg);
}
@media (max-width: 600px) {
  .claude-badge { font-size: .7rem; padding: .28rem .55rem; }
  .claude-badge .claude-badge-tooltip { display: none; }
}

/* ══════════════════════════════════════
   タブC（翌月分）
══════════════════════════════════════ */
.tab-c-summary {
  margin: .75rem 0 1rem;
  padding: .65rem .9rem;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: #333;
  line-height: 1.7;
}
.tab-c-section-header {
  margin-top: 1.25rem;
  margin-bottom: .5rem;
  padding: .45rem .75rem;
  background: linear-gradient(90deg, rgba(37,99,235,.08), transparent);
  border-left: 4px solid var(--blue-600);
  font-weight: 700;
  font-size: .95rem;
  color: var(--blue-600);
  border-radius: 2px;
}
/* 動きなし行：薄黄背景＋左ボーダー */
.data-table tbody tr.no-change-row {
  background: rgba(254, 240, 138, .35);
}
.data-table tbody tr.no-change-row:hover {
  background: rgba(254, 240, 138, .55);
}
.data-table tbody tr.no-change-row td:first-child {
  border-left: 3px solid var(--amber);
}
.no-change-badge {
  display: inline-block;
  margin-left: .35rem;
  padding: .12rem .45rem;
  background: var(--amber);
  color: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

/* ══════════════════════════════════════
   担当者マスター警告モーダル
══════════════════════════════════════ */
.members-warn-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1500;
  padding: 1rem;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.members-warn-card {
  background: #fff;
  border-radius: 12px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  border-top: 6px solid var(--amber);
  animation: popIn .18s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.members-warn-title {
  font-size: 1.15rem; font-weight: 700;
  color: #b45309;
  margin-bottom: .85rem;
}
.members-warn-lead {
  font-size: .92rem; color: #334155;
  margin: .35rem 0; line-height: 1.55;
}
.members-warn-action {
  font-size: 1rem; font-weight: 700;
  color: var(--red);
  margin: .75rem 0;
  padding: .55rem .75rem;
  background: rgba(220, 38, 38, .08);
  border-left: 4px solid var(--red);
  border-radius: 4px;
}
.members-warn-list-wrap {
  margin: 1rem 0 .75rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .7rem .9rem;
  max-height: 200px; overflow-y: auto;
}
.members-warn-list-title {
  font-size: .8rem; color: var(--gray, #6B7280);
  font-weight: 600; margin-bottom: .35rem;
}
.members-warn-list {
  margin: 0; padding-left: 1.2rem;
  font-size: .88rem; color: #1f2937;
  line-height: 1.55;
}
.members-warn-list li { margin: .15rem 0; }
.members-warn-hint {
  font-size: .82rem; color: #64748b;
  margin: .85rem 0 1.1rem;
  line-height: 1.55;
}
.members-warn-actions {
  display: flex; justify-content: flex-end;
  gap: .5rem;
}
.members-warn-close {
  padding: .55rem 1.25rem;
  background: var(--blue-600);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: .9rem; font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.members-warn-close:hover { background: #1d4ed8; }
.members-warn-close:focus { outline: 2px solid var(--blue-600); outline-offset: 2px; }

/* ══════════════════════════════════════
   理由入力モーダル：履歴表示（v4.9）
══════════════════════════════════════ */
.reason-history {
  margin: 1rem 0;
  padding: .85rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.reason-history .history-label {
  font-size: .9rem; font-weight: 700;
  color: var(--navy, #1E3A8A);
  margin-bottom: .65rem;
}
.reason-history .history-loading {
  padding: .5rem; color: var(--gray, #6B7280);
  font-size: .85rem; text-align: center;
}
.reason-history .history-error {
  padding: .5rem; color: var(--red);
  font-size: .85rem; text-align: center;
}
.reason-history .history-list {
  max-height: 320px; overflow-y: auto;
  display: flex; flex-direction: column; gap: .55rem;
}
.history-row {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue-600);
  border-radius: 6px;
  padding: .55rem .75rem;
  font-size: .85rem;
}
.history-row.history-row-locked {
  border-left-color: #9ca3af;
  background: #f9fafb;
}
.history-row-head {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: .35rem;
  flex-wrap: wrap;
}
.history-row-head .history-date {
  font-weight: 600; color: #1f2937;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.history-row-head .history-person {
  background: #eff6ff; color: #1e3a8a;
  padding: .1rem .5rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.history-actions { margin-left: auto; display: flex; gap: .35rem; }
.history-edit-btn, .history-delete-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .15rem .55rem;
  font-size: .75rem;
  cursor: pointer;
  transition: var(--transition);
}
.history-edit-btn:hover { border-color: var(--blue-600); color: var(--blue-600); }
.history-delete-btn:hover { border-color: var(--red); color: var(--red); }
.history-lock {
  font-size: .72rem; color: #6b7280;
  background: #f3f4f6; border-radius: 4px;
  padding: .15rem .5rem;
}
.history-row-code {
  display: flex; gap: .35rem; flex-wrap: wrap;
  margin-bottom: .35rem;
}
.reason-cat-chip {
  background: #fef3c7; color: #92400e;
  padding: .12rem .5rem; border-radius: 4px;
  font-size: .72rem; font-weight: 700;
}
.reason-code-chip {
  background: #dbeafe; color: #1e3a8a;
  padding: .12rem .5rem; border-radius: 4px;
  font-size: .76rem; font-weight: 600;
}
.history-row-comment {
  font-size: .85rem;
  color: #1f2937;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ══════════════════════════════════════
   管理者画面
══════════════════════════════════════ */
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ユーザーバッジ */
.user-badge {
  display: inline-block; padding: .18rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.user-badge.active   { background: rgba(16,185,129,.12); color: var(--green); }
.user-badge.disabled { background: rgba(100,116,139,.1); color: var(--text-400); }
.user-badge.locked   { background: rgba(239,68,68,.1);  color: var(--red); }
.user-badge.admin    { background: rgba(37,99,235,.12); color: var(--blue-700); }
.user-badge.user     { background: var(--bg-100); color: var(--text-500); }

/* 管理者操作ボタン */
.admin-action-group { display: flex; gap: .35rem; flex-wrap: wrap; }
.btn-admin-sm {
  padding: .25rem .65rem; border: 1px solid var(--border);
  background: var(--bg-white); color: var(--text-700);
  border-radius: var(--radius-sm); font-size: .78rem;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
  font-family: inherit;
}
.btn-admin-sm:hover         { background: var(--blue-50); border-color: var(--blue-600); color: var(--blue-700); }
.btn-admin-sm.unlock:hover  { background: rgba(16,185,129,.1); border-color: var(--green); color: var(--green); }
.btn-admin-sm.danger:hover  { background: rgba(239,68,68,.08); border-color: var(--red); color: var(--red); }

/* ── レスポンシブ ── */
@media (max-width: 768px) {
  .container { padding: 0 1rem 2rem; }
  .header-content { padding: 0 1rem; }
  .app-title { font-size: 1.4rem; }
  .upload-grid { grid-template-columns: 1fr; }
  .mapping-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .action-bar { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary { width: 100%; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .data-table th, .data-table td { padding: .65rem .5rem; font-size: .8rem; }
  .toast { left: 1rem; right: 1rem; bottom: 1rem; }

  /* 管理者画面: テーブルのmax-heightを解除しスクロール可能に */
  .table-container { max-height: none !important; overflow-y: visible; }

  /* 管理者画面: 操作ボタンをモバイル向けに拡大 */
  .btn-admin-sm {
    padding: .5rem .9rem;
    font-size: .85rem;
    min-height: 36px;
  }
  .admin-action-group {
    gap: .5rem;
    flex-direction: column;
  }
  .admin-action-group .btn-admin-sm {
    width: 100%;
    text-align: center;
  }

  /* 管理者タブナビを横スクロール対応 */
  .tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: .25rem;
  }
  .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* 承認待ち・ユーザー管理テーブル: 横スクロール */
  #panelPending .table-container,
  #panelUsers .table-container,
  #panelLogs .table-container {
    overflow-x: auto;
  }
}
@media (max-width: 480px) {
  .app-title { font-size: 1.2rem; }
  .kpi-value { font-size: 1.5rem; }
}

/* ══════════════════════════════════════
   申請フォーム / 承認待ち画面 追加スタイル
══════════════════════════════════════ */

/* 申請完了アイコン */
#registerDoneScreen .auth-icon { font-size: 3rem; margin-bottom: 1rem; }

/* 承認待ちバッジ（タブナビ内） */
#pendingBadge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 999px;
  margin-left: .35rem;
  vertical-align: middle;
}

/* 承認待ちパネルのヒント */
#panelPending .filter-hint {
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .82rem;
}

/* 承認待ちテーブルの操作列 */
#pendingTableBody .btn-admin-sm.unlock {
  background: rgba(16,185,129,.08);
  border-color: var(--green);
  color: var(--green);
}
#pendingTableBody .btn-admin-sm.danger {
  background: rgba(239,68,68,.06);
  border-color: var(--red);
  color: var(--red);
}

/* 管理者ユーザー追加フォームのグリッド（氏名列追加で3列対応） */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* モバイル：申請フォームカード */
@media (max-width: 480px) {
  #registerScreen .auth-card,
  #registerDoneScreen .auth-card {
    padding: 1.75rem 1.25rem;
  }
}
