:root {
  color-scheme: light;
  --paper: #fcf4ef;
  --ink: #47282c;
  --red: #a5253b;
  --line: #d8beb5;
  --small-ink: #744e4d;
  --serif: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 80% 40%, #f9e4df80, transparent 60%), var(--paper);
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 5px; }
.page {
  max-width: 1400px;
  min-height: 100svh;
  margin: auto;
  padding: 0 clamp(22px, 6.3vw, 96px);
  display: flex;
  flex-direction: column;
}
.masthead, footer { display: flex; align-items: center; justify-content: space-between; }
.masthead { min-height: 87px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--red); font-family: var(--serif); font-weight: 700; letter-spacing: .14em; }
.brand-seal {
  display: grid;
  place-items: center;
  width: 31px; height: 36px;
  padding-left: 2px;
  border: 3px dotted var(--paper);
  outline: 1px solid var(--red);
  outline-offset: -4px;
  color: var(--paper);
  background: var(--red);
  font: 20px/1 Georgia, serif;
  transform: rotate(-5deg);
}
.project-link, footer { font: 11px/1.5 "Courier New", monospace; letter-spacing: .12em; }
.project-link { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }
.project-link span { color: var(--red); font: 16px/1 sans-serif; }
.project-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.letter {
  width: min(100%, 1100px);
  flex: 1;
  align-content: center;
  margin: 0 auto;
  padding: clamp(58px, 8vh, 108px) 2%;
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  grid-template-rows: auto auto;
  column-gap: clamp(40px, 7vw, 110px);
}
.intro-heading, .result { grid-area: 1 / 1; align-self: end; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; color: var(--red); font-size: 13px; font-weight: 650; letter-spacing: .22em; }
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--red); }
h1 { margin: 0 0 22px -.045em; font: 400 clamp(84px, 8.5vw, 125px)/.88 var(--serif); letter-spacing: -.075em; }
h1 i { color: var(--red); font-weight: 400; }
.period { color: var(--red); }
.illustration { grid-area: 1 / 2 / 3 / 3; position: relative; align-self: center; width: 94%; max-width: 464px; margin: 0 auto; }
.stamp-shadow { transform: rotate(5deg); filter: drop-shadow(2px 9px 9px #713c371f); }
.stamp {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: clamp(13px, 1.6vw, 23px);
  padding-bottom: 11px;
}
.stamp::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #fffaf2;
  /* Perforate each edge independently so the scallops fit at every size. */
  mask:
    radial-gradient(circle at 50% 0, transparent 3.5px, #000 4px) top / 12px 100% repeat-x,
    radial-gradient(circle at 50% 100%, transparent 3.5px, #000 4px) bottom / 12px 100% repeat-x,
    radial-gradient(circle at 0 50%, transparent 3.5px, #000 4px) left / 100% 12px repeat-y,
    radial-gradient(circle at 100% 50%, transparent 3.5px, #000 4px) right / 100% 12px repeat-y;
  mask-composite: intersect;
}
.stamp img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 1px solid #b471705e; }
figcaption { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px 0; color: var(--red); }
figcaption span:first-child { font: italic 21px/1 var(--serif); }
figcaption span:last-child { font: 10px/1 var(--serif); letter-spacing: .2em; }
.postmark {
  color: #923543;
  position: absolute;
  top: -6%; right: -6%;
  transform: rotate(13deg);
  pointer-events: none;
  opacity: .9;
}
.postmark-ring {
  width: clamp(69px, 7.2vw, 98px);
  aspect-ratio: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 3px double currentColor;
  border-radius: 50%;
  font: 700 clamp(8px, .76vw, 11px)/1.3 "Courier New", monospace;
  letter-spacing: .08em;
  background: #fcf4ef55;
}
.postmark-ring b { font: 25px/1.05 var(--serif); }
.postmark-ring span:last-child { font: 8px/1.4 var(--serif); letter-spacing: .09em; }
.postmark i {
  position: absolute; top: 35%; right: 96%; width: clamp(30px, 4vw, 62px); height: 18px;
  border-block: 1px solid currentColor; border-radius: 45%;
}
.postmark i::after { content: ""; position: absolute; inset: 7px 0 auto; border-top: 1px solid; border-radius: 45%; transform: rotate(-3deg); }
.controls { grid-area: 2 / 1; align-self: start; }
.intro, .message { font-size: clamp(14px, 1.2vw, 16px); line-height: 2; margin: 0; }
button {
  display: inline-flex; align-items: center; gap: 13px;
  margin: 24px 0 0; padding: 0 22px;
  min-width: 230px; min-height: 54px;
  font: inherit; font-weight: 650; font-size: 15px; letter-spacing: .08em;
  color: #fff9f2; background: var(--red); border: 1px solid var(--red); border-radius: 3px; cursor: pointer;
  transition: background .18s;
}
button:hover { background: #842037; }
button:disabled { cursor: wait; }
.envelope-icon { width: 20px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px; position: relative; overflow: hidden; }
.envelope-icon::after { content: ""; position: absolute; width: 12px; height: 12px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; top: -7px; left: 2px; transform: rotate(45deg); }
.arrow { margin-left: auto; font: 22px/1 var(--serif); }
noscript { display: block; margin-top: 12px; font-size: 14px; }
.rank { color: var(--red); margin: 0 0 8px; font: 600 clamp(44px, 5.5vw, 76px)/1.16 var(--serif); letter-spacing: .05em; }
h2 { margin: 0 0 12px; font: 600 clamp(23px, 2.15vw, 30px)/1.5 var(--serif); }
h2:focus { outline: none; }
.details { margin: 18px 0 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.details div { display: grid; grid-template-columns: 7.1em 1fr; align-items: baseline; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
dt { color: var(--red); font-size: 12px; font-weight: 650; }
dd { margin: 0; line-height: 1.65; }
footer { min-height: 66px; border-top: 1px solid var(--line); color: var(--small-ink); position: relative; }
footer b { font-weight: 400; }
.footer-heart { position: absolute; left: 50%; transform: translateX(-50%); color: var(--red); font: 13px/1 var(--serif); }
@media (max-width: 760px) {
  .page { max-width: 560px; }
  .masthead { min-height: 61px; }
  .brand { font-size: 14px; gap: 9px; }
  .brand-seal { width: 24px; height: 27px; font-size: 15px; }
  .letter { grid-template-columns: 1fr; padding: 32px 0; row-gap: 23px; text-align: center; }
  .intro-heading, .result, .controls, .illustration { grid-area: auto; }
  .eyebrow { justify-content: center; margin-bottom: 9px; font-size: 11px; }
  .eyebrow::before, .eyebrow::after { content: ""; width: 18px; height: 1px; background: var(--red); }
  h1 { margin: 0; font-size: clamp(46px, 10.6vw, 68px); line-height: 1.06; }
  h1 br { display: none; }
  h1 i { margin-right: .15em; }
  .illustration { width: min(67%, 262px); margin: 9px auto 6px; }
  .stamp { padding: 11px 11px 8px; }
  figcaption { padding-top: 5px; }
  figcaption span:first-child { font-size: 15px; }
  figcaption span:last-child { font-size: 8px; }
  .postmark { right: -12%; top: -8%; }
  .postmark-ring { width: 59px; }
  .postmark-ring b { font-size: 18px; }
  .intro { font-size: 14px; line-height: 1.85; }
  button { margin-top: 17px; min-width: min(100%, 250px); min-height: 49px; }
  footer { min-height: 50px; font-size: 9px; letter-spacing: .07em; }
  .opened .illustration { display: none; }
  .opened { row-gap: 6px; }
  .result { text-align: left; }
  .result .eyebrow, .rank, h2 { text-align: center; }
  .rank { margin: 14px 0 6px; }
  .message { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
