:root {
  --bg-top: #f7efe5;
  --bg-bottom: #ead9cb;
  --card: rgba(255, 251, 246, 0.8);
  --card-strong: rgba(255, 249, 242, 0.92);
  --line: rgba(111, 74, 53, 0.12);
  --text: #3a251d;
  --muted: #7a6255;
  --accent: #a86a4a;
  --accent-deep: #7f4d33;
  --highlight: rgba(255, 222, 181, 0.45);
  --shadow: 0 28px 60px rgba(92, 56, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 32%),
    radial-gradient(circle at 85% 10%, rgba(255, 229, 197, 0.7), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Cormorant Garamond", "Yu Mincho", "Hiragino Mincho ProN", "Times New Roman", serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 80%);
  opacity: 0.4;
}

.page-shell {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.invitation-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 26%),
    linear-gradient(180deg, rgba(255, 251, 246, 0.92), rgba(248, 239, 232, 0.82));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.invitation-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 245, 220, 0.8), transparent 24%),
    radial-gradient(circle at 88% 26%, rgba(255, 224, 204, 0.7), transparent 20%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.38), transparent 52%);
  pointer-events: none;
}

.hero-card,
.detail-card,
.access-card,
.rsvp-card {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 24px 22px;
}

.detail-card,
.access-card,
.rsvp-card {
  border-top: 1px solid rgba(111, 74, 53, 0.12);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(100svh - 44px, 760px);
  padding-top: 22px;
  padding-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3,
legend {
  margin: 0;
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 10vw, 3.7rem);
  line-height: 0.94;
}

h2 {
  font-size: 2rem;
}

.hero-copy,
.detail-grid p,
.field span,
.form-status {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}

.hero-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.92rem;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.mosaic-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(125, 88, 62, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 20px 32px rgba(105, 68, 49, 0.14);
  opacity: 0;
  transform: translateY(26px) scale(0.96);
  filter: blur(12px);
  animation: floatIn 0.95s cubic-bezier(0.18, 0.84, 0.24, 1) forwards;
}

.mosaic-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.08));
  pointer-events: none;
  z-index: 1;
}

.mosaic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mosaic-wide {
  grid-column: span 6;
  aspect-ratio: 1.95 / 1;
  animation-delay: 0.12s;
}

.mosaic-wide img {
  object-position: center 40%;
}

.mosaic-third {
  grid-column: span 2;
  aspect-ratio: 0.82 / 1;
}

.mosaic-half {
  grid-column: span 3;
  aspect-ratio: 1.22 / 1;
}

.mosaic-photo-01 {
  animation-delay: 0.34s;
}

.mosaic-photo-01 img {
  object-position: center 72%;
}

.mosaic-photo-03 {
  animation-delay: 0.42s;
}

.mosaic-photo-03 img {
  object-position: center 32%;
}

.mosaic-photo-04 {
  animation-delay: 0.5s;
}

.mosaic-photo-04 img {
  object-position: center 46%;
}

.mosaic-photo-02 {
  animation-delay: 0.58s;
}

.mosaic-photo-02 img {
  object-position: center 60%;
}

.mosaic-photo-05 {
  animation-delay: 0.66s;
}

.mosaic-photo-05 img {
  object-position: center 70%;
}

.section-heading {
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  gap: 0;
}

.detail-grid article {
  padding: 14px 2px;
  border-top: 1px solid rgba(122, 98, 85, 0.12);
}

.detail-grid article:first-child {
  padding-top: 0;
  border-top: 0;
}

.detail-grid h3 {
  margin-bottom: 6px;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-grid p {
  margin: 0;
  font-size: 1rem;
}

.detail-grid p + p {
  margin-top: 4px;
}

.access-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 98, 85, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 34px rgba(105, 68, 49, 0.1);
}

.access-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.access-note {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.access-note p {
  margin: 0;
  color: var(--muted);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rsvp-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.88rem;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(122, 98, 85, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 1rem;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.6;
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid rgba(168, 106, 74, 0.35);
  outline-offset: 2px;
}

.choice-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.choice-group legend {
  margin-bottom: 4px;
  font-size: 0.92rem;
  color: var(--muted);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(122, 98, 85, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.choice-card:has(input:checked) {
  border-color: rgba(168, 106, 74, 0.48);
  box-shadow: 0 10px 22px rgba(168, 106, 74, 0.14);
  transform: translateY(-1px);
}

.choice-card input {
  margin: 0;
  accent-color: var(--accent);
}

.choice-card span {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  font-size: 0.98rem;
}

.submit-button {
  margin-top: 4px;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fffaf6;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 18px 32px rgba(127, 77, 51, 0.26);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.form-status.is-success {
  color: #2b6b4b;
}

.form-status.is-error {
  color: #a44639;
}

.reveal-sequence {
  opacity: 0;
  transform: translateY(24px);
  animation: sectionIn 0.8s ease forwards;
}

.detail-card {
  animation-delay: 0.22s;
}

.access-card {
  animation-delay: 0.3s;
}

.rsvp-card {
  animation-delay: 0.38s;
}

@keyframes floatIn {
  0% {
    opacity: 0;
    filter: blur(16px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes pulse {
  from {
    transform: scale(0.9);
  }
  to {
    transform: scale(1.08);
  }
}

@keyframes sectionIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 431px) {
  .page-shell {
    padding-top: 24px;
    padding-bottom: 32px;
  }
}
