:root {
  /* Light pastel: sage green and baby blue. Cards are near-white and lift off a pale
     sage page, so separation comes from soft shadow rather than from the card being
     lighter than its background. */
  --bg-rgb: 240, 244, 238;
  --bg: rgb(var(--bg-rgb));   /* pale sage */
  --surface: #fbfcf9;         /* near-white card */
  --surface-2: #e6ece2;       /* pale sage */
  --text-rgb: 46, 58, 48;
  --text: rgb(var(--text-rgb));   /* deep sage charcoal */
  --text-dim: #5c6a60;        /* muted sage grey — 4.8:1 on the palest surface */
  --accent-rgb: 156, 178, 137;
  --accent: rgb(var(--accent-rgb));   /* pastel sage, for fills and gradients */
  /* The pastel sage only reaches 2.2:1 on a light card, so anything that has to be
     READ — the quote glyph, focus rings — uses this deeper sage instead. */
  --accent-ink: #6f8a5c;

  /* Baby blue carries the milestone treatment. Kept as channels too, so the veil,
     the sketch and the chip can all tint with the same blue at any alpha. */
  --blue-rgb: 140, 192, 220;
  --blue: rgb(var(--blue-rgb));   /* baby blue */
  --blue-ink: #2f6b8c;            /* deep enough to read as a line on light */

  /* Separators and lift, tinted with the text colour so they stay in the sage family
     instead of going grey. On a light ground these do the work the old dark theme got
     for free from contrast between surfaces. */
  --hairline: rgba(46, 58, 48, 0.1);
  --shadow-card: 0 1px 2px rgba(46, 58, 48, 0.05), 0 6px 18px rgba(46, 58, 48, 0.07);
  --shadow-lift: 0 8px 24px rgba(46, 58, 48, 0.12);

  --radius: 18px;
  --gap: 16px;
  --tray-h: 76px;
  --maxw: 560px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.4;
  /* Leave room for the sticky tray + iOS home indicator */
  padding-bottom: calc(var(--tray-h) + env(safe-area-inset-bottom));
  overscroll-behavior-y: none;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: calc(env(safe-area-inset-top) + 14px) 20px 12px;
  background: linear-gradient(var(--bg) 70%, transparent);
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.2px;
}

.app-subtitle {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.timeline {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 8px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sentinel { height: 1px; }

/* One floating action, thumb-reachable. No bar behind it: the tray is just a
   full-width positioning strip, so it must not swallow taps meant for the timeline —
   only the button itself takes pointer events. */
.bottom-tray {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.tray-capture {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: #23301f;
  /* Carries its own lift now that no bar separates it from the timeline */
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45), 0 2px 6px rgba(46, 58, 48, 0.16);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* A viewer account has no way in, so the button is not there. Needed explicitly: the
   rule above sets `display: grid`, which outranks the browser's own
   `[hidden] { display: none }` and would leave a hidden button perfectly visible. */
.tray-capture[hidden] { display: none; }

.tray-capture:active { transform: scale(0.94); }

.tray-capture-icon {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  margin-top: -2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
