:root {
  --bg: #f5f1ea;
  --bg-soft: #ede7dc;
  --ink: #2a2622;
  --ink-soft: #6b6258;
  --ink-faint: #a39c91;
  --accent: #7a8c6f;
  --accent-soft: #c7d0bd;
  --border: #d9d2c4;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Cormorant Garamond", "Noto Serif TC", "Songti TC", "Songti SC", serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  max-width: 540px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  letter-spacing: 0.04em;
}

/* === Home === */
.home-header {
  margin-top: 16px;
  margin-bottom: 36px;
}
.home-eyebrow {
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.4em;
  margin-bottom: 18px;
  font-weight: 400;
}
.home-title {
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 18px;
  white-space: pre-line;
  letter-spacing: -0.005em;
  font-style: italic;
}
.home-sub {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.65;
  white-space: pre-line;
  letter-spacing: 0.01em;
  font-style: normal;
}

.day-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.day-card {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  transition: transform .15s ease, background .2s ease;
}
.day-card:hover {
  background: #e6dfd0;
}
.day-card:active {
  transform: scale(0.99);
}
.day-card.done {
  background: #eee9dc;
  border-color: #cfc6b3;
}
.day-card-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 6px;
}
.day-num {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  min-width: 48px;
}
.day-title {
  font-size: 18px;
  font-weight: 500;
}
.day-check {
  margin-left: auto;
  font-size: 14px;
  color: var(--accent);
}
.day-sub {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
  padding-left: 62px;
}

/* === Intro screen === */
.intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 48px 8px;
}
.intro-num {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  margin-bottom: 18px;
}
.intro-title {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 20px;
}
.intro-sub {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.8;
  max-width: 320px;
  margin: 0 auto 40px;
}
.intro-meta {
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  margin-bottom: 56px;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  padding: 14px 40px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.2em;
  display: inline-block;
}
.btn-primary:active { opacity: 0.85; }

.btn-text {
  color: var(--ink-faint);
  font-size: 14px;
  letter-spacing: 0.15em;
  padding: 12px 18px;
}
.btn-text:hover { color: var(--ink-soft); }

/* === Practice screen === */
.practice {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}
.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.practice-exit {
  color: var(--ink-faint);
  font-size: 14px;
  padding: 4px 0;
}
.practice-section {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.practice-progress {
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
}

.practice-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 0;
  min-height: 70vh;
}
.practice-text {
  font-size: 19px;
  line-height: 2;
  color: var(--ink);
  white-space: pre-line;
  max-width: 420px;
  opacity: 0;
  animation: fadeIn 0.7s ease forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* breathing circle */
.breath-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}
.breath-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, rgba(199,208,189,0.2) 70%, transparent 100%);
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}
.breath-circle.action {
  background: radial-gradient(circle, #d8c9a8 0%, rgba(216,201,168,0.2) 70%, transparent 100%);
  animation: breathe 2s ease-in-out infinite;
}
.breath-countdown {
  font-size: 28px;
  color: var(--ink-faint);
  letter-spacing: 0.15em;
  font-feature-settings: "tnum";
}
.breath-action {
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--accent);
}

.practice-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px 32px;
  display: flex;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  pointer-events: none;
}
.practice-controls > * { pointer-events: auto; }

.btn-next {
  background: var(--ink);
  color: var(--bg);
  padding: 12px 36px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.25em;
}
.btn-skip {
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.2em;
  padding: 12px 20px;
}

/* section transition */
.section-marker {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--ink-faint);
  opacity: 0;
  animation: sectionFade 1.6s ease;
}
@keyframes sectionFade {
  0% { opacity: 0; transform: translateY(8px); }
  30%, 70% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

/* === Recording === */
.record {
  padding: 24px 0 120px;
}
.record-header {
  margin-bottom: 32px;
}
.record-eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.record-question {
  font-size: 21px;
  line-height: 1.6;
  font-weight: 500;
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  transition: background .15s ease;
}
.opt:hover { background: #e6dfd0; }
.opt.selected {
  background: #e8eadf;
  border-color: var(--accent-soft);
}
.opt-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ink-faint);
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.opt.selected .opt-box {
  background: var(--accent);
  border-color: var(--accent);
}
.opt.selected .opt-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.three-part {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 28px;
}
.three-part-block .three-label {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.three-part-block .three-opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  padding: 9px 16px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}
.chip.selected {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.extra-prompt {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
textarea.note {
  width: 100%;
  min-height: 90px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
  line-height: 1.7;
}
textarea.note:focus {
  outline: none;
  border-color: var(--accent);
}

.record-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 24px 28px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
  display: flex;
  justify-content: center;
}

/* === Complete === */
.complete {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
}
.complete-mark {
  font-size: 22px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 32px;
}
.complete-line {
  font-size: 18px;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 48px;
  max-width: 340px;
  white-space: pre-line;
}
