:root {
  --cream: #f7f0e6;
  --warm-white: #fffaf3;
  --linen: #ebe0d1;
  --taupe: #c8b7a3;
  --clay: #9f8066;
  --coffee: #5d4638;
  --charcoal: #312b27;
  --muted: #786a60;
  --gold: #b78a4e;
  --soft-shadow: 0 30px 96px rgba(74, 56, 42, 0.12), 0 10px 26px rgba(74, 56, 42, 0.06);
  --lifted-shadow: 0 48px 130px rgba(74, 56, 42, 0.15), 0 18px 42px rgba(74, 56, 42, 0.075);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.68);
  --border: rgba(93, 70, 56, 0.105);
  --radius: 10px;
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-quiet: cubic-bezier(0.2, 0.8, 0.2, 1);
  --motion-fast: 160ms;
  --motion-base: 240ms;
  --motion-slow: 420ms;
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  --cream: #181411;
  --warm-white: #211b16;
  --linen: #34291f;
  --taupe: #6f5c49;
  --clay: #d3aa75;
  --coffee: #e4d0b8;
  --charcoal: #f3eadf;
  --muted: #b9a896;
  --gold: #c4924f;
  --soft-shadow: 0 30px 96px rgba(0, 0, 0, 0.28), 0 10px 26px rgba(0, 0, 0, 0.2);
  --lifted-shadow: 0 48px 130px rgba(0, 0, 0, 0.34), 0 18px 42px rgba(0, 0, 0, 0.24);
  --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --border: rgba(228, 208, 184, 0.14);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --cream: #181411;
    --warm-white: #211b16;
    --linen: #34291f;
    --taupe: #6f5c49;
    --clay: #d3aa75;
    --coffee: #e4d0b8;
    --charcoal: #f3eadf;
    --muted: #b9a896;
    --gold: #c4924f;
    --soft-shadow: 0 30px 96px rgba(0, 0, 0, 0.28), 0 10px 26px rgba(0, 0, 0, 0.2);
    --lifted-shadow: 0 48px 130px rgba(0, 0, 0, 0.34), 0 18px 42px rgba(0, 0, 0, 0.24);
    --inner-light: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --border: rgba(228, 208, 184, 0.14);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 22% 8%, rgba(255, 252, 246, 0.96), transparent 36rem),
    radial-gradient(circle at 76% 18%, rgba(226, 210, 190, 0.28), transparent 31rem),
    radial-gradient(circle at 56% 82%, rgba(183, 138, 78, 0.08), transparent 30rem),
    linear-gradient(140deg, #f7f0e6 0%, #efe3d5 48%, #f9f4ec 100%);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 22% 8%, rgba(83, 63, 47, 0.3), transparent 34rem),
    radial-gradient(circle at 76% 18%, rgba(196, 146, 79, 0.12), transparent 31rem),
    linear-gradient(140deg, var(--cream) 0%, #211914 52%, #17120f 100%);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] body {
    background:
      radial-gradient(circle at 22% 8%, rgba(83, 63, 47, 0.3), transparent 34rem),
      radial-gradient(circle at 76% 18%, rgba(196, 146, 79, 0.12), transparent 31rem),
      linear-gradient(140deg, var(--cream) 0%, #211914 52%, #17120f 100%);
  }
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.2rem 1.75rem;
  border-right: 1px solid rgba(93, 70, 56, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.76), rgba(244, 235, 224, 0.48)),
    rgba(255, 250, 243, 0.58);
  backdrop-filter: blur(24px);
}

.brand {
  order: 1;
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0 1.35rem;
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.brand-mark {
  position: relative;
  display: block;
  width: 7.6rem;
  height: 6.1rem;
  font-family: Newsreader, Georgia, serif;
  color: var(--coffee);
  line-height: 1;
}

.brand-mark::after {
  position: absolute;
  right: 2.72rem;
  bottom: 0.45rem;
  width: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(93, 70, 56, 0), rgba(93, 70, 56, 0.42), rgba(93, 70, 56, 0));
  content: "";
}

.brand-c,
.brand-n {
  position: absolute;
  display: block;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 0 12px 28px rgba(93, 70, 56, 0.08);
}

.brand-c {
  top: 0.1rem;
  left: 0.05rem;
  font-size: 5.9rem;
}

.brand-n {
  right: 0.02rem;
  bottom: 0.15rem;
  font-size: 5.45rem;
  transform: translateX(-0.9rem);
}

.brand strong,
.brand em {
  display: block;
}

.brand strong {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.78rem;
  font-weight: 500;
  letter-spacing: -0.015rem;
}

.brand em {
  margin-top: 0.58rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.journey-summary,
.soft-panel,
.suggestion-panel,
.note-panel,
.status-panel,
.progress-panel,
.milestone-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.88), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.journey-summary {
  order: 3;
  padding: 1.35rem;
  margin-top: auto;
}

.journey-summary h2,
.status-panel h2 {
  margin: 0.35rem 0 0.5rem;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.journey-summary p,
.status-panel p,
.note-panel p,
.screen-header p,
.milestone-card p {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  margin: 0;
  color: var(--clay);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.side-nav {
  order: 2;
  display: grid;
  gap: 0.45rem;
  margin-top: 1.25rem;
}

.side-nav a,
.bottom-nav a {
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background var(--motion-base) var(--ease-quiet),
    box-shadow var(--motion-base) var(--ease-quiet),
    color var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.82rem;
  padding: 0.84rem 1rem;
}

.side-nav a.settings-nav-link {
  position: relative;
  margin-top: 1rem;
}

.side-nav a.settings-nav-link::before {
  content: "";
  position: absolute;
  top: -0.58rem;
  right: 1rem;
  left: 1rem;
  height: 1px;
  background: rgba(93, 70, 56, 0.12);
}

.side-nav a span {
  display: inline-grid;
  width: 2.05rem;
  height: 2.05rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.38);
  color: var(--coffee);
  font-size: 0.9rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.side-nav a.active,
.bottom-nav a.active {
  background: linear-gradient(180deg, rgba(101, 79, 62, 0.96), rgba(75, 58, 47, 0.96));
  color: var(--warm-white);
  box-shadow: 0 12px 28px rgba(93, 70, 56, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.side-nav a.active span {
  border-color: rgba(255, 250, 243, 0.24);
  background: rgba(255, 250, 243, 0.12);
  color: var(--warm-white);
}

.side-nav a:hover,
.bottom-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 250, 243, 0.62);
  color: var(--coffee);
}

.side-nav a:active,
.bottom-nav a:active {
  transform: translateY(0) scale(0.98);
}

.screen-frame {
  position: relative;
  min-height: 100vh;
  overflow: auto;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 5.55rem;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(93, 70, 56, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.88), rgba(247, 240, 230, 0.74)),
    rgba(255, 250, 243, 0.72);
  backdrop-filter: blur(20px);
}

.topbar-icon {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 0;
  border-right: 1px solid rgba(93, 70, 56, 0.12);
  padding-right: 1rem;
  background: transparent;
  color: var(--coffee);
  font-size: 1.1rem;
  transition: color 180ms ease, transform 180ms ease;
}

.topbar-icon:hover,
.profile-chip:hover {
  transform: translateY(-1px);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--charcoal);
  font-size: 0.94rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}

.sync-status,
.sync-status-inline,
.sync-retry,
.sync-error-detail {
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  background: rgba(255, 250, 243, 0.62);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  transition:
    background var(--motion-base) ease,
    border-color var(--motion-base) ease,
    color var(--motion-base) ease,
    opacity var(--motion-base) ease;
}

.sync-retry {
  background: rgba(93, 70, 56, 0.08);
  color: var(--coffee);
}

.sync-error-detail {
  max-width: min(28rem, 44vw);
  overflow: hidden;
  color: #8a4b38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status-inline {
  display: inline-block;
  width: fit-content;
  margin: 0.8rem 0 0;
  border-color: transparent;
  padding-inline: 0;
  background: transparent;
  color: rgba(93, 70, 56, 0.62);
  font-size: 0.72rem;
  font-weight: 700;
}

.sync-retry-inline {
  display: block;
  width: fit-content;
  margin-top: 0.5rem;
}

.sync-error-detail-inline {
  width: fit-content;
  max-width: 100%;
  margin: 0.5rem 0 0;
  white-space: normal;
}

.profile-chip span {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #e8d9c5, #d8c4aa);
  color: var(--coffee);
  font-size: 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.screen {
  display: none;
  min-height: calc(100vh - 5.55rem);
  padding: clamp(2rem, 5vw, 5.5rem);
  animation: screenIn var(--motion-slow) var(--ease-calm) both;
}

.screen.active {
  display: block;
}

.screen.active .screen-header,
.screen.active .dashboard-intro,
.screen.active .dashboard-editorial,
.screen.active .progress-showcase,
.screen.active .checkin-card,
.screen.active .continue-card,
.screen.active .insight-card,
.screen.active .insight-hero,
.screen.active .insight-chart-panel,
.screen.active .insight-map-panel,
.screen.active .reflection-entry,
.screen.active .reminder-panel,
.screen.active .notification-panel,
.screen.active .journey-accordion,
.screen.active .settings-section {
  animation: calmSurfaceIn var(--motion-slow) var(--ease-calm) both;
}

.screen.active .progress-showcase,
.screen.active .insight-hero,
.screen.active .checkin-card {
  animation-duration: 520ms;
}

.onboarding-modal-screen.active {
  position: fixed;
  inset: 0;
  z-index: 28;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
  padding: clamp(1rem, 3vw, 2.4rem);
  background:
    radial-gradient(circle at 50% 82%, rgba(255, 250, 243, 0.2), transparent 18rem),
    rgba(40, 30, 24, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.onboarding-modal-screen .screen-header,
.onboarding-modal-screen .content-grid {
  width: min(100%, 39rem);
  margin-inline: auto;
}

.onboarding-modal-screen .screen-header {
  margin-bottom: 0;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: clamp(1rem, 2.4vw, 1.35rem) clamp(1rem, 3vw, 1.55rem) 0.2rem;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.9), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.82);
  text-align: center;
  box-shadow: 0 22px 70px rgba(74, 56, 42, 0.1);
  animation: modalPanelIn var(--motion-slow) var(--ease-calm) both;
}

.onboarding-modal-screen .screen-header h1:first-child {
  margin-top: 0;
}

.onboarding-modal-screen .screen-header h1 {
  margin: 0.28rem auto 0.34rem;
  max-width: 24rem;
  font-size: clamp(1.55rem, 2.65vw, 2.15rem);
  line-height: 1.05;
}

.onboarding-modal-screen .screen-header p:not(.eyebrow) {
  max-width: 25rem;
  margin: 0 auto;
  font-size: 0.84rem;
  line-height: 1.42;
}

.onboarding-modal-screen .content-grid {
  grid-template-columns: 1fr;
  gap: 0.82rem;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  padding: 0.65rem clamp(0.85rem, 3vw, 1.25rem) clamp(0.9rem, 3vw, 1.25rem);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.9), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.82);
  box-shadow: 0 30px 96px rgba(74, 56, 42, 0.14), var(--inner-light);
  animation: modalPanelIn var(--motion-slow) var(--ease-calm) both;
}

.onboarding-modal-screen .soft-panel,
.onboarding-modal-screen .suggestion-panel,
.onboarding-modal-screen .note-panel {
  box-shadow: none;
}

.onboarding-modal-screen form.soft-panel,
.onboarding-modal-screen .soft-panel {
  background: rgba(255, 250, 243, 0.38);
}

.onboarding-modal-screen .soft-panel,
.onboarding-modal-screen .suggestion-panel,
.onboarding-modal-screen .note-panel {
  padding: clamp(0.9rem, 2.4vw, 1.25rem);
}

.onboarding-modal-screen .suggestion-panel,
.onboarding-modal-screen .note-panel {
  background: rgba(255, 250, 243, 0.32);
}

.onboarding-modal-screen .note-panel p {
  margin: 0;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.96rem;
  line-height: 1.55;
  text-align: center;
}

.onboarding-modal-screen .notification-setup-panel h2 {
  max-width: 25rem;
  font-size: clamp(1.25rem, 2.35vw, 1.65rem);
  line-height: 1.12;
}

.onboarding-modal-screen .notification-setup-panel p:not(.eyebrow) {
  max-width: 25rem;
  font-size: 0.88rem;
}

.onboarding-modal-screen .onboarding-steps {
  gap: 0.55rem;
}

.onboarding-modal-screen .onboarding-steps > div:not(.onboarding-progress, .onboarding-nav) {
  padding: 0.55rem 0;
}

.onboarding-modal-screen .onboarding-steps strong {
  font-size: 1.05rem;
}

.onboarding-modal-screen .onboarding-steps p {
  font-size: 0.86rem;
}

.onboarding-modal-screen .onboarding-progress {
  margin-top: 0.5rem;
}

.onboarding-modal-screen .onboarding-nav,
.onboarding-modal-screen .milestone-actions {
  justify-content: center;
}

.onboarding-modal-screen .clarity-moment-list {
  max-height: min(18rem, 42vh);
  overflow: auto;
  padding-right: 0.2rem;
}

.onboarding-modal-screen .routine-list {
  max-height: min(17rem, 40vh);
  overflow: auto;
  padding-right: 0.2rem;
}

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

@keyframes calmSurfaceIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-screen {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 27rem);
  gap: clamp(2rem, 6vw, 6rem);
}

.auth-screen.active {
  display: grid;
  place-items: center;
}

.import-screen.active {
  display: grid;
  place-items: center;
}

.auth-shell {
  display: grid;
  width: min(66rem, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.import-shell {
  width: min(48rem, 100%);
}

.import-panel {
  display: grid;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.9), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.78);
  box-shadow: var(--lifted-shadow), var(--inner-light);
}

.import-preview {
  display: grid;
  gap: 0.65rem;
}

.import-preview dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
}

.import-preview div {
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: var(--radius);
  padding: 0.95rem;
  background: rgba(255, 253, 248, 0.62);
}

.import-preview dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.import-preview dd {
  margin: 0.3rem 0 0;
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.8rem;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.sync-message {
  min-height: 1.3rem;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.5;
}

.auth-intro h1 {
  max-width: 35rem;
  margin: 0.65rem 0 1.15rem;
  font-size: clamp(3.3rem, 7vw, 6.4rem);
  line-height: 0.9;
}

.auth-intro p:not(.eyebrow) {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.75;
}

.auth-card,
.account-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.92), rgba(246, 238, 228, 0.76)),
    rgba(255, 250, 243, 0.84);
  box-shadow: var(--lifted-shadow), var(--inner-light);
}

.auth-card {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.2rem, 4vw, 1.75rem);
}

.auth-brand {
  display: grid;
  justify-content: center;
  padding-bottom: 0.25rem;
}

.mini-brand-mark {
  width: 4.9rem;
  height: 3.95rem;
  transform: scale(0.72);
  transform-origin: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.35rem;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.62);
}

.auth-provider-stack {
  display: grid;
  gap: 0.7rem;
}

.auth-provider-button {
  min-height: 3.05rem;
  border: 1px solid rgba(93, 70, 56, 0.14);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.92), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.88);
  color: var(--coffee);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 12px 26px rgba(74, 56, 42, 0.06);
  font: inherit;
  font-weight: 760;
}

.auth-provider-button.subtle {
  background: transparent;
  box-shadow: none;
  color: rgba(93, 70, 56, 0.82);
}

.auth-provider-button:hover,
.auth-provider-button:focus-visible {
  border-color: rgba(93, 70, 56, 0.24);
  transform: translateY(-1px);
}

.auth-tabs button {
  min-height: 2.55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-tabs button.active {
  background: linear-gradient(180deg, rgba(101, 79, 62, 0.96), rgba(75, 58, 47, 0.96));
  color: var(--warm-white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-copy h2,
.account-panel h2 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 500;
}

.auth-copy p,
.auth-smallprint,
.auth-message,
.account-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.auth-copy p {
  margin: 0.45rem 0 0;
}

.auth-message {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-message[data-tone="error"] {
  color: #8a4b38;
}

.auth-message[data-tone="success"] {
  color: #6f5a48;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-form[hidden] {
  display: none;
}

.password-field {
  position: relative;
  display: block;
  margin-top: 0.45rem;
}

.password-field input {
  margin-top: 0;
  padding-right: 4.4rem;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  min-height: 2.1rem;
  border: 0;
  border-radius: 999px;
  padding: 0 0.7rem;
  background: rgba(93, 70, 56, 0.07);
  color: var(--coffee);
  font-size: 0.76rem;
  font-weight: 800;
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease;
}

.password-field button:hover {
  background: rgba(93, 70, 56, 0.12);
}

.auth-form .text-action {
  justify-self: center;
  padding: 0.35rem;
}

.auth-smallprint {
  margin: 0;
  font-size: 0.82rem;
}

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

.onboarding-screen.active {
  display: grid;
}

.onboarding-steps {
  gap: 1rem;
}

.onboarding-steps > div:not(.onboarding-progress, .onboarding-nav) {
  display: grid;
  gap: 0.28rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid rgba(93, 70, 56, 0.08);
}

.onboarding-steps span {
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12rem;
}

.onboarding-steps strong {
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.onboarding-steps p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-progress {
  display: flex;
  gap: 0.38rem;
  align-items: center;
  margin: 1.1rem 0 0.2rem;
}

.onboarding-progress span {
  display: block;
  width: 1.75rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(226, 211, 194, 0.7);
}

.onboarding-progress span.active {
  background: linear-gradient(90deg, rgba(150, 105, 48, 0.95), rgba(190, 143, 72, 0.9));
}

.onboarding-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.hero-copy {
  max-width: 43rem;
}

h1 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin-top: 0.8rem;
  font-size: clamp(4.25rem, 10vw, 8.9rem);
  line-height: 0.88;
  letter-spacing: -0.035rem;
}

.lede {
  max-width: 34rem;
  margin: 1.55rem 0 2.35rem;
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.primary-action,
.secondary-action,
.routine-input button,
.suggestion-panel button {
  min-height: 2.85rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.78rem 1.22rem;
  font-weight: 700;
  letter-spacing: 0.01rem;
  transition:
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    background var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}

.primary-action {
  background: linear-gradient(180deg, #6b5140 0%, #4e3b30 100%);
  color: var(--warm-white);
  box-shadow: 0 14px 34px rgba(93, 70, 56, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.secondary-action,
.routine-input button,
.suggestion-panel button {
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(244, 235, 224, 0.72));
  color: var(--coffee);
  box-shadow: 0 8px 22px rgba(74, 56, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.primary-action:hover,
.secondary-action:hover,
.routine-input button:hover,
.suggestion-panel button:hover {
  transform: translateY(-2px);
}

.primary-action:active,
.secondary-action:active,
.routine-input button:active,
.suggestion-panel button:active {
  transform: translateY(0) scale(0.985);
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.secondary-action:disabled:hover {
  transform: none;
}

.hero-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.78), rgba(242, 232, 220, 0.68)),
    rgba(255, 250, 243, 0.68);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.quiet-date,
.intention-card {
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.quiet-date {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  color: var(--muted);
}

.quiet-date strong {
  color: var(--coffee);
}

.intention-card {
  min-height: 18rem;
  padding: 1.35rem;
}

.intention-card p {
  margin: 0 0 5.5rem;
  color: var(--muted);
}

.intention-card h2 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.05;
}

.mini-list {
  display: grid;
  gap: 0.65rem;
  padding: 0.25rem 0.25rem 0.55rem;
}

.mini-list span {
  display: block;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(93, 70, 56, 0.1);
}

.mini-list span:nth-child(2) {
  width: 75%;
}

.mini-list span:nth-child(3) {
  width: 52%;
}

.screen-header {
  max-width: 45rem;
  margin-bottom: 2rem;
}

.screen-header h1 {
  margin: 0.45rem 0 0.8rem;
  font-size: clamp(2.4rem, 5vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.02rem;
}

.content-grid,
.progress-layout,
.today-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: 1.15rem;
  align-items: start;
}

.soft-panel,
.suggestion-panel,
.note-panel,
.status-panel,
.progress-panel {
  padding: clamp(1.2rem, 3vw, 1.85rem);
}

form.soft-panel,
.soft-panel {
  display: grid;
  gap: 1rem;
}

label {
  color: var(--coffee);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  margin-top: 0.45rem;
  border: 1px solid rgba(93, 70, 56, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(250, 244, 237, 0.82));
  color: var(--charcoal);
  box-shadow: inset 0 1px 3px rgba(74, 56, 42, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  outline: none;
}

input,
select {
  min-height: 3.2rem;
  padding: 0.8rem 0.95rem;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--coffee) 50%) right 1rem center / 0.38rem 0.38rem no-repeat,
    linear-gradient(135deg, var(--coffee) 50%, transparent 50%) right 0.76rem center / 0.38rem 0.38rem no-repeat,
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(250, 244, 237, 0.82));
}

input[type="date"] {
  min-height: 3.2rem;
  padding: 0.8rem 0.95rem;
  line-height: 1.2;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

input[type="date"]::-webkit-date-and-time-value {
  min-height: 1.4rem;
  margin: 0;
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin-right: -0.2rem;
  padding: 0.25rem;
  opacity: 0.72;
}

input:disabled {
  color: var(--muted);
}

textarea {
  min-height: 8rem;
  padding: 0.95rem;
  resize: vertical;
}

.suggestion-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.suggestion-panel .eyebrow {
  flex-basis: 100%;
}

.routine-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.routine-input input {
  margin: 0;
}

.routine-list,
.checklist {
  display: grid;
  gap: 0.65rem;
}

.routine-list label,
.checklist label {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 3.8rem;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(248, 240, 231, 0.76));
  box-shadow: 0 0.75rem 1.8rem rgba(74, 56, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.62);
  color: var(--coffee);
  font-size: 1rem;
  font-weight: 750;
  transition:
    border-color var(--motion-base) var(--ease-quiet),
    box-shadow var(--motion-base) var(--ease-quiet),
    transform var(--motion-base) var(--ease-quiet),
    background var(--motion-base) var(--ease-quiet),
    color var(--motion-base) ease,
    opacity var(--motion-base) ease;
}

.routine-list label {
  justify-content: space-between;
}

.routine-list label > span,
.checklist label > span {
  flex: 1;
}

.checklist input[type="checkbox"],
.routine-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 1.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.38);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.checklist input[type="checkbox"]::after,
.routine-list input[type="checkbox"]::after {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.checklist input[type="checkbox"]:checked,
.routine-list input[type="checkbox"]:checked {
  border-color: rgba(164, 120, 64, 0.9);
  background: rgba(164, 120, 64, 0.92);
  box-shadow: 0 0 0 0.22rem rgba(183, 138, 78, 0.13);
}

.checklist input[type="checkbox"]:checked::after,
.routine-list input[type="checkbox"]:checked::after {
  background: rgba(255, 250, 243, 0.95);
}

.delete-routine {
  display: inline-grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.7);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.delete-routine:hover {
  background: rgba(93, 70, 56, 0.08);
  color: var(--coffee);
  transform: translateY(-1px);
}

.routine-list label:hover,
.checklist label:hover {
  border-color: rgba(93, 70, 56, 0.18);
  box-shadow: 0 12px 30px rgba(74, 56, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.routine-progress-summary {
  display: grid;
  gap: 0.5rem;
  margin: 0.05rem 0 1.25rem;
  color: var(--muted);
}

.daily-routine-progress-shell {
  display: grid;
  width: 100%;
  gap: 0.5rem;
}

.routine-progress-summary .eyebrow {
  margin: 0.25rem 0 0;
}

.daily-routine-progress-count {
  margin: 0;
  color: var(--coffee);
  font-size: 1rem;
  font-weight: 650;
}

.daily-routine-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
}

.daily-routine-progress-line > span {
  color: var(--coffee);
  font-size: 0.86rem;
  font-weight: 750;
}

.daily-routine-progress-arrow {
  display: grid;
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(93, 70, 56, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background var(--motion-fast) ease,
    color var(--motion-fast) ease,
    transform var(--motion-base) var(--ease-calm);
}

.daily-routine-progress-arrow:hover,
.daily-routine-progress-arrow:focus-visible {
  background: rgba(255, 250, 243, 0.68);
  color: var(--coffee);
  transform: translateX(1px);
}

.daily-routine-progress-arrow[aria-expanded="true"] {
  transform: rotate(90deg);
}

.daily-routine-progress-arrow:active {
  transform: scale(0.96);
}

.daily-routine-progress-arrow[aria-expanded="true"]:active {
  transform: rotate(90deg) scale(0.96);
}

.daily-routine-progress-bar {
  overflow: hidden;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(226, 211, 194, 0.64);
  box-shadow: inset 0 1px 1px rgba(93, 70, 56, 0.08);
}

.daily-routine-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(150, 105, 48, 0.95), rgba(190, 143, 72, 0.9));
  box-shadow: 0 0 0.85rem rgba(183, 138, 78, 0.24);
  transition: width 460ms var(--ease-calm);
}

.routine-row.is-completed {
  color: rgba(93, 70, 56, 0.66);
  background: rgba(255, 250, 243, 0.44);
  box-shadow: none;
  opacity: 0.82;
  min-height: 3rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.routine-row.is-completed span {
  text-decoration: line-through;
  text-decoration-color: rgba(93, 70, 56, 0.28);
}

.reflection-save-status {
  min-height: 1.2rem;
  margin: -0.35rem 0 0.1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.01rem;
  transition: color var(--motion-base) ease, opacity var(--motion-base) ease;
}

.reflection-save-status[data-state="saving"] {
  color: var(--muted);
}

.reflection-save-status[data-state="saved"] {
  color: rgba(104, 82, 62, 0.86);
}

.reflection-save-status[data-state="error"] {
  color: #8a4b3f;
}

.routine-disclosure-action {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.62);
  color: var(--coffee);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.routine-completed-list {
  display: grid;
  gap: 0.65rem;
}

.routine-completed-list {
  margin-top: 0.15rem;
  margin-bottom: 0.15rem;
  border: 1px solid rgba(93, 70, 56, 0.08);
  border-radius: var(--radius);
  padding: 0.65rem;
  background: rgba(255, 250, 243, 0.38);
}

.routine-complete-note,
.routine-empty {
  margin: 0;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: rgba(255, 250, 243, 0.58);
  color: var(--muted);
  font-weight: 700;
}

input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: auto;
  margin: 0;
  accent-color: var(--coffee);
}

.note-panel {
  display: grid;
  gap: 0.85rem;
}

.note-panel p {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.7rem;
  line-height: 1.16;
}

.today-screen {
  padding: clamp(2rem, 4vw, 4rem) clamp(1.6rem, 4vw, 3.7rem) clamp(2.2rem, 4vw, 4rem);
}

.dashboard-home {
  display: grid;
  max-width: 72.5rem;
  margin: 0 auto;
  gap: clamp(1.45rem, 3vw, 2.05rem);
}

.dashboard-hero {
  order: 1;
  display: grid;
  grid-template-columns: minmax(30rem, 1.15fr) minmax(18rem, 0.85fr);
  gap: clamp(1.25rem, 4vw, 3.5rem);
  align-items: center;
  padding-bottom: clamp(1.7rem, 3vw, 2.3rem);
  border-bottom: 1px solid rgba(93, 70, 56, 0.1);
}

.dashboard-intro {
  grid-column: 1 / -1;
  padding-left: clamp(0rem, 1vw, 0.45rem);
}

.dashboard-editorial {
  padding-left: clamp(0rem, 1vw, 0.45rem);
}

.dashboard-editorial h1 {
  max-width: 25rem;
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 2.85rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.dashboard-editorial p {
  max-width: 27rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.progress-showcase {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: 24.4rem;
  grid-template-columns: minmax(0, 1fr) 13.6rem;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.7rem, 3vw, 2.45rem);
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 78% 35%, rgba(255, 255, 255, 0.58), transparent 14rem),
    radial-gradient(circle at 95% 86%, rgba(185, 144, 89, 0.14), transparent 13rem),
    linear-gradient(135deg, rgba(250, 244, 237, 0.94), rgba(232, 221, 207, 0.74));
  box-shadow: var(--lifted-shadow), var(--inner-light);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.progress-showcase:hover,
.progress-showcase:focus-visible {
  border-color: rgba(93, 70, 56, 0.18);
  box-shadow: 0 54px 136px rgba(74, 56, 42, 0.17), 0 20px 48px rgba(74, 56, 42, 0.09), var(--inner-light);
  outline: none;
  transform: translateY(-2px);
}

.progress-showcase::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.36), transparent 34%),
    repeating-linear-gradient(100deg, rgba(93, 70, 56, 0.025) 0 1px, transparent 1px 18px);
  content: "";
  opacity: 0.75;
  pointer-events: none;
}

.progress-showcase::after {
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: 17rem;
  height: 17rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 58%);
  content: "";
  pointer-events: none;
}

.progress-copy,
.progress-orb {
  position: relative;
  z-index: 1;
}

.progress-copy h2 {
  margin: 1.7rem 0 1.05rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2.3rem, 4vw, 3.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.02rem;
}

.progress-copy h2 span {
  color: var(--gold);
}

.progress-copy p:not(.eyebrow) {
  max-width: 21rem;
  margin: 0 0 1.65rem;
  color: var(--charcoal);
  line-height: 1.55;
}

.progress-showcase .today-progress-bar {
  width: min(100%, 24rem);
  height: 0.82rem;
  margin: 0 0 1.15rem;
}

.progress-meta {
  display: flex;
  width: min(100%, 24rem);
  justify-content: space-between;
  gap: 1rem;
  color: var(--charcoal);
  font-size: 0.88rem;
}

.progress-orb {
  display: grid;
  width: clamp(10rem, 16vw, 12.5rem);
  height: clamp(10rem, 16vw, 12.5rem);
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 252, 246, 0.9) 0 55%, transparent 56%),
    conic-gradient(var(--gold) 0deg 68deg, rgba(255, 255, 255, 0.74) 68deg 360deg);
  box-shadow:
    0 20px 48px rgba(93, 70, 56, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  text-align: center;
  transition:
    background 560ms var(--ease-calm),
    box-shadow var(--motion-base) ease,
    transform var(--motion-base) ease;
}

.progress-orb::before {
  position: absolute;
  inset: 0.82rem;
  border-radius: 50%;
  border: 0.78rem solid rgba(255, 255, 255, 0.76);
  content: "";
}

.progress-orb span,
.progress-orb small {
  position: relative;
  z-index: 1;
  display: block;
}

.progress-orb span {
  margin-top: 0.5rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 4rem);
  line-height: 0.85;
  transition: color var(--motion-base) ease;
}

.progress-orb small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.continue-section {
  order: 3;
  display: grid;
  gap: 1rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  font-weight: 500;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--coffee);
  font-weight: 600;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.text-action:hover {
  color: var(--gold);
  transform: translateX(2px);
}

.continue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.continue-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  align-items: center;
  min-height: 8.8rem;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: var(--radius);
  padding: 1.45rem;
  background:
    linear-gradient(150deg, rgba(255, 253, 248, 0.9), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.8);
  color: var(--charcoal);
  text-align: left;
  box-shadow: 0 16px 48px rgba(74, 56, 42, 0.07), var(--inner-light);
  transition:
    transform var(--motion-base) var(--ease-quiet),
    box-shadow var(--motion-base) var(--ease-quiet),
    border-color var(--motion-base) ease;
}

.continue-card:hover {
  border-color: rgba(93, 70, 56, 0.18);
  box-shadow: 0 24px 62px rgba(74, 56, 42, 0.1), var(--inner-light);
  transform: translateY(-2px);
}

.continue-card:active,
.journey-library-card:active,
.reminder-summary-card:active,
.reflection-entry:active {
  transform: translateY(0) scale(0.995);
}

.card-symbol {
  display: grid;
  width: 3.8rem;
  height: 3.8rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 219, 202, 0.7);
  color: var(--gold);
  font-size: 1.45rem;
}

.continue-card em,
.continue-card strong,
.continue-card small {
  display: block;
}

.continue-card em {
  color: var(--clay);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.continue-card strong {
  margin-top: 0.65rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 500;
}

.continue-card i {
  display: block;
  width: 52%;
  height: 0.18rem;
  margin: 0.85rem 0 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), rgba(183, 138, 78, 0.18));
}

.continue-card small {
  color: var(--muted);
  font-size: 0.84rem;
}

.today-lower {
  order: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: 1.15rem;
  align-items: stretch;
}

.quote-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  min-height: 16rem;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
  background:
    radial-gradient(circle at 92% 82%, rgba(183, 138, 78, 0.12), transparent 10rem),
    linear-gradient(145deg, rgba(255, 252, 246, 0.82), rgba(246, 238, 228, 0.62));
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.quote-panel > span {
  color: rgba(183, 138, 78, 0.38);
  font-family: Newsreader, Georgia, serif;
  font-size: 4.2rem;
  line-height: 0.7;
}

.quote-panel p {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.35;
}

.quote-panel em {
  font-size: 0.92em;
}

.morning-line {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2.08rem);
}

.today-progress-bar {
  position: relative;
  height: clamp(1.18rem, 2vw, 1.58rem);
  margin: clamp(1.35rem, 3vw, 2.1rem) 0 0.86rem;
  overflow: hidden;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.74), rgba(208, 192, 174, 0.4)),
    rgba(221, 210, 196, 0.58);
  box-shadow:
    0 22px 54px rgba(124, 95, 70, 0.16),
    0 4px 12px rgba(124, 95, 70, 0.09),
    inset 0 1px 2px rgba(255, 255, 255, 0.72),
    inset 0 -1px 3px rgba(93, 70, 56, 0.08);
}

.today-progress-bar::before {
  position: absolute;
  inset: 2px 4px auto;
  height: 38%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
  content: "";
  pointer-events: none;
}

.today-progress-fill {
  position: relative;
  display: block;
  width: 19%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), transparent 48%),
    linear-gradient(90deg, #cba468 0%, #a57b48 42%, #6f5742 100%);
  box-shadow:
    0 0 42px rgba(183, 138, 78, 0.34),
    0 8px 18px rgba(93, 70, 56, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: width 560ms var(--ease-calm);
}

.today-progress-fill::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 248, 236, 0.42) 46%, transparent 72%);
  content: "";
  opacity: 0;
}

.today-screen.active .today-progress-fill {
  animation: fillTodayProgress 1050ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both;
}

.today-screen.active .today-progress-fill::after {
  animation: progressSheen 1200ms ease 560ms both;
}

@keyframes fillTodayProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes progressSheen {
  from {
    opacity: 0;
    transform: translateX(-120%);
  }
  28% {
    opacity: 0.7;
  }
  to {
    opacity: 0;
    transform: translateX(140%);
  }
}

.checkin-card {
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(255, 253, 248, 0.86), rgba(244, 235, 224, 0.72)),
    rgba(255, 250, 243, 0.82);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.today-checkin {
  display: grid;
  gap: 1rem;
}

.checkin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.section-title h2 {
  margin: 0.3rem 0 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.01rem;
}

.day-kicker,
.progress-stats,
.journey-detail {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.day-kicker {
  color: var(--clay);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

.checkin-card h1 {
  max-width: 48rem;
  margin: 1.1rem 0 1.6rem;
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: 1;
}

.reflection-label {
  position: relative;
  display: block;
  margin: 0.75rem 0 0.6rem;
  color: rgba(93, 70, 56, 0.78);
  font-size: 0.88rem;
  font-weight: 700;
}

.reflection-label textarea {
  min-height: 7.25rem;
  margin-top: 0.55rem;
  padding-bottom: 3.55rem;
}

.reflection-tools {
  position: absolute;
  left: 0.85rem;
  bottom: 0.75rem;
  display: flex;
  gap: 0.42rem;
  align-items: center;
  margin: 0;
}

.reflection-tool {
  display: inline-grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(93, 70, 56, 0.13);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.48);
  color: var(--coffee);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.reflection-tool svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.reflection-tool:hover,
.reflection-tool:focus-visible {
  border-color: rgba(93, 70, 56, 0.24);
  background: rgba(255, 250, 243, 0.72);
  transform: translateY(-1px);
}

.reflection-tool:active {
  transform: scale(0.97);
}

.reflection-tool-meta {
  margin: -0.15rem 0 0.7rem;
}

.reflection-tool-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.reflection-tool-meta span[data-state="saved"] {
  color: rgba(104, 82, 62, 0.86);
}

.reflection-tool-meta span[data-state="error"] {
  color: #8a4b3f;
}

.reflection-photo-preview,
.reflection-detail-photo {
  overflow: hidden;
  margin: 0 0 0.75rem;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 1.05rem;
  background: rgba(255, 250, 243, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.reflection-photo-preview img,
.reflection-detail-photo img {
  display: block;
  width: 100%;
  max-height: 18rem;
  object-fit: cover;
}

.reflection-photo-preview button {
  width: 100%;
  min-height: 2.65rem;
  border: 0;
  border-top: 1px solid rgba(93, 70, 56, 0.1);
  background: rgba(255, 250, 243, 0.62);
  color: var(--coffee);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
}

.status-panel h2 {
  font-size: 4rem;
  line-height: 0.9;
}

.progress-layout {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 23rem);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

.reminder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: 1.15rem;
  align-items: start;
}

.reminder-panel,
.notification-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.88), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.reminder-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.65rem);
}

.reminder-paused-note {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 252, 246, 0.72);
  color: var(--muted);
  line-height: 1.55;
}

.reminder-row-primary {
  border-color: rgba(183, 138, 78, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.72), rgba(246, 238, 228, 0.56)),
    rgba(255, 250, 243, 0.68);
}

.reminder-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(8rem, 11rem);
  gap: 1rem;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: var(--radius);
  padding: 1rem 1rem 1.22rem;
  background: rgba(255, 253, 248, 0.58);
}

.reminder-row > * {
  min-width: 0;
}

.reminder-row label:not(.toggle-line),
.reminder-row input[type="time"] {
  width: 100%;
  max-width: 100%;
  inline-size: 100%;
  max-inline-size: 100%;
}

.reminder-row input[type="time"] {
  display: block;
  box-sizing: border-box;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
}

.reminder-row input[type="time"]::-webkit-date-and-time-value {
  min-width: 0;
  margin: 0;
  text-align: left;
}

.reminder-row input[type="time"]::-webkit-calendar-picker-indicator {
  flex-shrink: 0;
  margin-right: 0;
}

.notification-setup-panel {
  display: grid;
  gap: 1rem;
}

.notification-setup-panel h2 {
  max-width: 37rem;
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 500;
  line-height: 1.04;
}

.notification-setup-panel p:not(.eyebrow) {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.reminder-accordion {
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.48);
  overflow: hidden;
  transition:
    border-color var(--motion-base) ease,
    box-shadow var(--motion-base) ease,
    transform var(--motion-base) ease;
}

.reminder-accordion-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 100%;
  min-height: 3.4rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  border: 0;
  padding: 0.88rem 1rem;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
}

.reminder-accordion-trigger span,
.reminder-accordion-trigger em,
.reminder-accordion-trigger strong,
.reminder-accordion-trigger i {
  display: block;
  min-width: 0;
}

.reminder-accordion-trigger em {
  color: var(--clay);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.reminder-accordion-trigger strong {
  margin-top: 0.2rem;
  color: var(--coffee);
  font-size: 0.95rem;
}

.reminder-accordion-trigger span strong:first-child {
  margin-top: 0;
}

.reminder-accordion-trigger i {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.reminder-accordion-trigger b {
  display: grid;
  align-self: center;
  justify-self: end;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
  color: var(--coffee);
  line-height: 1;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(93, 70, 56, 0.08);
  transition:
    transform var(--motion-base) var(--ease-calm),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.reminder-accordion.is-open .reminder-accordion-trigger b {
  transform: rotate(180deg);
}

.reminder-accordion-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
  overflow: hidden;
  padding: 0 1rem 1rem;
  animation: accordionPanelIn var(--motion-base) var(--ease-calm) both;
}

.reminder-accordion-panel[hidden] {
  display: none;
}

.reminder-accordion-panel .reminder-row,
.reminder-accordion-panel .timezone-note {
  margin: 0;
}

.reminder-row h2,
.notification-panel h2 {
  margin: 0.35rem 0 0.4rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1.05;
}

.reminder-row p:not(.eyebrow),
.notification-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.timezone-note {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(93, 70, 56, 0.1);
  padding-top: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.timezone-note strong {
  color: var(--coffee);
  overflow-wrap: anywhere;
  text-align: right;
}

.notification-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.65rem);
}

.notification-onboarding {
  display: grid;
  gap: 0.85rem;
  border: 1px solid rgba(183, 138, 78, 0.18);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 1.65rem);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.92), rgba(246, 238, 228, 0.72)),
    rgba(255, 250, 243, 0.78);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.notification-onboarding[hidden] {
  display: none;
}

.notification-onboarding h2 {
  margin: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  font-weight: 500;
  line-height: 1.05;
}

.notification-onboarding p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.notification-panel .secondary-action {
  width: 100%;
}

.clarity-moments-panel,
.clarity-moment-list {
  display: grid;
  gap: 1rem;
}

.toggle-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  border: 1px solid rgba(93, 70, 56, 0.11);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 250, 243, 0.58);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.clarity-moment-row {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid rgba(93, 70, 56, 0.11);
  border-radius: 14px;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.84), rgba(246, 238, 228, 0.62)),
    rgba(255, 250, 243, 0.72);
  box-shadow: 0 14px 36px rgba(74, 56, 42, 0.06), var(--inner-light);
}

.clarity-moment-fields {
  display: grid;
  gap: 0.75rem;
}

.clarity-moment-fields label {
  display: grid;
  gap: 0.35rem;
  color: var(--coffee);
  font-size: 0.82rem;
  font-weight: 750;
}

.clarity-moment-fields textarea {
  min-height: 6rem;
  resize: vertical;
}

.clarity-moment-fields small {
  justify-self: end;
  color: var(--muted);
  font-size: 0.75rem;
}

.clarity-moment-card {
  width: min(100%, 47rem);
  border: 1px solid rgba(183, 138, 78, 0.18);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 1.45rem);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.84), rgba(246, 238, 228, 0.64)),
    rgba(255, 250, 243, 0.78);
  box-shadow: 0 18px 54px rgba(74, 56, 42, 0.08), var(--inner-light);
}

.clarity-moment-card p:not(.eyebrow) {
  margin: 0.45rem 0 0;
  color: var(--charcoal);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.22;
}

.clarity-moment-time-row {
  align-items: stretch;
}

.clarity-moment-time-row input {
  max-width: 100%;
}

.insight-card,
.insight-hero,
.insight-chart-panel,
.insight-map-panel,
.reflection-entry {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.88), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.insight-hero {
  grid-column: span 5;
  display: grid;
  min-height: 26rem;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  place-items: center;
  text-align: center;
}

.insight-chart-panel {
  grid-column: span 7;
  min-height: 12rem;
  padding: clamp(1.2rem, 3vw, 1.65rem);
}

.insight-weekly-panel {
  grid-column: span 7;
}

.insight-map-panel {
  grid-column: 1 / -1;
  padding: clamp(1.2rem, 3vw, 1.65rem);
}

.insight-label,
.insight-card span,
.reflection-entry span {
  display: block;
  color: var(--clay);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.insight-hero h2,
.insight-chart-panel h2,
.insight-map-panel h2 {
  margin: 0.55rem 0 1rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
}

.insight-hero h2 {
  margin-bottom: 1.35rem;
  color: var(--coffee);
}

.insight-ring {
  --ring-value: 0deg;
  display: grid;
  width: min(21rem, 72vw);
  border-radius: 50%;
  aspect-ratio: 1;
  place-items: center;
  background:
    radial-gradient(circle, rgba(255, 250, 243, 0.92) 0 58%, transparent 59%),
    conic-gradient(from -90deg, #b78a4e 0 var(--ring-value), rgba(230, 218, 203, 0.78) var(--ring-value) 360deg);
  box-shadow:
    0 28px 70px rgba(111, 90, 72, 0.16),
    inset 0 0 0 12px rgba(255, 252, 246, 0.82),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.insight-ring::before {
  grid-area: 1 / 1;
  width: 70%;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: inherit;
  aspect-ratio: 1;
  background: linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.64));
  box-shadow: inset 0 1px 16px rgba(255, 255, 255, 0.76);
  content: "";
}

.insight-ring p,
.insight-ring strong,
.insight-ring em {
  position: relative;
  grid-area: 1 / 1;
}

.insight-ring strong {
  color: var(--charcoal);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(4rem, 10vw, 6.8rem);
  font-weight: 400;
  line-height: 0.85;
}

.insight-ring p {
  margin: 7.1rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

.insight-ring em {
  margin-top: 10.1rem;
  color: var(--coffee);
  font-size: 0.92rem;
  font-style: normal;
  font-weight: 700;
}

.insight-ring + p {
  margin: 0;
}

.insight-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  min-height: 13rem;
  gap: 0.65rem;
  padding-top: 0.7rem;
}

.insight-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  height: 12rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.insight-bar i {
  display: block;
  width: 100%;
  min-height: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px 999px 5px 5px;
  background: linear-gradient(180deg, #c8a05f 0%, #8d6d49 100%);
  box-shadow: 0 12px 26px rgba(111, 90, 72, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.insight-bar:hover i,
.weekly-bar:hover b,
.insight-journey-map .progress-day:hover {
  box-shadow: 0 16px 32px rgba(111, 90, 72, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.48);
  transform: translateY(-1px);
}

.insight-bar span {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.weekly-bars {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.35rem;
}

.weekly-bar {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 0.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.weekly-bar span,
.weekly-bar em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
}

.weekly-bar i {
  display: block;
  height: 0.62rem;
  overflow: hidden;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  background: rgba(231, 219, 205, 0.78);
  box-shadow: inset 0 1px 4px rgba(93, 70, 56, 0.08);
}

.weekly-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8d6d49, #c8a05f);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.insight-metrics {
  grid-column: span 5;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.insight-card {
  min-height: 8rem;
  padding: 1.2rem;
}

.insight-card strong {
  display: block;
  margin-top: 0.75rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 0.9;
}

.insight-journey-map {
  display: grid;
  grid-template-columns: repeat(30, minmax(0.45rem, 1fr));
  gap: 0.38rem;
}

.insight-map-legend {
  margin-top: 1rem;
}

.insight-note {
  max-width: 48rem;
}

.reflection-timeline {
  display: grid;
  max-width: 58rem;
  gap: 1rem;
}

.journal-controls {
  display: grid;
  max-width: 58rem;
  gap: 0.85rem;
  margin-top: -0.7rem;
  margin-bottom: 1.2rem;
}

.journal-search {
  display: grid;
  gap: 0.45rem;
  color: var(--coffee);
  font-weight: 700;
}

.journal-search span,
.journal-result-note {
  color: var(--muted);
  font-size: 0.82rem;
}

.journal-search span {
  display: none;
}

.journal-search input {
  min-height: 3.6rem;
}

.journal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.journal-actions .secondary-action,
.journal-view-all {
  min-height: 3.1rem;
}

.journal-actions .is-active {
  border-color: rgba(183, 138, 78, 0.36);
  background: linear-gradient(180deg, rgba(107, 81, 64, 0.96), rgba(78, 59, 48, 0.98));
  color: var(--warm-white);
}

.journal-result-note {
  min-height: 1rem;
  margin: 0;
}

.reflection-entry {
  position: relative;
  padding: clamp(1.1rem, 3vw, 1.5rem);
}

.reflection-entry-open {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  padding: 0 3.25rem 0 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.reflection-entry h2 {
  margin: 0.35rem 0 0.3rem;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
}

.reflection-entry p {
  margin: 0.8rem 0 0;
  color: var(--charcoal);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.45;
}

.reflection-entry small {
  color: var(--muted);
}

.reflection-favorite {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.62);
  color: var(--gold);
  cursor: pointer;
  font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.reflection-entry:hover,
.reflection-favorite:hover {
  transform: translateY(-1px);
}

.journal-view-all {
  width: fit-content;
  margin-top: 1rem;
}

.reflection-modal-panel {
  max-width: 44rem;
}

.reflection-detail-meta {
  margin: 0.35rem 0 1.2rem;
  color: var(--muted);
  font-weight: 700;
}

.reflection-reader {
  min-height: 12rem;
  margin: 1.4rem 0;
  color: var(--charcoal);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.45;
  white-space: pre-wrap;
}

.reflection-editor textarea {
  min-height: 14rem;
}

.reflection-detail-footer {
  gap: 0.75rem;
}

.reflection-edit-status {
  flex: 1 1 10rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.empty-state {
  color: var(--muted);
  line-height: 1.6;
}

.progress-stats {
  margin-bottom: 1.35rem;
}

.progress-stats span,
.journey-detail span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-stats strong,
.journey-detail strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.progress-grid {
  display: grid;
  grid-template-columns: repeat(15, minmax(0.75rem, 1fr));
  gap: 0.48rem;
}

.progress-day,
.legend i {
  border-radius: 4px;
  aspect-ratio: 1;
}

.progress-day {
  border: 1px solid rgba(93, 70, 56, 0.13);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.progress-day:hover {
  box-shadow: 0 8px 20px rgba(74, 56, 42, 0.12);
  transform: translateY(-1px);
}

.complete,
.state-complete {
  background: #6f5a48;
}

.partial,
.state-partial {
  background: #c4a98d;
}

.missed,
.state-missed {
  background: #ddd2c4;
}

.open,
.state-open {
  background: rgba(255, 253, 248, 0.95);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend i {
  display: inline-block;
  width: 0.75rem;
  border: 1px solid rgba(93, 70, 56, 0.13);
}

.milestone-screen.active,
.completion-screen.active {
  display: grid;
  place-items: center;
}

.milestone-card,
.completion-card {
  max-width: 48rem;
  padding: clamp(1.5rem, 5vw, 3.25rem);
  text-align: center;
}

.milestone-day {
  display: inline-grid;
  min-width: 4.5rem;
  min-height: 4.5rem;
  margin: 1rem 0;
  place-items: center;
  border-radius: 50%;
  background: var(--coffee);
  color: var(--warm-white);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.2rem;
}

.milestone-card h1,
.completion-card h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}

.completion-message {
  max-width: 34rem;
  margin: 0.9rem auto 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.completion-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
  text-align: left;
}

.completion-summary div {
  border: 1px solid rgba(93, 70, 56, 0.09);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  background: rgba(255, 250, 243, 0.52);
}

.completion-summary span {
  display: block;
  margin-bottom: 0.28rem;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.completion-summary strong {
  display: block;
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.milestone-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.journey-empty,
.journey-detail {
  max-width: 48rem;
  margin: 0 0 1.4rem;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  box-shadow: var(--soft-shadow), var(--inner-light);
}

.journey-empty p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.35;
}

.journey-section {
  max-width: 58rem;
  margin-bottom: 1.65rem;
}

.reminder-summary-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: min(48rem, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  color: var(--charcoal);
  font: inherit;
  text-align: left;
  box-shadow: 0 12px 34px rgba(74, 56, 42, 0.07), var(--inner-light);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.reminder-summary-card:hover {
  border-color: rgba(183, 138, 78, 0.26);
  box-shadow: 0 18px 42px rgba(74, 56, 42, 0.1), var(--inner-light);
  transform: translateY(-1px);
}

.reminder-summary-card em,
.reminder-summary-card strong,
.reminder-summary-card i {
  display: block;
}

.reminder-summary-card em {
  color: var(--clay);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.reminder-summary-card strong {
  margin-top: 0.25rem;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.65rem;
  font-weight: 500;
}

.reminder-summary-card i {
  justify-self: end;
  border-radius: 999px;
  padding: 0.62rem 0.9rem;
  background: rgba(255, 250, 243, 0.72);
  color: var(--coffee);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(93, 70, 56, 0.08);
}

.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: 48rem;
  margin: 0 0 0.85rem;
}

.library-heading .eyebrow {
  margin: 0;
}

.library-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  text-align: right;
}

.journey-accordion .library-heading {
  display: block;
}

.journey-accordion .library-heading span {
  text-align: left;
}

.journey-editor {
  max-width: 48rem;
  margin: 0 0 1.4rem;
  padding: clamp(1rem, 3vw, 1.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.82), rgba(246, 238, 228, 0.62)),
    rgba(255, 250, 243, 0.7);
  box-shadow: 0 12px 34px rgba(74, 56, 42, 0.07), var(--inner-light);
}

.journey-editor .field-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.75fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.journey-editor label,
.journey-editor input {
  min-width: 0;
}

.journey-editor .secondary-action {
  position: relative;
  z-index: 1;
}

.journey-library-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 48rem;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(93, 70, 56, 0.09);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.54);
}

.journey-library-action p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.journey-library {
  display: grid;
  max-width: 48rem;
  gap: 0.85rem;
  margin: 0 0 1.4rem;
}

.journey-library-card {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.7)),
    rgba(255, 250, 243, 0.72);
  color: var(--charcoal);
  cursor: pointer;
  font: inherit;
  text-align: left;
  box-shadow: 0 12px 34px rgba(74, 56, 42, 0.07), var(--inner-light);
}

.journey-library-card:hover {
  transform: translateY(-1px);
}

.journey-library-card.archived {
  opacity: 0.94;
}

.journey-card-actions {
  display: grid;
  justify-items: end;
  gap: 0.65rem;
}

.journey-card-actions small {
  color: var(--muted);
  font-size: 0.78rem;
}

.journey-library-card strong,
.journey-library-card span {
  display: block;
}

.journey-library-card strong {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
}

.journey-library-card span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.journey-status {
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(93, 70, 56, 0.08);
  color: var(--coffee);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.archive-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 700;
}

.today-empty-state {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
}

.today-empty-state p {
  margin: 0 0 0.35rem;
  color: var(--muted);
  line-height: 1.6;
}

.archive-modal-panel {
  max-width: 54rem;
}

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

.archive-reading {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  max-height: min(36rem, 54vh);
  overflow: auto;
  padding-right: 0.2rem;
}

.archive-reflection {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(255, 250, 243, 0.52);
}

.archive-reflection strong,
.archive-reflection small {
  display: block;
}

.archive-reflection strong {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.archive-reflection small {
  margin-top: 0.25rem;
  color: var(--muted);
}

.archive-reflection p {
  margin: 0.7rem 0 0;
  color: var(--charcoal);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.5;
}

.journey-accordion {
  max-width: 48rem;
  margin: 0 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.66)),
    rgba(255, 250, 243, 0.72);
  box-shadow: 0 12px 34px rgba(74, 56, 42, 0.065), var(--inner-light);
  overflow: hidden;
  transition:
    border-color var(--motion-base) ease,
    box-shadow var(--motion-base) ease,
    transform var(--motion-base) ease;
}

.journey-accordion-trigger {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 100%;
  min-height: 4.15rem;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 0;
  padding: 1rem 1.1rem;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
}

.journey-accordion-trigger span,
.journey-accordion-trigger em,
.journey-accordion-trigger strong,
.journey-accordion-trigger i {
  display: block;
  min-width: 0;
}

.journey-accordion-trigger > span,
.reminder-accordion-trigger > span {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.82rem;
  align-items: center;
}

.journey-accordion-trigger em {
  color: var(--clay);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.journey-accordion-trigger strong {
  margin-top: 0.25rem;
  font-family: Newsreader, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.journey-accordion-trigger span strong:first-child {
  margin-top: 0;
}

.journey-accordion-trigger i {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.journey-accordion-trigger b {
  display: grid;
  align-self: center;
  justify-self: end;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.72);
  color: var(--coffee);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(93, 70, 56, 0.08);
  transition:
    transform var(--motion-base) var(--ease-calm),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.journey-accordion.is-open .journey-accordion-trigger b {
  transform: rotate(180deg);
}

.journey-accordion-panel {
  display: grid;
  gap: 1rem;
  padding: 0 1.1rem 1.1rem;
  animation: accordionPanelIn var(--motion-base) var(--ease-calm) both;
}

.journey-accordion-panel[hidden] {
  display: none;
}

.journey-accordion .journey-detail,
.journey-accordion .journey-editor,
.journey-accordion .journey-library {
  max-width: none;
  margin-bottom: 0;
}

.journey-routine-list {
  display: grid;
  gap: 0.58rem;
}

.journey-routine-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 2.85rem;
  border: 1px solid rgba(93, 70, 56, 0.09);
  border-radius: var(--radius);
  padding: 0.65rem 0.8rem;
  background: rgba(255, 250, 243, 0.56);
}

.journey-routine-item span {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
}

.journey-routine-item strong {
  color: var(--coffee);
  font-size: 0.95rem;
}

.journey-routine-editor {
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
}

.journey-routine-name {
  min-width: 0;
}

.journey-routine-editor label,
.journey-routine-add label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.journey-routine-editor input,
.journey-routine-add input {
  width: 100%;
  min-height: 2.85rem;
}

.journey-routine-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.routine-icon-action {
  display: grid;
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.7);
  color: var(--coffee);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0.65rem 1.4rem rgba(93, 70, 56, 0.06);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.routine-icon-action:hover,
.routine-icon-action:focus-visible {
  border-color: rgba(177, 134, 72, 0.32);
  box-shadow: 0 0.85rem 1.7rem rgba(93, 70, 56, 0.1);
  transform: translateY(-1px);
}

.routine-icon-action.danger {
  color: rgba(93, 70, 56, 0.72);
}

.journey-routine-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  border: 1px dashed rgba(93, 70, 56, 0.14);
  border-radius: var(--radius);
  padding: 0.8rem;
  background: rgba(255, 250, 243, 0.44);
}

.field-helper {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.open-today-action {
  margin-top: 0.45rem;
}

.day-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(49, 43, 39, 0.28);
  backdrop-filter: blur(12px);
  animation: modalBackdropIn var(--motion-base) ease both;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(49, 43, 39, 0.24);
  backdrop-filter: blur(12px);
  animation: modalBackdropIn var(--motion-base) ease both;
}

.account-modal[hidden] {
  display: none;
}

.account-panel {
  position: relative;
  display: grid;
  width: min(24rem, 100%);
  gap: 0.55rem;
  justify-items: center;
  padding: 2rem;
  text-align: center;
  animation: modalPanelIn var(--motion-base) var(--ease-calm) both;
}

.account-panel .day-modal-close {
  width: 2.75rem;
  height: 2.75rem;
  border-color: rgba(93, 70, 56, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(244, 235, 224, 0.78)),
    rgba(255, 250, 243, 0.86);
  color: var(--coffee);
  font-size: 1.05rem;
  box-shadow: 0 14px 34px rgba(74, 56, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.account-panel .day-modal-close {
  font-size: 0;
}

.account-panel .day-modal-close::before,
.account-panel .day-modal-close::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.account-panel .day-modal-close::before {
  transform: rotate(45deg);
}

.account-panel .day-modal-close::after {
  transform: rotate(-45deg);
}

.account-avatar {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.35rem;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #e8d9c5, #d8c4aa);
  color: var(--coffee);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.account-panel p {
  max-width: 100%;
  margin: 0.2rem 0 0.8rem;
  overflow-wrap: anywhere;
}

.account-profile-form {
  display: grid;
  width: 100%;
  gap: 0.8rem;
  margin: 0.2rem 0 0.45rem;
  text-align: left;
}

.account-profile-form .secondary-action,
.account-panel > .secondary-action {
  width: 100%;
}

.account-save-status {
  min-height: 1.2rem;
  margin: -0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.feedback-panel,
.delete-account-panel {
  width: min(30rem, 100%);
  justify-items: stretch;
  text-align: left;
}

.feedback-panel h2,
.delete-account-panel h2 {
  text-align: center;
}

.feedback-panel > .eyebrow,
.delete-account-panel > .eyebrow {
  text-align: center;
}

.feedback-form {
  display: grid;
  gap: 0.85rem;
}

.feedback-form textarea {
  min-height: 9rem;
}

.feedback-form .primary-action,
.delete-account-panel .primary-action,
.delete-account-panel .secondary-action {
  width: 100%;
}

.delete-account-panel p:not(.eyebrow) {
  margin: 0 0 0.55rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
}

.policy-modal-panel {
  width: min(42rem, 100%);
  max-height: min(82dvh, 45rem);
  overflow: auto;
}

.policy-body {
  display: grid;
  gap: 1.05rem;
  margin-top: 1rem;
}

.policy-body section,
.policy-updated {
  margin: 0;
}

.policy-body h3 {
  margin: 0 0 0.35rem;
  color: var(--coffee);
  font-family: Newsreader, Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.policy-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.account-inline-action {
  width: fit-content;
  margin-top: 1rem;
}

.settings-layout {
  display: grid;
  width: min(100%, 54rem);
  max-width: 54rem;
  gap: 0.9rem;
}

.settings-screen {
  padding-right: clamp(2rem, 4vw, 4rem);
}

.settings-section {
  display: grid;
  min-width: 0;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 0;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.86), rgba(246, 238, 228, 0.66)),
    rgba(255, 250, 243, 0.72);
  box-shadow: 0 12px 34px rgba(74, 56, 42, 0.065), var(--inner-light);
}

.settings-section-trigger {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.82rem;
  align-items: center;
  border: 0;
  padding: clamp(0.95rem, 3vw, 1.2rem) clamp(1rem, 3vw, 1.35rem);
  background: transparent;
  color: var(--coffee);
  text-align: left;
}

.settings-section-trigger em,
.settings-section-trigger strong {
  display: block;
  font-style: normal;
}

.settings-section-trigger em {
  display: none;
}

.settings-section-trigger strong {
  margin-top: 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 500;
  line-height: 1.05;
}

.settings-section-trigger b {
  display: grid;
  align-self: center;
  justify-self: end;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.72);
  color: var(--clay);
  font-size: 1rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(93, 70, 56, 0.08);
  transition:
    transform var(--motion-base) var(--ease-calm),
    background var(--motion-fast) ease,
    color var(--motion-fast) ease;
}

.settings-section.is-open .settings-section-trigger b {
  transform: rotate(180deg);
}

.journey-accordion-trigger .settings-section-icon,
.reminder-accordion-trigger .settings-section-icon,
.settings-section-icon {
  display: inline-grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.1);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.52);
  color: var(--clay);
}

.journey-accordion-trigger .settings-section-icon svg,
.reminder-accordion-trigger .settings-section-icon svg,
.settings-section-icon svg {
  width: 1.18rem;
  height: 1.18rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.settings-section-panel {
  padding: 0 clamp(1rem, 3vw, 1.35rem) clamp(1rem, 3vw, 1.35rem);
  animation: accordionPanelIn var(--motion-base) var(--ease-calm) both;
}

.settings-section .settings-section-panel[hidden] {
  display: none !important;
}

@keyframes accordionPanelIn {
  from {
    opacity: 0;
    transform: translateY(-0.35rem);
    clip-path: inset(0 0 100% 0);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(12px);
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.settings-form,
.settings-actions,
.settings-list,
.settings-data-grid {
  display: grid;
  gap: 0.8rem;
}

.settings-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-data-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.settings-data-grid div,
.settings-list div {
  border: 1px solid rgba(93, 70, 56, 0.09);
  border-radius: var(--radius);
  padding: 0.85rem 0.9rem;
  background: rgba(255, 250, 243, 0.52);
}

.settings-data-grid span,
.settings-list span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--clay);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
}

.settings-data-grid strong,
.settings-list strong {
  color: var(--coffee);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.settings-link-button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--coffee);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.settings-link-button:hover,
.settings-link-button:focus-visible {
  color: var(--gold);
  outline: none;
}

.danger-zone {
  display: grid;
  gap: 0.72rem;
  margin-top: 1rem;
  border: 1px solid rgba(127, 66, 52, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(127, 66, 52, 0.055);
}

.danger-zone h3,
.danger-zone p {
  margin: 0;
}

.danger-zone h3 {
  font-family: Newsreader, Georgia, serif;
  font-size: 1.4rem;
  font-weight: 500;
}

.danger-zone p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.danger-action,
.danger-primary {
  border-color: rgba(127, 66, 52, 0.24);
}

.settings-status,
.settings-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.55;
}

.appearance-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  border: 0;
  padding: 0;
}

.appearance-options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.appearance-options label {
  display: grid;
  min-height: 3.1rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.58);
  color: var(--coffee);
  cursor: pointer;
  font-weight: 800;
}

.appearance-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.appearance-options label:has(input:checked) {
  border-color: rgba(183, 138, 78, 0.36);
  background: linear-gradient(180deg, rgba(107, 81, 64, 0.96), rgba(78, 59, 48, 0.98));
  color: var(--warm-white);
  box-shadow: 0 14px 34px rgba(93, 70, 56, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

:root[data-theme="dark"] .rail,
:root[data-theme="dark"] .app-topbar,
:root[data-theme="dark"] .journey-summary,
:root[data-theme="dark"] .soft-panel,
:root[data-theme="dark"] .suggestion-panel,
:root[data-theme="dark"] .note-panel,
:root[data-theme="dark"] .status-panel,
:root[data-theme="dark"] .progress-panel,
:root[data-theme="dark"] .milestone-card,
:root[data-theme="dark"] .completion-card,
:root[data-theme="dark"] .settings-section,
:root[data-theme="dark"] .journey-accordion,
:root[data-theme="dark"] .reminder-accordion,
:root[data-theme="dark"] .insight-card,
:root[data-theme="dark"] .insight-hero,
:root[data-theme="dark"] .insight-chart-panel,
:root[data-theme="dark"] .insight-map-panel,
:root[data-theme="dark"] .reflection-entry,
:root[data-theme="dark"] .reflection-modal-panel,
:root[data-theme="dark"] .archive-modal-panel,
:root[data-theme="dark"] .checkin-card,
:root[data-theme="dark"] .quote-panel,
:root[data-theme="dark"] .continue-card,
:root[data-theme="dark"] .progress-showcase,
:root[data-theme="dark"] .clarity-moment-row,
:root[data-theme="dark"] .clarity-moment-card,
:root[data-theme="dark"] .toggle-row,
:root[data-theme="dark"] .account-panel,
:root[data-theme="dark"] .day-modal-panel {
  background:
    linear-gradient(145deg, rgba(45, 35, 28, 0.92), rgba(30, 24, 20, 0.86)),
    rgba(33, 27, 22, 0.9);
}

:root[data-theme="dark"] .reminder-paused-note {
  background: rgba(255, 246, 232, 0.06);
  border-color: rgba(244, 221, 190, 0.14);
  color: var(--muted);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .secondary-action,
:root[data-theme="dark"] .routine-input button,
:root[data-theme="dark"] .suggestion-panel button,
:root[data-theme="dark"] .side-nav a span,
:root[data-theme="dark"] .mobile-global-button,
:root[data-theme="dark"] .mobile-screen-exit,
:root[data-theme="dark"] .settings-data-grid div,
:root[data-theme="dark"] .settings-list div,
:root[data-theme="dark"] .completion-summary div,
:root[data-theme="dark"] .archive-reflection,
:root[data-theme="dark"] .settings-section-icon,
:root[data-theme="dark"] .journey-routine-item,
:root[data-theme="dark"] .routine-row,
:root[data-theme="dark"] .timezone-note,
:root[data-theme="dark"] .appearance-options label {
  border-color: rgba(228, 208, 184, 0.14);
  background: rgba(22, 18, 15, 0.62);
  color: var(--charcoal);
}

:root[data-theme="dark"] .clarity-moment-card p:not(.eyebrow),
:root[data-theme="dark"] .clarity-moment-fields label {
  color: #f3e7da;
}

:root[data-theme="dark"] .reflection-favorite {
  border-color: rgba(228, 208, 184, 0.18);
  background: rgba(22, 18, 15, 0.62);
  color: #d8b17c;
}

:root[data-theme="dark"] .side-nav a span {
  color: #d8b17c;
}

:root[data-theme="dark"] .mobile-global-button,
:root[data-theme="dark"] .mobile-screen-exit,
:root[data-theme="dark"] .account-panel .day-modal-close {
  color: #d8b17c;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(244, 221, 190, 0.08);
}

:root[data-theme="dark"] .secondary-action,
:root[data-theme="dark"] .routine-input button,
:root[data-theme="dark"] .suggestion-panel button,
:root[data-theme="dark"] .auth-provider-button,
:root[data-theme="dark"] .reflection-tool,
:root[data-theme="dark"] .reflection-photo-preview button {
  border-color: rgba(228, 208, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(238, 226, 211, 0.84));
  color: #4f3b30;
}

:root[data-theme="dark"] .auth-provider-button.subtle {
  background: rgba(22, 18, 15, 0.62);
  color: #f3e7da;
}

:root[data-theme="dark"] .reflection-tool-meta span {
  color: #cdbba7;
}

:root[data-theme="dark"] .reflection-tool-meta span[data-state="saved"] {
  color: #d8b17c;
}

:root[data-theme="dark"] .reflection-tool-meta span[data-state="error"] {
  color: #e7a391;
}

:root[data-theme="dark"] .reflection-photo-preview,
:root[data-theme="dark"] .reflection-detail-photo {
  border-color: rgba(228, 208, 184, 0.14);
  background: rgba(22, 18, 15, 0.62);
}

:root[data-theme="dark"] .onboarding-progress span {
  background: rgba(244, 221, 190, 0.18);
}

:root[data-theme="dark"] .onboarding-steps strong {
  color: #f3e7da;
}

:root[data-theme="dark"] .onboarding-steps p {
  color: #cdbba7;
}

:root[data-theme="dark"] .checklist label.routine-row {
  color: #f3e7da;
}

:root[data-theme="dark"] .checklist label.routine-row > span {
  color: #f3e7da;
}

:root[data-theme="dark"] .checklist label.routine-row.is-completed {
  opacity: 0.92;
}

:root[data-theme="dark"] .checklist label.routine-row.is-completed > span {
  color: #d8c8b6;
  text-decoration-color: rgba(216, 200, 182, 0.44);
}

:root[data-theme="dark"] .reflection-save-status[data-state="saved"] {
  color: #d8b17c;
}

:root[data-theme="dark"] .reflection-save-status[data-state="error"] {
  color: #e7a391;
}

:root[data-theme="dark"] .progress-orb span,
:root[data-theme="dark"] .insight-ring strong {
  color: #5a4133;
}

:root[data-theme="dark"] .progress-orb small,
:root[data-theme="dark"] .insight-ring p {
  color: #7a6250;
}

:root[data-theme="dark"] .muted,
:root[data-theme="dark"] .settings-status,
:root[data-theme="dark"] .settings-note,
:root[data-theme="dark"] .screen-header p,
:root[data-theme="dark"] .journey-summary p,
:root[data-theme="dark"] .routine-row span,
:root[data-theme="dark"] .reflection-label,
:root[data-theme="dark"] .field-helper,
:root[data-theme="dark"] .empty-state {
  color: #cdbba7;
}

:root[data-theme="dark"] .journal-search,
:root[data-theme="dark"] .reflection-reader,
:root[data-theme="dark"] .reflection-entry p,
:root[data-theme="dark"] .archive-reflection p {
  color: #f2e4d5;
}

:root[data-theme="dark"] .settings-section-trigger em,
:root[data-theme="dark"] .journey-accordion-trigger em,
:root[data-theme="dark"] .reminder-accordion-trigger em,
:root[data-theme="dark"] .settings-data-grid span,
:root[data-theme="dark"] .settings-list span,
:root[data-theme="dark"] .completion-summary span {
  color: #d8b17c;
}

:root[data-theme="dark"] .settings-section-trigger,
:root[data-theme="dark"] .journey-accordion-trigger,
:root[data-theme="dark"] .reminder-accordion-trigger,
:root[data-theme="dark"] .journey-accordion-trigger strong,
:root[data-theme="dark"] .reminder-accordion-trigger strong,
:root[data-theme="dark"] .settings-data-grid strong,
:root[data-theme="dark"] .settings-list strong,
:root[data-theme="dark"] .completion-summary strong,
:root[data-theme="dark"] .routine-title,
:root[data-theme="dark"] .routine-row strong {
  color: #f5e9dc;
}

:root[data-theme="dark"] .settings-link-button,
:root[data-theme="dark"] .policy-body h3 {
  color: #f5e9dc;
}

:root[data-theme="dark"] .danger-zone {
  border-color: rgba(232, 170, 134, 0.24);
  background: rgba(232, 170, 134, 0.055);
}

:root[data-theme="dark"] label {
  color: #eadbc9;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
  border-color: rgba(244, 221, 190, 0.22);
  background:
    linear-gradient(180deg, rgba(49, 39, 32, 0.96), rgba(34, 27, 23, 0.94)),
    rgba(34, 27, 23, 0.96);
  color: #fff4e8;
  caret-color: #d8b17c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(244, 221, 190, 0.08);
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #bfae9b;
  opacity: 1;
}

:root[data-theme="dark"] input:disabled,
:root[data-theme="dark"] input[readonly],
:root[data-theme="dark"] textarea:disabled,
:root[data-theme="dark"] select:disabled {
  color: #d1c0ad;
  background: rgba(22, 18, 15, 0.58);
}

:root[data-theme="dark"] .auth-copy p,
:root[data-theme="dark"] .auth-smallprint,
:root[data-theme="dark"] .auth-message,
:root[data-theme="dark"] .feedback-form label,
:root[data-theme="dark"] .account-panel label {
  color: #dfcfbd;
}

:root[data-theme="dark"] .onboarding-modal-screen.active {
  background:
    radial-gradient(circle at 50% 82%, rgba(244, 221, 190, 0.08), transparent 18rem),
    rgba(10, 8, 7, 0.62);
}

:root[data-theme="dark"] .onboarding-modal-screen .screen-header,
:root[data-theme="dark"] .onboarding-modal-screen .content-grid,
:root[data-theme="dark"] .onboarding-modal-screen form.soft-panel,
:root[data-theme="dark"] .onboarding-modal-screen .soft-panel,
:root[data-theme="dark"] .onboarding-modal-screen .suggestion-panel,
:root[data-theme="dark"] .onboarding-modal-screen .note-panel {
  border-color: rgba(228, 208, 184, 0.14);
  background:
    linear-gradient(145deg, rgba(45, 35, 28, 0.92), rgba(30, 24, 20, 0.86)),
    rgba(33, 27, 22, 0.9);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .rail,
  :root[data-theme="system"] .app-topbar,
  :root[data-theme="system"] .journey-summary,
  :root[data-theme="system"] .soft-panel,
  :root[data-theme="system"] .suggestion-panel,
  :root[data-theme="system"] .note-panel,
  :root[data-theme="system"] .status-panel,
  :root[data-theme="system"] .progress-panel,
  :root[data-theme="system"] .milestone-card,
  :root[data-theme="system"] .completion-card,
  :root[data-theme="system"] .settings-section,
  :root[data-theme="system"] .journey-accordion,
  :root[data-theme="system"] .reminder-accordion,
  :root[data-theme="system"] .insight-card,
  :root[data-theme="system"] .insight-hero,
  :root[data-theme="system"] .insight-chart-panel,
  :root[data-theme="system"] .insight-map-panel,
  :root[data-theme="system"] .reflection-entry,
  :root[data-theme="system"] .reflection-modal-panel,
  :root[data-theme="system"] .archive-modal-panel,
  :root[data-theme="system"] .checkin-card,
  :root[data-theme="system"] .quote-panel,
  :root[data-theme="system"] .continue-card,
  :root[data-theme="system"] .progress-showcase,
  :root[data-theme="system"] .clarity-moment-row,
  :root[data-theme="system"] .clarity-moment-card,
  :root[data-theme="system"] .toggle-row,
  :root[data-theme="system"] .account-panel,
  :root[data-theme="system"] .day-modal-panel {
    background:
      linear-gradient(145deg, rgba(45, 35, 28, 0.92), rgba(30, 24, 20, 0.86)),
      rgba(33, 27, 22, 0.9);
  }
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .secondary-action,
  :root[data-theme="system"] .routine-input button,
  :root[data-theme="system"] .suggestion-panel button,
  :root[data-theme="system"] .auth-provider-button,
  :root[data-theme="system"] .reflection-tool,
  :root[data-theme="system"] .reflection-photo-preview button {
    border-color: rgba(228, 208, 184, 0.22);
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(238, 226, 211, 0.84));
    color: #4f3b30;
  }

  :root[data-theme="system"] .side-nav a span {
    border-color: rgba(228, 208, 184, 0.14);
    background: rgba(22, 18, 15, 0.62);
    color: #d8b17c;
  }

  :root[data-theme="system"] .mobile-global-button,
  :root[data-theme="system"] .mobile-screen-exit,
  :root[data-theme="system"] .account-panel .day-modal-close {
    border-color: rgba(228, 208, 184, 0.14);
    background: rgba(22, 18, 15, 0.62);
    color: #d8b17c;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(244, 221, 190, 0.08);
  }

  :root[data-theme="system"] .onboarding-modal-screen.active {
    background:
      radial-gradient(circle at 50% 82%, rgba(244, 221, 190, 0.08), transparent 18rem),
      rgba(10, 8, 7, 0.62);
  }

  :root[data-theme="system"] .onboarding-modal-screen .screen-header,
  :root[data-theme="system"] .onboarding-modal-screen .content-grid,
  :root[data-theme="system"] .onboarding-modal-screen form.soft-panel,
  :root[data-theme="system"] .onboarding-modal-screen .soft-panel,
  :root[data-theme="system"] .onboarding-modal-screen .suggestion-panel,
  :root[data-theme="system"] .onboarding-modal-screen .note-panel {
    border-color: rgba(228, 208, 184, 0.14);
    background:
      linear-gradient(145deg, rgba(45, 35, 28, 0.92), rgba(30, 24, 20, 0.86)),
      rgba(33, 27, 22, 0.9);
  }

  :root[data-theme="system"] .completion-summary div,
  :root[data-theme="system"] .archive-reflection {
    border-color: rgba(228, 208, 184, 0.14);
    background: rgba(22, 18, 15, 0.62);
  }

  :root[data-theme="system"] .clarity-moment-card p:not(.eyebrow),
  :root[data-theme="system"] .clarity-moment-fields label {
    color: #f3e7da;
  }

  :root[data-theme="system"] .progress-orb span,
  :root[data-theme="system"] .insight-ring strong {
    color: #5a4133;
  }

  :root[data-theme="system"] .progress-orb small,
  :root[data-theme="system"] .insight-ring p {
    color: #7a6250;
  }

  :root[data-theme="system"] .muted,
  :root[data-theme="system"] .settings-status,
  :root[data-theme="system"] .settings-note,
  :root[data-theme="system"] .screen-header p,
  :root[data-theme="system"] .journey-summary p,
  :root[data-theme="system"] .routine-row span,
  :root[data-theme="system"] .reflection-label,
  :root[data-theme="system"] .field-helper,
  :root[data-theme="system"] .empty-state {
    color: #cdbba7;
  }

  :root[data-theme="system"] .reflection-favorite {
    border-color: rgba(228, 208, 184, 0.18);
    background: rgba(22, 18, 15, 0.62);
    color: #d8b17c;
  }

  :root[data-theme="system"] .auth-provider-button.subtle,
  :root[data-theme="system"] .reflection-photo-preview,
  :root[data-theme="system"] .reflection-detail-photo {
    border-color: rgba(228, 208, 184, 0.14);
    background: rgba(22, 18, 15, 0.62);
    color: #f3e7da;
  }

  :root[data-theme="system"] .reflection-tool-meta span {
    color: #cdbba7;
  }

  :root[data-theme="system"] .onboarding-progress span {
    background: rgba(244, 221, 190, 0.18);
  }

  :root[data-theme="system"] .onboarding-steps strong {
    color: #f3e7da;
  }

  :root[data-theme="system"] .onboarding-steps p {
    color: #cdbba7;
  }

  :root[data-theme="system"] .journal-search,
  :root[data-theme="system"] .reflection-reader,
  :root[data-theme="system"] .reflection-entry p,
  :root[data-theme="system"] .archive-reflection p {
    color: #f2e4d5;
  }

  :root[data-theme="system"] .settings-section-trigger em,
  :root[data-theme="system"] .journey-accordion-trigger em,
  :root[data-theme="system"] .reminder-accordion-trigger em,
  :root[data-theme="system"] .settings-data-grid span,
  :root[data-theme="system"] .settings-list span,
  :root[data-theme="system"] .completion-summary span {
    color: #d8b17c;
  }

  :root[data-theme="system"] .settings-section-trigger,
  :root[data-theme="system"] .journey-accordion-trigger,
  :root[data-theme="system"] .reminder-accordion-trigger,
  :root[data-theme="system"] .journey-accordion-trigger strong,
  :root[data-theme="system"] .reminder-accordion-trigger strong,
  :root[data-theme="system"] .settings-data-grid strong,
  :root[data-theme="system"] .settings-list strong,
  :root[data-theme="system"] .completion-summary strong,
  :root[data-theme="system"] .routine-title,
  :root[data-theme="system"] .routine-row strong {
    color: #f5e9dc;
  }

  :root[data-theme="system"] .settings-link-button,
  :root[data-theme="system"] .policy-body h3 {
    color: #f5e9dc;
  }

  :root[data-theme="system"] .danger-zone {
    border-color: rgba(232, 170, 134, 0.24);
    background: rgba(232, 170, 134, 0.055);
  }

  :root[data-theme="system"] .checklist label.routine-row {
    color: #f3e7da;
  }

  :root[data-theme="system"] .checklist label.routine-row > span {
    color: #f3e7da;
  }

  :root[data-theme="system"] .checklist label.routine-row.is-completed {
    opacity: 0.92;
  }

  :root[data-theme="system"] .checklist label.routine-row.is-completed > span {
    color: #d8c8b6;
    text-decoration-color: rgba(216, 200, 182, 0.44);
  }

  :root[data-theme="system"] .reflection-save-status[data-state="saved"] {
    color: #d8b17c;
  }

  :root[data-theme="system"] .reflection-save-status[data-state="error"] {
    color: #e7a391;
  }

  :root[data-theme="system"] label {
    color: #eadbc9;
  }

  :root[data-theme="system"] input,
  :root[data-theme="system"] textarea,
  :root[data-theme="system"] select {
    border-color: rgba(244, 221, 190, 0.22);
    background:
      linear-gradient(180deg, rgba(49, 39, 32, 0.96), rgba(34, 27, 23, 0.94)),
      rgba(34, 27, 23, 0.96);
    color: #fff4e8;
    caret-color: #d8b17c;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(244, 221, 190, 0.08);
  }

  :root[data-theme="system"] input::placeholder,
  :root[data-theme="system"] textarea::placeholder {
    color: #bfae9b;
    opacity: 1;
  }

  :root[data-theme="system"] input:disabled,
  :root[data-theme="system"] input[readonly],
  :root[data-theme="system"] textarea:disabled,
  :root[data-theme="system"] select:disabled {
    color: #d1c0ad;
    background: rgba(22, 18, 15, 0.58);
  }

  :root[data-theme="system"] .auth-copy p,
  :root[data-theme="system"] .auth-smallprint,
  :root[data-theme="system"] .auth-message,
  :root[data-theme="system"] .feedback-form label,
  :root[data-theme="system"] .account-panel label {
    color: #dfcfbd;
  }
}

.day-modal[hidden] {
  display: none;
}

.day-modal-panel {
  position: relative;
  width: min(42rem, 100%);
  max-height: min(48rem, calc(100vh - 2.5rem));
  overflow: auto;
  border: 1px solid rgba(93, 70, 56, 0.14);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  background:
    linear-gradient(150deg, rgba(255, 253, 248, 0.96), rgba(244, 235, 224, 0.92)),
    rgba(255, 250, 243, 0.96);
  box-shadow: 0 38px 120px rgba(49, 43, 39, 0.24), var(--inner-light);
  animation: modalPanelIn var(--motion-base) var(--ease-calm) both;
}

.day-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 50%;
  background: rgba(255, 250, 243, 0.74);
  color: var(--coffee);
}

.day-modal-panel h2 {
  margin: 0.35rem 2.4rem 0.25rem 0;
  font-family: Newsreader, Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
}

.no-active-modal-panel {
  max-width: 31rem;
  padding: clamp(2rem, 6vw, 3.2rem);
  text-align: center;
}

.no-active-modal-panel h2 {
  margin: 0.35rem 0 0.25rem;
}

.no-active-modal-panel > p:not(.eyebrow) {
  max-width: 23rem;
  margin: 1rem auto 1.8rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.no-active-modal-panel .milestone-actions {
  justify-content: center;
}

.day-detail-date,
.day-detail-message {
  color: var(--muted);
  line-height: 1.55;
}

.day-detail-checklist {
  margin: 1rem 0;
}

.day-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.day-detail-footer span {
  color: var(--coffee);
  font-weight: 700;
}

.mobile-global-controls,
.mobile-screen-exit,
.bottom-nav {
  display: none;
}

.mobile-screen-exit,
.mobile-global-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(93, 70, 56, 0.16);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(244, 235, 224, 0.78)),
    rgba(255, 250, 243, 0.86);
  color: var(--coffee);
  box-shadow: 0 14px 34px rgba(74, 56, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.mobile-global-button svg {
  width: 1.12rem;
  height: 1.12rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.mobile-screen-exit svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-screen-exit:hover,
.mobile-screen-exit:focus-visible,
.mobile-global-button:hover,
.mobile-global-button:focus-visible {
  border-color: rgba(169, 124, 64, 0.42);
  color: var(--accent);
  box-shadow: 0 18px 42px rgba(74, 56, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transform: translateY(-1px);
}

.mobile-screen-exit {
  display: none;
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgba(93, 70, 56, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(244, 235, 224, 0.9)),
    rgba(255, 250, 243, 0.96);
  color: var(--coffee);
  box-shadow: 0 18px 52px rgba(74, 56, 42, 0.15), var(--inner-light);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.6rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
    padding-bottom: calc(5.8rem + env(safe-area-inset-bottom));
  }

  .rail {
    display: none;
  }

  .screen {
    min-height: calc(100dvh - 5.8rem);
    padding: 1.35rem 1.35rem calc(1.35rem + env(safe-area-inset-bottom));
  }

  .app-topbar {
    display: none;
  }

  .settings-screen .mobile-screen-exit {
    position: fixed;
    top: calc(0.8rem + env(safe-area-inset-top, 0px));
    right: 0.9rem;
    z-index: 19;
    display: grid;
  }

  body[data-active-route="today"] .mobile-global-controls,
  body[data-active-route="insights"] .mobile-global-controls,
  body[data-active-route="reflections"] .mobile-global-controls,
  body[data-active-route="reminders"] .mobile-global-controls,
  body[data-active-route="journey"] .mobile-global-controls {
    position: fixed;
    top: calc(0.8rem + env(safe-area-inset-top, 0px));
    right: 0.9rem;
    z-index: 19;
    display: flex;
    gap: 0.5rem;
  }

  .screen-header,
  .dashboard-editorial,
  .journal-header,
  .reminder-screen .screen-header,
  .settings-screen .screen-header,
  .journey-screen .screen-header {
    padding-right: min(10rem, 42vw);
  }

  .journey-screen .account-inline-action {
    display: none;
  }

  .welcome-screen.active,
  .auth-shell,
  .content-grid,
  .progress-layout,
  .today-layout,
  .reminder-layout,
  .dashboard-hero,
  .today-lower {
    display: grid;
    grid-template-columns: 1fr;
  }

  .reminder-row {
    grid-template-columns: 1fr;
    gap: 0.78rem;
    padding: 0.92rem 0.92rem 1.18rem;
  }

  .reminder-row .toggle-line {
    justify-self: start;
  }

  .auth-screen {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom));
  }

  .import-actions {
    display: grid;
  }

  .auth-intro h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  .dashboard-home {
    gap: 1.35rem;
  }

  .dashboard-hero {
    gap: 1.35rem;
    padding-bottom: 1.35rem;
  }

  .dashboard-editorial h1 {
    font-size: clamp(1.75rem, 7vw, 2.65rem);
  }

  .progress-showcase {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .progress-orb {
    grid-row: 1;
  }

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

  .hero-copy h1 {
    font-size: clamp(3.25rem, 16vw, 5.2rem);
  }

  .progress-grid {
    grid-template-columns: repeat(10, 1fr);
  }

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

  .insight-hero,
  .insight-chart-panel,
  .insight-weekly-panel,
  .insight-metrics {
    grid-column: 1 / -1;
  }

  .insight-hero {
    min-height: 22rem;
  }

  .insight-journey-map {
    grid-template-columns: repeat(18, minmax(0.5rem, 1fr));
  }

  .day-kicker,
  .progress-stats {
    flex-direction: column;
  }

  .journey-detail {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.85rem;
  }

  .journey-detail strong {
    font-size: 1.15rem;
  }

  .completion-summary,
  .archive-summary {
    grid-template-columns: 1fr;
  }

  .journey-library-card {
    grid-template-columns: 1fr;
  }

  .journey-card-actions {
    justify-items: start;
  }

  .bottom-nav {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    left: 1rem;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 250, 243, 0.92);
    box-shadow: 0 16px 48px rgba(74, 56, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.56);
    backdrop-filter: blur(20px);
  }

  .bottom-nav a {
    min-height: 2.85rem;
    padding: 0.78rem 0.45rem;
    font-size: 0.72rem;
    text-align: center;
  }

  .toast {
    right: 1rem;
    bottom: calc(6.2rem + env(safe-area-inset-bottom));
    left: 1rem;
    max-width: none;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .routine-input {
    grid-template-columns: 1fr;
  }

  .journey-screen {
    padding: 1rem 1rem calc(7.2rem + env(safe-area-inset-bottom));
  }

  .settings-screen {
    padding: 1rem 1rem calc(7.2rem + env(safe-area-inset-bottom));
  }

  .settings-actions,
  .settings-data-grid,
  .appearance-options {
    grid-template-columns: 1fr;
  }

  .journey-screen .screen-header {
    margin-bottom: 1.1rem;
  }

  .journey-screen .screen-header h1 {
    font-size: clamp(3rem, 16vw, 4.4rem);
  }

  .journey-screen .screen-header p {
    line-height: 1.5;
  }

  .bottom-nav {
    right: 0.65rem;
    left: 0.65rem;
    gap: 0.18rem;
    padding: 0.32rem;
  }

  .bottom-nav a {
    min-height: 2.7rem;
    padding: 0.72rem 0.2rem;
    font-size: 0.66rem;
  }

  .journey-editor {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem;
    overflow: hidden;
  }

  .journey-accordion {
    margin-bottom: 0.65rem;
  }

  .journey-accordion-trigger {
    min-height: 3.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    padding: 0.82rem 0.88rem;
  }

  .journey-accordion-trigger i {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .journey-accordion-trigger b {
    grid-column: 2;
    grid-row: 1;
  }

  .journey-accordion-trigger strong {
    font-size: 1.18rem;
  }

  .journey-accordion-panel {
    gap: 0.75rem;
    padding: 0 0.82rem 0.82rem;
  }

  .journey-detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.65rem;
  }

  .journey-detail div {
    min-width: 0;
  }

  .journey-detail span {
    font-size: 0.68rem;
  }

  .journey-detail strong {
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .journey-routine-editor,
  .journey-routine-add {
    grid-template-columns: 1fr;
  }

  .journey-routine-actions {
    justify-content: flex-start;
  }

  .library-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .library-heading span {
    text-align: left;
  }

  .journey-library-card {
    grid-template-columns: 1fr;
  }

  .reminder-summary-card {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    padding: 0.82rem;
  }

  .reminder-summary-card strong {
    font-size: 1.2rem;
  }

  .reminder-summary-card i {
    justify-self: start;
    padding: 0.5rem 0.72rem;
  }

  .journey-library-action {
    align-items: stretch;
    flex-direction: column;
  }

  .journey-library-action .secondary-action {
    width: 100%;
  }

  .journey-card-actions {
    justify-items: start;
  }

  .journey-editor .field-row {
    grid-template-columns: 1fr;
    gap: 0.72rem;
  }

  .journey-editor input {
    max-width: 100%;
  }

  .journey-editor input[type="date"] {
    min-height: 3.25rem;
    padding-right: 1.15rem;
  }

  .journey-editor input[type="date"]::-webkit-calendar-picker-indicator {
    margin-right: 0;
  }

  .journey-editor .secondary-action {
    width: 100%;
    min-height: 3rem;
  }

  .reminder-accordion-trigger {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    padding: 0.78rem 0.85rem;
  }

  .reminder-accordion-trigger i {
    grid-column: 1 / -1;
    grid-row: 2;
    white-space: normal;
  }

  .reminder-accordion-trigger b {
    grid-column: 2;
    grid-row: 1;
  }

  .reminder-accordion-panel {
    padding: 0 0.85rem 0.85rem;
  }

  .timezone-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .timezone-note strong {
    text-align: left;
  }

  .progress-grid {
    gap: 0.35rem;
  }

  .note-panel p {
    font-size: 1.35rem;
  }

  .today-screen {
    padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom));
  }

  .today-checkin {
    margin-bottom: 1rem;
  }

  .checkin-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-intro h1 {
    font-size: clamp(3.1rem, 14vw, 4.4rem);
  }

  .progress-showcase {
    padding: 1.25rem;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .continue-card {
    grid-template-columns: 1fr;
  }

  .clarity-moment-row {
    grid-template-columns: 1fr;
  }

  .clarity-moments-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .clarity-moments-actions .primary-action,
  .clarity-moments-actions .secondary-action {
    width: 100%;
  }

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

  .insight-hero,
  .insight-chart-panel,
  .insight-weekly-panel,
  .insight-map-panel,
  .insight-metrics {
    grid-column: 1;
  }

  .insight-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .insight-bars {
    gap: 0.4rem;
    min-height: 10.5rem;
  }

  .insight-bar {
    height: 9.8rem;
  }

  .weekly-bar {
    grid-template-columns: 3.9rem minmax(0, 1fr) 2.8rem;
    min-height: 2.6rem;
  }

  .insight-journey-map {
    grid-template-columns: repeat(10, minmax(0.55rem, 1fr));
  }

  .day-modal {
    align-items: end;
    padding: 0.75rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .day-modal-panel {
    width: 100%;
    max-height: min(44rem, calc(100dvh - 1.5rem - env(safe-area-inset-bottom)));
  }

  .day-detail-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .day-detail-footer .primary-action {
    width: 100%;
  }
}

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

  .screen,
  .screen.active .screen-header,
  .screen.active .dashboard-intro,
  .screen.active .dashboard-editorial,
  .screen.active .progress-showcase,
  .screen.active .checkin-card,
  .screen.active .continue-card,
  .screen.active .insight-card,
  .screen.active .insight-hero,
  .screen.active .insight-chart-panel,
  .screen.active .insight-map-panel,
  .screen.active .reflection-entry,
  .screen.active .reminder-panel,
  .screen.active .notification-panel,
  .screen.active .journey-accordion,
  .screen.active .settings-section,
  .day-modal,
  .day-modal-panel,
  .account-modal,
  .account-panel,
  .today-screen.active .today-progress-fill,
  .today-screen.active .today-progress-fill::after {
    animation: none !important;
  }

  .today-progress-fill {
    transform: scaleX(1);
  }

  .screen,
  .day-modal-panel,
  .account-panel {
    transform: none !important;
  }
}
