:root {
  color-scheme: light;
  --paper: #f7f2e9;
  --page: #fffdf8;
  --ink: #2d2824;
  --muted: #655950;
  --rust: #823f33;
  --rust-dark: #693127;
  --line: #d9cbbd;
  --serif: Georgia, 'Times New Roman', serif;
  --ui: system-ui, sans-serif;
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.55 var(--ui); }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #865243; outline-offset: 4px; }
.skip { position: absolute; z-index: 3; top: .5rem; left: .5rem; padding: .5rem 1rem; background: white; transform: translateY(-180%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-header { max-width: 1280px; margin: auto; min-height: 75px; padding: .85rem clamp(1rem, 5vw, 4rem); display: flex; align-items: center; gap: clamp(.85rem, 4vw, 2.6rem); border-bottom: 1px solid var(--line); }
.brand { margin-right: auto; display: inline-flex; align-items: center; gap: .65rem; font: 1.1rem/1.15 var(--serif); text-decoration: none; }
.mark { color: var(--rust); font: 1.3rem/1 var(--serif); }
nav { display: flex; gap: clamp(.75rem, 3vw, 1.9rem); white-space: nowrap; }
nav a { font-size: .9rem; color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--rust); text-decoration: underline; }
.language select { font: 600 .9rem var(--ui); color: var(--ink); background: var(--page); border: 1px solid var(--line); border-radius: .4rem; padding: .45rem .5rem; }
.hero { max-width: 1280px; margin: auto; min-height: 450px; display: grid; grid-template-columns: 1fr .72fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 8vw, 7rem); }
.eyebrow { color: var(--rust); font-weight: 700; font-size: .875rem; letter-spacing: .14em; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; text-wrap: balance; }
h1 { font-size: clamp(2.65rem, 6.1vw, 5.6rem); line-height: .99; letter-spacing: -.055em; margin: 1.1rem 0 1.35rem; }
h1 em { color: var(--rust); font-weight: inherit; }
.hero p { max-width: 32rem; color: var(--muted); margin-bottom: 1.75rem; font-size: 1.08rem; }
.welcome h1 { max-width: 12em; font-size: clamp(2.55rem, 5.4vw, 4.8rem); line-height: 1.04; }
.topic-options { max-width: 29rem; display: grid; gap: .6rem; }
.topic-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; padding: .75rem 1rem; border: 1px solid #ba8f7e; border-radius: .42rem; background: var(--page); color: var(--rust-dark); font-weight: 650; text-decoration: none; }
.topic-card:hover { background: #f2e4d9; border-color: var(--rust); }
.topic-card span:last-child { color: var(--rust); font-size: 1.15rem; }
.welcome .welcome-privacy { margin: .85rem 0 0; font-size: .9rem; }
.hero-art { min-height: 15rem; aspect-ratio: 1.16; border-radius: .45rem; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 12% 10%, #f5d7bf, transparent 62%), linear-gradient(147deg, #edc9af, #a45543); box-shadow: inset 0 0 0 1px #a3554440; }
.envelope { position: relative; width: 64%; height: 48%; margin-top: 15%; transform: rotate(-9deg); background: #b57864; filter: drop-shadow(6px 15px 17px #51291f55); }
.note { position: absolute; width: 83%; height: 130%; top: -48%; left: 8%; background: #fffaef; transform: rotate(9deg); border: 1px solid #d4b4a2; padding: 12% 15%; box-shadow: 0 3px 10px #51291f45; }
.note span { display: block; color: #92574a; font-size: 1.25rem; margin: -.3rem 0 .45rem; }
.note i { display: block; border-top: 1px solid #bb9c8990; margin: .55rem 0; }
.note i:last-child { width: 64%; }
.envelope-fold { position: absolute; inset: 0; background: linear-gradient(147deg, #d2a28a 49.8%, transparent 50%), linear-gradient(213deg, #e5bea7 49.8%, transparent 50%), #edcbb3; clip-path: polygon(0 0, 50% 53%, 100% 0, 100% 100%, 0 100%); }
.seal { position: absolute; top: 44%; left: 50%; transform: translate(-50%,-23%); width: 16%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 46% 52% 47% 53%; border: 2px solid #864034; box-shadow: 0 2px 3px #51291f55, inset 0 0 0 2px #f1bc9f4a; background: #a85344; color: #ffe5cd; font-size: clamp(.8rem, 2vw, 1.45rem); }
.button { min-height: 44px; padding: .68rem 1rem; border: 1px solid transparent; border-radius: .38rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: 650 .94rem/1.25 var(--ui); text-decoration: none; text-align: center; }
.primary { background: var(--rust); color: #fffaf3; }
.primary:hover { background: var(--rust-dark); }
.outline { background: transparent; color: var(--rust); border-color: #aa7667; }
.outline:hover, .quiet:hover { background: #f3e7dd; }
.quiet { background: transparent; color: var(--rust); }
.button:disabled { opacity: .65; cursor: wait; }
.section { scroll-margin-top: 1rem; padding: clamp(3rem, 6vw, 5.5rem) clamp(1rem, 5vw, 4rem); }
.letter { background: #eee4d8; border-block: 1px solid #e0d0c1; }
.section-intro { text-align: center; margin-bottom: 1.9rem; }
h2 { font-size: clamp(2.25rem, 4.3vw, 3.6rem); line-height: 1.08; letter-spacing: -.046em; }
.section-intro p { color: var(--muted); margin-top: .7rem; }
.writing { padding-top: clamp(2rem, 4vw, 3.5rem); }
.writing-intro { max-width: 49rem; margin-inline: auto; }
.writing-intro h1, .editorial h1 { font-size: clamp(2.25rem, 4.5vw, 4rem); line-height: 1.08; margin: .65rem 0 .75rem; }
.topic-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--rust); font-size: .95rem; text-underline-offset: .2em; }
.sheet { max-width: 49rem; margin: auto; background: var(--page); border: 1px solid #ddccbc; border-radius: .57rem; padding: clamp(1.2rem, 4.6vw, 2.8rem); box-shadow: 0 12px 32px #63423312; }
.progress-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem 1rem; color: var(--muted); font-size: .9rem; }
.private-label { color: var(--rust); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; margin: .62rem 0 1.55rem; }
.progress span { height: 4px; border-radius: 1rem; background: #e8d9cd; }
.progress .filled { background: #a75d4e; }
.sheet h3 { font-size: clamp(1.65rem, 3.5vw, 2.35rem); line-height: 1.16; margin-bottom: 1rem; }
.moods { display: grid; gap: .55rem; }
.mood { justify-content: flex-start; text-align: left; background: #fbf6ee; border-color: #e0d2c5; color: var(--ink); }
.mood:hover, .mood[aria-pressed=true] { border-color: #ab7161; background: #f0ded3; }
textarea { display: block; width: 100%; padding: .75rem; min-height: 96px; resize: vertical; border: 1px solid #c8b5a5; border-radius: .35rem; background: #fffefa; color: var(--ink); font: 1rem/1.5 var(--ui); }
textarea::placeholder { color: #756960; }
.count { margin-top: .25rem; text-align: right; color: var(--muted); font-size: .875rem; }
.actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .45rem 1rem; margin-top: 1.25rem; }
.actions #next { margin-left: auto; }
.privacy-note { color: var(--muted); border-top: 1px solid #e8dcd0; padding-top: .9rem; margin-top: 1.15rem; font-size: .9rem; }
.privacy-note span:first-child { color: var(--rust); margin-right: .15rem; }
.closed { text-align: center; }
.closed p { color: var(--muted); }
.finish-mark { color: var(--rust); font-size: 1.5rem; }
.pdf-actions, .center { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.15rem; }
.feedback { margin-top: .55rem; color: var(--rust); font-size: .9rem; }
.feedback:empty { margin: 0; }
.wall { max-width: 1150px; margin: auto; }
.wall-header { display: grid; grid-template-columns: 1.35fr 1fr; text-align: left; align-items: end; gap: .75rem 2rem; }
.wall-header .eyebrow { display: block; margin-bottom: .5rem; }
.wall-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.3rem; align-items: start; }
.wall-state, .post, .wall-form { background: var(--page); border: 1px solid var(--line); border-radius: .48rem; padding: 1.15rem; }
.wall-state { color: var(--muted); }
.posts { margin: 0; padding: 0; list-style: none; display: grid; gap: .65rem; }
.post blockquote { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 1.23rem/1.45 var(--serif); }
.post time { display: block; color: var(--muted); font-size: .87rem; margin-top: .5rem; }
#more { margin-top: .8rem; }
.wall-form > label:first-child { display: block; font-weight: 650; margin-bottom: .45rem; }
#wall-guidance { color: var(--muted); font-size: .9rem; margin-top: .45rem; }
.consent { display: flex; align-items: flex-start; gap: .54rem; margin: .85rem 0; font-size: .9rem; }
.consent input { width: 1rem; height: 1rem; margin: .19rem 0 0; accent-color: var(--rust); }
footer { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; max-width: 1280px; margin: auto; border-top: 1px solid var(--line); color: var(--muted); padding: 1.15rem clamp(1rem, 5vw, 4rem) 1.6rem; font-size: .9rem; }
footer summary { cursor: pointer; }
footer p { margin-top: .5rem; }
.public-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.public-footer a { padding-block: .55rem; text-underline-offset: .2em; }
.editorial { max-width: 52rem; margin-inline: auto; padding: clamp(2.2rem, 6vw, 4.4rem) clamp(1rem, 5vw, 3rem); }
.editorial h2 { font-size: clamp(1.6rem, 3vw, 2.05rem); margin: 1.85rem 0 .52rem; letter-spacing: -.023em; }
.editorial p { max-width: 65ch; color: var(--muted); }
.editorial p + p { margin-top: .72rem; }
.editorial .lead { font-size: 1.12rem; }
.editorial .guide-exercise { margin-top: 1.55rem; padding: .9rem 1.15rem; border-left: 3px solid #aa7667; background: #eee4d8; }
.display-ad { margin-top: 2.5rem; min-width: 0; }
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-block: 3rem 2.25rem; gap: 1.45rem; }
  .hero-art { aspect-ratio: 1.8; min-height: 10rem; }
  .envelope { width: 55%; margin-top: 10%; }
  .wall-header, .wall-layout { grid-template-columns: 1fr; }
  .welcome { padding-top: 2rem; }
  .welcome h1 { max-width: 16em; }
  .topic-options { max-width: none; }
  .topic-card { min-height: 56px; }
  .writing-intro { margin-bottom: 1.15rem; }
  .writing .sheet h3 { overflow-wrap: break-word; }
}
@media (max-width: 390px) {
  .site-header { flex-wrap: wrap; gap: .55rem 1rem; }
  .site-header .brand { flex-basis: 100%; }
  .language { margin-left: auto; }
  .site-header nav a { display: inline-flex; align-items: center; min-height: 40px; }
  .welcome h1 { font-size: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
