:root {
  color-scheme: light;
  --page: #f8f5ef;
  --paper: #fffdf9;
  --ink: #282a28;
  --muted: #77766e;
  --quiet: #aaa69c;
  --line: #e8e3d9;
  --accent: #d8795e;
  --accent-soft: #f8e8df;
  --sage: #dfe9dc;
  --blue: #dce8ef;
  --lilac: #eae2ef;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
  --shadow: 0 12px 32px rgb(60 49 35 / 5%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; padding-bottom: 88px; }
.topbar {
  height: 70px;
  padding: 0 6.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(52 47 39 / 7%);
}
.wordmark {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -.04em;
}
.wordmark-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50% 50% 50% 10px;
  color: #fffaf2;
  background: var(--accent);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}
.styles-link {
  margin-left: auto;
  margin-right: 20px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}
.styles-link span { margin-right: 4px; color: var(--accent); }
.group-switcher {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.group-avatars { display: inline-flex; padding-left: 3px; }
.avatar {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  margin-left: -4px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: #514f49;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}
.avatar--peach { background: #efc9b7; }
.avatar--blue { background: #c7dce7; }
.avatar--lilac { background: #d9cae2; }
.avatar--green { background: #c9d8bd; }
.chevron { color: var(--quiet); font-size: 16px; margin-top: -4px; }
.profile-button { border: 0; background: none; padding: 0; cursor: pointer; }
.profile-button .avatar { width: 34px; height: 34px; margin: 0; font-size: 13px; }

main { width: min(800px, 87.6%); margin: 0 auto; }
.view { padding: 52px 0 55px; }
.welcome-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 35px; }
.eyebrow {
  margin: 0 0 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
}
.eyebrow--muted { color: var(--muted); }
h1, h2, p { margin-top: 0; }
h1, .letter-heading h1 {
  margin-bottom: 0;
  font: 500 clamp(35px, 5vw, 48px)/1.11 var(--serif);
  letter-spacing: -.045em;
}
h1 em, h2 em { color: var(--accent); font-weight: 500; }
.sun-stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 9px 22px 0 0;
  border: 1px solid #e6bda9;
  border-radius: 50%;
  color: var(--accent);
  transform: rotate(9deg);
}
.sun-stamp > span { font-size: 18px; line-height: 1; }
.sun-stamp small { margin-top: 2px; font-size: 8px; line-height: 1.2; text-align: center; letter-spacing: .06em; }

.week-card {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 22px;
  border: 1px solid #eee6dc;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 100% 4%, rgb(226 198 164 / 17%), transparent 30%),
    var(--paper);
  box-shadow: var(--shadow);
}
.week-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.week-card .eyebrow { margin-bottom: 7px; }
.week-card h2, .section-heading h2, .nudge-card h2, .people-section h2 {
  margin: 0;
  font: 500 23px/1.25 var(--serif);
  letter-spacing: -.025em;
}
.date-pill {
  padding: 7px 9px;
  border-radius: 20px;
  background: #f4f0e9;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .09em;
}
.week-intro {
  max-width: 430px;
  margin: 10px 0 23px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.response-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.progress-avatars { display: flex; padding-left: 4px; }
.progress-avatars .avatar { width: 28px; height: 28px; font-size: 11px; }
.progress-copy { display: flex; min-width: 120px; flex-direction: column; gap: 3px; }
.progress-copy strong { font-size: 10px; font-weight: 700; }
.progress-copy span { color: var(--muted); font-size: 9px; }
.progress-track { height: 4px; flex: 1; overflow: hidden; margin-left: auto; border-radius: 4px; background: #eeeae2; }
.progress-track span { display: block; width: 75%; height: 100%; border-radius: inherit; background: #8ba486; transition: width .3s ease; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 41px 0 17px;
}
.section-heading .eyebrow { margin-bottom: 6px; }
.section-heading h2 { font-size: 22px; }
.count-label { padding-bottom: 4px; color: var(--quiet); font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.prompt-list { display: grid; gap: 10px; }
.prompt-card {
  display: grid;
  width: 100%;
  grid-template-columns: 39px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: inherit;
  background: rgb(255 253 249 / 72%);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.prompt-card:hover { transform: translateY(-1px); border-color: #d7c8b7; }
.prompt-number {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #a15e4b;
  background: var(--accent-soft);
  font: 500 14px var(--serif);
}
.prompt-card:nth-child(2) .prompt-number { color: #5f7782; background: var(--blue); }
.prompt-card:nth-child(3) .prompt-number { color: #786486; background: var(--lilac); }
.prompt-copy { min-width: 0; }
.prompt-copy h3 { margin: 0 0 5px; font: 500 15px/1.4 var(--serif); }
.prompt-copy p { margin: 0; color: var(--muted); font-size: 9px; }
.prompt-card .prompt-answer { padding: 0; border: 0; background: transparent; white-space: nowrap; color: #7d9676; font-size: 9px; font-weight: 700; cursor: pointer; }
.prompt-card .prompt-answer--pending { color: var(--accent); }
.prompt-card .prompt-arrow { margin-left: 5px; color: var(--quiet); font-size: 15px; }
.question-jump { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.question-jump:hover { color: var(--accent); }

.nudge-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 28px;
  padding: 22px 23px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e9eee4;
}
.nudge-sparkle { color: #8a9d80; font-size: 29px; }
.nudge-card .eyebrow { margin-bottom: 6px; color: #687a61; }
.nudge-card h2 { font-size: 18px; }
.nudge-card p:not(.eyebrow) { margin: 5px 0 0; color: #6b7066; font-size: 10px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 39px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 24px;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s, background .18s;
}
.button:hover { transform: translateY(-1px); }
.button--dark { color: #fffdf9; background: #333831; }
.button--dark:hover { background: #222820; }
.button--outline { border-color: #d9d1c6; color: var(--ink); background: transparent; }
.button--full { width: 100%; margin-top: 17px; min-height: 46px; }
.nudge-card .button { margin-left: auto; flex: 0 0 auto; }
.people-section { margin-top: 41px; }
.section-heading--compact { margin: 0 0 17px; }
.text-button { padding: 0 0 3px; border: 0; color: var(--accent); background: none; font-size: 10px; font-weight: 600; cursor: pointer; }
.text-button span { margin-left: 4px; }
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.person-card {
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(255 253 249 / 65%);
}
.person-top { display: flex; align-items: center; gap: 9px; }
.person-top .avatar { width: 31px; height: 31px; margin: 0; }
.person-name { font-size: 10px; font-weight: 700; }
.person-city { margin-top: 3px; color: var(--muted); font-size: 8px; }
.person-status { display: flex; align-items: center; gap: 5px; margin-top: 13px; color: var(--muted); font-size: 8px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #91a786; }
.status-dot--waiting { background: #d8a48a; }

/* The letter is rendered as reusable issue, prompt, and response components. */
.letter-heading { max-width: 570px; margin: 0 auto; text-align: center; }
.back-link {
  display: block;
  margin: 0 auto 42px 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  cursor: pointer;
}
.back-link span { margin-right: 8px; font-size: 14px; vertical-align: -1px; }
.letter-heading .eyebrow { margin-bottom: 15px; }
.letter-heading h1 { font-size: clamp(42px, 6vw, 60px); }
.letter-deck { max-width: 350px; margin: 16px auto 20px; color: var(--muted); font: 14px/1.65 var(--serif); }
.letter-byline { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 9px; }
.group-avatars--large .avatar { width: 25px; height: 25px; margin-left: -6px; font-size: 9px; }
.byline-divider { color: #c2bbaf; }
.letter-body { max-width: 640px; margin: 43px auto 0; }
.letter-question { padding: 24px 0 8px; border-top: 1px solid var(--line); }
.letter-question-header { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 16px; }
.letter-question .prompt-number { width: 31px; height: 31px; font-size: 12px; }
.letter-question h2 { margin: 0; font: 500 19px/1.4 var(--serif); }
.response-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.response-card {
  padding: 15px 16px;
  border: 1px solid #eee9df;
  border-radius: 12px;
  background: var(--paper);
}
.response-card--mine { border-color: #e7c6b8; background: #fff9f5; }
.response-author { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.response-author .avatar { width: 25px; height: 25px; margin: 0; font-size: 10px; }
.response-author strong { font-size: 9px; }
.response-author span:not(.avatar) { margin-left: auto; color: var(--quiet); font-size: 8px; }
.response-card p { margin: 0; color: #55564f; font: 12px/1.65 var(--serif); }
.letter-footer { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 39px 0 0; text-align: center; }
.footer-flower { color: var(--accent); font-size: 23px; }
.letter-footer p { margin: 0; font: 17px/1.5 var(--serif); }
.letter-footer p em { color: var(--muted); font-size: 13px; }

.bottom-nav {
  position: fixed;
  z-index: 5;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  gap: min(13vw, 90px);
  height: 70px;
  border-top: 1px solid rgb(52 47 39 / 8%);
  background: rgb(248 245 239 / 94%);
  backdrop-filter: blur(14px);
}
.nav-item {
  position: relative;
  display: flex;
  min-width: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px 3px;
  border: 0;
  color: #8a887f;
  background: none;
  font-size: 8px;
  cursor: pointer;
}
.nav-item.is-active { color: var(--accent); font-weight: 700; }
.nav-icon { font-size: 21px; line-height: 1; }
.nav-icon--write { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 9px; color: white; background: var(--accent); font-size: 14px; }
.nav-dot { position: absolute; top: 11px; right: 12px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

.compose-dialog {
  width: min(480px, calc(100vw - 30px));
  max-width: none;
  padding: 0;
  border: 1px solid #e8e1d6;
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px rgb(43 38 30 / 20%);
}
.compose-dialog::backdrop { background: rgb(40 40 36 / 38%); backdrop-filter: blur(3px); }
.compose-form { padding: 25px; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; }
.dialog-top .eyebrow { margin: 0; }
.close-button { width: 29px; height: 29px; border: 0; border-radius: 50%; color: var(--muted); background: #f4f0e9; font-size: 20px; cursor: pointer; }
.compose-form h2 { margin: 21px 0 23px; font: 500 27px/1.2 var(--serif); letter-spacing: -.03em; }
.field-label { display: block; margin: 17px 0 7px; font-size: 10px; font-weight: 700; }
.compose-form select, .compose-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fffefa;
}
.compose-form select { height: 43px; padding: 0 11px; font-size: 11px; }
.compose-form textarea { resize: vertical; min-height: 126px; padding: 12px; font: 13px/1.6 var(--serif); }
.compose-form textarea::placeholder { color: #aaa69c; }
.postcard-font-label, .postcard-font-select { display: none; }
.account-dialog {
  width: min(440px, calc(100vw - 30px));
  max-width: none;
  padding: 0;
  border: 1px solid #e8e1d6;
  border-radius: 20px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px rgb(43 38 30 / 20%);
}
.account-dialog::backdrop { background: rgb(40 40 36 / 38%); backdrop-filter: blur(3px); }
.account-panel { padding: 25px; }
.account-panel h2 { margin: 21px 0 9px; font: 500 27px/1.2 var(--serif); letter-spacing: -.03em; }
.account-description { margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.account-input {
  width: 100%;
  min-height: 43px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fffefa;
  font: inherit;
  font-size: 12px;
}
.account-message { min-height: 17px; margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.account-message[data-state="error"] { color: #a34032; }
.account-message[data-state="success"] { color: #426b49; }
.account-mode-toggle { display: block; margin: 17px auto 0; }
.account-user { margin: 14px 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 700; }
.account-sign-out { display: block; margin: 17px auto 0; }
.compose-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.toast {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: 87px;
  padding: 11px 16px;
  border-radius: 22px;
  color: white;
  background: #333831;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 8px);
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(50%, 0); }
[hidden] { display: none !important; }
.app-mode .app-shell { display: none; }
.entry-shell {
  width: min(100%, 680px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 26px 30px;
}
.entry-header {
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgb(52 47 39 / 8%);
}
.entry-card {
  width: min(100%, 430px);
  margin: clamp(42px, 10vh, 90px) auto 0;
  padding: clamp(24px, 6vw, 42px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(255 253 249 / 88%);
  box-shadow: 0 16px 50px rgb(55 48 36 / 6%);
}
.entry-card > .eyebrow { margin: 0 0 16px; }
.entry-card h1 { font: 500 clamp(38px, 8vw, 56px)/1.05 var(--serif); letter-spacing: -.045em; }
.entry-card h1 em { color: var(--accent); }
.entry-intro { margin: 16px 0 24px; color: var(--muted); font: 15px/1.65 var(--serif); }
.entry-card .field-label { margin-top: 15px; }
.entry-card .button--full { margin-top: 22px; }
.entry-footnote { margin: 21px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.6; text-align: center; }
.entry-account-row { display: flex; align-items: center; justify-content: space-between; }
.entry-account-row .eyebrow { margin: 0; }
.entry-card--groups { width: min(100%, 560px); }
.entry-groups-list { display: grid; gap: 10px; margin: 22px 0; }
.entry-create-group-button { margin-top: 3px; }
.entry-group-card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.entry-group-card h2 { margin: 0; font: 500 19px/1.3 var(--serif); }
.entry-group-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.entry-group-card .entry-invite-generate { margin-top: 13px; }
.entry-group-card .entry-invite-hint { margin-top: 6px; }
.entry-invite-result { margin-top: 10px; }
.entry-invite-result .account-input { margin-top: 0; font-size: 10px; }
.entry-invite-result .field-label { display: block; margin-top: 12px; }
.entry-invite-result .button { margin-top: 9px; }
.entry-join-code-form { margin: 18px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; }
.entry-join-code-form .field-label { margin: 0 0 8px; }
.entry-join-code-row { display: flex; align-items: stretch; gap: 8px; }
.entry-join-code-row .account-input { min-width: 0; margin: 0; }
.entry-join-code-row .button { flex: 0 0 auto; padding: 0 13px; }
.entry-join-code-hint { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.entry-join-code-form .account-message { margin-bottom: 0; }
.entry-invite-card { margin: 20px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #edf0e7; }
.entry-invite-card .eyebrow { margin: 0 0 7px; }
.entry-invite-card h2 { margin: 0; font: 500 21px/1.3 var(--serif); }
.entry-invite-card > p:not(.eyebrow):not(.account-message) { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.entry-invite-card .button--full { margin-top: 16px; }
.entry-invite-card > .text-button { display: block; margin: 12px auto 0; }
.entry-invite-auth-note { padding: 12px; border-radius: 10px; background: #edf0e7; color: var(--muted); font-size: 11px; line-height: 1.5; }
.entry-empty-state { margin: 20px 0; padding: 20px; border-radius: 14px; background: #edf0e7; }
.entry-empty-state h2 { margin: 8px 0; font: 500 20px/1.3 var(--serif); }
.entry-empty-state p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.entry-empty-state .text-button { margin-top: 14px; }
.entry-create-form { margin: 20px 0; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: #fffefa; }
.entry-form-heading { display: flex; align-items: flex-start; justify-content: space-between; }
.entry-form-heading .eyebrow { margin: 0 0 5px; }
.entry-form-heading h2 { margin: 0; font: 500 21px/1.3 var(--serif); }
.entry-create-hint { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.entry-footer { margin: 29px auto 0; color: var(--quiet); font: 12px/1.6 var(--serif); text-align: center; }
html.preview-mode .entry-shell { display: none; }

@media (max-width: 480px) {
  .entry-shell { padding: 0 18px 24px; }
  .entry-header { height: 64px; }
  .entry-card { margin-top: 48px; border-radius: 16px; }
  .entry-join-code-row { flex-direction: column; }
  .entry-join-code-row .button { min-height: 42px; }
}

@media (min-width: 1000px) {
  main { width: min(800px, 76%); }
  .view { padding-top: 58px; }
}
@media (max-width: 620px) {
  .topbar { height: 60px; padding: 0 5%; }
  .wordmark { gap: 7px; font-size: 14px; }
  .styles-link { margin-right: 9px; font-size: 9px; }
  .group-switcher { gap: 8px; padding: 5px 8px; }
  .group-name { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  .group-switcher .avatar { width: 24px; height: 24px; font-size: 10px; }
  .group-avatars { padding-left: 3px; }
  .profile-button .avatar { width: 31px; height: 31px; }
  main { width: 89%; }
  .view { padding: 35px 0 35px; }
  .welcome-row { margin-bottom: 25px; }
  .welcome-row .eyebrow { font-size: 8px; }
  h1 { font-size: 38px; }
  .sun-stamp { width: 60px; height: 60px; margin: 5px 2px 0 0; }
  .sun-stamp > span { font-size: 15px; }
  .sun-stamp small { font-size: 7px; }
  .week-card { padding: 20px 17px 17px; }
  .week-card h2 { font-size: 21px; }
  .date-pill { padding: 6px 7px; font-size: 7px; }
  .week-intro { margin: 9px 0 17px; font-size: 11px; }
  .response-progress { gap: 8px; }
  .progress-copy { min-width: 95px; }
  .progress-copy strong { font-size: 9px; }
  .progress-copy span { font-size: 8px; }
  .progress-track { max-width: 90px; }
  .section-heading { margin-top: 32px; }
  .section-heading h2, .people-section h2 { font-size: 20px; }
  .count-label { font-size: 7px; }
  .prompt-card { grid-template-columns: 34px 1fr auto; gap: 10px; padding: 12px 11px; }
  .prompt-number { width: 32px; height: 32px; }
  .prompt-copy h3 { font-size: 13px; }
  .prompt-copy p { font-size: 8px; }
  .prompt-card .prompt-answer { font-size: 8px; }
  .nudge-card { flex-wrap: wrap; gap: 11px; padding: 17px; }
  .nudge-sparkle { font-size: 24px; }
  .nudge-card > div { flex: 1; }
  .nudge-card h2 { font-size: 16px; }
  .nudge-card p:not(.eyebrow) { font-size: 9px; }
  .nudge-card .button { width: 100%; margin: 3px 0 0; }
  .people-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .person-card { padding: 12px 10px; }
  .text-button { font-size: 9px; }
  .letter-heading { padding-top: 2px; }
  .back-link { margin-bottom: 35px; }
  .letter-deck { font-size: 13px; }
  .letter-byline { gap: 6px; font-size: 8px; }
  .letter-body { margin-top: 35px; }
  .letter-question { padding-top: 19px; }
  .letter-question h2 { font-size: 17px; }
  .response-grid { grid-template-columns: 1fr; gap: 8px; }
  .response-card { padding: 13px; }
  .response-card p { font-size: 12px; }
  .letter-footer { padding-top: 30px; }
  .bottom-nav { height: 64px; gap: 13vw; }
  .app-shell { padding-bottom: 74px; }
}
@media (max-width: 370px) {
  .styles-link { margin-right: 6px; font-size: 0; }
  .styles-link span { margin: 0; font-size: 14px; }
  .group-switcher { gap: 6px; }
  .group-switcher { padding: 4px 5px; }
  .group-switcher .group-avatars { display: none; }
  .group-name { max-width: 90px; }
  .prompt-card { grid-template-columns: 31px 1fr; }
  .prompt-card .prompt-answer { grid-column: 2; justify-self: start; margin-top: -4px; }
  .prompt-card .prompt-arrow { display: none; }
  .date-pill { letter-spacing: .04em; }
  h1 { font-size: 35px; }
}

body[data-theme="coastal"] {
  --page: #edf5f5;
  --paper: #fbffff;
  --ink: #173944;
  --muted: #5e7980;
  --quiet: #8aa3a7;
  --line: #d4e4e5;
  --accent: #317d8b;
  --accent-soft: #dceef0;
  --sage: #deece7;
  --blue: #dceef0;
  --lilac: #e5e9f0;
  --radius: 22px;
  --shadow: 0 12px 32px rgb(34 88 98 / 8%);
}
body[data-theme="coastal"] .week-card {
  background:
    radial-gradient(ellipse at 100% 0%, rgb(130 190 192 / 20%), transparent 42%),
    linear-gradient(135deg, #fbffff, #f2f9f8);
}
body[data-theme="coastal"] .sun-stamp { border-color: #92bdc2; }
body[data-theme="coastal"] .nudge-card { background: #dcece8; }
body[data-theme="coastal"] .nudge-card .eyebrow { color: #507b7d; }
body[data-theme="coastal"] .nudge-sparkle { color: #609499; }
body[data-theme="coastal"] .button--dark { color: #f3ffff; background: #245a68; }
body[data-theme="coastal"] .progress-track span { background: #5a9b98; }
body[data-theme="coastal"] .avatar { border-color: var(--paper); }

body[data-theme="postcard"] {
  --page: #f4ecdc;
  --paper: #fffaf0;
  --ink: #463c31;
  --muted: #827263;
  --quiet: #b09d87;
  --line: #e4d4bd;
  --accent: #b75143;
  --accent-soft: #f2dfd2;
  --sage: #e2e5cf;
  --blue: #dce6e6;
  --lilac: #e9dce0;
  --radius: 5px;
  --shadow: 2px 5px 0 rgb(110 83 53 / 8%);
}
body[data-theme="postcard"] {
  background-image: radial-gradient(#b8a487 0.55px, transparent 0.55px);
  background-size: 7px 7px;
}
body[data-theme="postcard"] .topbar,
body[data-theme="postcard"] .bottom-nav { background: rgb(244 236 220 / 95%); }
body[data-theme="postcard"] .wordmark-mark {
  border-radius: 2px;
  outline: 1px dashed rgb(255 250 240 / 70%);
  outline-offset: -4px;
}
body[data-theme="postcard"] .group-switcher,
body[data-theme="postcard"] .week-card,
body[data-theme="postcard"] .prompt-card,
body[data-theme="postcard"] .person-card,
body[data-theme="postcard"] .response-card {
  border-style: dashed;
  border-color: #d4bea1;
}
body[data-theme="postcard"] .week-card {
  background:
    linear-gradient(90deg, transparent 49.85%, rgb(212 190 161 / 30%) 50%, transparent 50.15%),
    linear-gradient(0deg, transparent 74%, rgb(212 190 161 / 30%) 74.2%, transparent 74.4%),
    var(--paper);
}
body[data-theme="postcard"] .date-pill {
  border: 1px solid #d6a597;
  border-radius: 2px;
  background: #fff5e7;
}
body[data-theme="postcard"] .prompt-number {
  border-radius: 3px;
  transform: rotate(-4deg);
}
body[data-theme="postcard"] .prompt-card {
  grid-template-columns: minmax(0, 1fr) auto;
}
body[data-theme="postcard"] .prompt-card .prompt-number,
body[data-theme="postcard"] .letter-question-header > .prompt-number {
  display: none;
}
body[data-theme="postcard"] .prompt-copy h3,
body[data-theme="postcard"] .letter-question h2 {
  color: #596987;
  font-family: Georgia, var(--serif);
  font-weight: 400;
}
body[data-theme="postcard"] .prompt-copy h3 {
  text-decoration: none;
}
body[data-theme="postcard"] .question-jump {
  text-decoration: none;
}
body[data-theme="postcard"] .question-jump:hover {
  color: #8a665d;
  text-decoration-color: currentColor;
}
body[data-theme="postcard"] .nudge-card {
  border: 1px dashed #b8ad88;
  background: #e9e8d5;
}
body[data-theme="postcard"] .avatar {
  --stamp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='white' d='M0 0 C0 12 5 15 10 15 C15 15 20 12 20 0 C20 12 25 15 30 15 C35 15 40 12 40 0 C40 12 45 15 50 15 C55 15 60 12 60 0 C60 12 65 15 70 15 C75 15 80 12 80 0 C80 12 85 15 90 15 C95 15 100 12 100 0 C88 0 85 5 85 10 C85 15 88 20 100 20 C88 20 85 25 85 30 C85 35 88 40 100 40 C88 40 85 45 85 50 C85 55 88 60 100 60 C88 60 85 65 85 70 C85 75 88 80 100 80 C88 80 85 85 85 90 C85 95 88 100 100 100 C100 88 95 85 90 85 C85 85 80 88 80 100 C80 88 75 85 70 85 C65 85 60 88 60 100 C60 88 55 85 50 85 C45 85 40 88 40 100 C40 88 35 85 30 85 C25 85 20 88 20 100 C20 88 15 85 10 85 C5 85 0 88 0 100 C12 100 15 95 15 90 C15 85 12 80 0 80 C12 80 15 75 15 70 C15 65 12 60 0 60 C12 60 15 55 15 50 C15 45 12 40 0 40 C12 40 15 35 15 30 C15 25 12 20 0 20 C12 20 15 15 15 10 C15 5 12 0 0 0 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  border: 0;
  -webkit-mask: var(--stamp-mask);
  mask: var(--stamp-mask);
  filter: drop-shadow(0 0 1px #b75143);
  transform: rotate(-4deg);
}
body[data-theme="postcard"] .button { border-radius: 3px; }
body[data-theme="postcard"] .sun-stamp { border-style: dashed; border-radius: 4px; transform: rotate(8deg); }
body[data-theme="postcard"] .response-grid { grid-template-columns: 1fr; }
body[data-theme="postcard"] .response-card {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  perspective: 1200px;
  text-align: left;
}
body[data-theme="postcard"] .response-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
body[data-theme="postcard"] .postcard-inner {
  position: relative;
  display: grid;
  min-height: 275px;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}
body[data-theme="postcard"] .response-card.is-flipped .postcard-inner {
  transform: rotateY(180deg);
}
body[data-theme="postcard"] .postcard-face {
  grid-area: 1 / 1;
  min-width: 0;
  border: 1px solid #8d7356;
  border-radius: 0;
  backface-visibility: hidden;
  box-shadow: inset 0 0 0 3px #fffaf0, inset 0 0 0 4px #cbb696, 1px 2px 0 rgb(110 83 53 / 12%);
}
body[data-theme="postcard"] .postcard-front {
  display: grid;
  min-height: 275px;
  grid-template-columns: minmax(0, 1fr) 34px;
  grid-template-rows: auto minmax(205px, 1fr);
  gap: 0 10px;
  padding: 18px;
  background: var(--paper);
}
body[data-theme="postcard"] .response-card--mine .postcard-front { background: #fff3e8; }
body[data-theme="postcard"] .postcard-back {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 18px;
  background: #f7edda;
  transform: rotateY(180deg);
}
body[data-theme="postcard"] .postcard-back-image {
  flex: 1;
  min-height: 205px;
  border: 1px solid #b69e7f;
  background:
    radial-gradient(ellipse at 72% 24%, #fff0be 0 7%, transparent 7.5%),
    linear-gradient(170deg, transparent 48%, #647b63 48.5% 68%, transparent 68.5%),
    linear-gradient(15deg, #a2b67d 0 35%, transparent 35.5%),
    linear-gradient(#9bbfc9 0 58%, #f0d8a5 58.5%);
  box-shadow: inset 0 0 0 4px rgb(255 250 240 / 86%);
}
body[data-theme="postcard"] .postcard-back-caption,
body[data-theme="postcard"] .postcard-back-hint {
  color: #75624c;
  font: 12px/1.3 "Patrick Hand", cursive;
  text-align: center;
}
body[data-theme="postcard"] .postcard-back-hint {
  color: var(--muted);
  font-size: 10px;
}
body[data-theme="postcard"] .letter-body { max-width: 760px; }
body[data-theme="postcard"] .response-author {
  display: grid;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  grid-template-columns: minmax(0, 1fr) 34px;
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-content: start;
  margin: 0 0 5px;
}
body[data-theme="postcard"] .response-author .avatar {
  grid-column: 2;
  grid-row: 1 / span 2;
}
body[data-theme="postcard"] .response-author strong,
body[data-theme="postcard"] .response-author span:not(.avatar) {
  grid-column: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
body[data-theme="postcard"] .response-author span:not(.avatar) {
  margin: 0;
  text-align: left;
}
body[data-theme="postcard"] .response-card p {
  box-sizing: border-box;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  min-height: 205px;
  padding: 25px 16px 19px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpath d='M4 26H96' fill='none' stroke='%23815c3b' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  background-size: 100% 30px;
  background-origin: border-box;
  background-position: 0 25px;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 30px;
}
body[data-theme="postcard"] .response-card--maya p {
  color: #405f9d;
}
body[data-theme="postcard"] .response-card--jules p {
  color: #465f91;
}
body[data-theme="postcard"] .response-card--ari p {
  color: #3f6498;
}
body[data-theme="postcard"] .response-card[data-handwriting="caveat"] p {
  font: 500 17px/30px "Caveat", cursive;
}
body[data-theme="postcard"] .response-card[data-handwriting="kalam"] p {
  font: 400 15px/30px "Kalam", cursive;
}
body[data-theme="postcard"] .response-card[data-handwriting="patrick-hand"] p {
  font: 16px/30px "Patrick Hand", cursive;
}
body[data-theme="postcard"] .response-card[data-handwriting="handlee"] p {
  font: 15px/30px "Handlee", cursive;
}
body[data-theme="postcard"] .postcard-font-label {
  display: block;
  margin-top: 12px;
}
body[data-theme="postcard"] .postcard-font-select {
  display: block;
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid #d4bea1;
  border-radius: 3px;
  color: var(--ink);
  background: #fffdf6;
  font-size: 11px;
}
@media (max-width: 620px) {
  body[data-theme="postcard"] .letter-body { width: 100%; }
  body[data-theme="postcard"] .postcard-inner,
  body[data-theme="postcard"] .postcard-front { min-height: 0; }
  body[data-theme="postcard"] .postcard-front {
    grid-template-rows: auto minmax(170px, 1fr);
    gap: 0 8px;
    padding: 12px;
  }
  body[data-theme="postcard"] .response-card p {
    min-height: 170px;
    padding: 23px 12px 16px;
    background-position: 0 23px;
    background-size: 100% 28px;
    line-height: 28px;
  }
  body[data-theme="postcard"] .response-card[data-handwriting="caveat"] p { font-size: 15px; line-height: 28px; }
  body[data-theme="postcard"] .response-card[data-handwriting="kalam"] p { font-size: 13px; line-height: 28px; }
  body[data-theme="postcard"] .response-card[data-handwriting="patrick-hand"] p { font-size: 14px; line-height: 28px; }
  body[data-theme="postcard"] .response-card[data-handwriting="handlee"] p { font-size: 13px; line-height: 28px; }
}
body[data-theme="postcard"] .compose-form textarea {
  min-height: 114px;
  padding: 8px 12px;
  border-style: dashed;
  border-color: #d4bea1;
  border-radius: 3px;
  background-color: #fffdf6;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 30px,
    rgb(183 151 117 / 38%) 30px 31px
  );
  background-position: 0 5px;
  background-size: 100% 32px;
  line-height: 32px;
}

body[data-theme="field-notes"] {
  --page: #eff0e6;
  --paper: #fbfbf4;
  --ink: #313b2e;
  --muted: #727a68;
  --quiet: #9aa08c;
  --line: #d8ddcd;
  --accent: #697d52;
  --accent-soft: #e6ead9;
  --sage: #e5eadb;
  --blue: #dfe8df;
  --lilac: #e9e5d8;
  --radius: 9px;
  --shadow: 0 8px 25px rgb(60 69 43 / 6%);
}
body[data-theme="field-notes"] .week-card {
  background:
    linear-gradient(135deg, rgb(232 237 219 / 72%), transparent 50%),
    var(--paper);
}
body[data-theme="field-notes"] .week-card h2,
body[data-theme="field-notes"] .section-heading h2,
body[data-theme="field-notes"] .nudge-card h2,
body[data-theme="field-notes"] .people-section h2,
body[data-theme="field-notes"] .prompt-copy h3,
body[data-theme="field-notes"] .letter-question h2 {
  font-family: Georgia, var(--serif);
}
body[data-theme="field-notes"] .nudge-card { background: #e3e9d9; }
body[data-theme="field-notes"] .nudge-card .eyebrow { color: #667553; }
body[data-theme="field-notes"] .nudge-sparkle { color: #8c9b67; }
body[data-theme="field-notes"] .button--dark { color: #f7f8ee; background: #45543c; }
body[data-theme="field-notes"] .progress-track span { background: #8e9a68; }
body[data-theme="field-notes"] .avatar { border-color: var(--paper); }
body[data-theme="field-notes"] .prompt-number { border-radius: 50% 50% 50% 5px; }

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