/* The glass cover opens onto the original anniversary letter and albums. */
body.letter-home {
  --home-ink: #302840;
  --home-muted: #625970;
  --home-action: #57416b;
  --home-panel: rgb(255 255 255 / 65%);
  --home-border: 1px solid rgb(255 255 255 / 91%);
  --home-shadow: 0 7px 22px #4a4a7211;
  --home-width: min(1100px, calc(100% - 82px));
  --a-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --a-blue: #584374;
  --a-soft: #625970;
  color: var(--home-ink);
  font-family: var(--a-sans);
  background: #e6e8f8;
}

.letter-home .memory-surround {
  background: radial-gradient(ellipse at 88% 9%, #ccf3ed, transparent 51%),
    linear-gradient(120deg, #eee6f8, #e6e8f8 50%, #e7f2f2);
}
.letter-home .memory-surround > * { display: none; }

.letter-home .home-opening {
  width: var(--home-width);
  min-height: min(calc(100vh - 84px), 850px);
  min-height: min(calc(100svh - 84px), 850px);
  margin: 0 auto;
  padding: 18px 0 48px;
}
.letter-home .letter-intro {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  grid-template-columns: 41% 10% 49%;
  align-items: center;
  gap: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.letter-home .letter-intro > .home-letter-card {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1 / 2 / 3;
  min-width: 0;
  padding: 38px clamp(24px, 3.5vw, 52px);
  background: #faf8fd;
  border: var(--home-border);
  border-radius: 24px;
  box-shadow: 0 13px 42px #635b8a20;
}
.letter-home .letter-intro .kicker {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  color: #64527f;
  background: transparent;
  border: 0;
  font: 550 13px/1.45 var(--a-sans);
  letter-spacing: .1em;
}
.letter-home .letter-intro h1 {
  margin: 0;
  color: var(--home-ink);
  font: 530 clamp(36px, 3.8vw, 55px)/1.22 var(--a-sans);
  letter-spacing: -.045em;
}
.letter-home .intro-annotation {
  display: block;
  margin: 15px 0 24px;
  padding: 0;
  color: var(--home-muted);
  background: transparent;
  font-size: 16px;
  line-height: 1.65;
}
.letter-home .read-start {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 9px 17px;
  color: white;
  background: var(--home-action);
  border: 1px solid #665079;
  border-radius: 50px;
  box-shadow: inset 0 1px 1px #ffffff4d, 0 2px 5px #40324f1c;
  font: 600 13px/1.55 var(--a-sans);
}
.letter-home .read-start:hover { background: #49355d; }
.letter-home .intro-photo {
  grid-area: 1 / 2 / 2 / 4;
  min-width: 0;
  height: 395px;
  margin: 0;
  padding: 7px;
  overflow: hidden;
  background: #ffffff80;
  border: var(--home-border);
  border-radius: 30px;
  box-shadow: 0 15px 45px #54618024;
  transform: none;
}
.letter-home .intro-photo::before, .letter-home .intro-photo figcaption { display: none; }
.letter-home .intro-photo a, .letter-home .intro-photo picture { display: block; height: 100%; }
.letter-home .intro-photo img {
  width: 100%;
  height: 100%;
  border-radius: 23px;
  object-fit: cover;
  object-position: 56% 36%;
}

.home-explore { margin-top: 32px; }
.home-explore h2 {
  margin: 0 0 15px 2px;
  color: var(--home-ink);
  font: 550 21px/1.4 var(--a-sans);
  letter-spacing: .02em;
}
.home-explore-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 13px;
}
.home-explore-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 98px;
  padding: 17px 19px;
  color: #39314d;
  background: #ffffff85;
  border: var(--home-border);
  border-radius: 20px;
  box-shadow: var(--home-shadow);
  text-decoration: none;
}
.home-explore-link:hover, .home-explore-link:focus-visible { background: #ffffffe0; }
.home-explore-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 37px;
  height: 37px;
  background: #e8e1f3;
  color: #624d7f;
  border-radius: 50%;
}
.home-explore-link:nth-child(2) .home-explore-icon { background: #dbece9; color: #3d6464; }
.home-explore-link:nth-child(3) .home-explore-icon { background: #ede2ee; color: #755070; }
.home-explore-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}
.home-explore-link strong { display: block; font-size: 16px; font-weight: 550; line-height: 1.5; }
.home-explore-link small { display: block; margin-top: 1px; color: #635e73; font-size: 12px; line-height: 1.55; }
.home-explore-arrow { margin-left: auto; color: #706480; font: 17px/1 "Segoe UI Symbol", sans-serif; }
#home-comic-help { display: none; }
#home-comic-help:target { display: block; margin: 12px 0 0; color: var(--home-muted); font-size: 14px; }

.letter-home .home-footprint, .letter-home .latest-journey, .letter-home .photobook-preview,
.letter-home #home-gallery, .letter-home #home-quotes {
  width: var(--home-width);
  color: var(--home-ink);
  background: var(--home-panel);
  border: var(--home-border);
  border-radius: 24px;
  box-shadow: var(--home-shadow);
}
.letter-home .home-footprint { margin-top: 0; }
.letter-home .home-footprint h2, .letter-home .latest-journey h2, .letter-home .photobook-preview h2,
.letter-home .section-head h2, .letter-home .quiet-entry h3 {
  color: var(--home-ink);
  font-family: var(--a-sans);
  font-weight: 550;
}
.letter-home .home-footprint p, .letter-home .latest-journey-copy p, .letter-home .photobook-preview-description,
.letter-home .photobook-preview-note, .letter-home .photobook-preview-folio, .letter-home .photobook-preview .kicker {
  color: var(--home-muted);
}
.letter-home .home-footprint-figure path { fill: #e2e8ee; stroke: #a3b4c0; }
.letter-home .home-footprint-figure .has-footprints path { fill: #89b2ad; stroke: #567b79; }
.letter-home .home-footprint-figure a:is(:hover, :focus-visible) path { fill: #bba8cc; stroke: #665079; }
.letter-home .latest-journey-link, .letter-home .home-footprint-link, .letter-home .photobook-preview-link {
  color: white;
  background: var(--home-action);
  border: 1px solid #665079;
  border-radius: 50px;
}
.letter-home .latest-journey-link:hover, .letter-home .home-footprint-link:hover, .letter-home .photobook-preview-link:hover { background: #49355d; }
.letter-home .photobook-preview-wordmark { color: #61506c; }
.letter-home .photobook-preview::after { border-color: #fffc; border-radius: 17px; }
.letter-home .photobook-preview a:focus-visible { outline-color: var(--home-action); }
.letter-home .photobook-preview-art { filter: drop-shadow(8px 12px 13px #46325447); }
.letter-home .letter-wrap { width: min(960px, var(--home-width)); }
.letter-home .letter-topline > .kicker, .letter-home .letter-body, .letter-home .letter-body .letter-sheet:first-child p:first-of-type { color: #403a51; }
.letter-home .letter-sheet {
  background: #fdfcfe;
  border: var(--home-border);
  border-radius: 19px;
  box-shadow: var(--home-shadow);
}
.letter-home .sheet-number, .letter-home .sheet-bottom-mark { background: #fdfcfe; color: #60596d; }
.letter-home .reading-tools, .letter-home .quote-preview, .letter-home .quiet-entry, .letter-home .album-page {
  background: #fbfaff;
  border: var(--home-border);
  border-radius: 16px;
  box-shadow: var(--home-shadow);
}
.letter-home .letter-body { max-width: 100%; }
.letter-home .quote-preview blockquote { color: #494058; }
.letter-home .quiet-entry p, .letter-home .quote-preview p, .letter-home .album-intro,
.letter-home #home-gallery .gallery-note, .letter-home .section-head .kicker { color: var(--home-muted); }
.letter-home #home-gallery .gallery-actions button {
  color: var(--home-action);
  background: #fff;
  border-color: #c7bed3;
  border-radius: 30px;
}
.letter-home .home-image-dialog, .letter-home .daily-comic {
  --comic-paper: #fbfaff;
  --comic-ink: #302840;
  --comic-quiet: #625970;
  --comic-line: #dfdae6;
  --comic-blue: #57416b;
  background: #fbfaff;
  border: var(--home-border);
  border-radius: 21px;
  box-shadow: 0 24px 80px #35273f47;
}
.letter-home .home-image-dialog::backdrop, .letter-home .daily-comic::backdrop { background: rgb(38 31 53 / 57%); }
.letter-home .home-image-bar { color: var(--home-ink); }

@media (max-width: 700px) {
  body.letter-home { --home-width: calc(100% - 30px); }
  .letter-home .home-opening {
    min-height: min(calc(100svh - 84px), 810px);
    padding: 0 0 36px;
  }
  .letter-home .letter-intro { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .letter-home .intro-photo {
    grid-area: 1 / 1;
    height: clamp(245px, 69vw, 305px);
    margin: 0 0 0 13px;
    padding: 4px;
    border-radius: 24px;
  }
  .letter-home .intro-photo img { border-radius: 19px; object-position: 54% 36%; }
  .letter-home .letter-intro > .home-letter-card {
    grid-area: 2 / 1;
    margin: -39px 26px 0 0;
    padding: 12px 18px 13px;
    border-radius: 17px;
  }
  .letter-home .letter-intro .kicker { margin: 0 0 5px; font-size: 10px; }
  .letter-home .letter-intro h1 { font-size: 29px; }
  .letter-home .intro-annotation { margin: 5px 0 8px; font-size: 12px; }
  .letter-home .read-start { padding: 5px 12px; font-size: 11px; }
  .home-explore { margin-top: 21px; }
  .home-explore h2 { margin: 0 0 8px 3px; font-size: 18px; }
  .home-explore-links { grid-template-columns: 1fr; gap: 7px; }
  .home-explore-link { gap: 12px; min-height: 51px; padding: 7px 13px; border-radius: 15px; }
  .home-explore-icon { width: 30px; height: 30px; }
  .home-explore-icon svg { width: 16px; height: 16px; }
  .home-explore-link strong { font-size: 14px; }
  .home-explore-link small { font-size: 11px; }
  .letter-home .home-footprint, .letter-home .latest-journey, .letter-home .photobook-preview,
  .letter-home #home-gallery, .letter-home #home-quotes { border-radius: 19px; }
  .letter-home .home-image-dialog { border-radius: 0; }
}
@media print {
  .letter-home .home-opening { min-height: 0; }
  .letter-home .home-explore { display: none; }
}
