
/* ============================================================
   👁 READABILITY OVERRIDE  2026-07-01
   Notion風より視認性最優先。カラーバー禁止・グラデ禁止は継続
   ============================================================ */

:root {
  /* コントラスト強化 */
  --text: #111827;         /* 濃い黒寄り(元 #37352f) */
  --text-sub: #374151;     /* 中間グレー(元 #787774) */
  --text-muted: #6b7280;   /* 薄グレー(元 #9b9a97) */
  --border: #d1d5db;       /* 罫線もハッキリ */
  --border-light: #e5e7eb;
  --accent: #2563eb;       /* 濃いブルー */
  --accent-hover: #1d4ed8;
  --accent-subtle: #dbeafe;
  --bg-hover: #f3f4f6;
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-callout: #f9fafb;
}

/* ---- Base ---- */
body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  padding: 32px 40px 30vh;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .container { padding: 20px 16px 30vh; }
}

/* ---- Headings ---- */
.page-heading, h1.page-heading {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  margin: 8px 0 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h2, .section-heading, .section-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 16px !important;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

/* ---- Section spacing ---- */
main > .container > * {
  margin-bottom: 40px;
}
#todayTimelineSection, #weeklyFocusSection, #todayColumns, #waitingSection, #somedaySection, #upcomingSection, #calendarSection, #kpiBar {
  margin-bottom: 48px !important;
}

/* ---- Weekly Focus カード大きく ---- */
#weeklyFocusSection {
  background: #fefce8;
  border: 2px solid #fde68a;
  border-radius: 12px;
  padding: 24px 28px;
}
#weeklyFocusSection h2, #weeklyFocusSection .section-title {
  font-size: 22px !important;
  color: #78350f !important;
  margin-bottom: 20px !important;
}
#weeklyFocusSection .focus-item, #weeklyFocusSection .task-row, #weeklyFocusSection li {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 10px;
  font-size: 17px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---- タスク行 高さ確保 ---- */
.task-row, .task-item, .tasks-table tbody tr, .task-card {
  min-height: 52px;
  padding: 12px 16px;
  font-size: 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background 20ms ease-in;
}
.task-row:hover, .task-item:hover, .tasks-table tbody tr:hover, .task-card:hover {
  background: var(--bg-hover);
}
.task-title, .task-row-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.task-meta, .task-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Tables ---- */
.tasks-table {
  font-size: 15px;
  width: 100%;
}
.tasks-table th {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  padding: 12px 8px;
  border-bottom: 2px solid var(--border);
  background: var(--bg-hover);
  text-align: left;
}
.tasks-table td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}
.tasks-table tbody tr:hover {
  background: var(--bg-hover);
}

/* ---- Buttons ---- */
button, .btn, .nav-tab, .modal-btn, .retry-btn, .login-btn {
  font-size: 15px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 8px;
  min-height: 40px;
  color: var(--text);
  transition: background 20ms ease-in, border-color 20ms ease-in;
}
.nav-tab {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px 8px 0 0;
  color: var(--text-sub);
}
.nav-tab.active {
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
  background: var(--accent-subtle);
}
button:hover, .btn:hover {
  background: var(--bg-hover);
}
.modal-btn-primary, .login-btn {
  background: var(--accent);
  color: white;
  border: none;
}
.modal-btn-primary:hover, .login-btn:hover {
  background: var(--accent-hover);
}

/* ---- Checkbox 大きく ---- */
.task-check, input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.task-check:hover {
  border-color: var(--accent);
}

/* ---- Tags/Badges ---- */
.tag, .badge, .chip, .status-badge, .category-badge, .person-badge {
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip-danger, .badge-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.chip-warn {
  background: #fef3c7 !important;
  color: #92400e !important;
}

/* ---- Header ---- */
.header {
  background: var(--bg-page);
  border-bottom: 2px solid var(--border-light);
  padding: 16px 0;
}
.header-inner {
  max-width: 1000px;
  padding: 0 40px;
}
.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.header-datetime, .header-time {
  font-size: 14px;
  color: var(--text-sub);
  font-weight: 500;
}

/* ---- Callout sections ---- */
#waitingSection, #somedaySection, #upcomingSection, #backlogSection {
  background: var(--bg-callout);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 24px;
}
#waitingSection h2::before { content: "⏳ "; }
#somedaySection h2::before { content: "📦 "; }

/* ---- Login screen ---- */
.login-card {
  max-width: 400px;
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-page);
}
.login-card h1 {
  font-size: 24px;
  color: var(--text);
  margin-bottom: 8px;
}
.login-card p {
  color: var(--text-sub);
  margin-bottom: 20px;
}
.login-input {
  font-size: 16px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 100%;
  color: var(--text);
}
.login-input:focus {
  border-color: var(--accent);
  outline: none;
}
.login-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 12px;
  cursor: pointer;
}

/* ---- Loading/Error ---- */
.loading-screen, .error-screen {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-sub);
}
.error-message {
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  margin: 12px 0;
}

/* ---- KPI Bar ---- */
#kpiBar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.kpi-card .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.kpi-card .value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

/* ---- Footer ---- */
.footer {
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 13px;
}

/* ---- Modal 見やすく ---- */
.modal-card {
  padding: 28px;
  border-radius: 12px;
  max-width: 480px;
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.modal-subtitle {
  color: var(--text-sub);
  margin-bottom: 20px;
}
.modal-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  display: block;
  margin-bottom: 6px;
}
.modal-field input, .modal-field textarea {
  font-size: 15px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  width: 100%;
  color: var(--text);
}

/* ---- モバイル ---- */
@media (max-width: 700px) {
  .page-heading, h1.page-heading { font-size: 26px; }
  h2, .section-heading { font-size: 18px !important; }
  .task-title { font-size: 16px; }
  .container { padding: 16px 12px 20vh; }
  #weeklyFocusSection { padding: 18px 16px; }
  .nav-tab { padding: 10px 14px; }
}
