:root {
  color-scheme: light;
  --ink: #111111;
  --line: #111111;
  --muted: #111111;
  --paper: #ffffff;
  --soft-line: #111111;
  font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
a { color: inherit; }
.page-shell { width: min(100% - 48px, 880px); margin: 0 auto; }
.site-notice {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.site-notice p { margin: 0; }
.intro-section { padding: 104px 0 88px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(35px, 6vw, 58px); line-height: 1.22; letter-spacing: -.065em; font-weight: 650; }
h2 { margin-bottom: 0; font-size: 27px; line-height: 1.3; letter-spacing: -.055em; }
.intro-copy { margin: 0; color: #111111; font-size: 14px; line-height: 1.9; }
.section-rule { height: 1px; background: var(--line); }
.letters-section { padding: 48px 0 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.letter-total { display: flex; align-items: baseline; gap: 5px; margin: 0 0 2px; font-size: 13px; }
.letter-total strong { font-size: 28px; font-weight: 500; letter-spacing: -.05em; }
.envelope-stage {
  position: relative;
  min-height: 245px;
  margin: 32px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.envelope, .empty-envelope {
  position: absolute;
  width: min(250px, 54vw);
  height: 156px;
  border: 1px solid var(--ink);
  background: #fff;
}
.envelope {
  left: calc(50% + var(--shift));
  top: 50%;
  z-index: var(--layer);
  transform: translate(-50%, -50%) rotate(var(--angle));
  animation: envelope-arrive .48s ease-out both;
  animation-delay: calc(var(--layer) * 35ms);
}
.envelope-fold, .empty-fold {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.envelope-fold::before, .empty-fold::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -82px;
  height: 164px;
  border-bottom: 1px solid var(--ink);
  transform: rotate(0deg) skewY(0deg);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.envelope-fold::after, .empty-fold::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 78px;
  background: linear-gradient(31deg, transparent calc(50% - .5px), var(--ink) 50%, transparent calc(50% + .5px)),
              linear-gradient(-31deg, transparent calc(50% - .5px), var(--ink) 50%, transparent calc(50% + .5px));
}
.empty-envelope { position: relative; transform: rotate(-2deg); }
@keyframes envelope-arrive {
  from { opacity: 0; translate: 0 -16px; }
  to { opacity: 1; translate: 0 0; }
}
.empty-note { position: absolute; top: calc(50% + 94px); margin: 0; color: var(--muted); font-size: 12px; }
.stack-caption { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 11px; }
.write-section { padding: 54px 0 90px; max-width: 650px; }
.write-section h2 { margin-bottom: 10px; }
.section-description { margin: 0 0 34px; color: #111111; font-size: 13px; }
.letter-form { display: flex; flex-direction: column; align-items: stretch; }
.field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}
.field input { min-height: 48px; }
.field textarea { min-height: 220px; resize: vertical; line-height: 1.8; }
.field input:focus, .field textarea:focus { outline: 1px solid var(--ink); outline-offset: 2px; }
.field input::placeholder, .field textarea::placeholder { color: #111111; }
.anonymous-option { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; cursor: pointer; font-size: 13px; }
.anonymous-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.custom-check { width: 17px; height: 17px; border: 1px solid var(--ink); display: inline-block; position: relative; }
.anonymous-option input:checked + .custom-check::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 6px; height: 10px;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(42deg);
}
.anonymous-option input:focus-visible + .custom-check { outline: 2px solid var(--ink); outline-offset: 3px; }
.field-note { margin: 7px 0 22px; color: var(--muted); font-size: 11px; }
.message-field { margin-top: 8px; margin-bottom: 4px; }
.message-field .field-note { margin: 0; }
.submit-button, .plain-button {
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.submit-button { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 13px; font-weight: 600; }
.submit-button:hover, .plain-button:hover { background: var(--ink); color: #fff; }
.submit-button span { font-size: 18px; }
.privacy-note { margin: 16px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.flash-list { padding-top: 16px; }
.flash { margin: 0; padding: 10px 12px; border: 1px solid var(--line); font-size: 12px; }
.flash + .flash { margin-top: 7px; }
.flash-error { border-style: dashed; }
.system-page { min-height: 62vh; padding: 100px 0; }
.system-page h1 { margin-bottom: 18px; }
.text-link { display: inline-block; margin-top: 28px; padding-bottom: 2px; border-bottom: 1px solid var(--ink); text-decoration: none; font-size: 12px; }
.admin-login-page { max-width: 540px; }
.login-form { margin-top: 34px; }
.login-form .submit-button { margin-top: 4px; }
.admin-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; padding: 76px 0 44px; }
.admin-heading h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 12px; }
.plain-button { min-height: 38px; padding: 0 13px; font-size: 11px; }
.archive-list { padding: 4px 0 30px; }
.archive-letter { padding: 24px 0 28px; border-bottom: 1px solid var(--soft-line); }
.archive-meta { display: flex; justify-content: space-between; gap: 15px; color: #111111; font-size: 10px; letter-spacing: .04em; }
.archive-message { margin: 18px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.9; }
.pagination { display: flex; justify-content: space-between; align-items: center; padding: 20px 0 60px; font-size: 12px; }
.pagination .text-link { margin: 0; }
.empty-archive { padding: 50px 0; color: var(--muted); font-size: 13px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
  .page-shell { width: min(100% - 36px, 880px); }
  .site-notice { padding: 12px 0; font-size: 11px; }
  .intro-section { padding: 78px 0 66px; }
  .intro-copy { font-size: 13px; }
  .letters-section { padding: 38px 0 46px; }
  .envelope-stage { min-height: 210px; }
  .envelope, .empty-envelope { height: 132px; }
  .empty-note { top: calc(50% + 80px); }
  .write-section { padding: 44px 0 68px; }
  .admin-heading { padding-top: 58px; }
  .archive-meta { flex-direction: column; gap: 3px; }
}
