/* The YOGArtist Journal
   Paper, ink and a little colour. Calm first: nothing moves unless it helps,
   and nothing moves at all for anyone who has asked for less motion. */

:root {
  --paper: #faf7f2;
  --paper-2: #f3ede4;
  --card: #fffdf9;
  --ink: #2c2a28;
  --ink-2: #5f5a54;
  --ink-3: #8a847c;
  --line: #e6ddd0;
  /* Terracotta at text weight is darkened for contrast: #b5836d on paper is
     about 3:1, which fails for body text. The lighter tone is decoration only. */
  --accent: #8f5c47;
  --accent-soft: #b5836d;
  --accent-wash: #f1e3da;
  --sage: #8a9b8e;
  --sage-wash: #e7ece7;
  --danger: #9b3d2e;
  --focus: #6b8f7a;
  --shadow: 0 1px 2px rgba(44, 42, 40, 0.05), 0 8px 24px rgba(44, 42, 40, 0.06);
  --radius: 18px;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1d1a18;
    --paper-2: #26221f;
    --card: #2a2623;
    --ink: #efe8de;
    --ink-2: #c7bfb4;
    --ink-3: #9a9187;
    --line: #3b3531;
    --accent: #e2a58b;
    --accent-soft: #c98f76;
    --accent-wash: #3a2c26;
    --sage-wash: #2c332e;
    --danger: #e59a8a;
    --focus: #9fc1ad;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--card); color: var(--ink); padding: 0.5rem 0.9rem; border-radius: 10px;
}
.skip:focus { left: 0.5rem; z-index: 20; }

/* ---- boot ---------------------------------------------------------------- */
.boot {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
}
.boot-word { font-family: var(--serif); color: var(--ink-3); letter-spacing: 0.08em; margin: 0; }
.figure { width: 120px; height: 120px; }

/* ---- layout -------------------------------------------------------------- */
.app {
  max-width: 34rem;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 1.1rem) 1.15rem calc(6.2rem + var(--safe-bottom));
  outline: none;
}
.app.bare { padding-bottom: 2.5rem; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
.muted { color: var(--ink-2); }
.small { font-size: 0.87rem; }
.eyebrow { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.stack > * + * { margin-top: 0.9rem; }
.stack-lg > * + * { margin-top: 1.6rem; }
.row { display: flex; align-items: center; gap: 0.6rem; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }

/* ---- welcome ------------------------------------------------------------- */
.welcome { min-height: calc(100dvh - 3rem); display: flex; flex-direction: column; justify-content: center; }
.wordmark { font-family: var(--serif); font-size: 2.3rem; line-height: 1.1; }
.wordmark span { color: var(--accent-soft); }
.lede { font-family: var(--serif); font-size: 1.2rem; color: var(--ink-2); }
.welcome .figure { margin: 0 0 1rem -10px; }

/* ---- cards --------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.theme-card { position: relative; overflow: hidden; padding-top: 1.5rem; }
.theme-card .band { position: absolute; inset: 0 0 auto 0; height: 6px; display: flex; }
.theme-card .band i { flex: 1; }
.theme-title { font-size: 1.9rem; margin: 0.35rem 0 0.2rem; }
.cue { display: flex; gap: 0.85rem; align-items: center; padding: 0.85rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0.9rem 0; }
.cue p { font-family: var(--serif); font-style: italic; color: var(--ink-2); }
.prompt { font-family: var(--serif); font-size: 1.22rem; line-height: 1.45; }

/* The breathing circle: in for four, out for six. Tap to breathe with it. */
.breath {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 40% 38%, var(--accent-wash), var(--sage-wash));
  position: relative;
}
.breath::after {
  content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--sage);
  opacity: 0.55; transform: scale(0.55);
}
.breath.on::after { animation: breathe 10s ease-in-out infinite; }
@keyframes breathe {
  0% { transform: scale(0.55); opacity: 0.45; }
  40% { transform: scale(1.35); opacity: 0.8; }
  100% { transform: scale(0.55); opacity: 0.45; }
}
.breath-label { font-size: 0.8rem; color: var(--ink-3); }

/* ---- composer ------------------------------------------------------------ */
.field-label { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); display: block; margin-bottom: 0.45rem; }
textarea, input[type="text"], input[type="email"], input[type="number"], select {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; width: 100%;
  padding: 0.8rem 0.9rem; transition: border-color 0.15s ease;
}
textarea:focus, input:focus, select:focus { border-color: var(--accent-soft); outline: none; box-shadow: 0 0 0 3px var(--accent-wash); }
textarea.writing {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.6;
  min-height: 9.5rem; resize: none; background: var(--paper);
}
input.code {
  font-size: 1.6rem; letter-spacing: 0.4em; text-align: center; font-variant-numeric: tabular-nums;
}
input.joincode { text-transform: uppercase; letter-spacing: 0.12em; }

.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.95rem; cursor: pointer;
  min-height: 44px; transition: background 0.15s ease, border-color 0.15s ease;
}
.chip[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent-soft); color: var(--ink); font-weight: 600; }

.energy { display: flex; gap: 0.35rem; align-items: center; }
.energy button {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper);
  cursor: pointer; padding: 0; display: grid; place-items: center;
}
.energy button i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: transform 0.15s ease, background 0.15s ease; }
.energy button[aria-pressed="true"] i { background: var(--accent-soft); transform: scale(1.35); }
.energy .ends { font-size: 0.78rem; color: var(--ink-3); }

.swatch-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.swatch {
  width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--card); cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px var(--ink-3);
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.swatch.none { background: var(--paper); color: var(--ink-3); font-size: 0.72rem; }

/* A page being edited fills its own card, rather than a card inside a card:
   on a 320px phone the energy dots and photos need that width. */
.card > .composer.editing { padding: 0; border: 0; box-shadow: none; background: none; }

.more { font: inherit; font-size: 0.92rem; color: var(--accent); background: none; border: none; padding: 0.3rem 0; cursor: pointer; min-height: 44px; }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  font: inherit; font-weight: 600; font-size: 1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 50px; padding: 0.7rem 1.4rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: var(--accent); color: #fff; width: 100%;
  transition: filter 0.15s ease, transform 0.05s ease;
}
@media (prefers-color-scheme: dark) { .btn { color: #1d1a18; } }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--line); font-weight: 500; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--line); }
.btn.inline { width: auto; }
.linkbtn { font: inherit; color: var(--accent); background: none; border: none; padding: 0.4rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.notice { background: var(--sage-wash); border-radius: 14px; padding: 0.8rem 1rem; font-size: 0.93rem; color: var(--ink); }
.notice.warm { background: var(--accent-wash); }
.error-text { color: var(--danger); font-size: 0.92rem; }

/* ---- entries ------------------------------------------------------------- */
.entry { position: relative; padding-left: 1.2rem; }
.entry .colour { position: absolute; left: 0; top: 0.2rem; bottom: 0.2rem; width: 5px; border-radius: 4px; background: var(--line); }
.entry .meta { font-size: 0.82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0.25rem 0.7rem; }
.entry .text { font-family: var(--serif); font-size: 1.07rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 0.35rem; }
.entry .body-note { font-size: 0.92rem; color: var(--ink-2); margin-top: 0.3rem; }
.entry-actions { display: flex; gap: 1rem; margin-top: 0.25rem; }
/* Small words, but a thumb-sized place to tap them. */
.entry-actions button { font: inherit; font-size: 0.85rem; background: none; border: none; color: var(--ink-3); padding: 0.3rem 0; min-height: 44px; cursor: pointer; }

/* ---- photos on a page ---------------------------------------------------- */
/* Thumbnails in a grid that wraps, never scrolls sideways. Each one is a
   button: tapped, the photo opens larger. Photos arrive as data: URLs. */
.photos-part > * + * { margin-top: 0.6rem; }
/* Two across even in a page being edited on a 320px phone, where cards sit inside cards. */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: 0.7rem 0.6rem; }
.photo-grid.compact { grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); gap: 0.45rem; }
.entry .photo-grid { margin-top: 0.7rem; }
.photo { min-width: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.photo-open {
  display: block; width: 100%; aspect-ratio: 1 / 1; min-height: 44px; padding: 0; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper-2);
}
.photo-open[disabled] { cursor: default; }
.photo-open img { width: 100%; height: 100%; object-fit: cover; }
.photo.sending .photo-open img, .photo.waiting .photo-open img { opacity: 0.6; }
.photo-note { font-size: 0.8rem; line-height: 1.35; color: var(--ink-2); overflow-wrap: anywhere; }
.photo-note.refused { color: var(--danger); }
.photo-btn {
  font: inherit; font-size: 0.85rem; min-height: 44px; padding: 0.3rem 0.4rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink); overflow-wrap: anywhere;
}
.save-status[data-status="photos"] { margin-top: 0.35rem; }
.save-status[data-status="photos"]:empty { min-height: 0; margin: 0; }

dialog.photo-dialog { padding: 0; max-width: min(46rem, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); overflow: auto; }
.photo-dialog-inner { padding: 0.75rem; }
.photo-dialog-inner > * + * { margin-top: 0.75rem; }
.photo-large { max-width: 100%; max-height: calc(100dvh - 7rem); width: auto; height: auto; margin: 0 auto; border-radius: 12px; }
.entry-actions button:hover { color: var(--accent); }

.day { margin-top: 1.8rem; }
.day:first-child { margin-top: 0.4rem; }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.day-head .theme-name { font-family: var(--serif); font-style: italic; color: var(--ink-2); font-size: 0.95rem; text-align: right; }
.day .card + .card { margin-top: 0.6rem; }

.week { display: flex; gap: 0.3rem; margin-top: 0.4rem; }
.week i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.week i.on { background: var(--sage); }

.empty { text-align: center; padding: 2.4rem 1rem; color: var(--ink-2); }
.empty h3 { margin-bottom: 0.4rem; }

/* ---- settings ------------------------------------------------------------ */
.setting { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.95rem 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: none; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background 0.2s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform 0.2s ease; }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
select.hour { width: auto; padding: 0.55rem 0.8rem; }

.install { display: flex; gap: 0.9rem; align-items: flex-start; }
.install svg { flex: none; width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; }

/* ---- retreat ------------------------------------------------------------- */
/* Emma's retreat diary. One column, thumb-sized, and quiet: the day's colours
   are decoration only, so text keeps the journal's own contrast. */
.retreat-head .eyebrow { color: var(--ink-2); }
.retreat-opening { display: flex; align-items: center; justify-content: center; gap: 0.6rem; padding: 1.4rem 0; }

/* Every day on one row, even on a 320px phone: five 48px columns fit. */
.day-chips {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(3rem, 1fr)); gap: 0.35rem;
  margin: 1.1rem 0 1.2rem;
}
.day-chip {
  font: inherit; min-width: 0; min-height: 60px; padding: 0.3rem 0.1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.1rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  text-decoration: none; cursor: pointer;
}
.day-chip .chip-emoji { font-size: 1.3rem; line-height: 1.15; }
.day-chip .chip-day { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); }
.day-chip .chip-opens { font-size: 0.75rem; color: var(--ink-2); }
.day-chip[aria-current="page"] { background: var(--accent-wash); border-color: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-soft); }
.day-chip[aria-current="page"] .chip-day { color: var(--ink); }
.day-chip.locked { background: transparent; border-style: dashed; cursor: default; }

.rday > * + * { margin-top: 1rem; }
.rday-theme .band { height: 10px; }
.rday-theme .eyebrow { color: var(--ink-2); }
.rday-title {
  display: flex; align-items: center; gap: 0.6rem; margin: 0.4rem 0 0.3rem;
  font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.12em; overflow-wrap: anywhere;
}
.rday-emoji { font-size: 2rem; letter-spacing: 0; line-height: 1; }
.rday-tagline { font-family: var(--serif); font-style: italic; font-size: 1.18rem; line-height: 1.45; color: var(--ink-2); }
.rday-words { padding: 0.2rem 0.3rem; }
.rday-words > * + * { margin-top: 0.7rem; }
.rday-desc { font-family: var(--serif); font-size: 1.08rem; line-height: 1.65; }
.rday-theme .rday-desc { margin-top: 0.8rem; }

.breath-card { display: flex; align-items: center; gap: 1.1rem; }
.breath.big { width: 88px; height: 88px; }
.breath.big::after { inset: 20px; }
.breath.once::after { animation: breathe 10s ease-in-out 1 both; }
.cue-text { font-family: var(--serif); font-style: italic; color: var(--ink-2); line-height: 1.5; }
.breath-card .breath-label { font-size: 0.9rem; color: var(--ink-2); margin-top: 0.4rem; }
@media (max-width: 359px) {
  .breath-card { gap: 0.85rem; }
  .breath.big { width: 72px; height: 72px; }
  .breath.big::after { inset: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  /* No growing and shrinking: the circle just brightens while the breath is taken. */
  .breath.once::after { animation: none !important; transform: scale(1); opacity: 0.85; }
}

.rsection > * + * { margin-top: 0.8rem; }
.rsection .eyebrow { color: var(--ink-2); }
.rsection .eyebrow + .rs-title { margin-top: 0.3rem; }
.rs-title { font-size: 1.22rem; line-height: 1.35; }
.rs-title label { cursor: inherit; }
.rs-question { font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; }
.rs-hint { font-size: 0.93rem; color: var(--ink-2); }
textarea.writing.reflect { min-height: 8rem; }
.save-status { min-height: 1.35em; font-size: 0.85rem; color: var(--ink-2); }
.rsection > .save-status { margin-top: 0.45rem; }
.save-status.refused { color: var(--danger); }
/* The photo's line only takes room when it has something to say; the words'
   line keeps its room, so the page does not jump as "Saving…" comes and goes. */
.save-status[data-status="photo"]:empty { min-height: 0; }

/* Changed on another device: set apart from the member's own box, so the two
   versions are never mistaken for each other. */
.conflict { border: 1px solid var(--accent-soft); border-radius: 14px; padding: 0.95rem 1rem; background: var(--accent-wash); }
.conflict > * + * { margin-top: 0.65rem; }
.conflict-title { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; margin: 0; }
.conflict-other { background: var(--card); border-left: 4px solid var(--ink-3); border-radius: 10px; padding: 0.7rem 0.9rem; }
.conflict-other > * + * { margin-top: 0.4rem; }
.conflict-text { font-family: var(--serif); font-size: 1.05rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.conflict-colour { display: flex; align-items: center; gap: 0.6rem; }
.conflict-colour i { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }
.conflict-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }

/* Words for a part no longer on the day: to read and copy, not to edit. */
.gone-item { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.gone-item > * + * { margin-top: 0.5rem; }
textarea[readonly] { background: var(--paper-2); }

/* A retreat code kept from signing in that could not be used yet. */
.card.attention { border-color: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }

.energy.stacked {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem 0.3rem;
  max-width: 17rem; justify-items: center;
}
.energy.stacked .ends { grid-row: 2; font-size: 0.8rem; color: var(--ink-2); overflow-wrap: anywhere; min-width: 0; }
.energy.stacked .ends:first-child { grid-column: 1 / span 2; justify-self: start; }
.energy.stacked .ends:last-child { grid-column: 4 / span 2; justify-self: end; text-align: right; }

.prompt-cards > * + * { margin-top: 0.55rem; }
.prompt-card {
  font: inherit; font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; color: var(--ink);
  display: block; width: 100%; min-height: 56px; text-align: left; cursor: pointer; position: relative;
  padding: 0.85rem 1rem 0.85rem 2.9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  overflow-wrap: anywhere;
}
.prompt-card::before {
  content: ""; position: absolute; left: 1rem; top: 1.05rem; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--ink-3); background: var(--card); box-sizing: border-box;
}
.prompt-card[aria-checked="true"] { background: var(--accent-wash); border-color: var(--accent-soft); }
.prompt-card[aria-checked="true"]::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.deeper-label {
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2);
  border-top: 1px dashed var(--line); padding-top: 0.9rem;
}
.prompt-cards > .deeper-label { margin-top: 1rem; }
.prompt-answer { padding: 0.1rem 0 0.35rem; }

.art-img { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--paper-2); }
.art-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.6rem; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer;
  font-size: 16px; /* never small enough for iOS to zoom */
}
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.file-btn.busy { opacity: 0.55; pointer-events: none; }

.swatch.big { width: 52px; height: 52px; }
.swatch-row { align-items: center; row-gap: 0.8rem; }
.swatch-other { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 52px; font-size: 0.95rem; color: var(--ink-2); cursor: pointer; }
.other-face {
  position: relative; flex: none; width: 52px; height: 52px; border-radius: 50%;
  border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--ink-3);
  background: conic-gradient(#c2556a, #e0a33b, #f2d18b, #7a8b5e, #3f6f8a, #b9a7c6, #c2556a);
}
.other-face input[type="color"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: none; border-radius: 50%;
  background: none; cursor: pointer; opacity: 0; -webkit-appearance: none; appearance: none;
}
.other-face input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.other-face input[type="color"]::-webkit-color-swatch { border: none; border-radius: 50%; }
.other-face input[type="color"]::-moz-color-swatch { border: none; border-radius: 50%; }
.swatch-other:focus-within .other-face { outline: 3px solid var(--focus); outline-offset: 2px; }
.swatch-other.on .other-face { box-shadow: 0 0 0 3px var(--ink); }
.swatch-other.on .other-face input[type="color"] { opacity: 1; }
.swatch-other.on .other-name { color: var(--ink); font-weight: 600; }

.journey { list-style: none; margin: 0.9rem 0 0; padding: 0; }
.journey li + li { margin-top: 0.5rem; }
.journey-day {
  display: flex; align-items: center; gap: 0.75rem; min-height: 56px; padding: 0.65rem 0.85rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); text-decoration: none;
}
.journey-emoji { font-size: 1.35rem; flex: none; }
.journey-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.journey-title { font-size: 0.95rem; color: var(--ink-2); overflow-wrap: anywhere; }
.journey-title strong { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; color: var(--ink); }
.journey-note { font-size: 0.87rem; color: var(--ink-2); overflow-wrap: anywhere; }
.journey-day.quiet .journey-note { font-style: italic; }
.journey-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 2px var(--card), 0 0 0 3px var(--line); }

.retreat-notice h2 { font-size: 1.35rem; }
.other-retreats { margin-top: 1.6rem; }
.retreat-privacy { text-align: center; margin-top: 1.6rem; padding: 0 1rem; }
.empty-title { font-size: 1.55rem; }

/* ---- tabs ---------------------------------------------------------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 0.2rem;
  padding: 0.4rem 0.8rem calc(0.4rem + var(--safe-bottom));
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
}
.tabs a {
  flex: 1; max-width: 8.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.12rem;
  /* --ink-2, not --ink-3: labels this small need the stronger contrast. */
  text-decoration: none; color: var(--ink-2); font-size: 0.75rem; padding: 0.35rem 0; border-radius: 12px; min-height: 48px;
  min-width: 0;
}
.tabs a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--accent); }

/* ---- toast --------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(5.4rem + var(--safe-bottom)); transform: translateX(-50%);
  background: var(--ink); color: var(--paper); padding: 0.7rem 1.1rem; border-radius: 999px;
  font-size: 0.92rem; box-shadow: var(--shadow); z-index: 30; max-width: calc(100vw - 2rem); text-align: center;
}

.noscript { padding: 2rem; font-family: var(--serif); }

/* ---- dialog -------------------------------------------------------------- */
dialog {
  border: none; border-radius: var(--radius); padding: 1.4rem; max-width: min(28rem, calc(100vw - 2rem));
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(29, 26, 24, 0.45); }

/* ---- motion -------------------------------------------------------------- */
.fade { animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

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

@media (min-width: 720px) {
  body { font-size: 18px; }
  .app { padding-top: 2.4rem; }
}
