* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.45), transparent 28%),
    linear-gradient(90deg, rgba(105, 90, 70, .035) 1px, transparent 1px),
    #f4efe3;
  background-size: auto, 36px 36px, auto;
  color: #2f2c28;
  font-family: "Noto Serif JP", serif;
  line-height: 1.9;
}
a { color: #4c5f66; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-header, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px;
}
.site-header nav, .site-footer { gap: 18px; flex-wrap: wrap; }
.brand { font-weight: 600; text-decoration: none; color: #2f2c28; }
.paper {
  width: min(880px, calc(100vw - 32px));
  margin: 22px auto 48px;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(rgba(255,255,255,.34), rgba(255,255,255,.08)),
    #fffaf0;
  border: 1px solid #e0d6c5;
  box-shadow: 0 18px 50px rgba(64, 48, 28, .08);
}
.paper.small { max-width: 560px; }
.letter-desk { padding-bottom: 40px; }
.stationery { min-height: 70vh; position: relative; }
.ceremony-paper { position: relative; }
.letter-mark,
.paper-heading,
.archive-heading p {
  color: #766d61;
  font-size: .92rem;
}
.letter-mark {
  margin-bottom: 22px;
  border-bottom: 1px solid #e8ddcc;
  padding-bottom: 10px;
}
.quiet-link { margin-top: 28px; }
.delivered-note p { margin: 0 0 8px; }
.paper-heading {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  border-bottom: 1px solid #e8ddcc;
  padding-bottom: 12px;
  margin: 8px 0 18px;
}
.paper-heading strong {
  color: #3f3b35;
  font-weight: 600;
}
.first-letter pre, pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  margin: 0;
}
.cat-corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  color: #3f3b35;
}
.cat-corner svg {
  display: block;
  width: 92px;
  height: auto;
  margin: 0 auto;
}
.cat-letter { color: #3f3b35; }
.cat-letter-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  border-bottom: 1px solid #e8ddcc;
  padding-bottom: 14px;
  margin-bottom: 24px;
}
.cat-letter-head svg { width: 82px; height: auto; }
.cat-letter-head span { color: #766d61; font-size: .94rem; }
.tail { transform-origin: 92px 70px; animation: tail 5s ease-in-out infinite; }
.blink { animation: blink 6s steps(1) infinite; }
@keyframes tail { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(4deg); } }
@keyframes blink { 0%, 92%, 100% { opacity: 1; } 94%, 96% { opacity: 0; } }
textarea {
  width: 100%;
  min-height: 45vh;
  border: 0;
  resize: vertical;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 2;
  outline: none;
  display: block;
  padding: 0;
  text-align: left;
}
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8cdb9;
  background: #fffdf7;
  color: inherit;
  font: inherit;
}
button {
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #6b6258;
  background: #3f3b35;
  color: #fffaf0;
  font: inherit;
  cursor: pointer;
}
button.danger { background: #6c3f3c; border-color: #6c3f3c; }
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #e8ddcc;
  padding-top: 18px;
}
.stack { display: grid; gap: 18px; }
.archive-paper { max-width: 960px; }
.archive-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e8ddcc;
  margin-bottom: 30px;
}
.archive-heading h1 { margin: 0 0 14px; }
.archive { display: grid; gap: 0; }
.archive-item {
  position: relative;
  border-top: 1px solid #e8ddcc;
  padding: 28px 0 30px;
}
.archive-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 32px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9aa94;
}
.archive-item h2 { font-size: 1.05rem; margin: 4px 0 12px; }
.archive-receipt {
  padding-left: clamp(18px, 4vw, 42px);
  color: #504b44;
}
.archive-receipt::before { background: #6f7b7a; }
.archive-weekly {
  margin: 28px 0;
  padding: 30px clamp(18px, 4vw, 42px);
  border: 1px solid #ded2bf;
  background: rgba(255, 253, 247, .54);
}
.archive-weekly::before { display: none; }
time, #count { color: #726b61; font-size: .9rem; }
.plain-list { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid #e8ddcc; margin: 28px 0; }
@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .cat-corner svg { width: 72px; }
  .archive-heading, .paper-heading { display: block; }
}

.landing-cat { color: #6b6258; }
.landing-cat svg { width: 84px; height: auto; }
.landing h1 { font-size: 1.35rem; font-weight: 600; margin: 6px 0 22px; }
.landing p { margin: 0 0 18px; }
.landing-cta { margin-top: 32px; }
.button-link {
  display: inline-block;
  padding: 12px 32px;
  border: 1px solid #6b6258;
  background: #3f3b35;
  color: #fffaf0;
  text-decoration: none;
}
.login-note { color: #766d61; font-size: .92rem; margin-top: 0; }
.beta-tag {
  font-size: .68rem;
  font-weight: 400;
  color: #766d61;
  border: 1px solid #d8cdb9;
  padding: 2px 8px;
  vertical-align: middle;
  letter-spacing: .08em;
}
.beta-note { color: #766d61; font-size: .92rem; margin-top: 26px; }

/* ギャラリー（/samples とトップの両方で使う） */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 28px;
  margin: 24px 0 40px;
}
.gallery-card { display: block; text-decoration: none; color: inherit; }
.gallery-cover {
  aspect-ratio: 2 / 3;
  border: 1px solid #e0d6c5;
  background: #fffaf0;
  box-shadow: 0 8px 20px rgba(64,48,28,.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow .15s ease;
}
.gallery-card:hover .gallery-cover { box-shadow: 0 12px 28px rgba(64,48,28,.14); }
.gallery-cover img { width: 100%; height: 100%; object-fit: cover; }
.gallery-cover-placeholder {
  background: linear-gradient(135deg, #f4efe3, #e8ddcc);
  color: #a89a82;
  font-size: 2.6rem;
  font-family: "Noto Serif JP", serif;
}
.gallery-caption { margin-top: 8px; font-size: .85rem; }
.gallery-caption strong { display: block; color: #2f2c28; }
.gallery-caption span { color: #766d61; }

.landing-gallery { margin: 40px 0 8px; text-align: left; }
.landing-gallery h2 { font-size: 1.05rem; font-weight: normal; margin-bottom: 4px; }
.landing-gallery .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 20px; }
