/* Still — design system
   Warm editorial journal. No purple AI glow. */

:root {
  --bg: #f3efe7;
  --paper: #fcfaf6;
  --ink: #171815;
  --muted: #72766e;
  --line: #ddd7cb;
  --sage: #66785f;
  --sage-dark: #4d6049;
  --warm: #e9d6c2;
  --warm-soft: rgba(233, 214, 194, 0.35);
  --sage-soft: rgba(102, 120, 95, 0.14);
  --mist: #dde3d7;
  --lav: #d8d2e0;
  --danger: #9b4a3c;
  --danger-soft: rgba(155, 74, 60, 0.1);
  --shadow: 0 18px 50px rgba(43, 39, 31, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-ui: "DM Sans", system-ui, -apple-system, sans-serif;
  --max: 1120px;
  --app-max: 720px;
  --header-h: 64px;
  --tap: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --black: #11120f;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 82% 8%, rgba(221, 227, 215, 0.55), transparent 28rem),
    radial-gradient(circle at 10% 34%, rgba(233, 214, 194, 0.35), transparent 24rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

button {
  cursor: pointer;
}

::selection {
  background: var(--sage-soft);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ——— Typography ——— */

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-dark);
}

.muted {
  color: var(--muted);
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 36ch;
}

/* ——— Layout ——— */

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.app-wrap {
  width: min(100% - 1.5rem, var(--app-max));
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-lg {
  gap: 1.75rem;
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.grow {
  flex: 1;
}

/* ——— Buttons ——— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.btn:hover {
  background: #2c2f2a;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible,
.btn-ghost:focus-visible,
.btn-text:focus-visible,
.chip:focus-visible,
.nav-link:focus-visible,
.field:focus-visible,
.textarea:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 2px;
}

.btn-sage {
  background: var(--black, #11120f);
}

.btn-sage:hover {
  background: #2a2b27;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: rgba(32, 34, 31, 0.04);
  border-color: #cfcabb;
}

.btn-text {
  background: transparent;
  color: var(--muted);
  border: none;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
}

.btn-text:hover {
  color: var(--ink);
  background: rgba(32, 34, 31, 0.04);
}

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #823d32;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ——— Forms ——— */

.field,
.textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.6;
}

.field:focus,
.textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-soft);
}

.field::placeholder,
.textarea::placeholder {
  color: #9a9d96;
}

.label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.form-group {
  margin-bottom: 1.1rem;
}

.form-error {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9rem;
}

.form-success {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-size: 0.9rem;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ——— Chips ——— */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.chip:hover {
  border-color: #c8c3b6;
}

.chip.is-selected {
  background: var(--sage-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
}

/* ——— Paper / panels ——— */

.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.35rem 1.4rem;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 1.5rem 0;
}

/* ——— Landing header ——— */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(246, 244, 239, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 2rem, var(--max));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--black, #11120f);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
}

/* ——— Landing hero ——— */

.hero {
  padding: 3.5rem 0 4rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding: 5rem 0 5.5rem;
    gap: 3rem;
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7vw, 4.6rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0.7rem 0 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.phone {
  width: min(100%, 300px);
  margin-inline: auto;
  aspect-ratio: 9 / 17.5;
  border-radius: 36px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.95), rgba(246, 244, 239, 0.9)),
    var(--paper);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
}

.phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: rgba(32, 34, 31, 0.08);
}

.phone-inner {
  height: 100%;
  padding: 2.2rem 0.85rem 1rem;
  display: flex;
  flex-direction: column;
}

.phone-date {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.phone-q {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.2;
  margin: 0 0 auto;
}

.phone-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ——— Landing sections ——— */

.section {
  padding: 4rem 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.steps {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.step {
  padding: 1.5rem 1.4rem;
  border-top: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--warm);
  margin-bottom: 0.85rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}

.step p {
  margin: 0;
  color: var(--muted);
}

.quote-strip {
  padding: 3.5rem 0;
  border-block: 1px solid var(--line);
  text-align: center;
}

.quote-strip blockquote {
  margin: 0 auto;
  max-width: 28ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.quote-strip cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
}

.preview-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 800px) {
  .preview-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: start;
  }
}

.journal-sample {
  padding: 1.75rem 1.5rem;
}

.journal-sample time {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.journal-sample h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.85rem;
}

.journal-sample p {
  margin: 0 0 0.85rem;
  color: #3a3d38;
}

.privacy {
  text-align: center;
  padding: 4.5rem 0;
}

.privacy h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 500;
  margin: 0.5rem 0 1rem;
}

.privacy-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem auto 0;
  max-width: 420px;
  text-align: left;
}

.privacy-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.privacy-list li:first-child {
  border-top: 1px solid var(--line);
}

.cta-band {
  text-align: center;
  padding: 4rem 0 5rem;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

/* ——— Reveal ——— */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ——— Auth / onboarding shells ——— */

.auth-shell,
.onboard-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.auth-main,
.onboard-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.auth-card {
  width: min(100%, 420px);
  padding: 2rem 1.5rem;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  margin: 0.35rem 0 0.35rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(32, 34, 31, 0.04);
}

.auth-tab {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}

.auth-tab.is-active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(32, 34, 31, 0.08);
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--sage-dark);
}

.onboard-progress {
  height: 3px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.onboard-progress > span {
  display: block;
  height: 100%;
  background: var(--sage);
  transition: width 0.35s var(--ease);
}

.onboard-card {
  width: min(100%, 540px);
  padding: 2rem 1.5rem 1.75rem;
}

.onboard-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 500;
  margin: 0 0 0.65rem;
  line-height: 1.15;
}

.onboard-card .prompt {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.onboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.people-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
}

@media (max-width: 520px) {
  .people-row {
    grid-template-columns: 1fr;
  }
}

.depth-options {
  display: grid;
  gap: 0.65rem;
}

.depth-option {
  text-align: left;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.depth-option.is-selected {
  border-color: var(--sage);
  background: var(--sage-soft);
}

.depth-option strong {
  display: block;
  margin-bottom: 0.2rem;
}

.depth-option span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ——— App chrome ——— */

.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  background: rgba(246, 244, 239, 0.88);
  border-bottom: 1px solid var(--line);
}

.app-top-inner {
  width: min(100% - 1.5rem, var(--app-max));
  margin-inline: auto;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-top .brand {
  font-size: 1.4rem;
}

.app-main {
  flex: 1;
  padding: 1.5rem 0 2rem;
}

.app-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom));
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}

.app-nav-inner {
  width: min(100%, var(--app-max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.15rem;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 52px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.35rem 0.2rem;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.is-active {
  color: var(--sage-dark);
  background: var(--sage-soft);
}

/* ——— App views ——— */

.view-home {
  padding-top: 2.5rem;
  text-align: center;
}

.view-home .greeting {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 500;
  margin: 0 0 0.75rem;
  line-height: 1.15;
}

.view-home .invite {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
  margin-inline: auto;
}

.home-secondary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.q-progress {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.q-dot {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
}

.q-dot.is-done {
  background: var(--sage);
}

.q-dot.is-current {
  background: var(--warm);
}

.question-card {
  padding: 1.75rem 1.35rem;
}

.question-card .q-label {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.question-card h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.5vw, 2.15rem);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 1.35rem;
}

.answer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 1.25rem;
}

.voice-btn.is-recording {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.draft-status {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 1.2em;
  margin-top: 0.35rem;
}

.complete-screen {
  text-align: center;
  padding: 2rem 0;
}

.complete-screen h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.loading-calm {
  text-align: center;
  padding: 3rem 1rem;
}

.loading-calm p {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0;
  color: var(--ink);
}

.loading-calm .sub {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sage);
  margin: 0 auto 1.25rem;
  animation: pulse 1.6s var(--ease) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ——— Journal list ——— */

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.entry-link {
  display: block;
  padding: 1.15rem 1.2rem;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.entry-link:hover {
  border-color: #c8c3b6;
}

.entry-link time {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.entry-link h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.entry-link p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--warm-soft);
  color: #7a6544;
}

/* ——— Entry detail ——— */

.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 1rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--sage);
}

.entry-title-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: 0.75rem;
}

.entry-body-edit {
  width: 100%;
  min-height: 280px;
  border: none;
  background: transparent;
  padding: 0;
  line-height: 1.7;
  resize: vertical;
}

.answer-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.answer-block:last-child {
  border-bottom: none;
}

.answer-block h3 {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.answer-block p {
  margin: 0;
  white-space: pre-wrap;
}

/* ——— Calendar ——— */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35rem 0;
}

.cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  font-size: 0.9rem;
  color: var(--ink);
  min-height: 44px;
}

.cal-day.is-muted {
  color: #b0b3ab;
}

.cal-day.has-entry {
  background: var(--sage-soft);
}

.cal-day.has-entry::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage-dark);
}

.cal-day.is-today {
  border-color: var(--warm);
}

.cal-day:hover:not(:disabled) {
  background: rgba(32, 34, 31, 0.04);
}

/* ——— Ask / Search / Reflections / Settings ——— */

.ask-answer {
  margin-top: 1.5rem;
  padding: 1.35rem;
  white-space: pre-wrap;
  line-height: 1.65;
}

.sources {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.sources a {
  color: var(--sage-dark);
}

.empty {
  text-align: center;
  padding: 3rem 1rem;
}

.empty h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  margin: 0 0 0.65rem;
}

.empty p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.settings-section {
  margin-bottom: 1.75rem;
}

.settings-section h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 0 0 0.85rem;
}

.settings-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
}

.settings-link span {
  color: var(--muted);
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  z-index: 50;
  max-width: min(90vw, 360px);
  text-align: center;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none !important;
}
