:root {
  color-scheme: light;
  --ink: #1c3028;
  --green: #254b3c;
  --muted: #56675b;
  --line: #cbd3c8;
  --paper: #fffdf6;
  --field: #f6f6ee;
  --serif: "DM Serif Text", Georgia, serif;
  --sans: "DM Sans", "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--field);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.edition-link { color: inherit; text-underline-offset: .2em; }
#signin-link { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #ab592e; outline-offset: 3px; }
.frame { max-width: 1130px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 72px); }
.topbar { border-bottom: 1px solid var(--line); }
.header-row { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .45rem; font: 600 1.8rem/1 var(--serif); letter-spacing: -.065em; }
.brand-sun { color: #ad4e30; font: 2rem/1 Georgia, serif; }
.header-meta, .detail, figcaption { color: var(--muted); font-size: .88rem; }
.welcome { display: grid; grid-template-columns: .98fr 1.02fr; column-gap: clamp(2rem, 8vw, 6rem); align-items: center; padding: clamp(2rem, 5vw, 4.3rem) 0 4rem; }
.kicker { text-transform: uppercase; letter-spacing: .15em; font-weight: 700; font-size: .76rem; margin: 0 0 .8rem; color: var(--muted); }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.06em; line-height: 1.03; margin: 0; }
h1 { font-size: clamp(3.3rem, 6.7vw, 6rem); }
h1 em { color: #486849; font-weight: 400; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.8rem); }
p { line-height: 1.5; }
.lede { color: var(--muted); font-size: 1.08rem; margin: 1.15rem 0 1.55rem; max-width: 29rem; }
.setup { max-width: 26rem; }
.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border: 1px solid var(--line); background: #e8ece2; border-radius: 8px; padding: 3px; margin: 0 0 1rem; }
.switch button { border: 0; border-radius: 5px; color: var(--muted); background: transparent; padding: .43rem; font-size: .88rem; font-weight: 600; }
.switch button[aria-pressed="true"] { color: var(--ink); background: var(--paper); box-shadow: 0 1px 3px #203b2e1a; }
label, legend { display: block; font-weight: 650; font-size: .9rem; margin: 0 0 .38rem; }
input, textarea, select { padding: .68rem .78rem; width: 100%; border: 1px solid #b9c5b9; border-radius: 6px; background: var(--paper); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #717b70; }
textarea { resize: vertical; line-height: 1.45; }
select { appearance: none; padding-right: 2rem; background-image: linear-gradient(45deg,transparent 50%,var(--ink) 50%), linear-gradient(135deg,var(--ink) 50%,transparent 50%); background-size: 5px 5px; background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-repeat: no-repeat; }
form > input, form > div > input, .controls > select { margin-bottom: .8rem; }
.primary, .outline, .cream { display: inline-block; border-radius: 6px; padding: .73rem 1.12rem; font-weight: 650; border: 1px solid transparent; }
.primary { background: var(--green); color: white; }
.primary:hover { background: #173a2b; }
.outline { color: var(--green); border-color: #afbcad; background: transparent; }
.outline:hover { background: #e5eadf; }
.cream { background: #f9edba; color: var(--ink); }
.cream:hover { background: #fff2ce; }
#setup-submit { width: 100%; }
.status { font-size: .9rem; margin: .6rem 0 0; color: #435d44; }
.status:empty, .helper:empty { margin: 0; display: none; }
.error { color: #9c402b; }
.example { margin: 0; width: 100%; text-align: center; padding-inline: .4rem; }
.paper-stack { position: relative; transform: rotate(2.5deg); isolation: isolate; margin: .8rem auto 1.9rem; max-width: 26rem; }
.paper-stack::before { content: ""; position: absolute; inset: 5% -1% -2% -1%; background: #d6dec8; border: 1px solid #bbc5b5; z-index: -1; transform: rotate(-8deg); box-shadow: 1px 9px 16px #223b2614; }
canvas { display: block; width: 100%; height: auto; background: var(--paper); }
.paper-stack canvas { box-shadow: 1px 8px 30px #223b2624; }
figcaption span { margin: 0 .35rem; }
.circle-heading, .archive-head, .action-row, .dialog-head { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.circle-heading { margin: 2.5rem 0 .6rem; }
.circle-heading h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); }
.circle-heading .outline { flex: none; }
.members, .helper { color: var(--muted); font-size: .94rem; line-height: 1.5; }
.members { margin: .55rem 0 1.6rem; }
.workspace { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1.25rem; }
.sheet, .postcard-promo { border-radius: 12px; overflow: hidden; }
.sheet { border: 1px solid var(--line); background: var(--paper); padding: clamp(1.1rem,3vw,2rem); }
.sheet h2 { margin: .5rem 0 1.25rem; }
fieldset { padding: 0; border: 0; margin: 0 0 .85rem; }
.moods { display: flex; flex-wrap: wrap; gap: .35rem; }
.mood { display: inline-flex; align-items:center; gap: .3rem; font-weight: 500; font-size: .9rem; }
.mood input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mood span { display: block; border: 1px solid var(--line); border-radius: 20px; padding: .33rem .6rem; cursor: pointer; }
.mood input:checked + span { background: #dce8d4; border-color: #648360; }
.mood input:focus-visible + span { outline: 2px solid #ab592e; }
.action-row { margin-top: .55rem; }
.postcard-promo { background: var(--green); color: #fffbed; display: flex; flex-direction: column; }
.landscape { position: relative; height: clamp(4rem, 9vw, 7rem); background: #f3be84; overflow: hidden; isolation: isolate; }
.sun { width: 3.8rem; height: 3.8rem; background: #fff2b3; border-radius: 50%; position: absolute; right: 22%; top: 14%; }
.ridge { position: absolute; height: 75%; bottom: -38%; border-radius: 60% 50% 0 0; width: 130%; }
.ridge-far { background: #aab99b; transform: rotate(-8deg); left: 2%; bottom: -23%; }
.ridge-near { background: #416754; transform: rotate(8deg); left: -22%; }
.postcard-body { padding: 1.4rem; }
.postcard-body .kicker { color: #cbdbc3; }
.postcard-body p:not(.kicker) { color: #dce8d8; max-width: 26rem; }
.archive { margin: 2.6rem 0 4rem; }
.archive-head select { max-width: 16rem; }
.archive .helper { margin: .6rem 0 1rem; }
.journal-day { margin: 1.35rem 0; }
.journal-day h3 { font: 650 .87rem var(--sans); color: var(--muted); letter-spacing: 0; margin: 0 0 .5rem; }
.entry { display: grid; grid-template-columns: 2.3rem 1fr; gap: .65rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.entry .symbol { background: #e4ebda; border-radius: 50%; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; font-size: 1.15rem; }
.entry strong { font-size: .88rem; }
.entry p { margin: .14rem 0; white-space: pre-wrap; }
.empty { color: var(--muted); padding: 1.1rem 0; border-top: 1px solid var(--line); }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); padding: clamp(1.1rem, 3vw, 2rem); width: min(460px, 94vw); max-height: 90dvh; box-shadow: 0 12px 65px #15342638; }
dialog::backdrop { background: #15291fa6; }
.dialog-head { align-items: start; }
.close { background: transparent; border: 0; font-size: 1.7rem; line-height: 1; color: var(--ink); padding: .15rem .4rem; }
.wide-dialog { width: min(870px, 94vw); }
.postcard-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 1.35rem; align-items: start; margin-top: 1.2rem; }
#postcard-preview { border: 1px solid var(--line); }
.controls .primary, .controls .outline { display: block; width: 100%; margin-top: .45rem; }
.choice-list { max-height: 15rem; overflow-y: auto; }
.choice { display: flex; align-items: baseline; gap: .45rem; border-bottom: 1px solid var(--line); padding: .45rem 0; }
.choice input { width: 1rem; height: 1rem; flex: none; }
.choice span { font-size: .86rem; line-height: 1.4; font-weight: 400; overflow-wrap: anywhere; }
#copy-fallback { margin-top: .65rem; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 720px) {
  .header-row { min-height: 62px; }
  .welcome { grid-template-columns: 1fr; gap: 2.2rem; }
  .intro, .setup { max-width: 100%; }
  .example { max-width: 23rem; margin: 0 auto; }
  .workspace { grid-template-columns: 1fr; }
  .postcard-promo { display: grid; grid-template-columns: .3fr 1fr; }
  .landscape { height: 100%; min-height: 7rem; }
  .postcard-grid { grid-template-columns: 1fr; }
  #postcard-preview { max-width: 420px; margin: auto; }
  .circle-heading, .archive-head { align-items: start; flex-wrap: wrap; }
  .header-meta { max-width: 48%; text-align: right; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: no-preference) { button { transition: background .15s; } }
