/* ═══════════════════════════════════════════════════════════
   MY HEALTH TRACKER — Tween-focused dark mode UI
═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2230;
  --border: #2a2f42;
  --teal: #00b4a6;
  --teal-dim: #007d75;
  --text: #e8eaf0;
  --text-muted: #7b8097;
  --text-dim: #4a5068;
  --rose: #f05a7a;
  --green: #3dd68c;
  --yellow: #f5c842;
  --radius: 14px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* ─── PIN SCREEN ─────────────────────────────────────────── */

.pin-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.pin-box {
  width: 100%;
  max-width: 340px;
  padding: 2rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.pin-logo { margin-bottom: 0.25rem; }

.pin-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.pin-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pin-dots {
  display: flex;
  gap: 16px;
  margin: 0.5rem 0;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.dot.filled {
  background: var(--teal);
  border-color: var(--teal);
}

.dot.error {
  background: var(--rose);
  border-color: var(--rose);
}

.pin-dots-sm { margin: 0.75rem 0 0.25rem; }
.pin-dots-sm .dot { width: 13px; height: 13px; }

.pin-error {
  font-size: 0.82rem;
  color: var(--rose);
  min-height: 1.2em;
  text-align: center;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 280px;
  margin-top: 0.25rem;
}

.key-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  padding: 1rem 0;
  cursor: pointer;
  transition: background 0.1s, transform 0.08s;
  user-select: none;
}

.key-btn:active { background: var(--bg2); transform: scale(0.96); }
.key-btn.key-empty { background: transparent; border-color: transparent; cursor: default; }
.key-btn.key-del { font-size: 1.1rem; color: var(--text-muted); }

/* ─── APP SHELL ──────────────────────────────────────────── */

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 80px;
}

/* ─── HEADER ─────────────────────────────────────────────── */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1rem 0.75rem;
}

.greeting {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.header-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.streak-pill {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.35rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

.streak-fire { font-size: 1rem; }
#streak-count { font-weight: 700; color: var(--yellow); }
.streak-label { color: var(--text-muted); font-size: 0.78rem; }

/* ─── TAB BAR ────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0.6rem 0 0.5rem;
  cursor: pointer;
  font-size: 0.7rem;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.tab-icon { font-size: 1rem; }
.tab-label { font-size: 0.68rem; font-weight: 500; }

/* ─── TAB CONTENT ────────────────────────────────────────── */

.tab-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 0.1rem;
  margin-top: 0.25rem;
}

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

/* ─── COMPLETION RING CARD ───────────────────────────────── */

.completion-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ring-wrap {
  position: relative;
  flex-shrink: 0;
}

.progress-ring {
  display: block;
}

.ring-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.ring-pct {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.ring-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ring-fill {
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4,0,0.2,1);
}

.completion-meta {
  flex: 1;
}

.completion-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.completion-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── CHECKLIST ──────────────────────────────────────────── */

.checklist-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.checklist-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

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

.checklist-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: background 0.1s;
}
.checklist-row:active { background: var(--bg3); }

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.checklist-item.done .checklist-checkbox {
  background: var(--teal);
  border-color: var(--teal);
}

.checkmark {
  display: none;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.checklist-item.done .checkmark { display: block; }

.checklist-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}

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

.checklist-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ─── SITS LIST ──────────────────────────────────────────── */

.sits-count { float: right; color: var(--teal); font-weight: 600; font-size: 0.75rem; }

.sits-list, .bms-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.log-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.88rem;
}

.log-entry-left { display: flex; flex-direction: column; gap: 2px; }
.log-entry-time { font-weight: 600; color: var(--teal); font-size: 0.82rem; }
.log-entry-detail { color: var(--text-muted); font-size: 0.8rem; }

.btn-delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.btn-delete:hover { color: var(--rose); }

.btn-log-sit, .btn-log-bm {
  width: 100%;
  background: var(--bg3);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem;
  cursor: pointer;
  transition: background 0.1s, border-color 0.15s;
}

.btn-log-sit:active, .btn-log-bm:active { background: var(--bg2); }

/* ─── NOTES ──────────────────────────────────────────────── */

.notes-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  resize: none;
  min-height: 70px;
  outline: none;
}

.notes-input::placeholder { color: var(--text-dim); }

/* ─── STATS TAB ──────────────────────────────────────────── */

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 0.5rem;
  text-align: center;
}

.stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── PHASE STEPS ────────────────────────────────────────── */

.phase-card { padding: 1.25rem 1rem; }

.phase-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  margin-bottom: 1rem;
}

.phase-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.phase-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg3);
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 6px;
}

.phase-step.active .phase-dot {
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0,180,166,0.2);
}

.phase-step.completed .phase-dot {
  background: var(--teal-dim);
  border-color: var(--teal-dim);
}

.phase-connector {
  flex: none;
  width: 20px;
  height: 2px;
  background: var(--border);
  margin-top: 9px;
}

.phase-step-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
}

.phase-step.active .phase-step-name { color: var(--teal); }

.phase-step-desc {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 2px;
}

.phase-current-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* ─── WEEKLY CHART ───────────────────────────────────────── */

.chart-card { padding: 1rem; }

.chart-legend-row {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-dot.teal { background: var(--teal); }
.legend-dot.rose { background: var(--rose); }

.weekly-chart {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 100px;
}

.chart-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bars {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  flex: 1;
  width: 100%;
  justify-content: center;
}

.chart-bar {
  width: 8px;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.4s;
}

.chart-bar.teal { background: var(--teal); }
.chart-bar.rose { background: var(--rose); }

.chart-day-label {
  font-size: 0.62rem;
  color: var(--text-dim);
  text-align: center;
}

/* ─── GOALS ──────────────────────────────────────────────── */

#goals-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }

.goal-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
}

.goal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

.goal-text {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text);
}

.add-goal-form {
  display: flex;
  gap: 0.5rem;
}

.goal-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  font-family: var(--font);
  outline: none;
}

.goal-input:focus { border-color: var(--teal); }

.btn-add-goal {
  background: var(--teal);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-add-goal:active { opacity: 0.8; }

/* ─── HISTORY TABLE ──────────────────────────────────────── */

.table-card { padding: 0; overflow: hidden; }

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.history-table th {
  background: var(--bg3);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.6rem 0.6rem;
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.history-table td {
  padding: 0.55rem 0.6rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.history-table tr:last-child td { border-bottom: none; }
.history-table tr:nth-child(even) td { background: rgba(255,255,255,0.015); }

.td-yes { color: var(--green); font-weight: 600; }
.td-no { color: var(--text-dim); }

/* ─── INFO TAB ───────────────────────────────────────────── */

.info-hero {
  background: linear-gradient(135deg, #0d2220 0%, #0f1117 100%);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.info-hero-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.info-hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text);
}

.info-card p + p { margin-top: 0.75rem; }

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.info-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.88rem;
  color: var(--text);
}

.info-list li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--teal);
}

.info-note {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

/* ─── COLLAPSIBLE ────────────────────────────────────────── */

.collapsible { padding: 0; overflow: hidden; }

.collapse-btn {
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font);
  text-align: left;
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.collapse-arrow {
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.collapse-body {
  padding: 0 1rem 1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.collapse-body.hidden { display: none; }

.bristol-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.bristol-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bristol-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.type-great { background: rgba(61,214,140,0.2); color: var(--green); }
.type-ok { background: rgba(245,200,66,0.18); color: var(--yellow); }
.type-bad { background: rgba(240,90,122,0.18); color: var(--rose); }

.bristol-desc { font-size: 0.85rem; color: var(--text-muted); }
.bristol-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ─── SETTINGS TAB ───────────────────────────────────────── */

.settings-card { display: flex; flex-direction: column; gap: 0; }

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
.setting-row:first-child { padding-top: 0; }

.setting-label {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.setting-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.setting-input-text {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  font-family: var(--font);
  outline: none;
  width: 130px;
  text-align: right;
}

.setting-input-num {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.45rem 0.7rem;
  font-family: var(--font);
  outline: none;
  width: 80px;
  text-align: right;
}

.setting-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.45rem 0.5rem;
  font-family: var(--font);
  outline: none;
  max-width: 160px;
}

.btn-change-pin {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: background 0.1s;
}
.btn-change-pin:active { background: var(--bg2); }

/* ─── MODALS ─────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.modal-box {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.5rem 1.25rem 2rem;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-align: center;
}

.modal-body-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
}

.modal-field { display: flex; flex-direction: column; gap: 0.35rem; }
.modal-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); letter-spacing: 0.05em; }

.modal-input, .modal-select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
  font-family: var(--font);
  outline: none;
  width: 100%;
}

.modal-input:focus, .modal-select:focus { border-color: var(--teal); }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.btn-primary {
  background: var(--teal);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.15s;
}
.btn-primary:active { opacity: 0.85; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  padding: 0.7rem;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.1s;
}
.btn-ghost:active { background: var(--bg3); }

.checkbox-field { flex-direction: row; align-items: center; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text);
  user-select: none;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 20px; height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border);
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--teal);
  border-color: var(--teal);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '\2713';
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ─── FLEET ENEMA TYPE PILLS ─────────────────────────────── */

.fleet-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem;
}

.fleet-pill {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  padding: 0.65rem 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, border-color 0.15s, color 0.1s;
}

.fleet-pill:active { background: var(--bg2); }

.fleet-pill.active {
  background: rgba(0,180,166,0.15);
  border-color: var(--teal);
  color: var(--teal);
  font-weight: 600;
}

.enema-type-dot {
  cursor: help;
}

/* ─── ENEMA DETAIL MODAL ─────────────────────────────────── */

.modal-label-hint {
  font-weight: 400;
  color: var(--teal);
  font-size: 0.72rem;
  letter-spacing: 0;
}

/* Time quick-pick pills row */
.time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.1rem 0 0.25rem;
}

.time-pill {
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: var(--font);
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  transition: background 0.1s, border-color 0.15s, color 0.1s;
  min-width: 42px;
  text-align: center;
  line-height: 1.1;
}

.time-pill-unit {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-muted);
}

.time-pill:active { background: var(--bg2); }

.time-pill.active {
  background: rgba(0,180,166,0.15);
  border-color: var(--teal);
  color: var(--teal);
}

/* Target range highlight (5-10 min) */
.time-pill.target {
  border-color: var(--teal-dim);
}

.time-pill.target .time-pill-unit { color: var(--teal-dim); }

.time-pill.target.active {
  background: rgba(0,180,166,0.22);
  border-color: var(--teal);
}

/* ─── CHECKLIST ENEMA DETAIL ROW ─────────────────────────── */

.checklist-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.checklist-enema-detail {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 400;
}

.enema-detail-prompt {
  color: var(--text-dim);
  cursor: pointer;
}

.enema-detail-prompt:active { color: var(--teal); }

/* ─── TOAST ──────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  padding: 0.6rem 1.25rem;
  border-radius: 99px;
  z-index: 600;
  pointer-events: none;
  white-space: nowrap;
  animation: fadeToast 2.5s ease forwards;
}

@keyframes fadeToast {
  0%   { opacity: 0; transform: translateX(-50%) translateY(8px); }
  15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ═══ TASK DIRECTIONS ═══ */
.checklist-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  flex-shrink: 0;
}
.dir-expand-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 1rem;
  background: #141824;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  letter-spacing: 0.03em;
}
.dir-expand-btn:hover { background: #1a2030; }
.dir-arrow { transition: transform 0.2s; display: inline-block; }
.dir-expand-btn.open .dir-arrow { transform: rotate(180deg); }
.task-directions {
  background: #141824;
  border-top: 1px solid var(--border);
  padding: 1rem 1rem 1rem 1.25rem;
}
.dir-step {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}
.dir-num {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.7rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.dir-text {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.dir-tip {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: rgba(0,180,166,0.08);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  font-size: 0.8rem;
  color: #7ecac5;
  line-height: 1.5;
}
