/* =========================================================================
   Green Heart — visual language
   A warm paper almanac for a regenerative community: cream stock, a living
   leaf-green accent, and a harvest-gold seal for the rare, earned moments.
   Calm and reflective by default; celebratory only when something real is
   finished. A subtle gardener's touch — nature, East Africa. System/serif
   fonts only — nothing loads over the network, so it works fully offline.
   ========================================================================= */

:root {
  --paper: #f3eeda;
  --paper-raised: #fffdf6;
  --paper-sunk: #ece7cf;
  --ink: #2a2a1e;
  --ink-soft: #66634f;
  --ink-faint: #a4a086;
  --line: #e0dcc0;
  --line-strong: #d0cca8;

  --accent: #46795a;      /* living leaf green — growth, harmony with nature */
  --accent-strong: #2d5540;
  --accent-tint: #e6efe4;

  --gold: #c1912f;        /* harvest gold — the seal / milestone moments */
  --gold-soft: #e7cd8a;
  --gold-tint: #f4edd0;

  --rose: #b06a53;        /* warm clay — used for "grace" */
  --rose-tint: #f4e4dc;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(58, 45, 24, 0.05), 0 8px 24px rgba(58, 45, 24, 0.08);
  --shadow-sm: 0 1px 2px rgba(58, 45, 24, 0.06), 0 2px 8px rgba(58, 45, 24, 0.06);

  --serif: "Iowan Old Style", "Palatino Linotype", "Palatino", Georgia,
    "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;

  --maxw: 480px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.5), transparent 45%),
    #e2dcc2;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- App shell ---------------------------------------------------------- */

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--paper);
  background-image:
    radial-gradient(rgba(140, 120, 80, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: 0 0 60px rgba(60, 45, 20, 0.12);
}

.app__main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 20px calc(96px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.app__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top, 0px)) 20px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(var(--paper), rgba(244, 236, 220, 0.85));
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(6px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.2px;
  color: var(--ink);
  white-space: nowrap; /* the quick actions sit beside it; never wrap the wordmark */
  flex: 0 0 auto;
}

/* ---- Header quick actions: Plan (morning) and Reflect (evening) --------
   Two compact pills right of the wordmark. Each is a one-tap jump into its
   flow from any tab, and doubles as a status: green with a small check when
   today's half is done, a gold "up next" tint for the current phase while it
   is still open, plain paper otherwise. Colour meanings match `.status-pill`.
   ------------------------------------------------------------------------ */

.quick {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0 auto 0 12px; /* snug to the wordmark, settings stays at the far right */
  min-width: 0;
}

.quick__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2px;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    transform 0.12s ease;
}
.quick__btn:active {
  transform: scale(0.95);
}
.quick__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Up next: the current phase, still open. Gold is the app's "not started". */
.quick__btn--next {
  background: var(--gold-tint);
  border-color: var(--gold-soft);
  color: #8a6a1f;
}

/* Done for today: filled leaf green, plus the check badge on the icon. */
.quick__btn--done {
  background: var(--accent-tint);
  border-color: rgba(70, 121, 90, 0.45);
  color: var(--accent-strong);
}

.quick__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.quick__icon svg {
  display: block;
}

/* The small "done" seal, tucked into the icon's lower-right corner. */
.quick__check {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #f4ecdc;
  box-shadow: 0 0 0 1.5px var(--accent-tint);
  animation: quick-seal 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes quick-seal {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.quick__label {
  padding-top: 1px; /* optical centre against the icon */
}

/* Very narrow phones: keep both pills but fold the words into the icon. The
   accessible name still says "Plan" / "Reflect" and the done state. */
@media (max-width: 400px) {
  .quick {
    margin-left: 8px;
  }
  .quick__btn {
    padding: 0 8px;
  }
  .quick__label {
    display: none;
  }
}

.brand__seal {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-strong));
  color: #f4ecdc;
  font-size: 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.icon-btn {
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-soft);
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
}
.icon-btn:active {
  transform: scale(0.94);
}

/* ---- Bottom nav --------------------------------------------------------- */

.nav {
  position: sticky;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(rgba(244, 236, 220, 0.6), var(--paper) 40%);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav__item {
  border: none;
  background: none;
  padding: 8px 4px 6px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__glyph {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.18s ease;
}
.nav__item--active {
  color: var(--accent-strong);
}
.nav__item--active .nav__glyph {
  transform: translateY(-1px) scale(1.06);
}
.nav__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 1px;
}

/* ---- Cards & type ------------------------------------------------------- */

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.2px;
  margin: 0;
}

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

.muted {
  color: var(--ink-soft);
}
.faint {
  color: var(--ink-faint);
}

.stack {
  display: flex;
  flex-direction: column;
}

/* ---- Buttons ------------------------------------------------------------ */

.btn {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 650;
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active {
  transform: translateY(1px) scale(0.99);
}
.btn--primary {
  background: linear-gradient(var(--accent), var(--accent-strong));
  color: #f6efe0;
  box-shadow: 0 6px 16px rgba(45, 84, 73, 0.28);
}
.btn--ghost {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--line-strong);
}
.btn--soft {
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.btn--full {
  width: 100%;
}
.btn--lg {
  padding: 16px 20px;
  font-size: 16px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.textlink {
  background: none;
  border: none;
  color: var(--accent-strong);
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--gold-soft);
}

/* ---- Today screen ------------------------------------------------------- */

.today-hero {
  padding: 22px 20px 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 85% 0%, var(--accent-tint), transparent 60%),
    var(--paper-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.today-hero__date {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.today-hero__title {
  font-size: 27px;
  margin: 10px 0 6px;
}
.today-hero__sub {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 18px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 6px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.status-pill--todo {
  background: var(--gold-tint);
  color: #8a6a1f;
}
.status-pill--doing {
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.status-pill--done {
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.virtue-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--serif);
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 2px 12px;
}
.section-label h2 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
}

/* mini streak strip on Today */
.streak-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}
.streak-strip__plant {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  flex: none;
}
.streak-strip__plant--dormant {
  background: var(--paper-sunk);
  color: var(--ink-faint);
}

/* This week's five values on the Today landing: a collapsible list, today open */
.weekvalues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.weekvalue {
  background: var(--paper-raised);
  border: 1px solid var(--paper-sunk);
  border-radius: 14px;
  overflow: hidden;
}
.weekvalue--today {
  border-color: var(--accent);
}
.weekvalue__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
}
.weekvalue__day {
  flex: none;
  width: 32px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink-faint);
}
.weekvalue--today .weekvalue__day {
  color: var(--accent);
}
.weekvalue__name {
  flex: 1;
  font-size: 15px;
  line-height: 1.3;
}
.weekvalue--today .weekvalue__name {
  font-weight: 600;
}
.weekvalue__tag {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 7px;
  border-radius: 999px;
}
.weekvalue__check {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--accent);
}
.weekvalue__chev {
  flex: none;
  color: var(--ink-faint);
  transition: transform 0.15s ease;
}
.weekvalue--open .weekvalue__chev {
  transform: rotate(90deg);
}
.weekvalue__body {
  padding: 0 14px 14px;
}
.weekvalue__body .saying:first-child {
  margin-top: 0;
}
.streak-strip__big {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
}

/* recap of a completed day */
.recap dl {
  margin: 0;
}
/* Completed-day recap: each morning plan paired with its evening reflection. */
.recap-item__line {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.recap-item__tag {
  flex: none;
  align-self: flex-start;
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
}
.recap-item__tag--plan {
  color: var(--accent);
  background: var(--accent-tint);
}
.recap-item__tag--reflect {
  color: var(--gold);
  background: var(--gold-tint);
}
.recap-item__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}
.recap dt {
  font-size: 11.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 700;
  margin-top: 14px;
}
.recap dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}

/* ---- Reflection flow (full sheet) --------------------------------------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  max-width: var(--maxw);
  margin: 0 auto;
  animation: sheet-in 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheet-in {
  from {
    transform: translateY(18px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) 18px 10px;
}
.sheet__progress {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  transition: background 0.2s ease, transform 0.2s ease;
}
.pdot--done {
  background: var(--accent);
}
.pdot--now {
  background: var(--accent-strong);
  transform: scale(1.35);
}

.sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px 20px;
}
.sheet__foot {
  padding: 12px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  background: var(--paper);
}

.step {
  animation: step-in 0.26s ease both;
}
@keyframes step-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.step__kicker {
  margin-top: 14px;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.step__q {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.22;
  margin: 10px 0 6px;
  font-weight: 600;
}
.step__hint {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.precept {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  border-left: 3px solid var(--gold-soft);
  padding: 4px 0 4px 14px;
  margin: 4px 0 12px;
}
.gloss {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
}

.field {
  width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background:
    repeating-linear-gradient(
      var(--paper-raised),
      var(--paper-raised) 31px,
      var(--line) 31px,
      var(--line) 32px
    );
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  min-height: 128px;
  resize: vertical;
  outline: none;
}
.field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}

.charcount {
  text-align: right;
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* private self-check scale */
.scale {
  display: grid;
  gap: 10px;
}
.scale__opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--paper-raised);
  cursor: pointer;
  font-size: 16px;
  font-family: var(--serif);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.scale__opt:active {
  transform: scale(0.99);
}
.scale__opt--on {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.scale__tick {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  flex: none;
}
.scale__opt--on .scale__tick {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.private-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--paper-sunk);
  border-radius: 999px;
  padding: 6px 12px;
}

/* virtue picker */
.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.picker-cell {
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.picker-cell--on {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.picker-cell__n {
  font-size: 11px;
  color: var(--ink-faint);
  font-weight: 700;
}
.picker-cell__name {
  font-family: var(--serif);
  font-size: 16px;
  margin-top: 2px;
}
.picker-cell__badge {
  font-size: 10px;
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 0.4px;
}

/* junto giving chip */
.give-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold-tint);
  color: #8a6a1f;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.give-chip__heart {
  font-size: 13px;
}

/* opt-in share toggle */
.share-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--paper-sunk);
}
.share-toggle__text {
  flex: 1;
}
.share-toggle__title {
  font-weight: 650;
  font-size: 14px;
}
.share-toggle__sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.switch {
  --w: 46px;
  width: var(--w);
  height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--line-strong);
  position: relative;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease;
}
.switch--on {
  background: var(--accent);
}
.switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.switch--on .switch__knob {
  transform: translateX(18px);
}

/* compact, VERBATIM value jog on the evening "what actually happened" step */
.value-jog {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-soft);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin: 12px 0 4px;
}
.value-jog__name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.value-jog__list {
  margin: 6px 0 0;
  padding-left: 18px;
}
.value-jog__list li {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-top: 3px;
}

/* per-intention sharing block (evening) — comment + toggle on each intention */
.share-block {
  margin-top: 18px;
}
.share-block__head {
  margin-bottom: 12px;
}
.share-block__title {
  font-weight: 650;
  font-size: 15px;
}
.share-block__sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
  line-height: 1.45;
}
.share-item {
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--paper-sunk);
  padding: 13px 14px;
  margin-top: 10px;
}
.share-item__saying {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.share-item__planlabel {
  font-size: 11px;
  color: var(--accent);
  margin-top: 6px;
}
.share-item__intent {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  margin: 3px 0 10px;
}
.share-item__intent--muted {
  font-style: italic;
  color: var(--ink-faint);
}
.share-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.share-item__state {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---- Junto screen ------------------------------------------------------- */

.sample-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--paper-sunk);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.share {
  padding: 16px 18px;
}
.share__head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  flex: none;
}
.share__name {
  font-weight: 650;
  font-size: 15px;
}
.share__trade {
  font-size: 12px;
  color: var(--ink-faint);
}
.share__q {
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 6px;
}
.share__body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.share__mine {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--gold);
  background: var(--gold-tint);
  padding: 3px 9px;
  border-radius: 999px;
}
.given-note {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--serif);
}

.give-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.give-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.give-preset {
  text-align: left;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 11px 13px;
  background: var(--paper-raised);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.4;
}
.give-preset:active {
  background: var(--accent-tint);
}

.giving-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, var(--gold-tint), transparent 60%),
    var(--paper-raised);
}
.giving-summary__num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
}

/* ---- Community: today's participation ---------------------------------- */
/* Two tappable bars driving toward 100%. Participation only: a name and a
   done / not-yet state, never any reflection content. */
.participation {
  padding: 16px 18px;
}
.participation__bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pbar {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.pbar:active {
  transform: scale(0.995);
}
.pbar[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-tint);
}
.pbar__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pbar__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-size: 15px;
}
.pbar__icon {
  font-size: 15px;
}
.pbar__count {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
}
.pbar__count strong {
  color: var(--accent-strong);
  font-size: 17px;
}
.pbar__sub {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 2px;
}
.pbar__track {
  height: 10px;
  border-radius: 999px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  margin-top: 10px;
  overflow: hidden;
}
.pbar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.pbar__pct {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 600;
  margin-top: 6px;
}

.roster {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-sunk);
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: step-in 0.24s ease both;
}
.roster__grouphead {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.roster__grouphead--done {
  color: var(--accent-strong);
}
.roster__grouphead--pending {
  color: var(--ink-faint);
}
.roster__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.roster__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px 5px 5px;
  font-size: 13.5px;
  color: var(--ink);
}
.roster__chip--you {
  border-color: var(--accent);
  background: var(--accent-tint);
  font-weight: 650;
}
.roster__ava {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-family: var(--serif);
  font-weight: 600;
  flex: none;
}
.roster__empty {
  font-size: 13px;
  color: var(--ink-faint);
  font-style: italic;
  line-height: 1.45;
}
.participation__note {
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 14px 0 0;
}

/* ---- Community: reactions + encouragement -------------------------------- */
/* Two gifts under every shared item. Reactions read like WhatsApp's little
   bubble; encouragement reads like an X reply thread. Per-item warmth only,
   never a tally across people. */
.social {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.react-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.tally {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tally__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 3px 9px 3px 7px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.tally__pill:active {
  transform: scale(0.96);
}
.tally__pill--mine {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.tally__emoji {
  font-size: 15px;
  line-height: 1;
}

.react-ctl {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.react-btn {
  width: 36px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--accent-strong);
  display: grid;
  place-items: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.react-btn:active {
  transform: scale(0.92);
}
.react-btn--on {
  border-color: var(--accent);
  background: var(--accent-tint);
  animation: react-pop 0.34s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.react-btn__emoji {
  font-size: 17px;
  line-height: 1;
}
@keyframes react-pop {
  0% { transform: scale(0.7); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.react-more {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--ink-faint);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.react-more[aria-expanded="true"],
.react-more:active {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-tint);
}

/* the compact picker: a rounded bar floating above the control */
.react-tray {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: var(--paper-raised);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow);
  animation: tray-in 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom right;
}
.react-tray--wide {
  left: 0;
  flex-wrap: wrap;
  border-radius: 16px;
  padding: 8px;
  gap: 2px;
}
@keyframes tray-in {
  from { transform: translateY(6px) scale(0.92); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.react-tray__emoji,
.react-tray__plus {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 23px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, background 0.15s ease;
}
.react-tray__emoji:hover,
.react-tray__emoji:active {
  transform: scale(1.28);
}
.react-tray__emoji--on {
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.react-tray__plus {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper-sunk);
  width: 34px;
  height: 34px;
  margin-left: 2px;
}
.react-who {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 1.4;
  animation: step-in 0.2s ease both;
}

/* the reply thread */
.thread {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}
.reply {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 8px 0 6px;
}
.reply__line {
  position: absolute;
  left: 14px;
  top: 40px;
  bottom: -8px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}
.reply__ava,
.composer__ava {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  flex: none;
  position: relative;
  z-index: 1;
}
.reply__col {
  flex: 1;
  min-width: 0;
}
.reply__meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  line-height: 1.3;
}
.reply__name {
  font-weight: 650;
  color: var(--ink);
}
.reply__you {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 1px 6px;
}
.reply__time {
  color: var(--ink-faint);
  font-size: 12.5px;
}
.reply__text {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  margin-top: 2px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* the lightweight per-comment like — smaller and quieter than the item tray */
.reply__actions {
  margin-top: 4px;
}
.clike {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 3px 9px 3px 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-faint);
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.clike:active {
  transform: scale(0.94);
}
.clike--on {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-strong);
  animation: react-pop 0.34s cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
.clike__count {
  line-height: 1;
}

/* the reply composer, resting as one quiet line and opening when tapped */
.composer {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 8px;
}
.composer__ava {
  background: var(--accent-strong);
}
.composer__box {
  flex: 1;
  min-width: 0;
}
.composer__input {
  display: block;
  width: 100%;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 6px 0 7px;
  margin: 0;
  resize: none;
  outline: none;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.composer__input:focus {
  border-bottom-color: var(--accent);
}
.composer__input::placeholder {
  color: var(--ink-faint);
  font-style: italic;
}
.quick-words {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  animation: step-in 0.2s ease both;
}
.quick-words::-webkit-scrollbar {
  display: none;
}
.quick-word {
  flex: none;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  border-radius: 999px;
  padding: 5px 11px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.quick-word:active {
  background: var(--accent-tint);
  border-color: var(--accent);
}
.composer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.composer__hint {
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.35;
}
.composer__send {
  flex: none;
  border: none;
  border-radius: 999px;
  padding: 7px 15px;
  background: linear-gradient(var(--accent), var(--accent-strong));
  color: #f6efe0;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(45, 84, 73, 0.24);
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.composer__send:active {
  transform: translateY(1px) scale(0.98);
}
.composer__send:disabled {
  opacity: 0.45;
  cursor: default;
  box-shadow: none;
}

/* ---- Journey screen ----------------------------------------------------- */

.streak-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--paper-sunk);
  text-align: center;
}
.stat--live {
  background:
    radial-gradient(120% 120% at 50% 0%, var(--accent-tint), transparent 70%),
    var(--paper-sunk);
}
.stat__num {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
}
.stat__label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-weight: 600;
}
.stat__hint {
  font-size: 11px;
  color: var(--ink-faint);
  margin-top: 3px;
}

.grace-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--rose);
  background: var(--rose-tint);
  padding: 9px 12px;
  border-radius: 12px;
  line-height: 1.4;
}

/* contribution grid */
.grid-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.grid {
  display: flex;
  gap: 4px;
  min-width: min-content;
}
.grid__weekdays {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-right: 4px;
}
.grid__wd {
  height: 15px;
  font-size: 9px;
  color: var(--ink-faint);
  line-height: 15px;
}
.grid__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.grid__month {
  height: 14px;
  font-size: 9px;
  color: var(--ink-faint);
  font-weight: 600;
}
.cell {
  position: relative;
  overflow: hidden;
  width: 15px;
  height: 15px;
  border-radius: 4px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
}
.cell--done {
  border-color: var(--accent-strong);
}
.cell--full {
  background: var(--accent);
  border-color: var(--accent-strong);
  animation: cell-pop 0.3s ease both;
}
/* Half-day fill: morning = top-left triangle, evening = bottom-right triangle. */
.cell__am,
.cell__pm {
  position: absolute;
  inset: 0;
  background: var(--accent);
}
.cell__am {
  clip-path: polygon(0 0, 100% 0, 0 100%);
}
.cell__pm {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
/* Weekend (bonus) days fill gray instead of green, to mark them as different. */
.cell--weekend.cell--full {
  background: var(--ink-faint);
  border-color: var(--ink-soft);
}
.cell--weekend .cell__am,
.cell--weekend .cell__pm {
  background: var(--ink-faint);
}
.legend__swatch--split {
  position: relative;
  overflow: hidden;
  background: var(--paper-sunk);
}
/* Dotted rule between the weekday block (expected) and the weekend (bonus). */
.grid__sep {
  height: 0;
  border-top: 1px dashed var(--ink-faint);
  opacity: 0.6;
}
.cell--grace {
  background: repeating-linear-gradient(
    45deg,
    var(--rose-tint),
    var(--rose-tint) 3px,
    var(--rose) 3px,
    var(--rose) 4px
  );
  border-color: var(--rose);
}
.cell--today-open {
  background: var(--paper-raised);
  border: 2px dashed var(--gold);
}
.cell--future {
  background: transparent;
  border-color: transparent;
}
@keyframes cell-pop {
  from {
    transform: scale(0.6);
    opacity: 0.4;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend__swatch {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* rotation ring / progress */
.rotation {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}
.ring {
  --size: 76px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: conic-gradient(
    var(--accent) calc(var(--p) * 1%),
    var(--paper-sunk) 0
  );
}
.ring__inner {
  width: calc(var(--size) - 18px);
  height: calc(var(--size) - 18px);
  border-radius: 50%;
  background: var(--paper-raised);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  color: var(--accent-strong);
}
.rotation__body h3 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 600;
}
.rotation__body p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
/* The five values as a checklist for the current round. */
.rotation-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rotation-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
}
.rotation-list__heart {
  font-size: 13px;
  flex: none;
}
.rotation-list__name {
  flex: 1;
}
.rotation-list__name--today {
  font-weight: 700;
}
.rotation-list__check {
  color: var(--accent-strong);
  font-weight: 700;
  flex: none;
}
.rotation-list__item--missed {
  color: var(--ink-faint);
}

.milestone-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}
.milestone-row + .milestone-row {
  border-top: 1px solid var(--line);
}
.milestone-seal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--gold));
  color: #fff;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}
.milestone-row__title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}
.milestone-row__sub {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.empty-hint {
  text-align: center;
  color: var(--ink-faint);
  font-size: 13.5px;
  line-height: 1.5;
  padding: 8px 10px;
}

/* ---- Milestone celebration overlay ------------------------------------- */

.celebrate {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(38, 30, 16, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-in 0.3s ease both;
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.celebrate__card {
  background: var(--paper-raised);
  border-radius: 24px;
  padding: 34px 26px 26px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: card-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes card-rise {
  from { transform: translateY(16px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.wax-seal {
  width: 108px;
  height: 108px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff5df;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 34px;
  background: radial-gradient(circle at 36% 30%, var(--gold-soft), var(--gold) 60%, #9a6f1c);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.35),
    inset 0 -6px 12px rgba(120, 80, 10, 0.4), 0 8px 20px rgba(150, 110, 30, 0.35);
  position: relative;
  animation: stamp 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) both;
}
.wax-seal::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 245, 220, 0.55);
}
@keyframes stamp {
  0% { transform: scale(1.8) rotate(-14deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: scale(1) rotate(-6deg); opacity: 1; }
}
.celebrate__eyebrow {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-size: 11.5px;
}
.celebrate__title {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  margin: 8px 0 10px;
  line-height: 1.2;
}
.celebrate__body {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 22px;
}
.spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-soft);
  opacity: 0;
  animation: rise 1.5s ease-out forwards;
}
@keyframes rise {
  0% { transform: translateY(20px) scale(0.5); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: translateY(-90px) scale(1); opacity: 0; }
}

/* ---- Onboarding --------------------------------------------------------- */

.onboard {
  min-height: 100dvh;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 26px calc(28px + env(safe-area-inset-bottom));
}
.onboard__art {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 180px;
}
.onboard__seal {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 46px;
  color: #f4ecdc;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-strong));
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.25), var(--shadow);
  animation: stamp 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.onboard__kicker {
  color: var(--accent-strong);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 12px;
}
.onboard__title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.18;
  margin: 10px 0 12px;
}
.onboard__body {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 8px;
}
.onboard__dots {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 20px 0;
}
.onboard__foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input {
  width: 100%;
  font-family: var(--serif);
  font-size: 18px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

/* ---- Settings sheet ----------------------------------------------------- */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(38, 30, 16, 0.4);
  animation: fade-in 0.2s ease both;
  max-width: var(--maxw);
  margin: 0 auto;
}
.settings {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 31;
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--paper-raised);
  border-radius: 22px 22px 0 0;
  padding: 10px 22px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(50, 35, 15, 0.2);
  animation: sheet-up 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.settings__grab {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 6px auto 14px;
}
.settings h3 {
  font-family: var(--serif);
  font-size: 18px;
  margin: 0 0 4px;
}
.proto-box {
  margin-top: 14px;
  border: 1px dashed var(--gold-soft);
  background: var(--gold-tint);
  border-radius: 14px;
  padding: 14px;
}
.proto-box__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #8a6a1f;
  text-transform: uppercase;
}
.danger {
  color: var(--rose);
  border-color: var(--rose);
}

.spacer-sm { height: 10px; }
.spacer { height: 16px; }
.spacer-lg { height: 26px; }

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

/* ---- Morning intention -------------------------------------------------- */

.intention-card {
  background:
    radial-gradient(120% 120% at 0% 0%, var(--gold-tint), transparent 55%),
    var(--paper-raised);
}
.intention-card p {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  margin: 8px 0 0;
  color: var(--ink);
}

/* the full, VERBATIM value review shown before the morning intention:
   the whole description, then every saying with its exact meaning and its
   grounding keywords — nothing cut, reworded, or summarized. */
.value-desc {
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  margin: 10px 0 4px;
}
.value-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.saying {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-soft);
  background: var(--paper-raised);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
}
.saying__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 11px;
}
.saying__label:first-child {
  margin-top: 0;
}
.saying__say {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  margin: 4px 0 0;
}
.saying__mean {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 4px 0 0;
}
.saying__grounding {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.grounding-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1.3;
}

/* the morning intention, recalled at the top of the evening report */
.intention-recall {
  border: 1px dashed var(--gold-soft);
  background: var(--gold-tint);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 10px 0 4px;
}
.intention-recall__tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8a6a1f;
}
.intention-recall__text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  margin: 6px 0 0;
  color: var(--ink);
}
.intention-recall__text--muted {
  font-style: italic;
  color: var(--ink-faint);
}

/* Anchors (vision / mission / strategic goal) shown VERBATIM under each morning
   saying box, so the person can draw on them while writing their intention. */
.anchors {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  padding: 12px 14px;
}
.anchors__nudge {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.anchors__row {
  margin-top: 10px;
}
.anchors__row:first-of-type {
  margin-top: 0;
}
.anchors__label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.anchors__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 3px 0 0;
}

/* morning / evening label in the flow sheet's top bar */
.sheet__mode {
  min-width: 56px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent-strong);
}

/* ---- Demo mode bar ------------------------------------------------------ */
/* A presenter tool, deliberately styled as dark "chrome" so it never reads as
   part of the calm paper app. It drives the single clock. */
.demobar {
  background: #26261b;
  color: #f3eeda;
  z-index: 7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 7px 12px calc(7px + env(safe-area-inset-top, 0px));
  padding-top: max(7px, env(safe-area-inset-top, 0px));
}
.demobar--off {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 5px 12px;
}
.demobar__label {
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 10.5px;
  color: var(--gold-soft);
}
.demobar--off .demobar__label {
  color: rgba(243, 238, 218, 0.5);
}
.demobar__enable,
.demobar__off {
  background: rgba(255, 255, 255, 0.14);
  color: #f3eeda;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
}
.demobar__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demobar__row + .demobar__row {
  margin-top: 7px;
}
.demobar__now {
  flex: 1;
  font-weight: 650;
  font-family: var(--serif);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demobar__controls {
  flex-wrap: wrap;
}
.demobar__btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f3eeda;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.demobar__btn:active {
  transform: scale(0.97);
}
.demobar__seg {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.demobar__segbtn {
  background: none;
  color: rgba(243, 238, 218, 0.7);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.demobar__segbtn.is-on {
  background: var(--gold);
  color: #26261b;
}
.demobar__date {
  background: rgba(255, 255, 255, 0.1);
  color: #f3eeda;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: var(--sans);
  color-scheme: dark;
  margin-left: auto;
}

/* ---- Morning final review + share (ReflectionFlow step 4) --------------- */

.review-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.review-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-raised);
  padding: 13px 14px;
}
.review-item__saying {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.review-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.review-item__state {
  font-size: 12.5px;
  color: var(--ink-soft);
}

/* ---- Paired morning plan + evening outcome (Community feed) ------------- */

.pair {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pair__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pair__tag {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.pair__tag--am {
  color: var(--gold);
  background: var(--gold-tint);
}
.pair__tag--pm {
  color: var(--accent-strong);
  background: var(--accent-tint);
}
.pair__text {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0;
}
.pair__note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-faint);
  font-style: italic;
}
.pair__note--done {
  font-style: normal;
  color: var(--ink-soft);
}
.pair__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ---- Collapsed comment toggle (icon + count, X / Instagram style) ------- */

.cmt-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.cmt-toggle:active {
  transform: scale(0.94);
}
.cmt-toggle--on {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.cmt-toggle__count {
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* Product additions: native forms, real account screens, route-based practice. */
a { color: inherit; }
.brand, .quick__btn, .btn, .streak-strip { text-decoration: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; }
button:disabled { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 480px); background: var(--paper-raised); border-top: 1px solid var(--line); padding: 12px 6px calc(12px + env(safe-area-inset-bottom)); z-index: 10; }
.bottom-nav__item { display: flex; align-items: center; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink-soft); font-size: 20px; padding: 4px; }
.bottom-nav__item span { font-size: 12px; }
.bottom-nav__item.active { color: var(--accent-strong); font-weight: 700; }
.auth-intro { padding: 20px 0; }
.auth-intro h1 { font-size: 38px; line-height: 1.1; margin: 24px 0 16px; }
.auth-intro p { font-size: 15px; line-height: 1.6; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form h2 { margin: 0 0 6px; }
.auth-form label, .reply-form label { font-size: 14px; font-weight: 600; }
input.field { min-height: 46px; height: auto; padding: 12px; }
textarea.field { display: block; width: 100%; }
.auth-foot { font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.5; }
.form-error { color: #843b2c; background: #f7e4dc; border-radius: 10px; padding: 12px; line-height: 1.5; }
.notice { display: flex; justify-content: space-between; gap: 12px; background: var(--accent-tint); padding: 12px 20px; font-size: 14px; }
.notice--error { background: var(--rose-tint); }
.notice button { background: none; border: none; font-size: 20px; cursor: pointer; }
.record-note { font-size: 13px; line-height: 1.6; margin: 12px 2px 22px; }
.alternate-flow { display: block; text-align: center; margin-top: 14px; }
.prompt-text { font-size: 20px; line-height: 1.4; }
summary { cursor: pointer; }
.practice-flow { display: flex; flex-direction: column; min-height: 100dvh; }
.practice-flow .sheet__top { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.practice-flow .sheet__body { flex: 1; padding: 24px 20px; }
.practice-flow .sheet__foot { position: sticky; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--paper-raised); display: flex; gap: 8px; border-top: 1px solid var(--line); }
.practice-flow .sheet__foot .btn { flex: 1; padding-left: 10px; padding-right: 10px; font-size: 13px; }
label.step__q { display: block; margin-top: 24px; }
.share-choice { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 14px; cursor: pointer; }
.share-choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.morning-recall { margin-top: 24px; padding: 16px; background: var(--paper-sunk); border-radius: 12px; font-size: 14px; }
.sealed { text-align: center; padding: 70px 0; }
.sealed p { line-height: 1.6; }
.milestone-celebration { background: var(--gold-tint); margin: 24px 0; }
.recap-item + .recap-item { margin-top: 18px; }
.participation-meter { display: block; height: 20px; width: 100%; accent-color: var(--accent); }
.history-columns { display: flex; gap: 3px; padding: 8px 0; }
.history-columns .grid__col { display: flex; flex-direction: column; gap: 3px; }
.pages-list { padding: 0; }
.page-link { display: flex; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; }
.page-link div { display: flex; flex-direction: column; gap: 6px; }
.page-link div span { color: var(--ink-soft); }
.sign-out, .load-more { margin-top: 24px; }
.reaction-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.comments-toggle { margin-bottom: 8px; }
.comment-row { border-left: 2px solid var(--line); padding: 12px; font-size: 14px; }
.comment-row p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; margin: 8px 0; }
.comment-row .danger { margin-left: 12px; font-size: 12px; }
.reply-form { margin-top: 12px; }
.reply-form textarea { margin: 10px 0; min-height: 70px; }
.presets { display: flex; flex-direction: column; align-items: start; gap: 4px; margin-bottom: 8px; }
.presets .btn { font-size: 12px; padding: 6px 0; text-align: left; }
.remove-sharing { margin-top: 16px; font-size: 12px; }
.share .avatar { background: var(--accent-strong); color: white; }
.pair__text { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.practice-fields { border: 0; margin: 0; padding: 0; min-width: 0; }

/* Keep the latest practice visible even on a narrow phone. */
.history-columns { display: grid; grid-template-columns: repeat(18, minmax(0, 1fr)); min-width: 0; }
.history-columns .cell { width: 100%; aspect-ratio: 1; height: auto; border-radius: 3px; }

.google-signin { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; width: 100%; padding: 10px 16px; border: 1px solid #747775; border-radius: 4px; background: white; color: #1f1f1f; font: 500 14px Arial, sans-serif; cursor: pointer; }
.google-signin:hover { background: #f8faff; }
.google-signin svg { flex-shrink: 0; }
.google-hint { margin: 0; line-height: 1.5; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 13px; margin: 6px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
