:root {
  --bg: #f4eee2;
  --bg-2: #ece3d2;
  --bg-3: #e3d7c1;
  --ink: #2c2722;
  --ink-2: #6b6253;
  --ink-3: #978c79;
  --line: rgba(44, 39, 34, 0.13);
  --line-strong: rgba(44, 39, 34, 0.26);
  --terra: #b5651d;
  --terra-deep: #8f4e16;
  --terra-soft: #d3935a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --read: "Spectral", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-top: max(56px, env(safe-area-inset-top));
  --safe-bottom: max(30px, env(safe-area-inset-bottom));
}

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

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}

.scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.fade-enter {
  animation: fadeUp 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .fade-enter {
    animation: none;
  }
}

.display {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: 0;
}

.read {
  font-family: var(--read);
}

.kicker {
  color: var(--terra);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.2;
  text-transform: uppercase;
}

.latin {
  margin-top: 14px;
  color: var(--ink-3);
  font-family: var(--read);
  font-size: 13px;
  font-style: italic;
  letter-spacing: 0.04em;
}

.btn,
.icon-button,
.chip,
.transport-small,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms ease, background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.btn:active,
.icon-button:active,
.chip:active,
.transport-small:active,
.play-button:active {
  transform: scale(0.97);
}

.btn-primary {
  width: 100%;
  height: 58px;
  gap: 9px;
  border-radius: 999px;
  background: var(--terra);
  box-shadow: 0 10px 24px -10px rgba(143, 78, 22, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fbf6ec;
  font-size: 16px;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--terra-deep);
}

.btn-text {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  gap: 7px;
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 600;
}

.icon-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
}

.icon-button:hover {
  background: rgba(44, 39, 34, 0.05);
}

.pinned-footer {
  padding: 12px 26px var(--safe-bottom);
  background: linear-gradient(180deg, transparent, var(--bg) 26%);
}

.home-scroll {
  padding: calc(var(--safe-top) + 14px) 26px calc(var(--safe-bottom) + 16px);
}

.home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.home-greeting {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.home-date {
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 13px;
}

.streak-pill,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.streak-pill {
  gap: 6px;
  padding: 7px 12px;
  color: var(--terra);
}

.streak-pill span {
  color: var(--ink);
  font-weight: 600;
}

.meta-pill {
  padding: 8px 13px;
}

.meta-pill svg {
  color: var(--terra);
}

.hero-block {
  position: relative;
  margin-top: 54px;
}

.hero-glow,
.hero-ring {
  position: absolute;
  left: 50%;
  pointer-events: none;
  transform: translateX(-50%);
}

.hero-glow {
  top: -36px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--terra) 18%, transparent), transparent 60%);
}

.hero-ring {
  top: -4px;
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.hero-block > :not(.hero-glow):not(.hero-ring) {
  position: relative;
}

.hero-title {
  max-width: 340px;
  margin-top: 6px;
  font-size: clamp(48px, 15vw, 58px);
  text-wrap: balance;
}

.tagline {
  max-width: 300px;
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 19px;
  font-style: italic;
  line-height: 1.4;
  text-wrap: pretty;
}

.quote-block {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.quote-mark {
  margin-bottom: 12px;
  color: var(--terra);
  opacity: 0.85;
}

.quote-copy {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.45;
  text-wrap: pretty;
}

.attribution {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.03em;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.meta-row.center {
  justify-content: center;
  margin-top: 18px;
}

.subheader {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--safe-top) 18px 8px;
}

.subheader-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.form-scroll {
  padding: 8px 26px;
}

.form-section {
  margin-bottom: 30px;
}

.form-section > .kicker {
  margin-bottom: 14px;
}

.length-grid,
.focus-grid {
  display: grid;
  gap: 9px;
}

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

.focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.length-chip {
  height: 64px;
  flex-direction: column;
  gap: 2px;
}

.length-chip span {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
}

.length-chip small {
  font-size: 11px;
  opacity: 0.7;
}

.topic-card,
.theme-chip {
  width: 100%;
  height: auto;
  justify-content: space-between;
}

.topic-card {
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 18px;
}

.topic-copy,
.theme-chip-left {
  display: flex;
  text-align: left;
}

.topic-copy {
  flex-direction: column;
  gap: 4px;
}

.topic-copy strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
}

.topic-copy small {
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.75;
}

.choose-label {
  margin: 20px 0 12px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.theme-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.theme-chip {
  padding: 13px 16px;
}

.theme-chip-left {
  align-items: baseline;
  gap: 10px;
}

.theme-chip-left em {
  width: 18px;
  font-family: var(--read);
  font-size: 12px;
  font-style: italic;
  opacity: 0.6;
}

.theme-chip-left strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.prepare-scroll {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 22px 28px 8px;
  text-align: center;
}

.prepare-title {
  margin-top: 10px;
  font-size: 44px;
}

.settle-copy {
  max-width: 290px;
  margin: 36px 0 44px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.55;
  text-wrap: pretty;
}

.prepare-scroll .form-section {
  width: 100%;
}

.focus-chip {
  height: 96px;
  flex-direction: column;
  gap: 10px;
  border-radius: 18px;
}

.focus-chip span {
  font-size: 13px;
}

.session-screen {
  background: var(--bg);
}

.dawn-mode {
  background: #6f5642;
  color: #fbf3e2;
}

.visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.session-top {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) 20px 0;
}

.session-title {
  text-align: center;
}

.session-theme {
  margin-top: 3px;
  color: currentColor;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.top-spacer {
  width: 42px;
}

.dawn-mode .icon-button {
  background: rgba(0, 0, 0, 0.12);
}

.dawn-mode .kicker {
  color: #f2cf9a;
}

.session-bottom {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 40px 26px calc(var(--safe-bottom) + 6px);
  background: linear-gradient(180deg, transparent, var(--bg) 42%);
}

.dawn-mode .session-bottom {
  background: linear-gradient(180deg, transparent, rgba(58, 42, 28, 0.55) 55%);
}

.caption-wrap {
  display: flex;
  min-height: 84px;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 22px;
  animation: wordIn 800ms ease;
  text-align: center;
}

.caption {
  max-width: 320px;
  margin: 0;
  color: currentColor;
  font-size: 21px;
  line-height: 1.45;
  text-wrap: pretty;
}

.segment-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.segment {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.dawn-mode .segment {
  background: rgba(255, 255, 255, 0.22);
}

.segment span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--terra);
  transition: width 250ms linear;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: 12px;
}

.dawn-mode .time-row,
.dawn-mode .transport-small {
  color: rgba(251, 243, 226, 0.72);
}

.transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
}

.transport-small {
  width: 48px;
  height: 48px;
  color: var(--ink-2);
}

.play-button {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--terra);
  box-shadow: 0 14px 30px -10px rgba(143, 78, 22, 0.7);
  color: #fbf6ec;
}

.orb-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-halo {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  animation: glowPulse 7s ease-in-out infinite;
  background: radial-gradient(circle, color-mix(in srgb, var(--terra) 18%, transparent), color-mix(in srgb, var(--terra) 6%, transparent) 38%, transparent 66%);
}

.orb {
  position: relative;
  width: 232px;
  height: 232px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--terra-soft), var(--terra) 48%, var(--terra-deep));
  box-shadow: 0 30px 70px -20px color-mix(in srgb, var(--terra) 65%, transparent), inset 0 2px 14px rgba(255, 255, 255, 0.25);
  will-change: transform;
}

.orb::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.45), transparent 34%);
  content: "";
}

.orb::after {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
  content: "";
}

.orb.idle {
  animation: orbIdle 4s ease-in-out infinite;
}

.orb.breathing {
  animation: breathe 12s ease-in-out infinite;
}

.ring-set {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orb-ring {
  position: absolute;
  width: 240px;
  height: 240px;
  border: 1px solid color-mix(in srgb, var(--terra) 55%, transparent);
  border-radius: 50%;
  animation: driftRings 9s ease-out infinite;
}

.breath-label {
  position: absolute;
  bottom: calc(50% - 188px);
  width: 100%;
  color: var(--ink-2);
  font-family: var(--read);
  font-size: 19px;
  font-style: italic;
  letter-spacing: 0.04em;
  opacity: 0;
  text-align: center;
  transition: opacity 700ms ease;
}

.breath-label.shown {
  opacity: 1;
}

.dawn-base,
.dawn-day {
  position: absolute;
  inset: 0;
}

.dawn-base {
  background: linear-gradient(180deg, #6f5642, #b07d52 40%, #e5c89a 78%, #f3ead4);
}

.dawn-day {
  background: linear-gradient(180deg, #c9a06b, #e8b878 36%, #f4d29a 66%, #fbf1da);
  transition: opacity 1.2s linear;
}

.dawn-sun {
  position: absolute;
  bottom: 250px;
  left: 50%;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff7e6, var(--terra-soft) 40%, var(--terra));
  box-shadow: 0 0 90px 30px color-mix(in srgb, var(--terra) 45%, transparent), 0 0 180px 80px color-mix(in srgb, var(--terra) 22%, transparent);
  transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.haze {
  position: absolute;
  right: -10%;
  left: -10%;
  height: 40px;
  background: linear-gradient(90deg, transparent, rgba(255, 243, 223, 0.5), transparent);
  filter: blur(8px);
}

.haze-one {
  bottom: 120px;
}

.haze-two {
  bottom: 166px;
  opacity: 0.76;
}

.haze-three {
  bottom: 212px;
  opacity: 0.54;
}

.hill {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 150px;
  background: linear-gradient(180deg, transparent, #4a3a28 70%);
  clip-path: polygon(0 60%, 22% 48%, 48% 64%, 72% 44%, 100% 58%, 100% 100%, 0 100%);
  opacity: 0.5;
}

.words-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 38px;
  text-align: center;
}

.word-ring {
  position: absolute;
  opacity: 0.5;
}

.words-line {
  z-index: 1;
  max-width: 300px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.5;
  animation: wordIn 900ms ease;
  text-wrap: pretty;
}

.words-rule {
  z-index: 1;
  width: 30px;
  height: 1px;
  margin-top: 30px;
  background: var(--line-strong);
}

.complete-scroll {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: calc(var(--safe-top) + 30px) 30px 8px;
  text-align: center;
}

.check-medallion {
  display: flex;
  width: 84px;
  height: 84px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--terra) 18%, transparent), color-mix(in srgb, var(--terra) 6%, transparent));
  color: var(--terra);
}

.complete-title {
  margin-top: 8px;
  font-size: 40px;
}

.complete-body {
  max-width: 280px;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.5;
}

.closing-quote {
  width: 100%;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.closing-quote p {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-style: italic;
  line-height: 1.45;
}

.complete-streak {
  display: flex;
  width: 100%;
  align-items: center;
  flex-direction: column;
  margin-top: 34px;
}

.streak-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--terra);
}

.streak-line strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
}

.streak-line span {
  color: var(--ink-2);
  font-size: 13px;
}

.week-row {
  display: flex;
  gap: 9px;
  margin-top: 14px;
}

.week-row span {
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.week-row .filled {
  border-color: var(--terra);
  background: var(--terra);
}

.note-field {
  width: 100%;
  margin-top: 34px;
  text-align: left;
}

.note-field .kicker {
  display: block;
  margin-bottom: 10px;
}

.note {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--read);
  font-size: 17px;
  padding: 10px 2px;
}

.note::placeholder {
  color: var(--ink-3);
  font-style: italic;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.82);
  }
  45%,
  55% {
    transform: scale(1.16);
  }
}

@keyframes orbIdle {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(0.99);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
}

@keyframes driftRings {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  20% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: scale(1.9);
  }
}

@keyframes wordIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@media (min-width: 700px) {
  body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: radial-gradient(120% 90% at 50% 0%, #e4ddd0, #d2cbbd 55%, #c4bcab);
  }

  .app {
    position: relative;
    width: min(402px, 100vw);
    height: min(874px, 100vh - 32px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(44, 39, 34, 0.12);
    border-radius: 38px;
    box-shadow: 0 28px 90px rgba(44, 39, 34, 0.22);
  }

  .screen {
    position: absolute;
  }
}
