/* Layout: one centred column of stationery (max 440px). Screens swap in place; the envelope opens into the letter. */
:root {
  --paper: #fbf1ec;
  --paper-2: #f5e4dc;
  --paper-3: #e9d2c8;
  --ink: #3a1e2c;
  --ink-2: #7d5c6a;
  --rose: #d64c66;
  --rose-deep: #b23a52;
  --rose-soft: #f8d9df;
  --gold: #c29a5b;
  --wax: #b8323f;
  --ok: #5d9a7a;
  --shadow: 0 24px 50px -24px rgba(58, 30, 44, .45);
  --shadow-sm: 0 8px 20px -12px rgba(58, 30, 44, .35);
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Segoe Script', cursive;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1c1219;
    --paper-2: #2a1b25;
    --paper-3: #3d2834;
    --ink: #f7e9ee;
    --ink-2: #c4a7b4;
    --rose: #ef6f88;
    --rose-deep: #f28ca0;
    --rose-soft: #4a2634;
    --gold: #d9b26e;
    --wax: #d0404f;
    --ok: #7fc3a0;
    --shadow: 0 24px 50px -24px rgba(0, 0, 0, .7);
    --shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: env(safe-area-inset-top, 0px) env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 8vw, 40px); font-variation-settings: 'opsz' 144, 'SOFT' 60; }
h2 { font-size: clamp(26px, 7vw, 34px); font-variation-settings: 'opsz' 96, 'SOFT' 60; }
h3 { font-size: 20px; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
input, textarea, select { font: inherit; color: var(--ink); }
.hand { font-family: var(--hand); font-weight: 600; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.muted { color: var(--ink-2); }
.ic { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: -.3em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; text-decoration: none;
  background: var(--rose); color: #fff; font-weight: 600; font-size: 16px;
  box-shadow: 0 10px 24px -12px var(--rose);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); background: var(--rose-deep); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; box-shadow: none; transform: none; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--paper-3); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.sm { padding: 9px 14px; font-size: 14px; }
.btn.block { width: 100%; }

.card {
  background: var(--paper-2);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 26px 22px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: transparent; box-shadow: inset 0 0 0 1.5px var(--paper-3);
  font-weight: 500; font-size: 14px; color: var(--ink);
  transition: background .15s, box-shadow .15s, color .15s;
}
.pill[aria-pressed="true"] { background: var(--rose-soft); box-shadow: inset 0 0 0 1.5px var(--rose); color: var(--rose-deep); }

.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.input, textarea.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--paper); border: 1.5px solid var(--paper-3);
  transition: border-color .15s;
}
.input:focus { border-color: var(--rose); outline: none; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
