/* Cord of Three: warm and calm. Deep green, warm cream, one soft gold. Mobile first (390px). */
@font-face { font-family: 'Cord Serif'; src: url('/vendor/fonts/DMSerifDisplay-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Cord Sans'; src: url('/vendor/fonts/SourceSansPro-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cord Sans'; src: url('/vendor/fonts/SourceSansPro-Semibold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cord Sans'; src: url('/vendor/fonts/SourceSansPro-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

:root {
  --green: #1f3d2b;
  --green-2: #2f5a40;
  --green-soft: #dfe8dc;
  --cream: #f8f1e1;
  --paper: #fffaf0;
  --gold: #c9a04c;
  --gold-soft: #f3e4bf;
  --ink: #26302a;
  --muted: #5d6a60;
  --line: #e6dcc5;
  --water: #9cc3cf;
  --water-2: #c9e0e6;
  --radius: 22px;
  --tap: 56px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 19px/1.5 'Cord Sans', -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: 'Cord Serif', Georgia, serif; font-weight: 400; color: var(--green); margin: 0 0 10px; line-height: 1.15; }
h1 { font-size: 34px; }
h2 { font-size: 27px; }
h3 { font-size: 22px; }
p { margin: 0 0 14px; }
a { color: var(--green-2); }
button, input, textarea, select { font: inherit; color: inherit; }

.top {
  background: var(--green);
  color: var(--cream);
  padding: calc(env(safe-area-inset-top) + 12px) 20px 12px;
  display: flex; align-items: center; justify-content: center;
}
.top__name { font-family: 'Cord Serif', Georgia, serif; font-size: 21px; letter-spacing: .02em; }
.app { max-width: 560px; margin: 0 auto; padding: 20px 16px 24px; }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 0 0 16px;
  box-shadow: 0 1px 0 rgba(31, 61, 43, .04), 0 6px 18px rgba(31, 61, 43, .05);
}
.card--green { background: var(--green); color: var(--cream); border-color: var(--green); }
.card--green h1, .card--green h2, .card--green h3 { color: var(--cream); }
.card--gold { background: var(--gold-soft); border-color: #ead39b; }
.card--quiet { background: transparent; box-shadow: none; }
.eyebrow { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 0 0 6px; }
.card--green .eyebrow { color: var(--gold); }
.muted { color: var(--muted); font-size: 17px; }
.card--green .muted { color: #d8e2d6; }
.verse { font-family: 'Cord Serif', Georgia, serif; font-size: 24px; line-height: 1.35; margin: 6px 0 10px; }
.verse-ref { font-weight: 600; color: var(--gold); margin: 0 0 14px; }
.big-text { font-size: 22px; line-height: 1.45; }
.center { text-align: center; }

/* Buttons: big and friendly */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: var(--tap);
  padding: 14px 20px; margin: 10px 0 0;
  border-radius: 18px; border: 2px solid var(--green);
  background: var(--green); color: var(--cream);
  font-weight: 600; font-size: 20px; text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.99); }
.btn--big { min-height: 72px; font-size: 23px; border-radius: 22px; margin: 0 0 16px; }
.btn--soft { background: var(--paper); color: var(--green); }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #2b2410; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--green-2); text-decoration: underline; min-height: 48px; font-weight: 600; }
.btn--danger { background: var(--paper); color: #8a3b2b; border-color: #c98f7f; }
.card--green .btn { background: var(--cream); color: var(--green); border-color: var(--cream); }
.card--green .btn--ghost { background: transparent; color: var(--cream); border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.done-mark { display: inline-flex; align-items: center; gap: 8px; color: var(--green-2); font-weight: 700; }
.done-mark svg { width: 22px; height: 22px; }

/* Inputs */
.field { display: block; margin: 12px 0 0; }
.field span { display: block; font-weight: 600; margin: 0 0 6px; }
.input, textarea.input {
  width: 100%; min-height: var(--tap);
  border: 2px solid var(--line); border-radius: 16px;
  background: #fff; padding: 12px 14px; font-size: 19px;
}
textarea.input { min-height: 120px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
.code-input { text-align: center; font-size: 32px; letter-spacing: .3em; text-transform: uppercase; font-weight: 700; }
.counter { text-align: right; font-size: 15px; color: var(--muted); margin-top: 4px; }
.pair-code { font-family: 'Cord Sans', monospace; font-weight: 700; font-size: 46px; letter-spacing: .22em; text-align: center; color: var(--green); margin: 8px 0; }
.choice { text-align: left; justify-content: flex-start; background: var(--paper); color: var(--ink); border-color: var(--line); font-weight: 400; }
.choice[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); font-weight: 600; }

/* Toggle */
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: var(--tap); padding: 6px 0; cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; width: 58px; height: 34px; border-radius: 20px; background: #d6d0c0; position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked { background: var(--green-2); }
.toggle input:checked::after { transform: translateX(24px); }

/* Status chips */
.status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 600; font-size: 17px; }
.chip--wait { background: #efe8d6; color: var(--muted); }
.chip--gold { background: var(--gold-soft); color: #6b5115; }

/* Step dots */
.dots { display: flex; gap: 8px; justify-content: center; margin: 0 0 16px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #dcd3bd; }
.dots i.on { background: var(--green-2); }
.dots i.here { background: var(--gold); transform: scale(1.3); }
.nav-row { display: flex; gap: 10px; margin-top: 6px; }
.nav-row .btn { flex: 1; }
.nav-row .btn--back { flex: 0 0 auto; width: auto; padding: 14px 18px; }

/* Answers (the reveal) */
.answer { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 10px 0 0; }
.answer b { display: block; color: var(--green); margin: 0 0 4px; font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.sealed { display: flex; gap: 12px; align-items: center; }
.sealed svg { width: 44px; height: 44px; flex: none; }

/* Recorder */
.rec { text-align: center; padding: 22px 0 0; }
.rec__btn { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--green); color: var(--cream); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 6px 16px rgba(31,61,43,.25); }
.rec__btn svg { width: 40px; height: 40px; }
.rec__btn.is-on { background: #9b3d2c; animation: pulse 1.4s ease-in-out infinite; }
.rec__time { font-weight: 700; font-size: 22px; margin: 10px 0 0; font-variant-numeric: tabular-nums; }
.rec audio, .player audio { width: 100%; margin: 12px 0 0; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(155, 61, 44, .12); } }
.player { margin: 10px 0 0; }

/* Garden */
.garden { background: linear-gradient(#eaf1e2, #f8f1e1 70%); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; margin: 0 0 16px; }
.garden svg { display: block; width: 100%; height: auto; }
.garden__caption { padding: 4px 18px 16px; color: var(--muted); font-size: 17px; }
.mini-garden { display: flex; gap: 4px; align-items: flex-end; min-height: 74px; overflow: hidden; }
.mini-garden svg { width: 56px; height: 68px; flex: none; }
.stone-note { display: flex; align-items: center; gap: 12px; }
.stone-note svg { width: 64px; flex: none; }

/* Gratitude jar */
.jar { display: flex; justify-content: center; margin: 4px 0 8px; }
.jar svg { width: 160px; height: auto; }
.thanks { list-style: none; margin: 10px 0 0; padding: 0; }
.thanks li { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 0 0 10px; }
.thanks small { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }

/* Path */
.path-scene svg { display: block; width: 100%; height: auto; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { margin: 0 0 12px; }
.step-card { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; min-height: 72px; cursor: pointer; color: var(--ink); }
.step-card[disabled] { cursor: default; opacity: .6; }
.step-card__n { width: 44px; height: 44px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; background: #efe8d6; color: var(--muted); }
.step-card.is-done .step-card__n { background: var(--green-2); color: var(--cream); }
.step-card.is-open .step-card__n { background: var(--gold); color: #2b2410; }
.step-card__t { flex: 1; }
.step-card__t strong { display: block; font-size: 19px; }
.step-card__t span { font-size: 16px; color: var(--muted); }
.partner-strip { background: var(--green-soft); border-radius: 16px; padding: 12px 14px; margin: 10px 0 0; }
.partner-strip b { display: block; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--green-2); margin-bottom: 4px; }
.keepsake { background: var(--paper); border: 2px solid var(--green); outline: 1px solid var(--gold); outline-offset: -8px; border-radius: 18px; padding: 30px 22px; text-align: center; }
.keepsake h2 { font-size: 34px; margin: 10px 0 4px; }
.keepsake .k-name { font-family: 'Cord Serif', Georgia, serif; font-size: 26px; margin: 0; }
.keepsake .k-date { font-style: italic; color: var(--muted); margin: 4px 0 16px; }
.keepsake .k-verse { font-family: 'Cord Serif', Georgia, serif; font-size: 20px; line-height: 1.4; }
.keepsake svg { width: 70px; height: auto; }

/* Notes, toast, dialog */
.note { display: flex; align-items: flex-start; gap: 12px; }
.note svg { width: 30px; height: 30px; flex: none; color: var(--gold); margin-top: 2px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); max-width: 528px; margin: 0 auto; background: var(--green); color: var(--cream); padding: 14px 18px; border-radius: 16px; font-weight: 600; text-align: center; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.dialog-back { position: fixed; inset: 0; background: rgba(20, 30, 24, .45); display: flex; align-items: flex-end; justify-content: center; z-index: 40; padding: 16px; }
.dialog { background: var(--paper); border-radius: 24px; padding: 24px 20px; width: 100%; max-width: 520px; margin-bottom: env(safe-area-inset-bottom); }

/* Tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs[hidden], .toast[hidden] { display: none; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 60px; justify-content: center; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; border-radius: 14px; -webkit-tap-highlight-color: transparent; }
.tabs a svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--green); background: var(--green-soft); }

.signin .btn { margin-top: 16px; }
.err { color: #8a3b2b; font-weight: 600; margin: 10px 0 0; }
.hide { display: none !important; }

/* Cord of Three's own sign-in: the three strands above the name. */
.signin { text-align: center; }
.signin form { text-align: left; }
.signin__mark { width: 64px; height: 64px; display: block; margin: 4px auto 8px; }
