@font-face {
  font-family: Wenkai;
  src: url("/assets/fonts/LXGWWenKai-Regular.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Long Cang";
  src: url("/assets/fonts/LongCang-SC.woff2") format("woff2");
  font-display: swap;
}
:root {
  color-scheme: dark;
  --ink: #fbf4ed;
  --ink-soft: #e5d9cf;
  --muted: #c2b4ad;
  --quiet: #9e918d;
  --line: rgb(238 220 204 / 18%);
  --surface: rgb(27 27 31 / 74%);
  --surface-deep: rgb(18 19 23 / 90%);
  --warm: #e4b88f;
  --rose: #c9938b;
  --focus: #ffe0bd;
  --ease: cubic-bezier(0.22, 0.78, 0.25, 1);
  --radius: 16px;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC",
    sans-serif;
  color: var(--ink);
  background: #17191f;
}
* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  min-height: 100%;
  background: #17191f;
}
body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
}
button,
input {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.62;
}
button:active {
  transform: scale(0.985);
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  font-family: Wenkai, "Songti SC", serif;
  font-weight: 400;
}
h1 {
  line-height: 1.42;
  letter-spacing: 0.06em;
}
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #17191f url("/assets/ui/moonlit-home/scene-wide.webp")
    center/cover no-repeat;
}
.atmosphere:before,
.atmosphere:after {
  position: absolute;
  inset: 0;
  content: "";
}
.atmosphere:before {
  background:
    radial-gradient(circle at 22% 27%, rgb(233 169 112 / 16%), transparent 30%),
    radial-gradient(circle at 78% 18%, rgb(146 174 211 / 12%), transparent 34%);
  animation: room-breathe 9s ease-in-out infinite alternate;
}
.atmosphere:after {
  background: linear-gradient(
    90deg,
    rgb(10 12 17 / 52%),
    rgb(10 12 17 / 10%) 52%,
    rgb(10 12 17 / 28%)
  );
  transition:
    background 0.6s var(--ease),
    backdrop-filter 0.6s var(--ease);
}
body[data-view="reader"] .atmosphere:after {
  background: rgb(10 12 17 / 76%);
  backdrop-filter: blur(8px) saturate(0.75);
}
body[data-view="opening"] .atmosphere:after {
  background: radial-gradient(
    circle at 50% 52%,
    rgb(12 13 17 / 22%),
    rgb(10 11 15 / 72%) 78%
  );
}
.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: 100dvh;
  margin: auto;
  padding: 0 56px 28px;
}
.topbar {
  display: flex;
  height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: Wenkai, "Songti SC", serif;
  font-size: 17px;
  letter-spacing: 0.12em;
}
.brand-symbol {
  display: grid;
  width: 36px;
  height: 42px;
  place-items: center;
  border-right: 1px solid var(--line);
  padding-right: 11px;
  color: #f1c499;
  font-family: Georgia, serif;
  font-size: 32px;
  font-style: italic;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font:
    9px/1.8 Wenkai,
    serif;
  letter-spacing: 0.12em;
}
.header-note {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.view {
  display: none;
}
.view.is-active {
  display: block;
  animation: arrive 0.55s var(--ease) both;
}
.eyebrow {
  color: #edc5a5;
  font:
    11px/1.6 Wenkai,
    serif;
  letter-spacing: 0.12em;
}
.text-button {
  min-height: 44px;
  border: 0;
  padding: 10px 4px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.04em;
  transition:
    color 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}
.text-button:hover {
  color: #fff8f0;
}
.primary-btn {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: var(--radius);
  padding: 13px 22px;
  color: #382c2b;
  background: url("/assets/ui/moonlit-home/button-primary.png") center/100% 100%
    no-repeat;
  box-shadow: 0 10px 32px rgb(12 10 9 / 28%);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition:
    filter 0.22s ease,
    transform 0.22s var(--ease),
    opacity 0.22s ease;
}
.primary-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.primary-btn > span:last-child {
  font-size: 23px;
  font-weight: 400;
  line-height: 1;
}
/* Entry */
.entry-layout {
  display: grid;
  min-height: calc(100dvh - 116px);
  grid-template-columns: minmax(300px, 0.86fr) minmax(380px, 1.14fr);
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: clamp(44px, 7vw, 96px);
  padding: 28px 0 54px;
}
.entry-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}
.entry-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(34px, 4vw, 48px);
}
.entry-copy > p:last-child {
  max-width: 31em;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.85;
}
.entry-art {
  position: relative;
  isolation: isolate;
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  padding: 74px 22px 68px;
}
.preview-touch {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  perspective: 1500px;
  text-align: initial;
  touch-action: manipulation;
}
.preview-touch:active {
  transform: none;
}
.preview-touch:focus-visible {
  border-radius: var(--radius);
  outline-offset: 12px;
}
.presentation-envelope {
  display: block;
  width: 100%;
  transform: rotate(-6deg);
  filter: drop-shadow(0 26px 24px rgb(9 7 8 / 50%));
  transition: transform 0.65s var(--ease);
}
.preview-touch.is-open .presentation-envelope {
  transform: rotate(0deg) translateY(9px);
}
.keepsake {
  position: absolute;
  top: 4%;
  right: -3%;
  z-index: 1;
  width: 34%;
  height: auto;
  opacity: 0.64;
  pointer-events: none;
  filter: sepia(0.22) saturate(0.75) drop-shadow(4px 9px 9px rgb(16 9 8 / 28%));
  transform: rotate(8deg);
  transition:
    transform 0.6s var(--ease),
    opacity 0.5s ease;
}
.entry-art:has(.is-open) .keepsake {
  opacity: 0.2;
  transform: translate(10px, -8px) rotate(13deg);
}
.preview-instruction {
  position: absolute;
  right: 0;
  bottom: 32px;
  left: 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
  pointer-events: none;
}
.art-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}
.entry-controls {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  max-width: 430px;
  margin-top: 24px;
  border: 1px solid rgb(244 220 198 / 14%);
  border-radius: var(--radius);
  padding: 28px 32px 30px;
  background: linear-gradient(145deg, rgb(28 28 31 / 86%), rgb(22 23 28 / 78%));
  box-shadow:
    0 24px 65px rgb(7 7 9 / 46%),
    inset 0 1px 0 rgb(255 246 230 / 8%);
  backdrop-filter: blur(20px) saturate(1.08);
}
.entry-controls:before {
  position: absolute;
  inset: -2px;
  border: 18px solid transparent;
  border-image: url("/assets/ui/moonlit-home/panel-frame.png") 150/18px stretch;
  content: "";
  opacity: 0.48;
  pointer-events: none;
}
.entry-controls > * {
  position: relative;
  z-index: 1;
}
.panel-title {
  margin-bottom: 4px;
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0.05em;
}
.panel-copy {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.entry-switch {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.entry-switch button {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 8px 10px 11px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.08em;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}
.entry-switch button[aria-selected="true"] {
  border-color: #efc49e;
  color: #fff5e9;
  background: linear-gradient(0deg, rgb(224 161 109 / 10%), transparent);
}
.entry-form {
  display: grid;
  gap: 8px;
  animation: arrive 0.32s var(--ease);
}
.entry-form label {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.input-shell {
  position: relative;
}
.input-shell:after {
  position: absolute;
  inset: -2px;
  background: url("/assets/ui/moonlit-home/input-frame.png") center/100% 100%
    no-repeat;
  content: "";
  opacity: 0.38;
  pointer-events: none;
}
.entry-form input {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 52px;
  border: 1px solid rgb(240 218 199 / 20%);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fff8ef;
  background: rgb(17 19 24 / 78%);
  caret-color: #ffd8ad;
  font-size: 16px;
  letter-spacing: 0.08em;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.entry-form input::placeholder {
  color: #b8aaa2;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.entry-form input:focus {
  border-color: rgb(255 224 190 / 52%);
  background: rgb(20 21 26 / 94%);
}
.entry-form[aria-busy="true"] .primary-btn {
  opacity: 0.72;
}
.entry-form.has-error {
  animation: panel-shake 0.32s ease-in-out;
}
.form-message {
  min-height: 24px;
  padding-top: 7px;
  color: #ffd0c6;
  font-size: 12px;
  line-height: 1.6;
}
.entry-note {
  margin-top: 6px;
  color: var(--muted);
  font-family: Wenkai, serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
}
.remembered-link {
  display: inline-block;
  max-width: 100%;
  color: #f1c7a5;
  font-size: 12px;
}
/* Inbox */
.inbox-intro {
  max-width: 580px;
  padding: 44px 0 30px;
}
.inbox-intro h1 {
  margin: 10px 0 8px;
  font-size: clamp(30px, 4vw, 42px);
}
.inbox-intro > p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}
.receive-link {
  margin-top: 9px;
  color: #f0c5a3;
}
.arrival {
  display: grid;
  min-height: 330px;
  grid-template-columns: minmax(320px, 1.15fr) minmax(240px, 0.85fr);
  align-items: center;
  gap: clamp(36px, 6vw, 74px);
  margin-bottom: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px clamp(28px, 5vw, 58px);
  background: linear-gradient(135deg, rgb(27 26 29 / 68%), rgb(18 19 23 / 42%));
  box-shadow:
    0 28px 70px rgb(6 6 8 / 30%),
    inset 0 1px 0 rgb(255 245 230 / 7%);
  backdrop-filter: blur(12px);
}
.arrival-envelope {
  padding: 24px 0;
  transform: rotate(-4deg);
  filter: drop-shadow(0 18px 18px rgb(7 5 7 / 45%));
}
.arrival-envelope .seal-button {
  pointer-events: none;
}
.arrival h2 {
  margin: 10px 0;
  font-size: 30px;
}
.arrival p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.arrival .primary-btn {
  max-width: 240px;
  margin-top: 19px;
}
.scheduled-arrival {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -16px 0 42px;
  border-left: 1px solid #d8af8c;
  padding: 15px 0 15px 20px;
  color: var(--ink-soft);
}
.scheduled-arrival strong {
  display: block;
  margin-bottom: 5px;
  font-family: Wenkai, serif;
  font-size: 17px;
  font-weight: 400;
}
.scheduled-arrival span {
  color: var(--muted);
  font-size: 11px;
}
.collection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}
.collection-heading h2 {
  font-size: 21px;
}
.collection-heading span {
  color: var(--muted);
  font-size: 11px;
}
.letter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 26px;
}
.letter-shelf-room {
  padding: 26px 28px 42px;
  border-radius: 8px;
  background: #241b18 url("/assets/ui/moonlit-home/letter-shelf-wide.webp") center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgb(255 224 190 / 10%), 0 18px 42px rgb(5 5 7 / 28%);
}
.collection-letter {
  min-width: 0;
  border: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.collection-art {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
}
.collection-art:focus-visible {
  outline: 2px solid #d9b38a;
  outline-offset: 4px;
}
.collection-copy {
  display: block;
  padding: 13px 1px 8px;
}
.collection-copy[hidden] { display: none; }
.shelf-read {
  margin-top: 12px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #98765b;
  border-radius: 4px;
  color: #f2e8d8;
  background: #67283a;
  font: inherit;
  font-size: 13px;
}
.shelf-read:focus-visible { outline: 2px solid #d99a68; outline-offset: 3px; }
.collection-copy strong {
  display: block;
  font-family: Wenkai, serif;
  font-size: 18px;
  font-weight: 400;
}
.collection-copy small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.empty-note {
  padding: 34px 0 70px;
  color: var(--muted);
  font-family: Wenkai, serif;
  font-size: 15px;
  line-height: 2;
}
/* Envelope opening */
body[data-view="opening"] .topbar,
body[data-view="reader"] .topbar {
  display: none;
}
.opening-toolbar {
  display: flex;
  height: 76px;
  align-items: center;
  justify-content: space-between;
}
.opening-intro {
  margin-top: 12px;
  text-align: center;
}
.opening-intro h1 {
  margin: 12px 0 8px;
  font-size: 31px;
}
.opening-intro > p:last-child {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.envelope-space {
  padding: 94px 0 42px;
}
.envelope-stage {
  max-width: 520px;
  margin: auto;
  perspective: 1600px;
  filter: drop-shadow(0 25px 30px rgb(7 5 7 / 52%));
  transition:
    transform 0.8s var(--ease),
    opacity 0.5s;
}
.envelope-stage.is-leaving {
  opacity: 0;
  transform: translateY(45px) scale(0.94);
}
.opening-hint,
.archive-note {
  min-height: 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: 0.06em;
  text-align: center;
}
.opening-hint {
  color: var(--ink);
}
.archive-note {
  margin: 11px 0 24px;
  font-size: 11px;
  letter-spacing: 0.01em;
}
#open-retry {
  display: block;
  margin: auto;
}
.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6;
  perspective: 1500px;
}
.envelope-body {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(250 224 197 / 24%);
  border-radius: 7px;
  background: var(--env-paper);
  box-shadow:
    inset 0 1px 1px rgb(255 244 231 / 30%),
    inset 0 -3px 8px rgb(22 10 15 / 34%);
}
.envelope-liner {
  position: absolute;
  inset: 4% 2%;
  overflow: hidden;
  border-radius: 5px;
  background: var(--env-liner);
}
.liner-print {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 4px,
    var(--env-ink) 4px 5px,
    transparent 5px 9px
  );
  mask-image: repeating-linear-gradient(
    0deg,
    transparent 0 27px,
    #000 27px 65px,
    transparent 65px 94px
  );
}
.envelope-letter {
  position: absolute;
  z-index: 1;
  inset: 8% 8% 3%;
  border-radius: 4px;
  padding-top: 12%;
  color: #856658;
  background: #f4ebda;
  box-shadow: 0 0 5px rgb(64 43 37 / 25%);
  text-align: center;
  transition:
    transform 0.8s var(--ease),
    opacity 0.7s var(--ease);
}
.envelope-letter span {
  font:
    italic 22px Georgia,
    serif;
}
.envelope-letter i {
  display: block;
  width: 55%;
  height: 1px;
  margin: 9% auto 0;
  background: rgb(155 124 96 / 20%);
}
.envelope-pocket {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -1px 2px rgb(28 13 20 / 12%));
}
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  width: 100%;
  height: 59%;
  transition:
    opacity 0.52s var(--ease),
    transform 0.52s var(--ease);
}
.flap-face {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.flap-outside {
  background:
    linear-gradient(168deg, rgb(255 228 207 / 9%), transparent 60%),
    var(--env-deep);
  box-shadow: inset 0 1px 0 rgb(255 225 204 / 28%);
}
.flap-inside {
  display: none;
}
.seal-button {
  position: absolute;
  top: 59%;
  left: 50%;
  z-index: 4;
  width: 19%;
  min-width: 48px;
  aspect-ratio: 1;
  border: 0;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 3px 3px rgb(27 16 21 / 40%));
  transform: translate(-50%, -50%);
  transition:
    opacity 0.35s,
    transform 0.4s var(--ease);
}
.seal-button img {
  display: block;
  width: 100%;
  height: 100%;
}
.seal-button:active {
  transform: translate(-50%, -50%) scale(0.94);
}
.seal-button:focus-visible {
  border-radius: 50%;
  outline-offset: 5px;
}
.seal-inlay {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 3px double var(--env-metal);
  border-radius: 50%;
  color: var(--env-metal);
  background: var(--env-deep);
  box-shadow: inset 0 1px 7px rgb(244 238 238 / 30%);
}
.seal-inlay > span {
  color: var(--env-metal);
  font-size: clamp(18px, 3vw, 32px);
}
.pearl-inlay {
  border: 1px solid rgb(231 243 247 / 74%);
  background: radial-gradient(
    ellipse at 30% 20%,
    rgb(255 250 244 / 91%),
    rgb(216 234 238 / 50%) 40%,
    rgb(152 198 216 / 52%) 70%,
    rgb(236 248 247 / 70%)
  );
}
.pearl-inlay > span {
  color: #4b7181;
}
.envelope-postmark {
  position: absolute;
  right: 6%;
  bottom: 7%;
  z-index: 2;
  width: 16%;
  height: auto;
  opacity: 0.42;
  mix-blend-mode: screen;
}
.envelope-inscription {
  position: absolute;
  bottom: 11%;
  left: 7%;
  z-index: 2;
  color: var(--env-metal);
  font:
    clamp(7px, 0.7vw, 10px) Wenkai,
    serif;
  letter-spacing: 0.12em;
  opacity: 0.75;
}
.is-unsealing .seal-button,
.is-open .seal-button {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
}
.is-open .envelope-flap {
  opacity: 0;
  transform: translateY(8px) scale(0.985);
  pointer-events: none;
}
.is-revealing .envelope-letter {
  transform: translateY(-15%);
  opacity: 0;
}
.envelope-letter.actual-paper {
  bottom: auto;
  height: auto;
  aspect-ratio: 941/1672;
  border-radius: 0;
  padding: 0;
  background: none;
  clip-path: inset(0 0 66% 0);
  container-type: inline-size;
}
.envelope-letter.actual-paper .letter-page:not(:first-child) {
  display: none;
}
.envelope-letter.actual-paper .letter-page {
  box-shadow: none;
}
.is-revealing .envelope-letter.actual-paper {
  transform: translateY(-18%);
  opacity: 1;
}
.shelf-envelope {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 19%;
  display: block;
  transform: rotate(-2deg);
  filter: drop-shadow(0 12px 12px rgb(8 5 6 / 35%));
  transition:
    transform 0.42s var(--ease),
    filter 0.42s;
}
.collection-art:hover .shelf-envelope,
.collection-art:focus-visible .shelf-envelope,
.collection-art:active .shelf-envelope,
.collection-letter.is-selected .shelf-envelope {
  transform: translateY(-8px) rotate(0deg);
  filter: drop-shadow(0 18px 15px rgb(8 5 6 / 44%));
}
.shelf-envelope .envelope {
  height: auto;
  aspect-ratio: 640 / 400;
}
.collection-stamp {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #f0c5a3;
  font:
    11px Wenkai,
    serif;
  letter-spacing: 0.08em;
}
/* Reader */
.reader-head {
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
}
.reader-intro {
  padding: 8px 0 27px;
  text-align: center;
}
.reader-intro p {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}
.reader-intro h1 {
  font-size: 26px;
}
.letter-reader {
  display: grid;
  width: min(100%, 590px);
  margin: auto;
  gap: 24px;
  container-type: inline-size;
}
.letter-page {
  position: relative;
  overflow: hidden;
  aspect-ratio: 941/1672;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: 0 22px 50px rgb(5 5 8 / 42%);
}
.letter-copy {
  position: absolute;
  top: 16.75%;
  left: 23.38%;
  width: 57.39%;
  height: 59.21%;
  overflow: hidden;
  color: #473c35;
  font:
    5.3135cqw/1.5 "Long Cang",
    cursive;
  white-space: pre-wrap;
}
.letter-copy > div {
  white-space: pre;
}
.letter-page__meta {
  position: absolute;
  right: 3%;
  bottom: 1.8%;
  color: #6f5d53;
  font-size: 10px;
}
.reader-end {
  padding: 31px 0 26px;
  text-align: center;
}
.reader-end > p {
  color: var(--muted);
  font-family: Wenkai, serif;
  font-size: 14px;
  line-height: 1.8;
}
.reader-actions {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin: 12px 0;
}
.reader-actions button {
  color: #f0c5a3;
}
.boot-error {
  color: #ffd0c6;
  font-size: 14px;
}
@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes room-breathe {
  from {
    opacity: 0.65;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.012);
  }
}
@keyframes panel-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-2px);
  }
}
@media (hover: hover) and (pointer: fine) {
  .preview-touch:not(.is-open):hover .presentation-envelope {
    transform: rotate(-3deg) translateY(-7px);
  }
  .collection-letter:hover .collection-copy strong {
    color: #f2c8a7;
  }
}
@media (max-width: 900px) {
  .app-shell {
    padding-right: 30px;
    padding-left: 30px;
  }
  .entry-layout {
    grid-template-columns: minmax(280px, 0.9fr) minmax(330px, 1.1fr);
    column-gap: 34px;
  }
  .letter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .atmosphere {
    background-image: url("/assets/ui/moonlit-home/scene-mobile.webp");
    background-position: center;
  }
  .atmosphere:after {
    background: linear-gradient(
      180deg,
      rgb(10 12 17 / 28%),
      rgb(10 12 17 / 46%) 52%,
      rgb(10 12 17 / 68%)
    );
  }
  .app-shell {
    padding: 0 20px 22px;
  }
  .topbar {
    height: 68px;
  }
  .brand {
    gap: 9px;
    font-size: 14px;
  }
  .brand-symbol {
    width: 31px;
    height: 36px;
    padding-right: 9px;
    font-size: 28px;
  }
  .brand small {
    font-size: 8px;
  }
  .header-note {
    font-size: 9px;
  }
  .entry-layout {
    display: flex;
    min-height: calc(100dvh - 82px);
    flex-direction: column;
    padding: 8px 0 26px;
  }
  .entry-copy {
    text-align: center;
  }
  .entry-copy h1 {
    margin: 9px 0 7px;
    font-size: clamp(27px, 8.2vw, 34px);
  }
  .entry-copy > p:last-child {
    margin: auto;
    font-size: 11px;
  }
  .entry-art {
    order: 2;
    width: min(100%, 330px);
    margin: 0 auto;
    padding: 30px 24px 44px;
  }
  .keepsake {
    top: -2%;
    right: 2%;
    width: 29%;
  }
  .preview-instruction {
    bottom: 24px;
    font-size: 9px;
  }
  .art-caption {
    font-size: 9px;
  }
  .entry-controls {
    order: 3;
    max-width: 420px;
    margin: 12px auto 0;
    border-width: 1px;
    border-image: none;
    padding: 22px 24px 24px;
  }
  .panel-title {
    font-size: 20px;
  }
  .panel-copy {
    margin-bottom: 13px;
  }
  .entry-switch {
    margin-bottom: 13px;
  }
  .entry-form input {
    min-height: 50px;
  }
  .primary-btn {
    min-height: 50px;
  }
  .entry-note {
    display: none;
  }
  .form-message {
    min-height: 20px;
    padding-top: 4px;
  }
  .inbox-intro {
    padding: 28px 0 24px;
  }
  .inbox-intro h1 {
    font-size: 29px;
  }
  .arrival {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 30px 18px 27px;
    text-align: center;
  }
  .arrival-envelope {
    width: 100%;
    max-width: 350px;
    margin: auto;
    padding: 7px 3px;
  }
  .arrival h2 {
    margin: 7px 0;
    font-size: 25px;
  }
  .arrival .primary-btn {
    max-width: 100%;
    margin-top: 15px;
  }
  .scheduled-arrival {
    align-items: flex-start;
    flex-direction: column;
  }
  .letter-grid {
    gap: 20px 14px;
  }
  .collection-art {
    aspect-ratio: 1.4;
  }
  .letter-shelf-room {
    padding: 18px 14px 28px;
    background-image: url("/assets/ui/moonlit-home/letter-shelf-mobile.webp");
  }
  .collection-copy strong {
    font-size: 16px;
  }
  .collection-copy small {
    font-size: 10px;
  }
  .opening-toolbar {
    height: 66px;
  }
  .opening-intro {
    margin-top: 20px;
  }
  .opening-intro h1 {
    font-size: 27px;
  }
  .envelope-space {
    padding: 92px 0 43px;
  }
  .envelope-stage {
    width: 100%;
    max-width: 380px;
  }
  .envelope-letter span {
    font-size: 18px;
  }
  .reader-head {
    height: 66px;
  }
  .reader-intro {
    padding-bottom: 22px;
  }
  .reader-intro h1 {
    font-size: 23px;
  }
  .letter-reader {
    width: calc(100% + 16px);
    margin-left: -8px;
  }
}
@media (max-width: 380px), (max-height: 720px) and (max-width: 767px) {
  .topbar {
    height: 58px;
  }
  .entry-layout {
    min-height: calc(100dvh - 68px);
    padding-top: 2px;
  }
  .entry-copy h1 {
    font-size: 25px;
  }
  .entry-copy .eyebrow {
    display: none;
  }
  .entry-art {
    width: min(100%, 260px);
    padding-top: 20px;
    padding-bottom: 34px;
  }
  .preview-instruction {
    display: none;
  }
  .entry-controls {
    margin-top: 7px;
    padding-top: 3px;
    padding-bottom: 6px;
  }
  .panel-copy {
    margin-bottom: 9px;
  }
  .entry-switch {
    margin-bottom: 9px;
  }
  .entry-switch button {
    min-height: 36px;
    padding-top: 5px;
    padding-bottom: 8px;
  }
  .entry-form input,
  .primary-btn {
    min-height: 46px;
  }
  .form-message {
    font-size: 11px;
  }
  .opening-toolbar {
    height: 54px;
  }
  .opening-intro {
    margin-top: 0;
  }
  .opening-intro h1 {
    margin: 6px 0;
    font-size: 22px;
  }
  .envelope-space {
    padding-top: 58px;
    padding-bottom: 23px;
  }
  .envelope-stage {
    max-width: 300px;
  }
}
@media (min-width: 768px) {
  .scheduled-arrival {
    max-width: 720px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .entry-controls,
  .arrival {
    background: var(--surface-deep);
    backdrop-filter: none;
  }
}
body.is-page-hidden .atmosphere:before {
  animation-play-state: paused;
}
.ambient-status {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.archive-note {
  max-width: 440px;
  margin-right: auto;
  margin-left: auto;
}

/* Generated shelf scenes: fixed image geometry, independent letter metadata. */
.shelf-group { margin-bottom: 28px; }
.letter-shelf-room.shelf-v3 { position: relative; padding: 0; aspect-ratio: 3 / 2; background: #241b18; overflow: hidden; }
.shelf-scene, .shelf-scene img { display: block; width: 100%; height: 100%; }
.shelf-scene { position: absolute; inset: 0; }
.shelf-scene img { object-fit: contain; }
.shelf-v3 .letter-grid { position: absolute; inset: 0; display: block; padding: 0; }
.shelf-v3 .collection-letter { position: absolute; top: 29%; left: 11%; width: 24%; height: 32%; }
.shelf-v3 .collection-letter:nth-child(2) { left: 38%; }
.shelf-v3 .collection-letter:nth-child(3) { left: 65%; }
.shelf-v3 .collection-art { width: 100%; height: 100%; aspect-ratio: auto; overflow: visible; }
.shelf-v3 .shelf-envelope { left: 8%; right: 8%; bottom: 14%; }
.shelf-v3 .collection-stamp { bottom: 0; right: 10%; text-shadow: 0 1px 3px #140d09; }
.shelf-details .collection-copy { padding: 18px 4px; }
@media (max-width: 767px) {
 .letter-shelf-room.shelf-v3 { aspect-ratio: 2 / 3; }
 .shelf-v3 .collection-letter, .shelf-v3 .collection-letter:nth-child(2), .shelf-v3 .collection-letter:nth-child(3) { left: 30%; width: 39%; height: 19.5%; top: 16%; }
 .shelf-v3 .collection-letter:nth-child(2) { top: 38.2%; }
 .shelf-v3 .collection-letter:nth-child(3) { top: 60.4%; }
 .shelf-v3 .shelf-envelope { left: 5%; right: 5%; bottom: 11%; }
}
.inbox-summary{margin-bottom:28px;padding:26px 28px;border:1px solid rgb(221 180 140 / 28%);border-radius:12px;background:linear-gradient(120deg,rgb(62 39 35 / 88%),rgb(29 29 33 / 82%));box-shadow:0 18px 42px rgb(5 5 7 / 24%)}
.inbox-summary .inbox-intro{padding:0}.shelf-six{position:relative;aspect-ratio:3/2;overflow:hidden}.six-backdrop{position:absolute;inset:0;display:block}.six-backdrop img{width:100%;height:100%;display:block;object-fit:contain}.six-grid{position:absolute;inset:0}.shelf-six .collection-letter{position:absolute;width:32%;height:27%;left:16%;top:20%}.shelf-six .collection-letter:nth-child(even){left:52%}.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:45%}.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:70%}.shelf-six .collection-art{width:100%;height:100%;aspect-ratio:auto;overflow:visible}.shelf-six .shelf-envelope{left:2%;right:2%;bottom:8%}.shelf-pagination{display:flex;justify-content:center;align-items:center;gap:22px;margin-top:16px}.shelf-pagination button{min-width:44px;min-height:44px;border:1px solid var(--line);border-radius:50%;color:var(--ink);background:rgb(255 247 235 / 10%);font-size:24px}.shelf-pagination button:disabled{opacity:.35}
@media(max-width:767px){.inbox-summary{padding:20px 18px}.shelf-six{aspect-ratio:2/3}.shelf-six .collection-letter,.shelf-six .collection-letter:nth-child(even),.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4),.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){left:13%;width:34%;height:20%;top:12%}.shelf-six .collection-letter:nth-child(even){left:53%}.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:39%}.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:66%}}
/* Warm home mailbox image treatment */
.inbox-summary{position:relative;overflow:hidden;background:#2d201d url('/assets/ui/moonlit-home/inbox-header.webp') center/cover no-repeat;border-color:transparent}
.inbox-summary:before{content:"";position:absolute;inset:0;background:url('/assets/ui/moonlit-home/inbox-frame.webp') center/100% 100% no-repeat;opacity:.42;pointer-events:none}
.inbox-summary>*{position:relative;z-index:1}
.collection-heading{position:relative;padding:22px 26px;background:url('/assets/ui/moonlit-home/inbox-frame.webp') center/100% 100% no-repeat}
.collection-heading h2,.collection-heading span{position:relative;z-index:1}
.shelf-six .collection-art{cursor:pointer}
.shelf-six .collection-art:focus-visible{outline:2px solid #e3b681;outline-offset:4px}
/* Fixed envelope alignment for the generated six-compartment shelf. */
.shelf-six .collection-letter,
.shelf-six .collection-letter:nth-child(even),
.shelf-six .collection-letter:nth-child(3),
.shelf-six .collection-letter:nth-child(4),
.shelf-six .collection-letter:nth-child(5),
.shelf-six .collection-letter:nth-child(6){left:14%;width:35%;height:20%;top:17%}
.shelf-six .collection-letter:nth-child(even){left:51%}
.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:42%}
.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:67%}
@media(max-width:767px){.shelf-six .collection-letter,.shelf-six .collection-letter:nth-child(even),.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4),.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){left:14%;width:35%;height:17%;top:20%}.shelf-six .collection-letter:nth-child(even){left:51%}.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:43%}.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:66%}}
.inbox-summary{background-image:url('/assets/ui/moonlit-home/inbox-header.webp'),linear-gradient(120deg,#3e2723,#1d1d21);background-size:cover,auto}
/* One continuous room corner: note above the fixed shelf. */
.shelf-six{aspect-ratio:3/2;background:#2b1d18 url('/assets/ui/moonlit-home/inbox-room-wide.webp') center/cover no-repeat}
.shelf-six .six-backdrop{display:none}
.shelf-six .collection-letter,.shelf-six .collection-letter:nth-child(even),.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4),.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){left:39%;width:10%;height:16%;top:25%}
.shelf-six .collection-letter:nth-child(even){left:52%}
.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:43%}
.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:61%}
.shelf-six .shelf-envelope{left:-8%;right:-8%;bottom:5%}
@media(max-width:767px){.shelf-six{aspect-ratio:2/3;background-image:url('/assets/ui/moonlit-home/letter-shelf-six-mobile.webp');background-size:contain;background-position:center}.shelf-six .six-backdrop{display:block}.shelf-six .collection-letter,.shelf-six .collection-letter:nth-child(even),.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4),.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){left:14%;width:35%;height:17%;top:20%}.shelf-six .collection-letter:nth-child(even){left:51%}.shelf-six .collection-letter:nth-child(3),.shelf-six .collection-letter:nth-child(4){top:43%}.shelf-six .collection-letter:nth-child(5),.shelf-six .collection-letter:nth-child(6){top:66%}.shelf-six .shelf-envelope{left:2%;right:2%;bottom:8%}}
.inbox-summary{background-color:#2b1d18}
/* Memo note is the actual text surface for the mailbox summary. */
.inbox-summary{min-height:310px;margin-bottom:28px;padding:64px 14%;background:#eadcc5 url('/assets/ui/moonlit-home/inbox-note.webp') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:0 20px 40px rgb(5 5 7 / 32%);color:#47352c}
.inbox-summary:before{display:none}.inbox-summary .inbox-intro{max-width:780px;margin:0 auto;padding:0;text-align:left}.inbox-summary .eyebrow{color:#795447}.inbox-summary h1{color:#47352c;text-shadow:none}.inbox-summary #inbox-message{max-width:560px;color:#665148}.inbox-summary .receive-link{color:#67283a;border-color:#67283a}
@media(max-width:767px){.inbox-summary{min-height:330px;padding:58px 15% 48px;background-size:auto 100%;background-position:center}.inbox-summary .inbox-intro{text-align:left}.inbox-summary h1{font-size:29px}.inbox-summary #inbox-message{line-height:1.8}}
/* Immersive mailbox room: the note and shelf share one continuous perspective. */
#inbox-view{position:relative;min-height:100vh;background:#241812 url('/assets/ui/moonlit-home/inbox-room-v9-wide.webp') center top/100% auto no-repeat}
#inbox-view>.inbox-summary{min-height:48vw;height:48vw;max-height:720px;margin:0;padding:6vw 0 0 8%;background:none;box-shadow:none;color:#47352c}
#inbox-view>.inbox-summary:before{display:none}
#inbox-view>.inbox-summary .inbox-intro{width:42%;max-width:none;margin:0;padding:4% 5%;text-align:left}
#inbox-view>.inbox-summary h1{font-size:clamp(28px,3.2vw,48px)}
#inbox-view>.inbox-summary #inbox-message{line-height:1.8}
#inbox-view>.inbox-summary .receive-link{color:#67283a}
#inbox-view>.collection{position:relative;margin-top:0;padding:0 8% 80px;background:transparent}
#inbox-view>.collection .collection-heading{display:none}
#inbox-view .shelf-six{background:transparent;box-shadow:none}
#inbox-view .shelf-six .six-backdrop{display:none}
#inbox-view .shelf-six .collection-letter{left:53%;width:10%;height:16%;top:25%}
#inbox-view .shelf-six .collection-letter:nth-child(even){left:65%}
#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:43%}
#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:61%}
#inbox-view .shelf-six .shelf-envelope{left:-14%;right:-14%;bottom:5%}
#inbox-view .shelf-pagination{margin-top:12px}
#inbox-view>#new-section,#inbox-view>#scheduled-section{position:relative;z-index:2;margin:0 8%;background:transparent}
#inbox-view .arrival{background:rgb(35 23 19 / 45%);backdrop-filter:blur(2px)}
@media(max-width:767px){#inbox-view{background-image:url('/assets/ui/moonlit-home/scene-mobile.webp');background-size:auto 100%;background-position:center top;background-attachment:scroll}#inbox-view>.inbox-summary{height:auto;min-height:340px;padding:40px 12% 36px;background:url('/assets/ui/moonlit-home/inbox-note.webp') center/100% 100% no-repeat}#inbox-view>.inbox-summary .inbox-intro{width:auto;padding:15% 11% 8%}#inbox-view>.collection{padding:0 6% 60px}#inbox-view .shelf-six{background:url('/assets/ui/moonlit-home/letter-shelf-six-mobile.webp') center/contain no-repeat}#inbox-view .shelf-six .six-backdrop{display:block}#inbox-view .shelf-six .collection-letter,#inbox-view .shelf-six .collection-letter:nth-child(even),#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4),#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){left:14%;width:35%;height:17%;top:20%}#inbox-view .shelf-six .collection-letter:nth-child(even){left:51%}#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:43%}#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:66%}#inbox-view .shelf-six .shelf-envelope{left:2%;right:2%;bottom:8%}}
/* Final scene overlay correction: note and shelf live inside the same room image. */
@media (min-width: 768px){
  #inbox-view{min-height:48vw;padding-bottom:0}
  #inbox-view>.inbox-summary{position:relative;z-index:2;height:48vw;min-height:0;max-height:none;padding:0;background:none}
  #inbox-view>.inbox-summary .inbox-intro{position:absolute;left:10%;top:7%;width:33%;padding:5% 4%;box-sizing:border-box}
  #inbox-view>.inbox-summary h1{font-size:clamp(26px,2.8vw,42px);line-height:1.25;overflow-wrap:anywhere}
  #inbox-view>.inbox-summary #inbox-message{font-size:12px}
  #inbox-view>.collection{position:absolute;z-index:3;inset:0 0 auto;height:48vw;margin:0;padding:0 8%;pointer-events:none}
  #inbox-view>.collection #history-section,.shelf-pages,.shelf-page,.shelf-six{height:100%;width:100%}
  #inbox-view .shelf-six{aspect-ratio:auto;background:none;overflow:visible}
  #inbox-view .shelf-six .collection-letter{pointer-events:auto}
  #inbox-view>#scheduled-section{display:none}
}
@media (max-width:767px){
  #inbox-view>.collection{position:relative;margin-top:0}
  #inbox-view>.collection .collection-heading{display:none}
  #inbox-view>#scheduled-section{margin-top:0}
}
/* Mailbox scene only: background, shelf envelopes, memo text. */
#inbox-view>#new-section,#inbox-view>#scheduled-section{display:none!important}
#inbox-view>.inbox-summary{pointer-events:none}
#inbox-view>.inbox-summary .inbox-intro{pointer-events:auto}
#inbox-view>.inbox-summary .eyebrow,#inbox-view>.inbox-summary .receive-link{display:none}
#inbox-view>.inbox-summary #inbox-message{display:none}
#inbox-view>.collection .collection-heading{display:none!important}
#inbox-view>.collection .shelf-pagination{display:none}
@media(min-width:768px){
 #inbox-view{min-height:100vh;background-size:cover;background-position:center top}
 #inbox-view>.inbox-summary{height:100vh}
 #inbox-view>.inbox-summary .inbox-intro{left:10.5%;top:9%;width:35%;padding:4.8% 4.5%;}
 #inbox-view>.inbox-summary h1{margin:0;color:#46332b;font-size:clamp(24px,2.4vw,38px);line-height:1.3}
 #inbox-view>.collection{height:100vh;}
 #inbox-view #history-section{height:100%;}
 #inbox-view .shelf-pages,#inbox-view .shelf-page,#inbox-view .shelf-six{height:100%;}
 #inbox-view .shelf-six{width:100%;}
 #inbox-view .shelf-six .collection-letter{left:53%;width:10.5%;height:16%;top:25%}
 #inbox-view .shelf-six .collection-letter:nth-child(even){left:65.5%}
 #inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:43%}
 #inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:61%}
 #inbox-view .shelf-six .shelf-envelope{left:-15%;right:-15%;bottom:4%}
}
@media(max-width:767px){
 #inbox-view>.inbox-summary{min-height:0;height:360px;padding:0;background:none}
 #inbox-view>.inbox-summary .inbox-intro{position:absolute;left:13%;top:50px;width:74%;padding:60px 10%;box-sizing:border-box}
 #inbox-view>.inbox-summary h1{margin:0;font-size:27px;line-height:1.35}
 #inbox-view>.collection{padding:0 6%;}
}
@media(min-width:768px){#inbox-view>.inbox-summary .inbox-intro{left:11%;top:11%;width:39%;padding:4% 3%}#inbox-view>.inbox-summary h1{font-size:clamp(24px,2.1vw,32px);white-space:nowrap}#inbox-view .shelf-six .collection-letter{left:53%;width:10.5%;height:14%;top:48%}#inbox-view .shelf-six .collection-letter:nth-child(even){left:65.5%}#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:64%}#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:80%}#inbox-view .shelf-six .shelf-envelope{left:-15%;right:-15%;bottom:3%}}
/* Portrait only immersive mailbox room. */
body[data-view="inbox"]{overflow:hidden}
body[data-view="inbox"] .app-shell{width:100%;max-width:none;min-height:100dvh;margin:0;padding:0}
body[data-view="inbox"] .topbar{display:none}
#inbox-view.is-active{position:fixed;z-index:20;inset:0 auto 0 0;width:min(100vw,520px);height:100dvh;margin:0 auto;left:0;right:0;overflow:hidden;display:block;animation:none;background:#17120f}
#inbox-view:before{position:absolute;inset:0;content:"";background:url('/assets/ui/moonlit-home/inbox-room-mobile-official.webp') center center/cover no-repeat;transform:scale(1);transform-origin:center center}
body.inbox-entering #inbox-view:before{animation:inbox-camera 1050ms cubic-bezier(.2,.72,.2,1) both}
@keyframes inbox-camera{from{transform:scale(1.13);filter:brightness(.7)}to{transform:scale(1);filter:brightness(1)}}
#inbox-view>.inbox-summary{position:absolute;z-index:2;inset:0;width:100%;height:100%;min-height:0;max-height:none;margin:0;padding:0;background:transparent;box-shadow:none;pointer-events:none}
#inbox-view>.inbox-summary:before{display:none}
#inbox-view>.inbox-summary .inbox-intro{position:absolute;left:25%;top:10.5%;width:50%;max-width:none;margin:0;padding:0;text-align:center;pointer-events:auto}
#inbox-view>.inbox-summary .eyebrow,#inbox-view>.inbox-summary #inbox-message,#inbox-view>.inbox-summary .receive-link{display:none}
#inbox-view>.inbox-summary h1{margin:0;color:#49372c;font-size:clamp(18px,5vw,22px);line-height:1.35;letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 1px rgb(255 245 226 / 22%)}
#inbox-view>#new-section,#inbox-view>#scheduled-section{display:none!important}
#inbox-view>.collection{position:absolute;z-index:3;inset:0;width:100%;height:100%;margin:0;padding:0;background:transparent;pointer-events:none}
#inbox-view>.collection .collection-heading,#inbox-view .shelf-pagination{display:none!important}
#inbox-view #history-section,#inbox-view .shelf-pages,#inbox-view .shelf-page,#inbox-view .shelf-six{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;background:none;box-shadow:none;overflow:hidden}
#inbox-view .six-backdrop{display:none}
#inbox-view .six-grid{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#inbox-view .shelf-six .collection-letter{position:absolute;left:23%;top:38%;width:27%;height:10%;min-width:0;margin:0;padding:0;pointer-events:auto}
#inbox-view .shelf-six .collection-letter:nth-child(even){left:52%}
#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:49.5%}
#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:60%}
#inbox-view .shelf-six .collection-art{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;overflow:visible;aspect-ratio:auto;background:transparent;box-shadow:none}
#inbox-view .shelf-six .shelf-envelope{left:3%;right:3%;bottom:4%;transform:rotate(0);filter:drop-shadow(0 5px 5px rgb(0 0 0 / 42%));transition:transform .32s ease,filter .32s ease}
#inbox-view .shelf-six .collection-art:active .shelf-envelope{transform:translateY(-7px) scale(1.025)}
#inbox-view .collection-stamp{right:6%;bottom:-1%;color:#eee1ce;font-size:10px;text-shadow:0 1px 4px #100b08}
#inbox-view .empty-note{display:none}
@media(max-width:519px){#inbox-view.is-active{width:100vw}}
@media(min-width:520px){#inbox-view:after{position:absolute;inset:0;content:"";pointer-events:none;background:linear-gradient(90deg,rgb(0 0 0 / 14%),transparent 12%,transparent 88%,rgb(0 0 0 / 14%))}}
@media(prefers-reduced-motion:reduce){body.inbox-entering #inbox-view:before{animation:none}}
/* Final viewport geometry and envelope placement against the room artwork. */
html:has(body[data-view="inbox"]),body[data-view="inbox"]{width:100%;height:100%;min-height:100%;margin:0;overflow:hidden;background:#17120f}
body[data-view="inbox"] .atmosphere{display:none!important}
#inbox-view.is-active{position:fixed!important;display:block!important;inset:0!important;width:min(100vw,520px)!important;height:100dvh!important;min-height:100dvh!important;max-height:none!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;transform:none!important;animation:none!important}
#inbox-view:before{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;background-position:center!important;background-size:cover!important}
#inbox-view .shelf-six .collection-letter{left:22.5%!important;top:38%!important;width:27%!important;height:9.5%!important}
#inbox-view .shelf-six .collection-letter:nth-child(even){left:52%!important}
#inbox-view .shelf-six .collection-letter:nth-child(3),#inbox-view .shelf-six .collection-letter:nth-child(4){top:48.8%!important}
#inbox-view .shelf-six .collection-letter:nth-child(5),#inbox-view .shelf-six .collection-letter:nth-child(6){top:59.5%!important}
#inbox-view .shelf-six .shelf-envelope{left:4%!important;right:4%!important;bottom:8%!important;top:auto!important;height:auto!important;aspect-ratio:1.6!important}
#inbox-view .shelf-six .shelf-envelope .envelope{width:100%!important;height:100%!important;aspect-ratio:auto!important}
#inbox-view .collection-stamp{display:none}
#inbox-view .collection-letter:hover .shelf-envelope,#inbox-view .collection-letter:focus-visible .shelf-envelope{transform:translateY(-8px)!important;filter:drop-shadow(0 13px 11px rgb(0 0 0 / 50%))!important}
@media(min-width:520px){#inbox-view.is-active{width:520px!important}}
@media(prefers-reduced-motion:reduce){#inbox-view:before{transform:none!important}}
#inbox-view.is-active .six-backdrop{display:none!important}
#inbox-view .shelf-six .collection-letter:active .shelf-envelope{transform:translateY(-8px) scale(1.025)!important;filter:drop-shadow(0 13px 11px rgb(0 0 0 / 50%))!important}
#inbox-view>.inbox-summary #inbox-message{display:block!important;margin:12px 0 0;color:#665148;font-size:clamp(12px,3.2vw,15px);line-height:1.75;text-align:center;text-shadow:none}
#inbox-view>.inbox-summary h1{white-space:normal}
@media(max-width:350px){#inbox-view>.inbox-summary .inbox-intro{left:29%;width:42%}#inbox-view>.inbox-summary h1{font-size:15px;white-space:normal;overflow:visible;text-overflow:clip}#inbox-view>.inbox-summary #inbox-message{font-size:11px}}
