:root {
  color-scheme: light;
  --page:            #f9f9f7;
  --surface-1:        #fcfcfb;
  --text-primary:     #0b0b0b;
  --text-secondary:   #52514e;
  --text-muted:       #898781;
  --gridline:         #e1e0d9;
  --border:           rgba(11,11,11,0.10);
  --series-1:         #2a78d6;   /* blue — progress / primary accent */
  --status-good:      #0ca30c;   /* streak / completed */
  --status-good-bg:   rgba(12,163,12,0.10);
  --status-warning:   #fab219;   /* upcoming deadline */
  --status-critical:  #d03b3b;   /* overdue deadline */
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page:            #0d0d0d;
    --surface-1:        #1a1a19;
    --text-primary:     #ffffff;
    --text-secondary:   #c3c2b7;
    --text-muted:       #898781;
    --gridline:         #2c2c2a;
    --border:           rgba(255,255,255,0.10);
    --series-1:         #3987e5;
    --status-good:      #0ca30c;
    --status-good-bg:   rgba(12,163,12,0.16);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.greeting {
  font-size: 20px;
  font-weight: 700;
}

.date {
  font-size: 13px;
  color: var(--text-muted);
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.quote-card {
  margin-bottom: 16px;
  position: relative;
}

.quote-mark {
  font-size: 40px;
  line-height: 1;
  color: var(--series-1);
  opacity: 0.35;
  font-weight: 700;
  margin-bottom: -8px;
}

.quote-text {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 4px 0 8px;
}

.article-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.stat-tile {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: proportional-nums;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  min-height: 14px;
}

.progress-track {
  height: 6px;
  border-radius: 3px;
  background: var(--gridline);
  overflow: hidden;
  margin-bottom: 24px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: var(--series-1);
  transition: width 0.3s ease;
}

.task-section {
  margin-bottom: 20px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.section-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.prayer-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 20px;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.prayer-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gridline);
  background: var(--surface-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.prayer-circle.done {
  background: var(--status-good);
  border-color: var(--status-good);
}

.prayer-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

.task-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--gridline);
}

.task-item:last-child {
  border-bottom: none;
}

.task-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 7px;
  border: 2px solid var(--gridline);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--surface-1);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.task-check.done {
  background: var(--status-good);
  border-color: var(--status-good);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.task-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  min-width: 0;
}

.task-text {
  font-size: 14px;
}

.task-text.done {
  color: var(--text-muted);
  text-decoration: line-through;
}

.deadline-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.deadline-badge.overdue {
  color: var(--status-critical);
}

.task-delete {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}

.empty-hint {
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 4px;
}

.add-form {
  display: flex;
  gap: 8px;
}

.add-form input[type="text"] {
  flex: 1;
  min-width: 0;
}

.add-form input {
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.deadline-input {
  width: 132px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .deadline-input {
    color-scheme: dark;
  }
}
:root[data-theme="dark"] .deadline-input {
  color-scheme: dark;
}

.add-form input:focus {
  outline: none;
  border-color: var(--series-1);
}

.add-form button {
  border: none;
  background: var(--series-1);
  color: #fff;
  border-radius: 10px;
  width: 40px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
