/* =========================================
   Два ритма — premium calm sleep tracker
   ========================================= */

:root {
  --bg: #FBF8F4;
  --bg-soft: #F4EFE8;
  --surface: #FFFFFF;
  --surface-2: #F8F4ED;
  --border: #ECE5DB;
  --border-soft: #F2EDE4;

  --text: #2A2638;
  --text-2: #6E6883;
  --text-3: #A39DB3;

  --wife: #D89AA5;
  --wife-soft: #FBEBEE;
  --wife-tint: rgba(216, 154, 165, 0.12);

  --husband: #8FA8C4;
  --husband-soft: #ECF1F7;
  --husband-tint: rgba(143, 168, 196, 0.12);

  --accent: #B8A5D9;
  --accent-soft: #F0EAF8;

  --good: #A8C5A2;
  --warn: #D9B98F;

  --shadow-soft: 0 1px 2px rgba(42, 38, 56, 0.04), 0 4px 16px rgba(42, 38, 56, 0.04);
  --shadow-card: 0 1px 0 rgba(42, 38, 56, 0.02), 0 6px 24px rgba(42, 38, 56, 0.05);

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", Georgia, serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: contain;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }

/* =========================================
   APP LAYOUT
   ========================================= */

#app {
  max-width: 540px;
  margin: 0 auto;
  padding: 0 var(--space-5) calc(var(--space-9) + 72px);
  position: relative;
}

.screen {
  display: none;
  padding-top: var(--space-6);
  animation: fadeIn 0.4s ease;
}

.screen.active {
  display: block;
}

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

/* =========================================
   WELCOME SCREEN
   ========================================= */

[data-screen="welcome"] {
  min-height: 100vh;
  min-height: 100dvh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-5);
}

[data-screen="welcome"].active {
  display: flex;
}

.welcome-inner {
  max-width: 420px;
  text-align: center;
}

.logo-mark {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.brand-name {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-6);
}

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.1;
  font-weight: 500;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.welcome-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.welcome-subtitle {
  font-size: 16px;
  color: var(--text-2);
  margin-bottom: var(--space-8);
  line-height: 1.55;
}

.welcome-foot {
  margin-top: var(--space-6);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

/* =========================================
   SCREEN HEADER
   ========================================= */

.screen-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.screen-header h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.screen-header .header-spacer {
  width: 36px;
  flex-shrink: 0;
}

.screen-intro {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: var(--space-6);
  line-height: 1.55;
}

.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.2s;
}

.btn-back:hover { background: var(--bg-soft); }
.btn-back:active { background: var(--border); }

/* =========================================
   BUTTONS
   ========================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  min-height: 48px;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 16px rgba(42, 38, 56, 0.12);
}

.btn-primary:hover { background: #1f1c2c; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-2); }

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-full { width: 100%; }

/* =========================================
   INPUTS
   ========================================= */

.field {
  margin-bottom: var(--space-4);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.field-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.field-label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.input-narrow { max-width: 100px; }

.textarea {
  min-height: 84px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

input[type="time"] {
  font-variant-numeric: tabular-nums;
}

.duration-input {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.duration-input span {
  color: var(--text-2);
  font-size: 14px;
}

/* =========================================
   PROFILES
   ========================================= */

.profiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  transition: border-color 0.2s;
}

.profile-card:focus-within { border-color: var(--accent); }

.profile-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--space-4);
}

.profile-wife { border-left: 3px solid var(--wife); }
.profile-wife .profile-tag { color: var(--wife); }

.profile-husband { border-left: 3px solid var(--husband); }
.profile-husband .profile-tag { color: var(--husband); }

/* =========================================
   TODAY SCREEN
   ========================================= */

.day-header {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-5);
}

.day-counter {
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.day-counter b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.day-counter-of {
  color: var(--text-3);
  text-transform: none;
  letter-spacing: 0.04em;
}

.day-date {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.screen-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: var(--space-2);
  letter-spacing: -0.015em;
}

.screen-subtitle {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: var(--space-5);
  line-height: 1.5;
}

.people-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.person-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.person-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}

.person-card:active { transform: scale(0.99); }

.person-card .person-glow {
  position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  pointer-events: none;
}

.person-card-wife .person-glow { background: var(--wife); }
.person-card-husband .person-glow { background: var(--husband); }

.person-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  position: relative;
}

.person-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.person-name-empty {
  color: var(--text-3);
  font-style: italic;
  font-weight: 400;
}

.person-status {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-soft);
  color: var(--text-3);
}

.person-status.filled {
  background: var(--accent-soft);
  color: var(--accent);
}

.person-card-wife .person-status.filled {
  background: var(--wife-soft);
  color: var(--wife);
}

.person-card-husband .person-status.filled {
  background: var(--husband-soft);
  color: var(--husband);
}

.person-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-3);
  position: relative;
}

.person-quick-cell {
  text-align: left;
}

.person-quick-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.person-quick-value {
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.person-quick-value.empty { color: var(--text-3); }

.quick-actions {
  margin-top: var(--space-2);
}

/* =========================================
   ENTRY FORM
   ========================================= */

.entry-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.entry-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.entry-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-4);
  letter-spacing: -0.005em;
}

.section-hint {
  font-size: 13px;
  color: var(--text-3);
  margin-top: var(--space-2);
  line-height: 1.5;
}

/* Segmented control */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 2px;
}

.segmented-mini {
  padding: 3px;
}

.segmented-mini { font-size: 13px; }

.segmented button {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.2s, color 0.2s;
  min-height: 36px;
}

.segmented-mini button {
  padding: 7px 10px;
  font-size: 13px;
  min-height: 30px;
}

.segmented button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(42, 38, 56, 0.06);
}

/* Time grid */
.time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.duration-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px var(--space-4);
}

.duration-label {
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.04em;
}

.duration-value {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Counter */
.counter {
  display: inline-flex;
  align-items: center;
  background: var(--bg-soft);
  border-radius: 100px;
  padding: 4px;
}

.counter button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(42, 38, 56, 0.06);
}

.counter button:active { transform: scale(0.92); }

.counter-value {
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Rating */
.rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}

.rating button {
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text-2);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.rating button:hover { color: var(--text); }

.rating button.active {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(184, 165, 217, 0.18);
}

.rating-large button {
  height: auto;
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rating-large .emoji {
  font-size: 24px;
  line-height: 1;
}

.rating-large .rating-num {
  font-size: 12px;
  color: var(--text-3);
}

.rating-large button.active .rating-num {
  color: var(--text);
}

.rating-legend {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
  margin-top: var(--space-2);
  letter-spacing: 0.04em;
}

/* Attribution chip */
.attr-chip {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: all 0.2s;
  min-height: auto;
}

.attr-chip[data-value="partner"] {
  background: var(--bg-soft);
  color: var(--text-3);
}

/* =========================================
   MORNING RITUAL
   ========================================= */

.morning-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.morning-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.morning-card-wife { border-left: 3px solid var(--wife); }
.morning-card-husband { border-left: 3px solid var(--husband); }

.morning-card-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.morning-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.morning-metric-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.morning-metric-value {
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.morning-metric-value.empty {
  color: var(--text-3);
  font-weight: 400;
  font-size: 13px;
  font-style: italic;
}

.shared-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

/* =========================================
   PROGRESS
   ========================================= */

.progress-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.progress-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-align: center;
}

.progress-stat-value {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}

.progress-stat-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: var(--space-4);
}

.calendar-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  transition: all 0.2s;
}

.calendar-cell.today {
  border-color: var(--accent);
  border-width: 2px;
}

.calendar-cell .day-num {
  font-size: 13px;
}

.calendar-cell .day-status {
  width: 16px;
  height: 4px;
  border-radius: 100px;
  margin-top: 4px;
  background: var(--bg-soft);
}

.calendar-cell.dot-one .day-status { background: var(--accent); }
.calendar-cell.dot-both .day-status {
  background: linear-gradient(to right, var(--wife) 0% 50%, var(--husband) 50% 100%);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: 12px;
  color: var(--text-2);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 12px;
  height: 6px;
  border-radius: 100px;
  display: inline-block;
}

.dot-both { background: linear-gradient(to right, var(--wife) 0% 50%, var(--husband) 50% 100%); }
.dot-one { background: var(--accent); }
.dot-empty { background: var(--bg-soft); border: 1px solid var(--border); }

/* =========================================
   ANALYSIS
   ========================================= */

.analysis-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
}

.analysis-tabs::-webkit-scrollbar { display: none; }

.analysis-tab {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: all 0.2s;
  min-height: 32px;
}

.analysis-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(42, 38, 56, 0.06);
}

.analysis-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.analysis-block-wife { border-left: 3px solid var(--wife); }
.analysis-block-husband { border-left: 3px solid var(--husband); }
.analysis-block-shared {
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
}

.analysis-block-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.analysis-metric {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
}

.analysis-metric-label {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.analysis-metric-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.analysis-metric-suffix {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 4px;
}

.patterns-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pattern {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  position: relative;
  padding-left: var(--space-5);
}

.pattern::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.pattern-good::before { background: var(--good); }
.pattern-warn::before { background: var(--warn); }

.pattern-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
}

.pattern-detail {
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.01em;
}

.patterns-empty {
  font-size: 13px;
  color: var(--text-3);
  font-style: italic;
  padding: var(--space-3);
  text-align: center;
}

.analysis-disclaimer {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  font-style: italic;
}

/* =========================================
   NORMS
   ========================================= */

.norms-cards {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.norm-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.norm-card-age {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.norm-card-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.norm-card-value-suffix {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

.norms-disclaimer {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: var(--space-6);
}

.norms-tips {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tips-list li {
  position: relative;
  padding: var(--space-3) 0 var(--space-3) var(--space-5);
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

.tips-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.tips-list li:not(:last-child) {
  border-bottom: 1px solid var(--border-soft);
}

/* =========================================
   BOTTOM NAV
   ========================================= */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(251, 248, 244, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 10;
}

.bottom-nav[hidden] { display: none; }

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 0;
  color: var(--text-3);
  transition: color 0.2s;
  min-height: 48px;
}

.nav-btn.active {
  color: var(--text);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
}

.nav-label {
  font-size: 10px;
  letter-spacing: 0.04em;
}

/* =========================================
   TOAST
   ========================================= */

.toast {
  position: fixed;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(42, 38, 56, 0.18);
  z-index: 100;
  animation: toastIn 0.3s ease;
}

.toast[hidden] { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================================
   DESKTOP LAYOUT
   ========================================= */

@media (min-width: 720px) {
  #app {
    padding: var(--space-6) var(--space-5) calc(var(--space-9) + 72px);
  }

  [data-screen="welcome"] .welcome-title { font-size: 56px; }

  .profiles-grid { grid-template-columns: 1fr 1fr; }

  .people-cards { grid-template-columns: 1fr 1fr; }

  .time-grid { grid-template-columns: repeat(4, 1fr); }

  .analysis-metrics { grid-template-columns: repeat(4, 1fr); }

  .morning-grid { grid-template-columns: 1fr 1fr; }

  .morning-metrics { grid-template-columns: repeat(2, 1fr); }

  .entry-form { gap: var(--space-5); }
}

@media (min-width: 960px) {
  #app { max-width: 720px; }
}

/* =========================================
   SLEEP & HEALTH ARTICLE
   ========================================= */

.health-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.health-block-warn { border-left: 3px solid var(--warn); }
.health-block-good { border-left: 3px solid var(--good); }

.health-block-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.health-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.health-block-warn .health-icon { background: rgba(217, 185, 143, 0.18); color: var(--warn); }
.health-block-good .health-icon { background: rgba(168, 197, 162, 0.18); color: var(--good); }

.health-block-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.health-lead {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.55;
  margin-bottom: var(--space-4);
}

.health-section {
  padding: 10px 0;
  border-top: 1px solid var(--border-soft);
}

.health-section:first-of-type { border-top: none; padding-top: 0; }

.health-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.health-section p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

.health-summary {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}

.health-summary p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.55;
}

@media (min-width: 720px) {
  .health-block-title { font-size: 22px; }
}
