* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Inter", sans-serif;
}

:root {
  --bg: #000000;
  --card-bg: #f3f3f3;
  --text-primary: #333;
  --text-secondary: #9b9b9b;
  --text-muted: #b3b3b3;
  --text-day: #ccc;
  --border: #d5d5d5;
  --green: #2cff00;
  --green-ritual: #19ff00;
  --bar-dark: #1d1d1f;
  --bar-white: #fff;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: #fff;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

/* ===== DAY HEADER ===== */
.day-header {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.header-line {
  font-size: 19px;
  line-height: 1.4;
}

.date {
  color: var(--text-day);
  font-weight: 400;
}

.brief {
  color: #fff;
  font-weight: 700;
}

.mood {
  color: var(--text-day);
  font-weight: 400;
}

/* ===== PROGRESS BAR — full pill shape ===== */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bar-dark);
  border-radius: 999px;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-bottom: 28px;
}

.progress-bar.active {
  background: var(--bar-white);
  color: #000;
}

.progress-bar.active .progress-label {
  color: #333;
  font-weight: 600;
}

.progress-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.progress-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4a4a4a;
  transition: background 0.2s;
  pointer-events: none;
}

.progress-dot.done {
  background: var(--green);
}

.progress-label {
  font-size: 11px;
  color: var(--text-day);
  font-weight: 500;
  pointer-events: none;
}

/* ===== CARD — background wrapper, clips everything ===== */
.card {
  background: var(--card-bg);
  border-radius: 42px;
  padding: 28px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 0;
}

/* ===== SCREEN — single scrollable area for ALL content ===== */
.screen {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.active {
  display: block;
}

/* ===== SECTION LABELS — fixed at top/bottom ===== */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 14px 0 8px;
  font-weight: 600;
}

.done-section-label {
  margin-top: 24px;
}

/* ===== LISTS — no individual scroll, just flow ===== */
.event-list,
.ritual-list,
.stats-list {
  /* No flex, no overflow — just natural flow inside scrolling screen */
}

/* ===== EVENT & RITUAL rows ===== */
.event,
.ritual {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--border);
  -webkit-user-select: none;
  user-select: none;
}

.event:last-child,
.ritual:last-child {
  border-bottom: none;
}

/* ===== TIME (right side) ===== */
.event-time {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
  width: 50px;
  padding-top: 2px;
  text-align: right;
  padding-left: 20px;
}

/* ===== CHECKBOX (left side) ===== */
.event-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e4e4e4;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: transparent;
  border: none;
  outline: none;
}

.event-check:hover {
  background: #d0d0d0;
}

.event-check.checked {
  background: var(--green);
  color: #333;
}

/* ===== CONTENT areas ===== */
.event-content,
.ritual-content {
  flex: 1;
  min-width: 0;
}

.event-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.event-desc {
  margin-top: 3px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.event-done {
  opacity: 0.4;
}

.event-done .event-title {
  text-decoration: line-through;
}

/* ===== RITUAL ITEM ===== */
.ritual-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.ritual-dot.done {
  background: var(--green-ritual);
  color: #333;
}

.ritual-dot:hover {
  transform: scale(1.1);
}

.ritual-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.ritual-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.ritual-desc {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.3;
}

.ritual-target {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
}

/* ===== STATS ROWS ===== */
.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-values {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.stat-values span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-msg {
  padding: 24px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}
