/* ==========================================
   トップページ（案E「夜景と絵葉書」）
   共通部分は base.css
   ========================================== */

/* ---------- ヒーロー（夜景） ---------- */
.hero {
  position: relative;
  height: 760px;
  margin-top: calc(var(--header-h) * -1);
  overflow: hidden;
}
.hero-lights {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-title {
  position: absolute;
  right: 7%;
  top: 120px;
  margin: 0;
  writing-mode: vertical-rl;
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.7;
  letter-spacing: 0.18em;
}
.upright { text-orientation: upright; }

.hero-copy {
  position: absolute;
  left: 6%;
  top: 150px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hero-catch {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--font-hand);
  font-size: 24px;
  line-height: 1.8;
  white-space: nowrap;
}
.hero-catch-indent { padding-left: 4em; }
.hero-sub {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--paper-soft);
}

.hero-people {
  position: absolute;
  right: 16%;
  bottom: -10px;
  display: flex;
  align-items: flex-end;
}
.hero-people img { height: 360px; width: auto; }
.hero-people img + img { margin-left: -72px; }

.hero-actions {
  position: absolute;
  left: 6%;
  bottom: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  background: var(--lamp);
  font-size: 16px;
  letter-spacing: 0.08em;
}
/* 主要ボタン以外は線だけ */
.hero-cta-sub {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--paper);
}
.hero-cta:hover { text-decoration: none; filter: brightness(1.12); }

/* ---------- メッセージ（手紙） ---------- */
.letters-band { background: var(--sea); }
.letters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding-top: 96px;
  padding-bottom: 96px;
}
.letter {
  position: relative;
  flex: 1 1 420px;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px 36px 32px;
  background: var(--paper);
  color: var(--night);
}
.letter-left { transform: rotate(-1.6deg); }
.letter-right { margin-top: 56px; transform: rotate(1.8deg); }
.letter h2 { margin: 0; padding-right: 88px; font-weight: 400; font-size: 28px; line-height: 1.5; }
.letter p { margin: 0; font-size: 16px; line-height: 2.2; }
.letter .letter-sign { text-align: right; font-family: var(--font-hand); font-size: 18px; line-height: 1.5; }
.letter-stamp {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 64px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--lamp);
}
.letter-stamp img { width: 54px; height: 54px; object-fit: contain; }
.letter-postmark {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lamp);
  border-radius: 50%;
  color: var(--lamp);
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  transform: rotate(-12deg);
}

/* ---------- お知らせ ---------- */
.news {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  padding-top: 96px;
  padding-bottom: 64px;
}
.news-head {
  flex: 0 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.news-list {
  flex: 1 1 560px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.news-list li { border-bottom: 1px dotted var(--mist); }
.news-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 28px;
  padding: 18px 0;
}
.news-date { flex: 0 0 120px; font-family: var(--font-hand); font-size: 18px; color: rgba(244, 241, 248, 0.86); }
.news-title { flex: 1 1 280px; font-size: 17px; }
.news-new {
  flex: 0 0 auto;
  align-self: center;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lamp);
  border-radius: 50%;
  font-size: 13px;
  letter-spacing: 0.06em;
  transform: rotate(-12deg);
}
.news-empty { padding: 18px 0; color: var(--paper-soft); }

/* ---------- 作品の絵葉書 ---------- */
.works {
  max-width: 1360px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 64px;
  padding-bottom: 96px;
}
.works-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.category-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.top-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--font-hand);
  font-size: 16px;
}
.works-all {
  align-self: center;
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 32px;
  border: 1px solid var(--paper);
  font-size: 16px;
  letter-spacing: 0.08em;
}

/* ---------- SNS（切手シート） ---------- */
.sns-band { background: var(--sea); }
.sns {
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding-top: 88px;
  padding-bottom: 104px;
}
.sns-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
}
.sns-legend { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.sns-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.legend-box { width: 18px; height: 18px; background: var(--paper); }
.legend-official { border: 2px solid var(--lamp); }
.legend-daily { border: 2px solid var(--mist); }

.stamps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr));
  gap: 40px 28px;
}
.stamp {
  display: block;
  padding: 8px;
  border: 7px dotted var(--sea);
  background: var(--paper);
  color: var(--night);
}
.stamp:hover { text-decoration: none; }
.stamp:nth-child(6n+1) { transform: rotate(-2deg); }
.stamp:nth-child(6n+2) { transform: rotate(1.4deg); }
.stamp:nth-child(6n+3) { transform: rotate(-1deg); }
.stamp:nth-child(6n+4) { transform: rotate(2deg); }
.stamp:nth-child(6n+5) { transform: rotate(-1.6deg); }
.stamp:nth-child(6n+6) { transform: rotate(1deg); }
.stamp-inner {
  position: relative;
  overflow: hidden;
  min-height: 196px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  border: 2px solid var(--frame);
}
.stamp-official { --frame: var(--lamp); }
.stamp-daily { --frame: var(--mist); }
.stamp-icon {
  position: absolute;
  right: -18px;
  bottom: -14px;
  width: 132px;
  height: 132px;
  object-fit: contain;
  opacity: 0.18;
  transform: rotate(-12deg);
  pointer-events: none;
}
.stamp-kind {
  position: relative;
  align-self: flex-start;
  padding: 2px 10px;
  border: 1px solid var(--frame);
  font-size: 13px;
}
.stamp-official .stamp-kind { background: var(--lamp); color: var(--paper); }
.stamp-name { position: relative; font-size: 28px; line-height: 1.2; }
.stamp-handle { position: relative; font-family: var(--font-hand); font-size: 16px; word-break: break-all; }

/* ---------- お問い合わせ（絵葉書のフォーム） ---------- */
.contact { padding-top: 96px; padding-bottom: 96px; }
.contact .section-title { margin-bottom: 28px; }
.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  padding: 40px;
  background: var(--paper);
  color: var(--night);
}
.contact-card label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.contact-message { flex: 2 1 420px; min-width: 0; gap: 10px !important; font-size: 15px !important; }
.contact-message textarea {
  padding: 6px 4px;
  border: 0;
  border-bottom: 1px solid var(--mist);
  background: repeating-linear-gradient(var(--paper) 0, var(--paper) 35px, var(--mist) 35px, var(--mist) 36px);
  color: var(--night);
  font-family: var(--font-hand);
  font-size: 18px;
  line-height: 36px;
  resize: vertical;
}
.contact-side {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-left: 32px;
  border-left: 1px solid var(--mist);
}
.contact-stamp {
  align-self: flex-end;
  width: 74px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--lamp);
}
.contact-stamp img { width: 64px; height: 64px; object-fit: contain; }
.contact-to { margin: 0; font-size: 20px; }
.contact-side input {
  min-height: 48px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--night);
  background: transparent;
  color: var(--night);
  font-size: 16px;
}
.required {
  margin-left: 8px;
  padding: 1px 8px;
  background: var(--lamp);
  color: var(--paper);
  font-size: 12px;
}
.contact-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.contact-status {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--mist);
  font-family: var(--font-hand);
  font-size: 16px;
  line-height: 1.7;
}
.contact-status[hidden] { display: none; }
.contact-status.is-error { border-color: var(--lamp); color: var(--lamp); }
.contact-submit[disabled] { opacity: 0.6; cursor: wait; }
.contact-submit {
  margin-top: auto;
  min-height: 54px;
  border: 0;
  background: var(--lamp);
  color: var(--paper);
  font-size: 17px;
  letter-spacing: 0.1em;
}

/* ---------- スマホ（768px以下） ---------- */
@media (max-width: 768px) {
  .hero { height: 860px; }
  .hero-copy { left: 20px; right: 20px; top: 120px; max-width: none; }
  .hero-catch { font-size: clamp(14px, 4vw, 24px); }
  .hero-title { right: 20px; top: 310px; font-size: 26px; }
  .hero-people { right: auto; left: 4px; bottom: 88px; }
  .hero-people img { height: 300px; }
  .hero-people img + img { margin-left: -60px; }
  .hero-actions { left: 20px; right: 20px; bottom: 20px; }
  .hero-cta { flex: 1; }

  .letters { padding-top: 64px; padding-bottom: 72px; }
  .letter { padding: 28px 22px 24px; }
  .letter h2 { font-size: 22px; }

  .stamps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .stamp { padding: 5px; border-width: 5px; }
  .stamp-name { font-size: 20px; }

  .contact-card { padding: 24px 20px; }
  .contact-side { padding-left: 0; padding-top: 24px; border-left: 0; border-top: 1px dotted var(--mist); }
}
