
:root {
  --bg: #f1eee6;
  --surface: #fbfaf6;
  --surface-2: #e8e3d8;
  --text: #1c211e;
  --muted: #707771;
  --primary: #2f3d36;
  --primary-text: #ffffff;
  --border: rgba(28, 33, 30, .12);
  --shadow: 0 18px 42px rgba(25, 31, 28, .08);
}

body.dark {
  --bg: #101311;
  --surface: #171b18;
  --surface-2: #222721;
  --text: #efefe9;
  --muted: #a9b0aa;
  --primary: #d9e2dc;
  --primary-text: #142019;
  --border: rgba(255,255,255,.1);
  --shadow: 0 18px 42px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, select, textarea { font: inherit; }
button { cursor: pointer; }

.app {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 20px 110px;
}

.screen { display: none; }
.screen.active { display: block; }

.welcome-screen {
  min-height: calc(100vh - 48px);
  flex-direction: column;
  justify-content: space-between;
}

.welcome-screen.active { display: flex; }

.welcome-center {
  flex: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.welcome-center h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 14vw, 6rem);
  font-weight: 400;
}

.horizon {
  width: 180px;
  height: 1px;
  margin: 22px auto;
  background: currentColor;
  opacity: .35;
}

.welcome-center p {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
}

.header, .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h2, .section-header h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 400;
}

small {
  color: var(--muted);
  letter-spacing: .12em;
  font-weight: 700;
  font-size: .72rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.hero {
  margin: 28px 0 18px;
  min-height: 190px;
  padding: 28px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(160deg, #65776d, #28362f 72%);
  color: white;
  box-shadow: var(--shadow);
}

.hero p, .hero strong {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1.35;
}

.quick-grid, .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 110px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}

.quick-card span { font-size: 1.8rem; }
.quick-card strong, .quick-card small { display: block; }
.quick-card small { margin-top: 5px; line-height: 1.35; letter-spacing: normal; font-weight: 400; }

.dark-card { background: #080908; color: #fff; }
.dark-card small { color: #aaa; }

.card {
  margin: 18px 0;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card blockquote, .quote-center blockquote {
  margin: 18px 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  line-height: 1.45;
}

.stats article {
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.stats strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .85rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.chip, .check-buttons button {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.chip.selected {
  background: var(--primary);
  color: var(--primary-text);
}

select, textarea {
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  margin-bottom: 18px;
}

textarea { resize: vertical; }

.primary, .secondary {
  border-radius: 14px;
  padding: 16px;
  font-weight: 700;
}

.primary {
  border: 0;
  background: var(--primary);
  color: var(--primary-text);
}

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

.wide { width: 100%; }

.immersive {
  min-height: calc(100vh - 150px);
  position: relative;
}

.top-exit {
  position: absolute;
  top: 0;
  right: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.timer-center, .anchor-center, .quote-center {
  min-height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timer-display {
  margin: 28px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5rem, 20vw, 7rem);
  font-variant-numeric: tabular-nums;
}

.timer-center .primary, .anchor-center .primary, .quote-center .primary, .quote-center .secondary {
  max-width: 360px;
  margin-top: 12px;
}

.breath-orb, .monastery-orb {
  width: 90px;
  height: 90px;
  margin: 34px 0;
  border-radius: 50%;
  background: var(--primary);
  animation: breathe 8s ease-in-out infinite;
}

.anchor-center h2 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 2rem;
}

.anchor-center p {
  max-width: 420px;
  min-height: 68px;
  color: var(--muted);
  line-height: 1.55;
}

.check-buttons {
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 24px 0;
}

.check-buttons button {
  border-radius: 14px;
  padding: 16px;
}

.hidden { display: none !important; }

.monastery-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #050505;
  color: white;
}

.monastery-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.monastery-orb {
  width: 120px;
  height: 120px;
  background: #f2f1eb;
}

.monastery-time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  font-variant-numeric: tabular-nums;
}

.monastery-center p { color: #aaa; }

.light-btn, .ghost-btn {
  width: min(300px, 76vw);
  padding: 15px;
  border-radius: 999px;
  font-weight: 700;
}

.light-btn {
  margin-top: 24px;
  border: 0;
  background: #f2f1eb;
  color: #111;
}

.ghost-btn {
  margin-top: 10px;
  border: 1px solid #444;
  background: transparent;
  color: #ddd;
}

.monastery-exit { color: #aaa; top: 22px; right: 22px; }

.list-item {
  margin-bottom: 10px;
  padding: 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.list-item strong { display: block; margin-bottom: 6px; }
.list-item small { letter-spacing: normal; font-weight: 400; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 536px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px;
  gap: 6px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  z-index: 20;
}

.bottom-nav button {
  padding: 12px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.bottom-nav button.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
}

@keyframes breathe {
  0%, 100% { transform: scale(.72); opacity: .55; }
  50% { transform: scale(1.18); opacity: 1; }
}

@media (max-width: 430px) {
  .app { padding-left: 14px; padding-right: 14px; }
  .quick-grid { grid-template-columns: 1fr; }
}
