/*
Theme Name: ひとこと、そばに。
Description: HSの患者さんへ、アヒルさんと一日ひとつのお便りを届ける専用テーマ。スマホ幅の紙面と一色刷りの余白。
Version: 1.11.3
Requires at least: 6.6
Requires PHP: 8.1
Author: HSVCJ
License: GPL-2.0-or-later
Text Domain: hs-kotoba
*/
@import url("assets/fonts/kaisei-decol.css");
@import url("assets/fonts/cormorant-garamond.css");
:root {
  color-scheme: light;
  --bg: #f6fafb;
  --paper: #fff;
  --ink: #244a65;
  --muted: #557183;
  --line: #ccdee6;
  --blue: #c5e7f1;
  --blue-dark: #2c7a9f;
  --yellow: #f6d45b;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", YuMincho, serif;
}
* { box-sizing: border-box; }
html { font-size: 100%; background: var(--bg); }
body { margin: 0; color: var(--ink); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; line-height: 1.8; -webkit-text-size-adjust: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: .3em; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 6px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
h1, h2, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 99; background: #fff; padding: 12px 20px; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-shell { max-width: 1600px; margin: auto; padding: 0 clamp(24px, 6vw, 96px); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 0 25px; border-bottom: 1px solid var(--line); }
.site-identity { display: flex; flex-direction: column; gap: 4px; }
.site-audience { color: var(--muted); font-size: .75rem; letter-spacing: .035em; }
.brand { font-family: var(--serif); font-size: clamp(1.25rem, 1.7vw, 1.6rem); letter-spacing: .11em; text-decoration: none; white-space: nowrap; }
.site-header nav { display: flex; align-items: center; gap: clamp(20px, 2.7vw, 42px); }
.site-header nav a, .saved-open { position: relative; font-size: .875rem; text-decoration: none; background: none; border: 0; padding: 10px 0; min-height: 44px; white-space: nowrap; }
.site-header nav a::after, .saved-open::after { content: ""; position: absolute; bottom: 3px; left: 0; width: 100%; height: 2px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-header [aria-current=page]::after, .saved-open[aria-current=true]::after, .site-header nav a:hover::after, .saved-open:hover::after { transform: scaleX(1); }
main { min-height: 570px; }
.letter-stage { padding: clamp(42px, 5.3vw, 84px) 0 48px; max-width: 1360px; margin: auto; }
.arrival { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(40px, 6vw, 100px); min-height: 430px; padding: 12px 10px 10px; }
.welcome { padding: 0 0 36px; }
.welcome-eyebrow, .section-eyebrow { font-size: .8125rem; letter-spacing: .11em; color: var(--muted); margin-bottom: 24px; }
.welcome-title { font-family: var(--serif); font-size: clamp(2rem, 3.3vw, 3.25rem); font-weight: 400; line-height: 1.85; letter-spacing: .08em; }
.welcome-note { margin-top: 28px; font-size: .9375rem; line-height: 2.2; letter-spacing: .04em; color: var(--muted); }
.welcome-rule { display: block; width: 44px; height: 3px; background: var(--yellow); margin-top: 34px; }
.envelope { position: relative; width: 100%; max-width: 660px; margin: 0 auto; padding-top: 14px; }
.cover { position: relative; display: block; width: 100%; aspect-ratio: 1.43; border: 0; padding: 0; background: none; perspective: 1400px; isolation: isolate; filter: drop-shadow(0 22px 17px #244a6512); }
.envelope-back, .envelope-side, .envelope-front { position: absolute; inset: 16% 0 0; border-radius: 3px; }
.envelope-back { background: #a8d4e3; z-index: 0; }
.envelope-letter { position: absolute; inset: 20% 8% 7%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12% 14px 10px; background: #fff; border: 1px solid #e7eff2; box-shadow: 0 0 14px #244a650d; z-index: 1; transition: transform .56s .18s cubic-bezier(.25,.65,.2,1); }
.envelope-letter > span { font-family: var(--serif); font-size: 1.1rem; letter-spacing: .3em; }
.envelope-letter img { width: 30%; max-width: 124px; height: auto; }
.envelope-side { z-index: 3; }
.envelope-side--left { background: #cce9f2; clip-path: polygon(0 0, 58% 52%, 0 100%); }
.envelope-side--right { background: #bedfea; clip-path: polygon(100% 0, 42% 52%, 100% 100%); }
.envelope-front { z-index: 4; background: #c5e7f1; clip-path: polygon(0 100%, 0 94%, 50% 37%, 100% 94%, 100% 100%); }
.envelope-flap { position: absolute; top: 16%; left: 0; width: 100%; height: 45%; background: #def1f7; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transform: rotateX(0); transition: transform .48s cubic-bezier(.4,0,.2,1); z-index: 5; }
.envelope-stamp { position: absolute; top: 25%; right: 6%; width: 16%; max-width: 96px; aspect-ratio: 1; z-index: 6; padding: 5px; background: #fff; border: 1px dashed #80b7cc; transform: rotate(4deg); transition: opacity .16s ease; }
.envelope-stamp img { display: block; width: 100%; height: auto; }
.envelope-address { position: absolute; inset: 58% 5% 8%; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; transition: opacity .16s ease; }
.cover-title { font-family: var(--serif); font-size: clamp(1.15rem, 1.7vw, 1.65rem); letter-spacing: .17em; }
.open-label { display: inline-flex; align-items: center; gap: 22px; font-size: .875rem; letter-spacing: .08em; }
.open-label > span { display: grid; place-items: center; width: 34px; height: 34px; background: var(--yellow); border-radius: 50%; font-size: 1.15rem; transition: transform .2s ease; }
.cover:hover .open-label > span { transform: translate(2px, -2px); }
.envelope-seal { position: absolute; z-index: 6; width: 27px; height: 27px; left: calc(50% - 13.5px); top: calc(60% - 13.5px); border-radius: 50%; border: 1px solid #e6c654; background: #f6d45b; box-shadow: inset 0 0 0 4px #ffe698; transform: translateY(-2px); transition: opacity .16s ease; }
.envelope-caption { display: flex; justify-content: center; gap: 20px; margin-top: 23px; font-size: .75rem; letter-spacing: .09em; color: var(--muted); }
.envelope-caption > span { padding-left: 20px; border-left: 1px solid var(--line); }
.is-arriving .envelope { animation: arrive .68s cubic-bezier(.22,.65,.3,1) both; }
.is-opening .envelope-flap { transform: rotateX(175deg); z-index: 0; }
.is-opening .envelope-letter { transform: translateY(-50%); }
.is-opening .envelope-address, .is-opening .envelope-seal, .is-opening .envelope-stamp { opacity: 0; }
.is-opening .welcome { opacity: .5; transition: opacity .45s ease; }
@keyframes arrive { from { opacity: 0; transform: translateY(20px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
.paper { position: relative; padding: clamp(30px, 4.3vw, 64px) clamp(28px, 5vw, 78px) 34px; background: var(--paper); border: 1px solid #e1ebef; box-shadow: 0 14px 44px #244a6505; scroll-margin: 24px; }
.paper::before { content: ""; position: absolute; top: -1px; left: 0; height: 3px; width: 60px; background: var(--yellow); }
.paper:focus { outline: none; }
.paper-date { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .8125rem; letter-spacing: .07em; color: var(--muted); }
.paper-date > span { font-size: .75rem; }
.letter-story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); align-items: center; gap: clamp(30px, 4vw, 60px); padding: clamp(35px, 4vw, 60px) 0 28px; }
.letter-quote { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.25vw, 3.1rem); line-height: 1.9; letter-spacing: .07em; overflow-wrap: anywhere; line-break: strict; }
.letter-note { font-size: 1rem; line-height: 2.15; color: var(--muted); margin-top: 30px; overflow-wrap: anywhere; }
.letter-art { width: 100%; max-width: 440px; justify-self: center; object-fit: contain; }
.letter-sign { font-family: var(--serif); text-align: right; font-size: .875rem; letter-spacing: .12em; }
.letter-sign > span { text-decoration: underline; text-decoration-color: #d1e8f1; text-decoration-thickness: 3px; text-underline-offset: 8px; }
.paper.enter { animation: read-letter .3s ease both; }
@keyframes read-letter { from { opacity: .35; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.letter-actions { display: flex; justify-content: center; align-items: center; gap: 24px; flex-wrap: wrap; min-height: 76px; margin-top: 22px; }
.is-closed .letter-actions, .is-opening .letter-actions { justify-content: flex-end; padding-right: 21%; margin-top: 12px; }
.text-button { border: 0; background: none; padding: 12px 8px; min-height: 44px; font-size: .875rem; text-decoration: underline; text-underline-offset: 6px; }
.text-button:hover { color: var(--blue-dark); }
.save-button { border: 1px solid var(--yellow); background: var(--yellow); padding: 14px 28px; min-height: 48px; font-size: .9375rem; letter-spacing: .04em; transition: background .18s ease; }
.save-button:hover { background: #ffe38a; }
.save-button[aria-pressed=true] { background: #e3f0f5; border-color: var(--line); }
.save-button:disabled { opacity: .65; }
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 36px; font-size: .8125rem; color: var(--muted); }
.site-footer > p { letter-spacing: .035em; }
.related-sites { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; margin: 30px 0 24px; }
.site-banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, 30%); align-items: center; gap: 18px; min-height: 228px; padding: 30px 34px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: #fff; transition: border-color .2s ease; }
.site-banner--association { background: #e8f4f8; }
.site-banner--life { border-top: 3px solid var(--yellow); padding-top: 28px; }
.banner-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.banner-caption { font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.banner-title { display: block; font-family: var(--serif); font-size: clamp(1.25rem, 1.75vw, 1.7rem); line-height: 1.6; letter-spacing: .04em; margin-top: 9px; }
.banner-title > span { display: block; }
.banner-title--life { font-size: clamp(1.5rem, 2.25vw, 2.1rem); }
.banner-description { font-size: .8125rem; line-height: 1.8; margin-top: 10px; color: var(--muted); }
.banner-action { display: inline-flex; align-items: center; gap: 28px; font-size: .75rem; margin-top: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.banner-action > span { font-size: 1rem; }
.banner-art { display: block; width: 100%; height: auto; object-fit: contain; align-self: center; mix-blend-mode: multiply; }
.site-banner:hover { border-color: var(--blue-dark); }
.site-footer details { margin-top: 12px; font-size: .75rem; }
.site-footer summary { width: fit-content; cursor: pointer; padding: 10px 0; min-height: 44px; }
.site-footer details div { max-width: 720px; padding: 12px 0; line-height: 2; }
.site-footer details p + p { margin-top: 12px; }
.saved-shelf, .archive { padding: 66px 0 76px; min-height: 570px; max-width: 1200px; margin: auto; }
.saved-shelf h1, .archive h1, .text-page h1, .empty-state h1 { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 400; letter-spacing: .09em; line-height: 1.7; }
.section-eyebrow { margin-bottom: 15px; }
.archive-lead, .shelf-note { font-size: .875rem; color: var(--muted); margin: 18px 0 35px; }
.shelf-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shelf-status { margin: 24px 0; }
.archive-list { margin-top: 44px; border-top: 1px solid var(--line); }
.archive-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) 28px; gap: 32px; align-items: center; text-decoration: none; padding: 30px 8px; border-bottom: 1px solid var(--line); }
.archive-item time { font-size: .8125rem; color: var(--muted); letter-spacing: .06em; }
.archive-item > span:nth-child(2) { font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.6rem); line-height: 1.8; overflow-wrap: anywhere; }
.archive-item > span:last-child { transition: transform .18s ease; }
.archive-item:hover > span:last-child { transform: translate(3px, -3px); }
.saved-item { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.saved-item .archive-item { border-bottom: 0; padding-bottom: 6px; }
.saved-item .remove { margin-left: 152px; font-size: .75rem; color: var(--muted); }
.saved-item > p { padding: 24px 8px 8px; }
.pagination { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.pagination > * { padding: 8px 12px; min-width: 44px; text-align: center; }
.pagination .current { background: var(--yellow); }
.back-link { text-align: center; padding: 0 0 46px; font-size: .875rem; }
.empty-state { padding: 100px 0; text-align: center; }
.empty-state img { display: block; margin: 0 auto 24px; }
.empty-state p, .empty-state a { display: block; margin-top: 18px; }
.text-page { padding: 65px 0; max-width: 760px; margin: auto; }
.text-page h1 { margin-bottom: 28px; }
.text-page p { margin: 18px 0; }
.preview-note { font-size: .6875rem; color: var(--muted); margin: 16px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
@media (min-width: 1600px) { .arrival { min-height: 490px; } }
@media (max-width: 1000px) {
  .site-shell { padding-inline: 36px; }
  .site-header nav { gap: 22px; }
  .arrival { gap: 34px; min-height: 370px; }
  .welcome-title { font-size: 2rem; }
  .welcome-note { font-size: .875rem; }
  .letter-story { grid-template-columns: minmax(0, 1fr) minmax(220px, .8fr); gap: 25px; }
  .letter-quote { font-size: 2rem; }
  .letter-note { font-size: .9375rem; }
  .related-sites { gap: 20px; }
  .site-banner { padding: 25px; grid-template-columns: minmax(0, 1fr) 100px; gap: 12px; }
  .banner-title { font-size: 1.2rem; }
  .banner-title--life { font-size: 1.6rem; }
}
@media (max-width: 760px) {
  .site-shell { padding-inline: 24px; }
  .site-header { align-items: flex-start; flex-direction: column; gap: 16px; padding: 23px 0 17px; }
  .site-audience { font-size: .6875rem; }
  .brand { font-size: 1.4rem; }
  .site-header nav { width: 100%; justify-content: flex-start; gap: 29px; }
  .site-header nav a, .saved-open { font-size: .8125rem; }
  main { min-height: 500px; }
  .letter-stage { padding: 38px 0 29px; }
  .arrival { grid-template-columns: 1fr; gap: 16px; min-height: 0; padding: 0; }
  .welcome { padding: 0; }
  .welcome-eyebrow { margin-bottom: 16px; font-size: .75rem; }
  .welcome-title { font-size: clamp(1.8rem, 6.8vw, 2.25rem); line-height: 1.8; }
  .welcome-note { margin-top: 19px; font-size: .8125rem; line-height: 2; }
  .welcome-rule { margin-top: 22px; width: 34px; }
  .envelope { max-width: 450px; padding-top: 0; }
  .cover-title { font-size: clamp(1.125rem, 4.7vw, 1.5rem); }
  .envelope-address { gap: 10px; }
  .envelope-letter { padding-top: 11%; }
  .envelope-letter > span { font-size: .9375rem; }
  .open-label { gap: 18px; font-size: .8125rem; }
  .open-label > span { width: 29px; height: 29px; font-size: 1rem; }
  .envelope-seal { width: 23px; height: 23px; left: calc(50% - 11.5px); top: calc(60% - 11.5px); }
  .envelope-caption { font-size: .6875rem; margin-top: 18px; gap: 16px; }
  .envelope-caption > span { padding-left: 16px; }
  .is-closed .letter-actions, .is-opening .letter-actions { justify-content: center; padding-right: 0; margin-top: 8px; min-height: 58px; }
  .paper { padding: 25px 24px 28px; }
  .paper-date { font-size: .75rem; gap: 10px; }
  .paper-date > span { font-size: .6875rem; }
  .letter-story { grid-template-columns: 1fr; gap: 17px; padding: 32px 0 22px; }
  .letter-copy { width: 100%; max-width: 440px; margin: auto; }
  .letter-quote { font-size: clamp(1.6rem, 6.1vw, 2rem); line-height: 1.9; letter-spacing: .055em; }
  .letter-note { font-size: .9375rem; line-height: 2.05; margin-top: 23px; }
  .letter-art { width: 260px; max-width: 100%; }
  .letter-sign { font-size: .75rem; }
  .letter-actions { gap: 12px; margin-top: 18px; }
  .text-button { font-size: .8125rem; }
  .save-button { padding: 12px 24px; font-size: .875rem; }
  .site-footer { padding: 26px 0 28px; }
  .site-footer > p { font-size: .75rem; }
  .related-sites { grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
  .site-banner { grid-template-columns: minmax(0, 1fr) 100px; padding: 24px 22px; min-height: 218px; }
  .site-banner--life { padding-top: 22px; }
  .banner-title { font-size: 1.25rem; }
  .banner-title--life { font-size: 1.75rem; }
  .banner-description { font-size: .75rem; }
  .banner-caption { font-size: .6875rem; }
  .banner-action { margin-top: 15px; }
  .saved-shelf, .archive { padding: 40px 0 50px; min-height: 500px; }
  .section-eyebrow { font-size: .75rem; }
  .saved-shelf h1, .archive h1 { font-size: 1.8rem; }
  .archive-lead, .shelf-note { font-size: .8125rem; }
  .archive-list { margin-top: 28px; }
  .archive-item { grid-template-columns: 1fr 20px; gap: 9px; padding: 24px 0; }
  .archive-item time { grid-column: 1/-1; font-size: .75rem; }
  .archive-item > span:nth-child(2) { font-size: 1.2rem; }
  .saved-item .remove { margin-left: 0; }
}
@media (max-width: 380px) {
  .site-shell { padding-inline: 18px; }
  .site-header nav { gap: 23px; }
  .brand { font-size: 1.3rem; }
  .welcome-title { font-size: 1.8rem; }
  .paper { padding-inline: 20px; }
  .paper-date { flex-direction: column; gap: 3px; }
  .cover-title { font-size: 1.05rem; }
  .envelope-address { gap: 7px; }
  .open-label > span { width: 27px; height: 27px; }
  .site-banner { grid-template-columns: minmax(0, 1fr) 82px; padding-inline: 18px; }
  .banner-title { font-size: 1.125rem; }
  .banner-title--life { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body, html { background: #fff; }
  .site-header, .site-footer, .arrival, .letter-actions, .saved-shelf, .back-link { display: none !important; }
  .paper[hidden] { display: block !important; }
  .site-shell { padding: 0; }
  .paper { box-shadow: none; border: 0; }
  .letter-stage { padding: 0; }
}

/* Paper edition: one phone-width letter, with quiet printed margins. */
:root {
  --bg: #e5ece8;
  --paper: #f7f4ea;
  --ink: #2f5265;
  --muted: #546b70;
  --line: #c7cec4;
  --blue: #c3d9de;
  --blue-dark: #2e647d;
  --yellow: #dfc367;
  --column: 460px;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Cpath fill='%238b826e' filter='url(%23n)' opacity='.2' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
}
html { background: var(--bg); }
body { background: var(--grain); }
.print-filters { position: absolute; pointer-events: none; }
.site-shell { position: relative; isolation: isolate; width: min(100%, var(--column)); max-width: var(--column); min-height: 100svh; margin-inline: auto; padding: 0 30px; background: var(--paper); border-inline: 1px solid #b6c3bf80; box-shadow: 0 0 35px #3d5d5b0a; }
.site-shell::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; background: var(--grain); opacity: .55; mix-blend-mode: multiply; }
.site-header { flex-direction: column; align-items: flex-start; gap: 17px; padding: 28px 0 20px; border-bottom: 1px dashed var(--line); }
.site-identity { gap: 5px; }
.site-audience { font-size: .65rem; letter-spacing: .03em; }
.brand { font-size: 1.32rem; letter-spacing: .12em; }
.site-header nav { width: 100%; gap: 28px; justify-content: flex-start; }
.site-header nav a, .saved-open { font-size: .78rem; }
.art-motion-toggle { border: 0; background: none; font-size: .6875rem; color: var(--muted); padding: 12px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.art-motion-toggle::before { content: "Ⅱ"; margin-right: 8px; font-size: .65rem; }
.art-motion-toggle[aria-pressed=true]::before { content: "▷"; }
main { min-height: 0; }
.letter-stage { padding: 46px 0 34px; }
.arrival { display: flex; flex-direction: column; align-items: stretch; gap: 26px; padding: 0; min-height: 0; }
.welcome { padding: 0; text-align: center; }
.welcome-eyebrow { font-size: .7rem; letter-spacing: .15em; margin-bottom: 23px; }
.welcome-title { font-size: 1.95rem; line-height: 1.95; letter-spacing: .1em; }
.welcome-note { margin-top: 23px; font-size: .78rem; line-height: 2.1; letter-spacing: .06em; }
.welcome-rule { width: 27px; height: 2px; margin: 27px auto 0; }
.envelope { padding: 0; max-width: 100%; transform: rotate(-2deg); }
.cover { filter: drop-shadow(0 7px 6px #244a6513); }
.envelope-back { background: #a9c7ce; }
.envelope-side--left { background: #c3d9de; }
.envelope-side--right { background: #b6cfd5; }
.envelope-front { background: #c4dade; }
.envelope-flap { background: #d5e3e4; }
.envelope-back, .envelope-side, .envelope-front, .envelope-flap, .envelope-letter, .envelope-stamp { background-image: var(--grain); }
.envelope-back, .envelope-side, .envelope-front { border-radius: 0; }
.envelope-letter { background-color: var(--paper); padding-top: 11%; }
.envelope-letter > span { font-size: .9375rem; }
.envelope-stamp { background-color: var(--paper); border-color: #8eabaa; transform: rotate(5deg); }
.envelope-stamp img { filter: url(#blue-print); mix-blend-mode: multiply; }
.cover-title { font-size: 1.18rem; letter-spacing: .15em; }
.envelope-address { gap: 9px; }
.open-label { font-size: .75rem; gap: 15px; }
.open-label > span { width: 28px; height: 28px; font-size: 1rem; background: var(--yellow); }
.envelope-seal { width: 22px; height: 22px; left: calc(50% - 11px); top: calc(60% - 11px); background: var(--yellow); border-color: #c4ab59; box-shadow: inset 0 0 0 3px #e9d58c; }
.envelope-caption { font-size: .65rem; margin-top: 21px; gap: 14px; transform: rotate(2deg); }
.envelope-caption > span { padding-left: 14px; }
.letter-actions, .is-closed .letter-actions, .is-opening .letter-actions { justify-content: center; gap: 10px; padding: 0; min-height: 54px; margin-top: 17px; }
.text-button { font-size: .75rem; }
.paper { background: var(--paper); border: 0; padding: 12px 0 20px; box-shadow: none; }
.paper::before { top: -10px; width: 28px; height: 2px; }
.paper-date { font-size: .72rem; flex-direction: column; gap: 3px; }
.paper-date > span { font-size: .65rem; }
.letter-story { display: flex; flex-direction: column; gap: 18px; padding: 34px 0 25px; }
.letter-copy { width: 100%; margin: 0; }
.letter-quote { font-size: 1.85rem; line-height: 1.9; letter-spacing: .065em; }
.letter-note { font-size: .9rem; line-height: 2.15; margin-top: 24px; }
.letter-art { width: 270px; max-width: 100%; margin: auto; mix-blend-mode: multiply; }
.letter-sign { font-size: .75rem; }
.letter-sign > span { text-decoration-color: #d9cf9e; text-decoration-thickness: 2px; }
.save-button { font-size: .8125rem; padding: 12px 20px; background: #e4cc7e; border: 1px solid #b6a262; border-radius: 2px 0 3px 0; box-shadow: 2px 2px 0 #aa945029; }
.save-button:hover { background: #ecd990; }
.site-footer { border-top: 1px dashed var(--line); padding: 28px 0; }
.site-footer > p { font-size: .7rem; line-height: 2; letter-spacing: .015em; }
.related-sites { grid-template-columns: 1fr; gap: 14px; margin: 26px 0; }
.site-banner { position: relative; grid-template-columns: minmax(0,1fr) 78px; gap: 10px; min-height: 170px; padding: 21px 19px; background-color: #e8ece2; background-image: var(--grain); border: 1px solid #99aea8; outline: 1px solid #99aea866; outline-offset: -5px; }
.site-banner--life { min-height: 154px; border: 1px solid #b8aa7a; outline-color: #b8aa7a66; background-color: #f1e8cb; }
.banner-caption { font-size: .62rem; letter-spacing: .04em; }
.banner-title { font-size: 1.08rem; letter-spacing: .025em; margin-top: 9px; line-height: 1.6; }
.banner-title--life { font-size: 1.45rem; }
.banner-description { font-size: .67rem; margin-top: 8px; line-height: 1.8; }
.banner-action { font-size: .65rem; gap: 20px; margin-top: 11px; }
.banner-art { filter: url(#blue-print); opacity: .85; }
.site-footer summary { font-size: .68rem; }
.site-footer details p { font-size: .75rem; }
.saved-shelf, .archive { padding: 48px 0; min-height: 70svh; }
.saved-shelf h1, .archive h1, .text-page h1 { font-size: 1.7rem; letter-spacing: .05em; }
.section-eyebrow { font-size: .7rem; }
.archive-lead, .shelf-note { font-size: .8125rem; }
.archive-list { margin-top: 30px; }
.archive-item { grid-template-columns: 1fr 20px; gap: 9px; padding: 25px 0; }
.archive-item time { grid-column: 1/-1; font-size: .7rem; }
.archive-item > span:nth-child(2) { font-size: 1.15rem; }
.saved-item .remove { margin-left: 0; }
.empty-state { padding: 65px 0; }
.empty-state h1 { font-size: 1.4rem; }
.back-link { font-size: .8rem; }
.preview-note { font-size: .625rem !important; }
.printed-surround { display: none; }
@media (min-width: 1000px) {
  .site-shell { padding-inline: 32px; }
  .site-header { position: fixed; z-index: 7; left: calc((100vw - var(--column)) / 4); top: 50%; transform: translate(-50%, -50%); width: min(245px, calc((100vw - var(--column)) / 2 - 48px)); max-height: calc(100svh - 40px); overflow-y: auto; align-items: flex-start; gap: 28px; padding: 22px 6px; border: 0; }
  .site-header::before { content: ""; width: 34px; height: 2px; background: var(--yellow); }
  .site-header nav { flex-direction: column; align-items: stretch; gap: 0; counter-reset: menu; }
  .site-header nav a, .saved-open { counter-increment: menu; display: block; width: 100%; padding: 17px 0; text-align: left; font-size: .82rem; border-bottom: 1px solid #9eafaa70; }
  .site-header nav a::before, .saved-open::before { content: "0" counter(menu); margin-right: 22px; font-family: var(--serif); font-size: .7rem; color: #5b7379; }
  .site-header nav a::after, .saved-open::after { bottom: -1px; height: 2px; }
  .site-header .brand { font-size: 1.4rem; }
  .site-header .site-audience { font-size: .63rem; }
  .site-header .art-motion-toggle { margin-top: -13px; }
  .letter-stage { padding-top: 76px; }
  .arrival { gap: 29px; }
  .welcome-eyebrow { margin-bottom: 28px; }
  .welcome-title { font-size: 2rem; }
  .related-sites { position: fixed; z-index: 7; right: calc((100vw - var(--column)) / 4); top: 50%; transform: translate(50%, -50%); width: min(258px, calc((100vw - var(--column)) / 2 - 44px)); max-height: calc(100svh - 40px); overflow-y: auto; margin: 0; gap: 16px; padding: 7px; }
  .related-sites::before { content: "HSと暮らす、あなたへ"; font-size: .7rem; letter-spacing: .12em; margin-bottom: 3px; }
  .site-banner { grid-template-columns: minmax(0,1fr) 62px; padding: 20px 16px; min-height: 188px; gap: 6px; }
  .site-banner--life { min-height: 169px; }
  .banner-title { font-size: 1rem; }
  .banner-title--life { font-size: 1.3rem; }
  .banner-description { font-size: .625rem; }
  .banner-caption { font-size: .6rem; }
  .printed-surround { display: block; position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
  .print-gallery { position: absolute; top: 0; bottom: 0; width: calc((100vw - var(--column)) / 2); overflow: hidden; isolation: isolate; }
  .print-gallery--left { left: 0; background: var(--bg); }
  .print-gallery--right { right: 0; background: #e8e9dc; }
  .print-gallery::after { content: ""; position: absolute; inset: 0; background: var(--grain); opacity: .9; mix-blend-mode: multiply; }
  .print-slide { position: absolute; inset: 0; opacity: 0; mix-blend-mode: multiply; transition: opacity 1.8s ease; }
  .print-slide.is-current { opacity: 1; }
  .print-slide img { position: absolute; width: min(300px, 88%); max-width: none; height: auto; filter: url(#blue-print); opacity: .48; }
  .print-gallery--left img { left: 1%; bottom: -4%; transform: rotate(-12deg); }
  .print-gallery--right img { right: 1%; top: -4%; transform: rotate(10deg); }
  .print-gallery--left::before { content: "ひとこと、そばに。"; position: absolute; left: 28px; top: 30px; writing-mode: vertical-rl; font-family: var(--serif); letter-spacing: .35em; font-size: .72rem; opacity: .6; }
  .print-gallery--right::before { content: "読むだけでも、間が空いても。"; position: absolute; right: 28px; bottom: 28px; writing-mode: vertical-rl; font-family: var(--serif); letter-spacing: .25em; font-size: .7rem; opacity: .6; }
  .site-footer { margin-top: 8px; }
}
@media (max-width: 380px) {
  .site-shell { padding-inline: 22px; }
  .brand { font-size: 1.25rem; }
  .site-header nav { gap: 23px; }
  .site-header nav a, .saved-open { font-size: .72rem; }
  .welcome-title { font-size: 1.65rem; }
  .letter-quote { font-size: 1.65rem; }
  .welcome-eyebrow { font-size: .65rem; }
  .paper { padding-inline: 0; }
  .cover-title { font-size: 1.02rem; }
  .site-banner { grid-template-columns: minmax(0,1fr) 66px; padding-inline: 16px; }
  .banner-title { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .print-slide { transition: none; } }
@media print {
  .printed-surround, .print-filters { display: none !important; }
  .site-shell { width: 100%; max-width: 100%; border: 0; box-shadow: none; padding: 0; }
  .site-shell::after { display: none; }
  .letter-stage { padding-top: 0; }
}

@media (min-width: 1000px) and (max-height: 760px) { .print-slide img { opacity: .2; } }


/* Air-mail edition: luminous paper, quiet ink, generous letterforms. */
:root {
  --bg: #f4f5f1;
  --paper: #fcfbf6;
  --ink: #304b60;
  --muted: #65717a;
  --line: #cbd0cb;
  --blue-dark: #355a72;
  --yellow: #ded4ab;
  --display: "Kaisei Decol", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --latin: "Cormorant Garamond", Georgia, serif;
  --fiber: url("assets/paper-fiber-20261017.png");
  --stationery: linear-gradient(#ffffffbf,#ffffffbf),var(--fiber);
}
body { background: var(--bg); }
.site-shell { background-color: var(--paper); background-image: var(--stationery); background-size: auto,630px; border-inline: 1px solid #c4cbc5; box-shadow: 7px 0 16px #42576105,-7px 0 16px #42576105; }
.site-shell::after { background: none; }
.brand,.welcome-title,.letter-quote,.cover-title,.saved-shelf h1,.archive h1,.text-page h1,.empty-state h1 { font-family: var(--display); }
.brand { font-size: 1.4rem; font-weight: 700; letter-spacing: .035em; line-height: 1.8; }
.site-header { border-bottom: 1px solid var(--line); }
.site-audience { font-size: .62rem; }
.welcome-eyebrow { display: block; font-size: .625rem; letter-spacing: .18em; margin-bottom: 18px; }
.welcome-title { font-size: 1.85rem; font-weight: 500; line-height: 1.9; letter-spacing: .035em; }
.airmail-script { font-family: var(--latin); font-style: italic; font-size: 3.05rem; font-weight: 400; line-height: 1.15; color: #647b87; margin: 0 0 20px; letter-spacing: -.025em; }
.welcome-note { font-size: .78rem; line-height: 2.15; margin-top: 22px; letter-spacing: .035em; }
.welcome-rule { width: 30px; height: 1px; background: #9b6e69; margin: 25px auto 0; }
.letter-stage { padding-top: 42px; }
.arrival { gap: 14px; }
.envelope { transform: rotate(-3deg); }
.cover { filter: drop-shadow(1px 6px 6px #304b6016); }
.envelope-back { background-color: #e1dfd4; background-image: repeating-linear-gradient(135deg,#8b5551 0 12px,#fffaf1 12px 23px,#526f84 23px 35px,#fffaf1 35px 46px); }
.envelope-back,.envelope-side,.envelope-front { border-radius: 0; }
.envelope-side--left { background-color: #f1efe6; background-image: var(--stationery); }
.envelope-side--right { background-color: #eae8dd; background-image: var(--stationery); }
.envelope-front { background-color: #f7f5ee; background-image: var(--stationery); inset: 18% 5px 5px; }
.envelope-side { inset: 17% 5px 5px; }
.envelope-flap { left: 5px; width: calc(100% - 10px); top: calc(16% + 5px); background-color: #faf8f0; background-image: var(--stationery); filter: drop-shadow(0 1px 0 #b5b5a3); }
.envelope-letter { background-color: var(--paper); background-image: var(--stationery); }
.envelope-letter > span { font-family: var(--display); }
.envelope-stamp { width: 18%; top: 27%; right: 6%; padding: 6px; background-color: #f1f2e9; background-image: var(--stationery); border: 1px dotted #6c8490; transform: rotate(4deg); }
.envelope-stamp img { filter: url(#blue-print); }
.envelope-address { color: var(--ink); inset: 56% 5% 8%; }
.cover-title { font-size: 1.2rem; letter-spacing: .1em; }
.open-label { font-size: .71rem; letter-spacing: .1em; }
.open-label > span { background: transparent; border: 1px solid #8b9aa0; width: 26px; height: 26px; }
.envelope-seal { background: #a26a60; border-color: #91564e; box-shadow: inset 0 0 0 3px #b67e73; width: 20px; height: 20px; left: calc(50% - 10px); top: calc(59% - 10px); opacity: .85; }
.envelope-caption { font-size: .625rem; letter-spacing: .08em; }
.airmail-mark { position: absolute; z-index: 6; top: 31%; left: 6%; color: #526d81; border: 1px solid currentColor; padding: 3px 6px 2px; font-family: Georgia,serif; font-size: .5rem; letter-spacing: .09em; transform: rotate(-2deg); }
.airmail-postmark { position: absolute; z-index: 7; top: 25%; right: 18%; border: 1px solid #536b7880; border-radius: 50%; width: 55px; height: 55px; display: grid; place-content: center; font-family: Georgia,serif; font-size: .44rem; line-height: 1.6; letter-spacing: .08em; color: #536b78aa; transform: rotate(-17deg); }
.airmail-postmark::after { content: ""; position: absolute; top: 17px; left: 42px; width: 42px; height: 16px; background: repeating-linear-gradient(0deg,transparent 0 4px,#536b7860 4px 5px); }
.is-opening .airmail-mark,.is-opening .airmail-postmark { opacity: 0; transition: opacity .12s; }
.paper { background-color: var(--paper); background-image: var(--stationery); background-size: auto,630px; }
.paper::before { width: 35px; height: 1px; background: #9b6e69; }
.letter-quote { font-size: 1.85rem; font-weight: 500; letter-spacing: .02em; line-height: 1.9; }
.letter-note { font-size: .9rem; color: #526572; }
.letter-sign { font-family: var(--display); font-size: .75rem; letter-spacing: .05em; }
.letter-sign > span { text-decoration-thickness: 1px; text-decoration-color: #9b6e69; }
.save-button { background: #ecede4; border: 1px solid #9caeaa; box-shadow: none; font-size: .8125rem; }
.save-button:hover { background: #e2e7df; }
.site-footer { border-top: 1px solid var(--line); }
.saved-shelf h1,.archive h1,.text-page h1 { font-size: 1.7rem; font-weight: 500; letter-spacing: .02em; }
.archive-item > span:nth-child(2) { font-family: var(--display); font-size: 1.15rem; line-height: 1.9; }
@media (min-width: 1000px) {
  .site-header { color: var(--ink); border: 0; width: min(255px,calc((100vw - var(--column))/2 - 40px)); padding: 20px 8px; gap: 26px; }
  .site-header::before { width: 31px; height: 1px; background: #9b6e69; }
  .site-header .brand { font-size: 1.4rem; letter-spacing: .025em; }
  .site-header .site-audience,.site-header .art-motion-toggle { color: #66747a; }
  .site-header nav a,.saved-open { font-size: .82rem; border-bottom: 1px solid #9eafa670; }
  .site-header nav a::before,.saved-open::before { color: #8a6961; font-family: Georgia,serif; font-size: .65rem; }
  .site-header nav a::after,.saved-open::after { height: 1px; background: #9b6e69; }
  .site-header .art-motion-toggle { font-size: .65rem; }
  .letter-stage { padding-top: 48px; }
  .welcome-title { font-size: 1.9rem; }
  .related-sites { width: min(270px,calc((100vw - var(--column))/2 - 40px)); gap: 20px; padding: 8px; }
  .related-sites::before { font-size: .68rem; font-weight: 400; letter-spacing: .1em; }
  .print-gallery--left { background-color: #f0f3f0; }
  .print-gallery--right { background-color: #f6f4ed; }
  .print-gallery { background-image: linear-gradient(#ffffffb3,#ffffffb3),var(--fiber); background-size: auto,630px; background-blend-mode: normal,multiply; }
  .print-gallery::after { background: var(--grain); opacity: .25; mix-blend-mode: multiply; }
  .print-slide { mix-blend-mode: multiply; }
  .print-slide img { width: clamp(420px,38vw,610px); opacity: .52; filter: url(#riso-blue); }
  .print-gallery--left img { left: -24%; bottom: -22%; transform: rotate(-13deg); }
  .print-gallery--right img { right: -24%; top: -22%; transform: rotate(12deg); }
  .print-gallery--left::before,.print-gallery--right::before { color: #647a85; opacity: .6; font-family: var(--display); font-size: .7rem; letter-spacing: .2em; }
}
@media (min-width: 1000px) and (max-width: 1150px) {
  .site-header .brand { font-size: 1.24rem; }
  .site-header .site-audience { font-size: .57rem; }
  .print-slide img { width: 450px; }
  .print-gallery--left img { left: -60%; }
  .print-gallery--right img { right: -60%; }
}
@media (max-width: 380px) {
  .brand { font-size: 1.27rem; }
  .welcome-title { font-size: 1.6rem; }
  .airmail-script { font-size: 2.8rem; }
  .cover-title { font-size: 1.02rem; }
  .letter-quote { font-size: 1.58rem; }
  .airmail-postmark { width: 43px; height: 43px; font-size: .38rem; }
  .airmail-postmark::after { left: 34px; top: 13px; width: 30px; }
  .airmail-mark { font-size: .42rem; }
}
@media (min-width: 1000px) and (max-height: 760px) {
  .print-slide img { opacity: .3; }
  .print-gallery--left img { bottom: -42%; }
  .print-gallery--right img { top: -42%; }
}
@media print { .site-shell,.paper { background: white; } }
/* Related banners retain each destination's visual identity. */
.site-banner { display: flex; flex-direction: column; gap: 0; align-items: stretch; min-height: 0; padding: 0; overflow: hidden; background: #fffefa; border: 1px solid #cbd3d8; border-radius: 24px; outline: 0; box-shadow: 0 3px 9px #213e5306; color: #1f3a5f; }
.site-banner--life { background: #fffefa; border-top: 1px solid #cbd3d8; border-color: #cbdce2; color: #183e51; }
.banner-copy { padding: 18px 20px 16px; }
.banner-caption { font-size: .6rem; letter-spacing: .01em; color: #60727e; }
.banner-wordmark { font-family: "Hiragino Sans","Yu Gothic",sans-serif; font-size: 1.22rem; font-weight: 700; line-height: 1.3; letter-spacing: -.03em; margin: 10px 0 0; }
.banner-logo { display: block; width: 173px; max-width: 100%; height: auto; margin: 14px 0 3px; }
.banner-description { font-family: "Hiragino Sans","Yu Gothic",sans-serif; color: #60727e; font-size: .67rem; line-height: 1.7; margin-top: 10px; }
.banner-action { font-family: "Hiragino Sans","Yu Gothic",sans-serif; font-size: .63rem; font-weight: 500; margin-top: 12px; padding-bottom: 0; border: 0; width: 100%; justify-content: space-between; color: #315270; }
.site-banner--life .banner-action { color: #087ba6; }
.banner-photo { display: block; width: 100%; height: 65px; object-fit: cover; object-position: center 48%; filter: none; mix-blend-mode: normal; }
.site-banner--life .banner-photo { object-position: center 42%; height: 75px; }
.site-banner:hover { border-color: #718998; transform: translateY(-2px); }
@media (min-width:1000px) { .related-sites { gap: 18px; } .banner-copy { padding: 16px 18px 14px; } .banner-wordmark { font-size: 1.17rem; } .banner-logo { width: 167px; } }
@media (min-width:1000px) and (max-width:1150px) { .banner-wordmark { font-size: 1.04rem; } .banner-caption { font-size: .55rem; } }

/* Vertical letter edition: a larger letter, distinct ink fields, clear navigation. */
:root { --column: clamp(460px,39vw,560px); --ink: #244e70; --blue-dark: #286b94; --accent: #ba594b; }
.site-shell { padding-inline: 18px; background-color: #f8f7f1; border-color: #cad1c9; box-shadow: 0 0 24px #213d4b20; }
.brand { color: #245779; }
.site-header nav a::after,.saved-open::after { background: var(--accent); }
.letter-stage { padding-top: 24px; padding-bottom: 30px; }
.arrival { gap: 0; }
.envelope { transform: rotate(-1.25deg); }
.cover { aspect-ratio: .91; filter: drop-shadow(2px 9px 7px #203c4f22); }
.envelope-back { inset: 5% 0 0; background-image: repeating-linear-gradient(135deg,#ba594b 0 12px,#fffdf7 12px 23px,#366f91 23px 35px,#fffdf7 35px 46px); }
.envelope-back::after { content: ""; position: absolute; inset: 5px; background-color: var(--paper); background-image: var(--stationery); }
.envelope-side { inset: calc(5% + 5px) 5px 5px; }
.envelope-front { inset: calc(5% + 5px) 5px 5px; }
.envelope-flap { top: calc(5% + 5px); height: 39%; }
.envelope-letter { inset: 10% 8% 7%; }
.is-closed .envelope-letter { visibility: hidden; }
.envelope-stamp { top: 11%; right: 8%; width: 17%; }
.airmail-postmark { top: 11%; right: 22%; }
.airmail-mark { top: 13%; left: 8%; }
.envelope-address { inset: 26% 8% 8%; gap: 24px; }
.cover-title { white-space: nowrap; flex-shrink: 0; writing-mode: vertical-rl; text-orientation: upright; font-size: 2.1rem; line-height: 1.5; letter-spacing: .12em; color: #245779; }
.open-label { font-size: .85rem; gap: 12px; }
.open-label > span { color: #fff; background: #32698a; border-color: #32698a; width: 30px; height: 30px; }
.envelope-seal { background: #ba594b; border-color: #aa4c40; box-shadow: inset 0 0 0 3px #ce7d6e; top: 41%; left: 17%; opacity: 1; }
.envelope-caption { font-size: .82rem; margin-top: 22px; transform: none; }
.envelope-caption > .sr-only,.paper-date > .sr-only { padding: 0; border: 0; }
.paper { padding: 28px 16px 24px; border: 1px solid #ccd3cb; box-shadow: 0 5px 14px #203c4f0d; }
.paper::before { top: -1px; left: 22px; width: 40px; height: 3px; background: var(--accent); }
.paper-date { font-size: .82rem; color: #4d6572; }
.letter-story { padding: 36px 0 0; gap: 20px; }
.letter-copy { writing-mode: vertical-rl; text-orientation: mixed; width: auto; max-width: 100%; height: 420px; margin: 0 auto; }
.letter-quote { font-family: var(--display); font-size: 2.5rem; font-weight: 500; line-height: 1.65; letter-spacing: .06em; margin: 0; }
.letter-note { font-size: 1.2rem; line-height: 1.85; letter-spacing: .035em; color: #304e60; margin: 0; margin-block-start: 30px; }
.letter-art { width: min(340px,100%); }
.letter-actions { gap: 18px; margin-top: 20px; }
.text-button { font-size: .875rem; }
.save-button { color: #fff; background: #32698a; border-color: #32698a; font-size: .875rem; }
.save-button:hover { color: #fff; background: #245574; }
.site-footer { padding: 16px 0 28px; }
.related-sites::before,.print-gallery--left::before,.print-gallery--right::before { display: none; }
.site-banner { border-radius: 24px; border-color: #d4d9d7; box-shadow: 0 8px 22px #213d4b14; }
.banner-action { color: #286b94; font-weight: 600; }
.site-banner:hover { border-color: #356d8e; }
@media (min-width:1000px) {
  .site-shell { padding-inline: 20px; }
  .letter-stage { padding-top: 38px; }
  .is-closed,.is-opening { min-height: 88svh; display: flex; flex-direction: column; justify-content: center; }
  .is-closed .arrival,.is-opening .arrival { width: 100%; }
  .print-gallery { background-blend-mode: normal,multiply; border-top: 0; }
  .print-gallery--left { background-color: #456f88; background-image: linear-gradient(#456f88ed,#456f88ed),var(--fiber); }
  .print-gallery--right { background-color: #b57a60; background-image: linear-gradient(#b57a60ed,#b57a60ed),var(--fiber); }
  .print-gallery::after { opacity: .18; }
  .print-slide { mix-blend-mode: normal; }
  .print-slide img { width: clamp(780px,65vw,1120px); opacity: .68; filter: url(#riso-paper); }
  .print-gallery--left img { left: 50%; bottom: -32%; transform: translateX(-50%) rotate(-9deg); }
  .print-gallery--right img { left: 50%; right: auto; top: -15%; transform: translateX(-50%) rotate(9deg); filter: url(#riso-paper); opacity: .68; }
  .site-header { width: min(280px,calc((100vw - var(--column))/2 - 38px)); padding: 25px 22px; gap: 23px; background: #fffdf6f5; background-image: var(--stationery); background-size: auto,630px; border: 1px solid #e6e5da; border-radius: 3px; box-shadow: 0 8px 22px #203c4f26; }
  .site-header::before { background: #ba594b; width: 34px; height: 3px; }
  .site-header .brand { font-size: 1.35rem; letter-spacing: .005em; }
  .site-header .site-audience { font-size: .6rem; letter-spacing: 0; }
  .site-header nav { width: 100%; }
  .site-header nav a,.saved-open { font-size: .9rem; font-weight: 500; border-bottom-color: #90aab761; }
  .site-header nav a::before,.saved-open::before { color: #ba594b; margin-right: 17px; }
  .site-header nav a::after,.saved-open::after { height: 2px; background: var(--accent); }
  .site-header .art-motion-toggle { margin-top: -7px; }
  .related-sites { gap: 18px; }
}
@media (min-width:1000px) and (max-width:1150px) {
  .site-header { padding: 22px 16px; }
  .site-header .brand { font-size: 1.2rem; }
  .site-header .site-audience { font-size: .54rem; }
  .print-slide img { width: 820px; }
  .print-gallery--left img { left: 50%; bottom: -32%; }
  .print-gallery--right img { left: 50%; right: auto; top: -15%; }
}
@media (min-width:1000px) and (max-height:760px) {
  .print-gallery--left img { bottom: -49%; }
  .print-gallery--right img { top: -32%; }
}
@media (max-width:999px) {
  .site-shell { padding-inline: 14px; }
  .site-header { padding: 24px 12px 18px; align-items: center; text-align: center; }
  .site-identity { align-items: center; }
  .site-header nav { justify-content: center; }
  .letter-stage { padding-top: 54px; }
  .letter-stage.is-closed,.letter-stage.is-opening { padding-top: 96px; }
  .paper { padding: 24px 12px; }
  .letter-copy { height: 400px; }
  .letter-quote { font-size: 2.2rem; line-height: 1.65; }
  .letter-note { font-size: 1.125rem; line-height: 1.8; margin-block-start: 24px; }
  .cover-title { font-size: 1.75rem; letter-spacing: .06em; }
  .envelope-address { inset: 22% 8% 5%; gap: 18px; }
}
@media (max-width:360px) {
  .site-shell { padding-inline: 10px; }
  .site-header { padding-inline: 8px; }
  .brand { font-size: 1.23rem; }
  .letter-copy { height: 420px; }
  .letter-quote { font-size: 2rem; }
  .letter-note { font-size: 1.1rem; margin-block-start: 19px; }
  .cover-title { font-size: 1.625rem; }
  .letter-actions { gap: 13px; }
  .airmail-postmark { right: 22%; }
}
@media print {
  .site-shell { width: 100%; max-width: none; box-shadow: none; }
  .paper { box-shadow: none; }
}

/* The white letter separates clearly from its blue envelope. */
:root { --letter-white: linear-gradient(#fffffff2,#fffffff2),var(--fiber); }
.paper { background-color: #fff; background-image: var(--letter-white); background-size: auto,630px; border-color: #c9d3d9; }
.envelope-back::after { background-color: #bfd6df; background-image: linear-gradient(#bfd6dfed,#bfd6dfed),var(--fiber); background-size: auto,630px; }
.envelope-side--left { background-color: #bfd8e2; background-image: linear-gradient(#bfd8e2ed,#bfd8e2ed),var(--fiber); }
.envelope-side--right { background-color: #b5ceda; background-image: linear-gradient(#b5cedaed,#b5cedaed),var(--fiber); }
.envelope-front { background-color: #c8dde5; background-image: linear-gradient(#c8dde5f2,#c8dde5f2),var(--fiber); }
.envelope-flap { background-color: #d7e7ed; background-image: linear-gradient(#d7e7edf2,#d7e7edf2),var(--fiber); transition: transform .48s ease,opacity .25s .12s ease; }
.envelope-letter { background-color: #fff; background-image: var(--letter-white); background-size: auto,630px; border-color: #bfccd3; box-shadow: 0 7px 18px #294a6330; transition: transform 1.35s 4.3s cubic-bezier(.25,.65,.2,1); }
.is-opening .envelope-letter { transform: translateY(-40%); }
.is-opening .envelope-flap { opacity: 0; }
@media (max-width:999px) {
  .cover { overflow: visible; transition: transform 1.35s 4.3s cubic-bezier(.25,.65,.2,1); }
  .is-opening .cover { transform: translateY(24px); }
}
@media print { .paper { background: #fff; } }

.is-closed .letter-actions,.is-opening .letter-actions { display: none; }
.save-button[aria-pressed=true] { color: #244e70; border-color: #9cb5c1; }

/* Turn the addressed front over before opening the symmetric folded back. */
.envelope-turn { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transform: rotateY(0); transition: transform 1s cubic-bezier(.4,0,.2,1); }
.envelope-face { position: absolute; inset: 0; display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.envelope-face--front { inset: 5% 0 0; transform: translateZ(1px); background: repeating-linear-gradient(135deg,#ba594b 0 12px,#fffdf7 12px 23px,#366f91 23px 35px,#fffdf7 35px 46px); }
.envelope-face--front::before { content: ""; position: absolute; inset: 5px; background-color: #c8dde5; background-image: linear-gradient(#c8dde5f2,#c8dde5f2),var(--fiber); background-size: auto,630px; }
.envelope-face--front .envelope-address { inset: 23% 8% 8%; }
.envelope-face--front .envelope-stamp { top: 6%; }
.envelope-face--front .airmail-mark { top: 8%; }
.envelope-face--front .airmail-postmark { top: 6%; }
.envelope-face--back { transform: rotateY(180deg); }
.envelope-face--back .envelope-side--left { clip-path: polygon(0 0,50% 50%,0 100%); }
.envelope-face--back .envelope-side--right { clip-path: polygon(100% 0,50% 50%,100% 100%); background-color: #bfd8e2; background-image: linear-gradient(#bfd8e2ed,#bfd8e2ed),var(--fiber); }
.envelope-face--back .envelope-front { clip-path: polygon(0 100%,50% 50%,100% 100%); }
.envelope-face--back .envelope-flap { height: calc(47.5% - 5px); clip-path: polygon(0 0,100% 0,50% 100%); }
.is-opening .envelope-turn { transform: rotateY(180deg); }
.is-opening .envelope-face--front .envelope-address,.is-opening .envelope-face--front .envelope-stamp,.is-opening .envelope-face--front .airmail-mark,.is-opening .envelope-face--front .airmail-postmark { opacity: 1; transition: none; }
.is-opening .envelope-flap { transform: rotateX(0); opacity: 1; z-index: 5; transition: none; animation: unfold-envelope .9s 3.25s cubic-bezier(.35,0,.2,1) both; }
@keyframes unfold-envelope {
  0% { transform: rotateX(0); opacity: 1; z-index: 5; }
  80% { opacity: 1; }
  100% { transform: rotateX(175deg); opacity: 0; z-index: 0; }
}

/* Soft, readable destination cards with the source sites' own identity. */
.site-banner { transition: border-color .2s ease,box-shadow .2s ease,transform .2s ease; }
.banner-copy { min-height: 156px; padding: 20px; justify-content: center; }
.banner-caption { font-family: "Hiragino Sans","Yu Gothic",sans-serif; font-size: 11px; line-height: 1.6; color: #526878; }
.banner-wordmark { font-size: 21px; line-height: 1.3; margin-top: 8px; letter-spacing: -.025em; }
.banner-logo { width: 184px; margin: auto 0; }
.banner-action { min-height: 28px; margin-top: 13px; font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
.banner-action > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border: 1px solid #cbd8df; border-radius: 50%; font-size: 17px; font-weight: 400; background: #f2f6f7; }
.site-banner--life .banner-action > span { color: #087ba6; background: #eef7fa; border-color: #c5dfe8; }
.banner-photo,.site-banner--life .banner-photo { height: 104px; }
.site-banner--life .banner-photo { object-position: center 30%; }
.site-banner:hover { box-shadow: 0 11px 25px #213d4b23; }
.site-banner:focus-visible { outline: 3px solid #286b94; outline-offset: 4px; }
@media (min-width:1000px) and (max-width:1150px) {
  .banner-copy { padding: 18px 16px; }
  .banner-wordmark { font-size: 19px; }
  .banner-caption { font-size: 11px; }
}
@media (prefers-reduced-motion:reduce) { .site-banner { transition: none; } .site-banner:hover { transform: none; } }

/* Postal detail layer. Append after the two-face envelope rules. */
.envelope-face--front .envelope-stamp {
  top: 5.8%; right: 7.5%; width: clamp(58px,19%,92px); aspect-ratio: 90/112;
  padding: 0; border: 0; background: none; overflow: visible;
  transform: rotate(4deg); filter: drop-shadow(.6px 1.4px 1px #243b4f35);
}
.stamp-paper { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.stamp-print { position: absolute; inset: 9% 12% 9%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: #44687a; background: #dbe7e5; border: .65px solid #7f9ca2; box-shadow: inset 0 0 0 2px #eef2e5; padding: 4% 5% 3%; }
.stamp-print::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--grain); mix-blend-mode: multiply; opacity: .45; }
.stamp-name { font-family: Georgia,serif; font-size: clamp(6px,1.5vw,9px); line-height: 1; letter-spacing: .19em; font-weight: 700; }
.stamp-portrait { display: grid; place-items: center; min-height: 0; width: 100%; flex: 1; padding: 2px 0; }
.envelope-stamp .stamp-portrait img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: url(#blue-print); }
.stamp-caption { font-family: Georgia,serif; font-size: clamp(3px,.85vw,4.5px); line-height: 1.2; white-space: nowrap; letter-spacing: .075em; }
.envelope-face--front .airmail-postmark {
  top: 7%; right: 8%; width: clamp(120px,38%,190px); height: auto; aspect-ratio: 170/76;
  display: block; padding: 0; border: 0; border-radius: 0; color: #354d5bb3;
  transform: rotate(-13deg); mix-blend-mode: multiply; z-index: 8;
}
.airmail-postmark::after { content: none; }
.airmail-postmark svg { display: block; width: 100%; height: 100%; }
.envelope-face--front .airmail-mark { border-style: double; border-width: 3px; padding: 3px 6px 2px; color: #3d647a; background: #e7eff144; box-shadow: .5px .7px 0 #32566b20; }
.wax-seal {
  position: absolute; top: 52.5%; left: 50%; width: clamp(70px,20%,100px); aspect-ratio: 1;
  z-index: 6; display: block; pointer-events: none; opacity: 1;
  transform: translate(-50%,-50%) rotate(-8deg);
  filter: drop-shadow(1px 2px 1.5px #5731225c); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.wax-seal svg { display: block; width: 100%; height: 100%; }
/* Lift the seal from the paper, move it clear of the flap, then set it down.
   The 150ms pause after detachment keeps the flap from opening through the wax. */
.is-opening .wax-seal {
  transition: none;
  animation: detach-wax-seal .9s 2.2s both;
}
@keyframes detach-wax-seal {
  0% {
    transform: perspective(500px) translate(-50%,-50%) rotateX(0) rotateY(0) rotate(-8deg) scale(1);
    filter: drop-shadow(1px 2px 1.5px #5731225c);
    animation-timing-function: cubic-bezier(.3,0,.55,1);
  }
  32% {
    transform: perspective(500px) translate(-46%,-60%) rotateX(-24deg) rotateY(16deg) rotate(-14deg) scale(1.06);
    filter: drop-shadow(4px 10px 5px #57312250);
    animation-timing-function: cubic-bezier(.45,0,.65,1);
  }
  78% {
    transform: perspective(500px) translate(82%,96%) rotateX(-8deg) rotateY(4deg) rotate(18deg) scale(1.04);
    filter: drop-shadow(3px 8px 4px #57312248);
    animation-timing-function: ease-out;
  }
  100% {
    transform: perspective(500px) translate(85%,105%) rotateX(0) rotateY(0) rotate(15deg) scale(1);
    filter: drop-shadow(1px 2px 1.5px #5731225c);
  }
}
@media (max-width:360px) {
  .envelope-face--front .envelope-stamp { right: 7%; width: 58px; }
  .envelope-face--front .airmail-postmark { right: 7%; width: 122px; }
}
@media (prefers-reduced-motion:reduce) {
  .wax-seal,.is-opening .wax-seal { transition: none; }
}

/* Keep the drawn-out letter inside the desktop viewport. */
@media (min-width:1000px) { .letter-stage.is-closed,.letter-stage.is-opening { padding-top: 160px; } }
