:root {
  --paper: #fff9f5;
  --paper-pink: #faeae9;
  --rose: #d8899b;
  --rose-deep: #a65268;
  --plum: #4d2938;
  --muted: #7a5964;
  --cream: #f4dfd3;
  --shadow: 0 22px 60px rgba(104, 52, 67, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--plum);
  background: var(--paper);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
body.is-locked { overflow: hidden; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #b783ad url("assets/gate-background-v2.jpg") center / cover no-repeat;
  transition: opacity .65s ease, visibility .65s ease;
}
.gate.is-open { opacity: 0; visibility: hidden; }
.gate-envelope {
  width: min(650px, 100%);
  padding: clamp(42px, 8vw, 76px) clamp(26px, 8vw, 72px) 54px;
  text-align: center;
  background: #fffaf5;
  border-radius: 3px;
  box-shadow: 0 32px 90px rgba(75, 34, 51, .3);
  position: relative;
  clip-path: polygon(0 2%, 13% 0, 24% 1.7%, 38% .2%, 56% 1.4%, 76% 0, 100% 2%, 99% 98%, 85% 100%, 70% 98.7%, 54% 100%, 34% 98.5%, 17% 100%, 1% 98%);
}
.gate-envelope::before, .gate-envelope::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(176, 102, 123, .22);
  pointer-events: none;
}
.gate-envelope::after { inset: auto 50% -54px auto; width: 110px; height: 110px; transform: translateX(50%) rotate(45deg); background: #e3a0af; z-index: -1; }
.gate-star { display: block; font-size: 44px; color: var(--rose-deep); margin-bottom: 12px; }
.gate-kicker { font-size: 13px; letter-spacing: .24em; color: var(--rose-deep); }
.gate h1 { margin: 18px 0; font-size: clamp(30px, 5vw, 48px); font-weight: 500; letter-spacing: .08em; }
.gate h1 + p { color: var(--muted); line-height: 2; }
.gate form { margin-top: 34px; text-align: left; }
.gate label { display: block; margin-bottom: 9px; font-size: 13px; color: var(--muted); letter-spacing: .12em; }
.password-row { display: flex; gap: 10px; }
.password-row input { min-width: 0; flex: 1; padding: 14px 16px; border: 1px solid #dab7bf; border-radius: 2px; background: #fff; outline: none; color: var(--plum); }
.password-row input:focus { border-color: var(--rose-deep); box-shadow: 0 0 0 3px rgba(216,137,155,.18); }
.password-row button, .paper-button { border: 0; cursor: pointer; background: var(--plum); color: #fffaf6; padding: 14px 22px; box-shadow: 5px 6px 0 rgba(255,255,255,.28), 0 10px 24px rgba(68,32,47,.18); transition: transform .2s ease, box-shadow .2s ease; }
.password-row button:hover, .paper-button:hover { transform: translateY(-2px); box-shadow: 5px 8px 0 rgba(255,255,255,.25), 0 14px 30px rgba(68,32,47,.2); }
.gate-error { min-height: 22px; margin: 10px 0 0; text-align: center; color: #a83d58; font-size: 14px; }
.gate.shake .gate-envelope { animation: shake .38s ease; }

.site { opacity: 0; transition: opacity .8s ease .2s; }
.site.is-visible { opacity: 1; }
.nav-wrap { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 6vw, 90px); color: #fff8f6; background: linear-gradient(180deg, rgba(63,29,46,.58), rgba(91,43,65,.28) 72%, rgba(107,52,72,.08)); border-bottom: 1px solid rgba(255,238,241,.16); box-shadow: 0 14px 32px rgba(57,26,42,.12); backdrop-filter: blur(10px) saturate(1.08); -webkit-backdrop-filter: blur(10px) saturate(1.08); position: absolute; z-index: 10; top: 0; width: 100%; }
.brand { text-decoration: none; font-size: 30px; letter-spacing: .08em; text-shadow: 0 2px 12px rgba(61,24,42,.24); }
.brand span { color: #f6becd; font-size: 13px; vertical-align: super; }
nav { display: flex; gap: clamp(24px, 5vw, 64px); }
nav a { text-decoration: none; font-size: 15px; letter-spacing: .16em; border-bottom: 1px solid transparent; text-shadow: 0 2px 12px rgba(61,24,42,.24); }
nav a:hover { border-color: rgba(255,240,243,.8); }

.wind-chime {
  position: fixed;
  z-index: 20;
  top: 88px;
  right: clamp(18px, 3.5vw, 54px);
  width: 92px;
  height: 190px;
  padding: 0;
  border: 0;
  color: var(--rose-deep);
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 9px rgba(106, 54, 70, .17));
  transform-origin: 50% 0;
  animation: chime-sway 5.8s ease-in-out infinite;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.wind-chime:hover { animation-duration: 2.4s; }
.wind-chime.is-gusting { animation: chime-gust .68s ease-in-out infinite; }
.wind-chime.is-gusting .chime-strings i { animation-duration: .55s; }
.wind-chime:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 6px; border-radius: 45%; }
.chime-hook { position: absolute; top: 0; left: 45px; width: 2px; height: 31px; background: linear-gradient(#a95f73, #e5a5b2); }
.chime-hook::before { content: ""; position: absolute; top: -8px; left: -6px; width: 12px; height: 12px; border: 2px solid #ba7083; border-radius: 50%; }
.chime-roof { position: absolute; top: 27px; left: 11px; width: 70px; height: 42px; display: grid; place-items: center; color: #fff7f2; font-size: 12px; background: linear-gradient(155deg, #f2b4c0, #c77087); border-radius: 46px 46px 14px 14px; box-shadow: inset 0 3px 0 rgba(255,255,255,.38); }
.chime-roof::after { content: ""; position: absolute; bottom: -5px; left: 7px; width: 56px; height: 8px; background: #a9556c; border-radius: 50%; }
.chime-strings { position: absolute; top: 66px; left: 0; width: 92px; height: 69px; }
.chime-strings i { position: absolute; top: 0; width: 13px; height: 57px; border: 1px solid rgba(160, 76, 100, .5); border-radius: 2px 2px 8px 8px; background: linear-gradient(90deg, rgba(255,255,255,.74), #efadba 48%, #c86b83); box-shadow: inset 2px 0 4px rgba(255,255,255,.65); transform-origin: 50% 0; }
.chime-strings i::before { content: ""; position: absolute; left: 5px; top: -3px; width: 1px; height: 4px; background: #b96e81; }
.chime-strings i:nth-child(1) { left: 20px; height: 47px; animation: chime-piece 4.1s ease-in-out infinite reverse; }
.chime-strings i:nth-child(2) { left: 40px; height: 62px; animation: chime-piece 4.8s ease-in-out infinite; }
.chime-strings i:nth-child(3) { left: 60px; height: 52px; animation: chime-piece 4.4s ease-in-out infinite -.9s; }
.chime-wish { position: absolute; top: 135px; left: 37px; width: 22px; height: 39px; display: grid; place-items: center; color: #fffaf6; font-size: 12px; background: linear-gradient(#eaa6b4, #bd6078); clip-path: polygon(6% 0, 94% 3%, 100% 88%, 50% 100%, 0 88%); }
.chime-wish::before { content: ""; position: absolute; top: -18px; left: 10px; width: 1px; height: 18px; background: #b96e81; }
.chime-status { position: absolute; top: 180px; left: 50%; padding: 5px 9px; color: #fff8f5; background: rgba(77,41,56,.62); border: 1px solid rgba(255,235,239,.3); border-radius: 999px; box-shadow: 0 7px 18px rgba(68,31,48,.16); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 10px; letter-spacing: .06em; white-space: nowrap; transform: translateX(-50%); }
.breeze-stars { position: fixed; z-index: 19; top: 120px; right: 48px; width: 10px; height: 10px; pointer-events: none; }
.breeze-star { position: absolute; color: #d47c93; font-size: var(--star-size, 13px); opacity: 0; text-shadow: 0 0 8px #fff; animation: star-drift var(--star-time, 3.8s) ease-out forwards; }

@keyframes chime-sway { 0%, 100% { transform: rotate(-2.4deg); } 50% { transform: rotate(2.7deg); } }
@keyframes chime-gust { 0%, 100% { transform: rotate(-10deg) translateX(-2px); } 50% { transform: rotate(11deg) translateX(3px); } }
@keyframes chime-piece { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes star-drift {
  0% { opacity: 0; transform: translate(0, 0) rotate(0); }
  18% { opacity: .9; }
  100% { opacity: 0; transform: translate(var(--star-x, -160px), var(--star-y, 90px)) rotate(150deg); }
}

.hero { position: relative; min-height: min(860px, 100vh); overflow: hidden; display: flex; align-items: center; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% center; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,240,235,.88) 0%, rgba(250,216,214,.48) 38%, transparent 67%), linear-gradient(0deg, rgba(81,42,55,.18), transparent 36%); }
.hero-copy { position: relative; z-index: 2; width: min(620px, 88%); margin-left: clamp(28px, 7vw, 110px); padding-top: 80px; }
.hero h1 { margin: 0; font-size: clamp(52px, 7.2vw, 108px); font-weight: 500; line-height: 1.15; letter-spacing: .035em; }
.hero p { font-size: clamp(16px, 1.8vw, 23px); letter-spacing: .12em; margin: 28px 0 38px; }
.paper-button { clip-path: polygon(2% 0, 98% 2%, 100% 94%, 78% 100%, 55% 96%, 29% 100%, 0 95%); letter-spacing: .12em; min-width: 174px; }
.paper-button span { color: #f4c7a0; margin-right: 7px; }
.crescent { position: absolute; right: 7%; top: 14%; color: #fff4e8; font-size: 54px; filter: drop-shadow(0 0 14px #fff); }

.paper-section { background-color: var(--paper); background-image: radial-gradient(rgba(128,75,91,.06) .7px, transparent .7px); background-size: 7px 7px; }
.about { min-height: 880px; padding: 130px clamp(28px, 8vw, 130px); display: grid; grid-template-columns: minmax(280px, .9fr) minmax(340px, 1fr); gap: clamp(50px, 9vw, 150px); align-items: center; position: relative; }
.brush-title { display: inline-block; margin: 0 0 28px; font-size: 24px; position: relative; letter-spacing: .16em; }
.brush-title::before { content: ""; position: absolute; z-index: -1; left: -14px; right: -12px; bottom: 1px; height: 13px; background: #efb2b8; transform: rotate(-3deg); border-radius: 50%; opacity: .75; }
.about h2, .section-heading h2 { font-weight: 500; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.55; margin: 0 0 34px; }
.about-copy > p:not(.brush-title) { font-size: 17px; line-height: 2.25; color: var(--muted); }
.about blockquote { margin: 34px 0; padding: 0 0 0 22px; border-left: 2px solid var(--rose); font-size: 19px; line-height: 2; }
.rabbit-line { display: block; margin-top: 50px; color: var(--rose-deep); letter-spacing: .25em; }
.portrait-card { max-width: 570px; margin: 0; padding: 16px 16px 0; background: #f7e9df; transform: rotate(1.6deg); box-shadow: var(--shadow); position: relative; }
.portrait-card img { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.portrait-card figcaption { padding: 20px 12px 25px; text-align: center; font-size: 17px; letter-spacing: .08em; }
.tape { position: absolute; z-index: 2; top: -22px; left: 34%; width: 135px; height: 46px; background: rgba(224,196,174,.73); transform: rotate(-6deg); }
.path-line { position: absolute; left: 48%; top: 6%; height: 83%; border-left: 1px dashed rgba(194,114,135,.55); color: var(--rose); padding-top: 46%; transform: rotate(8deg); }

.moments { padding: 110px clamp(24px, 5vw, 80px) 140px; background: #f9e7e4; overflow: hidden; }
.section-heading { max-width: 1080px; margin: 0 auto 65px; }
.section-heading h2 { font-size: clamp(28px, 3.4vw, 46px); margin: 0; }
.scrapbook { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1.15fr .8fr 1fr .8fr 1.15fr; gap: 22px; align-items: center; }
.imagination-rail { max-width: 980px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.moment { padding: 12px 12px 24px; background: #fffaf6; box-shadow: 0 14px 28px rgba(98,53,65,.12); text-align: center; position: relative; }
.imagination-card { display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.imagination-card img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.moment:nth-child(1) { transform: rotate(-2.5deg); }
.moment:nth-child(2) { transform: translateY(25px) rotate(1deg); }
.moment:nth-child(3) { transform: translateY(-12px) rotate(-1deg); }
.moment:nth-child(4) { transform: translateY(27px) rotate(2deg); }
.moment:nth-child(5) { transform: rotate(-1.5deg); }
.moment p { margin: 15px 0 0; line-height: 1.75; color: var(--muted); }
.sun-window, .night-window, .blossom { aspect-ratio: 1; display: grid; place-items: center; font-size: 58px; }
.sun-window { background: radial-gradient(circle at 72% 20%, #fffbdc, transparent 19%), linear-gradient(145deg, #f7d8c8, #f2b6b4); }
.night-window { background: linear-gradient(#6c506d, #d18c9b 68%, #f2c2b6); color: #ffe9ca; }
.blossom { background: linear-gradient(#d8839b, #f5c4c3); color: #fff4f0; font-size: 84px; }
.blossom small { font-size: 16px; }
.moment-note { min-height: 270px; display: grid; place-items: center; background: #fff9f0; }
.moment-note .paperclip { position: absolute; top: -17px; left: 19px; font-size: 56px; color: #b39188; transform: rotate(12deg); }
.ruled { background: repeating-linear-gradient(#fffaf2 0 29px, #e8d1cc 30px); }

.mailbox { min-height: 860px; padding: 115px clamp(24px, 7vw, 110px) 145px; background: radial-gradient(circle at 12% 18%, rgba(255,255,255,.8) 0 2px, transparent 3px), linear-gradient(155deg, #fff9f5 0 52%, #f5dade 52% 74%, #c97c90 74%); background-size: 90px 90px, 100% 100%; position: relative; overflow: hidden; }
.mailbox::before { content: ""; position: absolute; left: -8%; bottom: -130px; width: 65%; height: 330px; background: rgba(255,246,240,.46); transform: rotate(8deg); }
.mailbox-heading { max-width: 1180px; margin: 0 auto 52px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.mailbox-heading .brush-title { margin-bottom: 18px; }
.mailbox-heading h2 { margin: 0; font-size: clamp(32px, 4vw, 58px); font-weight: 500; letter-spacing: .03em; }
.mail-count { padding: 9px 16px; color: var(--rose-deep); border: 1px solid rgba(166,82,104,.28); background: rgba(255,250,245,.72); font-size: 13px; letter-spacing: .12em; white-space: nowrap; }
.mailbox-layout { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: clamp(24px, 4vw, 52px); align-items: stretch; position: relative; z-index: 1; }
.mail-featured { min-height: 500px; padding: clamp(44px, 6vw, 74px); background: #fffaf4; box-shadow: 0 28px 70px rgba(104,52,67,.2); position: relative; clip-path: polygon(1% 2%, 15% 0, 31% 1.4%, 48% .2%, 65% 1.5%, 84% 0, 100% 2%, 99% 98%, 82% 100%, 64% 98.6%, 45% 100%, 24% 98.4%, 0 100%); transform: rotate(-.7deg); }
.mail-featured::after { content: ""; position: absolute; left: 9%; right: 9%; top: 37%; border-top: 1px dashed rgba(180,111,130,.18); transform: rotate(-1deg); }
.mail-stamp { position: absolute; top: 36px; right: 42px; width: 72px; height: 88px; display: grid; place-items: center; align-content: center; gap: 6px; color: #fff8ef; background: linear-gradient(145deg, #d88ca0, #a85169); border: 5px dotted #f5cbd2; font-size: 28px; transform: rotate(4deg); }
.mail-stamp small { font: 8px/1.2 Georgia, serif; letter-spacing: .12em; }
.mail-meta { display: flex; gap: 18px; align-items: center; margin: 0 105px 56px 0; color: var(--rose-deep); font-size: 12px; letter-spacing: .14em; }
.mail-meta span { padding: 6px 11px; color: #fffaf5; background: var(--rose-deep); }
.mail-featured h3 { max-width: 590px; margin: 0 0 28px; font-size: clamp(34px, 4.2vw, 59px); line-height: 1.35; font-weight: 500; }
.mail-featured > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 18px; line-height: 2.1; }
.mail-signoff { margin-top: 58px; display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.mail-signoff > span { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.mail-wax { position: absolute; right: 35px; bottom: 27px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: #f8ddcf; background: #b85f74; border: 5px double #df9dac; box-shadow: 0 4px 10px rgba(85,39,51,.22); font-size: 13px; }
.inbox-panel { min-height: 500px; padding: 30px 26px 32px; background: rgba(255,249,244,.92); border: 1px solid rgba(168,83,106,.18); box-shadow: 0 22px 55px rgba(104,52,67,.14); transform: rotate(.7deg); }
.inbox-panel > header { padding: 2px 4px 20px; display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #e8cbd1; }
.inbox-panel h3 { margin: 0; font-size: 27px; font-weight: 500; letter-spacing: .08em; }
.inbox-panel header span { color: var(--muted); font: 11px/1.3 Georgia, serif; letter-spacing: .14em; }
.inbox-item { width: 100%; margin-top: 15px; padding: 18px 12px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 13px; align-items: center; color: var(--plum); background: transparent; border: 0; border-bottom: 1px solid #ead9d7; text-align: left; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.inbox-item:hover, .inbox-item:focus-visible { background: #f8e4e6; transform: translateX(3px); outline: 0; }
.mini-envelope { width: 31px; height: 23px; border: 1px solid #b96d81; background: #fff9f4; position: relative; }
.mini-envelope::before, .mini-envelope::after { content: ""; position: absolute; top: 3px; width: 20px; border-top: 1px solid #b96d81; }
.mini-envelope::before { left: -1px; transform: rotate(31deg); }
.mini-envelope::after { right: -1px; transform: rotate(-31deg); }
.inbox-copy { min-width: 0; display: grid; gap: 5px; }
.inbox-copy strong { font-size: 15px; font-weight: 500; letter-spacing: .06em; }
.inbox-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item time { color: var(--rose-deep); font: 11px/1.2 Georgia, serif; }
.inbox-empty { min-height: 260px; display: grid; place-content: center; text-align: center; color: #ad7785; }
.inbox-empty > span { margin-bottom: 20px; font-size: 17px; letter-spacing: .18em; }
.inbox-empty p { margin: 0; font-size: 14px; line-height: 2; letter-spacing: .08em; }
.letter-rabbit { position: absolute; right: 8%; bottom: 60px; font-size: clamp(45px, 6vw, 83px); color: #fff7f1; text-shadow: 0 5px 0 rgba(94,44,58,.12); }
footer { padding: 38px 20px 42px; text-align: center; color: #fff4ee; background: #b86579; }
footer p { font-size: 18px; letter-spacing: .16em; }
footer span { opacity: .75; }

.letter-modal {
  width: min(720px, calc(100% - 40px));
  max-height: min(90dvh, 960px);
  padding: 0;
  overflow-y: auto;
  color: var(--plum);
  background-color: #fffaf8;
  background-image: url("assets/letter-paper-blush-lavender-v1.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid rgba(122,89,100,.16);
  border-radius: 4px;
  box-shadow: 0 28px 90px rgba(62,24,39,.3);
  scrollbar-color: rgba(166,82,104,.28) transparent;
  scrollbar-width: thin;
}
.letter-modal::backdrop { background: rgba(58,35,43,.54); backdrop-filter: blur(8px) saturate(.8); }
.letter-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 40px clamp(38px, 9vw, 68px) 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: rgba(255,253,248,.82);
  backdrop-filter: blur(10px);
}
.letter-toolbar p { margin: 0; display: flex; gap: 16px; color: var(--muted); font-size: 12px; letter-spacing: .1em; line-height: 1.5; }
.letter-toolbar p span { display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.letter-toolbar p span::before { content: ""; width: 22px; border-top: 1px solid rgba(166,82,104,.28); }
.letter-toolbar button {
  width: 44px;
  height: 44px;
  margin: -13px -13px 0 20px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  color: var(--plum);
  background: transparent;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.letter-toolbar button:hover { color: var(--rose-deep); background: rgba(245,223,224,.58); }
.letter-toolbar button:focus-visible { outline: 2px solid rgba(166,82,104,.58); outline-offset: 1px; background: rgba(245,223,224,.38); }
.letter-content {
  padding: 48px clamp(38px, 9vw, 68px) 80px;
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.86;
  letter-spacing: .018em;
}
.letter-content p { margin: 0 0 1.18em; text-align: start; }
.letter-content > p:first-child { margin-bottom: .7em; font-size: 1.06em; font-weight: 500; }
.letter-content > p:nth-child(2) { margin-bottom: 2em; color: var(--muted); }
.letter-content a { color: var(--rose-deep); text-underline-offset: 4px; }
.signature { margin-top: 52px !important; margin-bottom: 0 !important; text-align: right !important; line-height: 1.8; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-revealed { opacity: 1; transform: translateY(0); }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

@media (max-width: 820px) {
  .nav-wrap { height: 66px; padding-inline: 20px; }
  .brand { font-size: 25px; }
  nav { gap: 20px; }
  nav a { font-size: 13px; }
  .wind-chime { top: 74px; right: 9px; transform: scale(.78); transform-origin: 50% 0; animation-name: chime-sway-mobile; }
  .wind-chime.is-gusting { animation-name: chime-gust-mobile; }
  .wind-chime.is-compact { opacity: 0; pointer-events: none; }
  .wind-chime.is-compact .chime-status { display: none; }
  .breeze-stars { top: 96px; right: 35px; }
  .hero { min-height: 760px; align-items: flex-end; }
  .hero > img { object-position: 66% center; }
  .hero-shade { background: linear-gradient(0deg, rgba(255,239,234,.95) 0%, rgba(246,196,199,.58) 55%, rgba(175,100,119,.15) 100%); }
  .hero-copy { margin: 0 24px 70px; padding: 0; }
  .hero h1 { font-size: clamp(48px, 14vw, 70px); }
  .hero p { font-size: 16px; line-height: 1.9; }
  .crescent { top: 12%; right: 10%; }
  .about { grid-template-columns: 1fr; padding-block: 100px; }
  .path-line { display: none; }
  .portrait-card { width: min(92%, 520px); justify-self: center; }
  .scrapbook { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .moment:nth-child(n) { transform: none; }
  .moment:last-child { grid-column: span 2; width: 55%; justify-self: center; }
  .mailbox { padding-block: 95px 125px; }
  .mailbox-layout { grid-template-columns: 1fr; }
  .mail-featured { min-height: 470px; }
  .inbox-panel { min-height: 390px; }
  .inbox-empty { min-height: 170px; }
}

@keyframes chime-sway-mobile { 0%, 100% { transform: scale(.78) rotate(-2.4deg); } 50% { transform: scale(.78) rotate(2.7deg); } }
@keyframes chime-gust-mobile { 0%, 100% { transform: scale(.78) rotate(-10deg); } 50% { transform: scale(.78) rotate(11deg); } }
@keyframes chime-sway-compact { 0%, 100% { transform: scale(.52) rotate(-2.4deg); } 50% { transform: scale(.52) rotate(2.7deg); } }

@media (max-width: 540px) {
  .password-row { flex-direction: column; }
  .password-row button { width: 100%; }
  .gate-envelope { padding-inline: 24px; }
  .gate-kicker { letter-spacing: .12em; }
  .hero h1 { font-size: 50px; }
  .hero-copy { width: calc(100% - 40px); margin-inline: 20px; }
  .about { padding-inline: 24px; }
  .scrapbook { grid-template-columns: 1fr; max-width: 360px; }
  .moment:last-child { grid-column: auto; width: 100%; }
  .moment-note { min-height: 220px; }
  .mailbox { padding-inline: 18px; }
  .mailbox-heading { align-items: flex-start; margin-bottom: 34px; }
  .mailbox-heading h2 { font-size: 34px; line-height: 1.45; }
  .mail-count { margin-top: 8px; padding: 7px 10px; font-size: 11px; }
  .mail-featured { min-height: 520px; padding: 43px 25px 48px; transform: none; }
  .mail-stamp { top: 27px; right: 23px; width: 58px; height: 70px; font-size: 22px; }
  .mail-meta { margin: 0 70px 48px 0; align-items: flex-start; flex-direction: column; gap: 9px; }
  .mail-featured h3 { font-size: 37px; }
  .mail-featured > p { font-size: 16px; line-height: 2; }
  .mail-signoff { margin-top: 40px; align-items: flex-start; flex-direction: column; }
  .mail-signoff .paper-button { width: calc(100% - 58px); }
  .mail-wax { right: 20px; bottom: 36px; }
  .inbox-panel { padding: 25px 18px 28px; transform: none; }
  .letter-rabbit { right: 5%; bottom: 34px; }
  .letter-modal { width: 100dvw; max-width: 100dvw; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; overscroll-behavior: contain; }
  .letter-toolbar { padding: max(25px, env(safe-area-inset-top)) 26px 0; }
  .letter-toolbar p { max-width: calc(100% - 42px); gap: 10px; font-size: 11px; letter-spacing: .08em; }
  .letter-toolbar p span { gap: 10px; }
  .letter-toolbar p span::before { width: 14px; }
  .letter-toolbar button { margin: -11px -12px 0 12px; }
  .letter-content { padding: 40px 26px max(64px, env(safe-area-inset-bottom)); font-size: 16px; line-height: 1.84; letter-spacing: .012em; }
  .letter-content p { margin-bottom: 1.12em; }
  .letter-content > p:nth-child(2) { margin-bottom: 1.8em; }
  .signature { margin-top: 42px !important; }
}

@media (max-width: 820px) {
  html { scroll-snap-type: y mandatory; }
  body { overscroll-behavior-y: contain; }
  .hero, .about, .moments {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
  }

  .hero { align-items: flex-end; }
  .hero-copy { margin-bottom: max(72px, env(safe-area-inset-bottom)); }

  .about {
    padding: 76px 20px 18px;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }
  .about .brush-title { margin-bottom: 10px; font-size: 20px; }
  .about h2 { margin-bottom: 10px; font-size: clamp(25px, 7.2vw, 31px); line-height: 1.42; }
  .about-copy > p:not(.brush-title) { margin: 0; font-size: 14px; line-height: 1.75; }
  .about-copy > p + p { margin-top: 3px; }
  .about blockquote { margin: 10px 0 6px; padding-left: 12px; font-size: 14px; line-height: 1.65; }
  .rabbit-line { margin-top: 5px; font-size: 12px; }
  .portrait-card {
    align-self: stretch;
    width: min(78%, 300px);
    max-height: 100%;
    padding: 8px 8px 0;
    overflow: hidden;
  }
  .portrait-card img { height: calc(100% - 38px); min-height: 0; aspect-ratio: auto; object-position: 50% 34%; }
  .portrait-card figcaption { padding: 8px 5px 11px; font-size: 11px; }
  .tape { top: -10px; width: 90px; height: 29px; }

  .moments { padding: 72px 0 22px; }
  .moments .section-heading { margin: 0 0 20px; padding: 0 20px; }
  .moments .brush-title { margin-bottom: 12px; font-size: 20px; }
  .moments .section-heading h2 { font-size: 28px; line-height: 1.45; }
  .scrapbook {
    width: 100%;
    max-width: none;
    height: calc(100svh - 190px);
    padding: 8px 14vw 28px 20px;
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72vw;
    gap: 16px;
    align-items: stretch;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .scrapbook::-webkit-scrollbar { display: none; }
  .imagination-rail { grid-auto-columns: 72vw; }
  .moment:nth-child(n) {
    width: 100%;
    height: 100%;
    min-height: 0;
    transform: none;
    scroll-snap-align: center;
  }
  .moment-photo { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .moment-note { display: grid; place-items: center; }
  .moment:last-child { grid-column: auto; width: 100%; }
  .sun-window, .night-window, .blossom { height: 100%; min-height: 0; aspect-ratio: auto; }

  .mailbox {
    min-height: 200svh;
    padding: 0;
    overflow: visible;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .mailbox-heading {
    height: 188px;
    margin: 0;
    padding: 68px 18px 20px;
    align-items: flex-start;
  }
  .mailbox-heading .brush-title { margin-bottom: 9px; font-size: 20px; }
  .mailbox-heading h2 { font-size: 32px; line-height: 1.42; }
  .mail-count { margin-top: 4px; padding: 7px 9px; font-size: 10px; }
  .mailbox-layout { max-width: none; margin: 0; display: block; }
  .mail-featured {
    width: calc(100% - 36px);
    height: calc(100svh - 188px);
    min-height: 0;
    margin: 0 18px;
    padding: 34px 25px 28px;
    overflow: hidden;
    transform: none;
  }
  .mail-stamp { top: 25px; right: 22px; width: 56px; height: 68px; font-size: 21px; }
  .mail-meta { margin: 0 66px 34px 0; flex-direction: column; align-items: flex-start; gap: 8px; }
  .mail-featured h3 { margin-bottom: 18px; font-size: clamp(32px, 9.5vw, 39px); line-height: 1.35; }
  .mail-featured > p { font-size: 15px; line-height: 1.85; }
  .mail-signoff { margin-top: 24px; align-items: flex-start; flex-direction: column; gap: 16px; }
  .mail-signoff .paper-button { width: calc(100% - 62px); }
  .mail-wax { right: 19px; bottom: 25px; }
  .inbox-panel {
    width: 100%;
    height: 100svh;
    min-height: 100svh;
    margin: 0;
    padding: 78px 22px 34px;
    border: 0;
    box-shadow: none;
    transform: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .inbox-empty { min-height: calc(100svh - 300px); }
  .letter-rabbit { right: 7%; bottom: 38px; }
  footer { scroll-snap-align: end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .breeze-stars { display: none; }
}
