/* Pixel wedding invitation — soft garden dusk palette */
:root {
  --ink: #2a2430;
  --ink-soft: #5a5160;
  --rose: #e07a8a;
  --rose-deep: #c45a6c;
  --sage: #6f9b7a;
  --sage-deep: #4d7a5a;
  --sky-top: #f7c9b8;
  --sky-mid: #f0a8b0;
  --sky-low: #d4e4c8;
  --soil: #8b6b4a;
  --soil-dark: #6b4f35;
  --paper: #fff5f0;
  --wax: #c23b4a;
  --gold: #e8c07a;
  --pixel: 4px;
  --font-pixel: "Press Start 2P", system-ui, sans-serif;
  --font-cn: "ZCOOL KuaiLe", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font-cn);
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, #ffd4c8 0%, transparent 55%),
    linear-gradient(180deg, #f5d5c8 0%, #e8c4c8 35%, #d5e0c8 70%, #c8d4b8 100%);
  image-rendering: pixelated;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button,
input,
textarea {
  font: inherit;
  font-size: 16px; /* prevent iOS zoom on focus */
}

/* —— Seal screen —— */
.seal-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 50% 30%, #ffc8b8 0%, transparent 50%),
    linear-gradient(180deg, #e8a090 0%, #c88a98 50%, #8a9a78 100%);
  transition: opacity 0.6s ease, visibility 0.6s;
}

.seal-screen.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.seal {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem;
  animation: float-seal 3s ease-in-out infinite;
  perspective: 600px;
}

.seal:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 8px;
}

.envelope {
  position: relative;
  width: min(280px, 72vw);
  aspect-ratio: 280 / 176;
  filter: drop-shadow(0 12px 0 rgba(42, 36, 48, 0.15));
}

.envelope-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.envelope-flap {
  transform-box: view-box;
  transform-origin: 140px 44px;
  transition: transform 0.55s ease;
}

.seal.is-opening .envelope-flap {
  transform: rotateX(-160deg);
}

.envelope-initials {
  position: absolute;
  left: 50%;
  top: 72%;
  transform: translate(-50%, -50%);
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--rose-deep);
  letter-spacing: 0.15em;
  z-index: 1;
  pointer-events: none;
}

.wax-seal {
  position: absolute;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wax);
  border: 4px solid var(--ink);
  color: var(--gold);
  font-size: 1.4rem;
  display: grid;
  place-items: center;
  z-index: 3;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.seal:hover .wax-seal,
.seal:focus-visible .wax-seal {
  transform: translate(-50%, -50%) scale(1.08);
}

.seal-hint {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.8;
  color: var(--ink);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.4);
  animation: blink-hint 1.6s steps(2) infinite;
}

@keyframes float-seal {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes blink-hint {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* —— Main —— */
.invite {
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}

.invite.is-unlocked {
  opacity: 1;
  transform: none;
}

.invite.is-locked {
  pointer-events: none;
  max-height: 100vh;
  overflow: hidden;
}

.particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding:
    0
    max(1.25rem, env(safe-area-inset-right))
    calc(7.5rem + env(safe-area-inset-bottom))
    max(1.25rem, env(safe-area-inset-left));
  overflow: hidden;
}

.pixel-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 45%, var(--sky-low) 78%, #9cb88a 100%);
  z-index: 0;
}

.pixel-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(42, 36, 48, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 36, 48, 0.15) 1px, transparent 1px);
  background-size: 8px 8px;
  pointer-events: none;
}

.pixel-sun {
  position: absolute;
  top: 12%;
  right: 14%;
  width: 64px;
  height: 64px;
  background: #ffd27a;
  border: 4px solid var(--ink);
  box-shadow:
    0 0 0 8px rgba(255, 210, 122, 0.35),
    8px 8px 0 rgba(42, 36, 48, 0.12);
  animation: sun-pulse 4s ease-in-out infinite;
}

@keyframes sun-pulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(255, 210, 122, 0.35), 8px 8px 0 rgba(42, 36, 48, 0.12); }
  50% { box-shadow: 0 0 0 14px rgba(255, 210, 122, 0.45), 8px 8px 0 rgba(42, 36, 48, 0.12); }
}

.pixel-cloud {
  position: absolute;
  background: #fff6f0;
  border: 3px solid var(--ink);
  height: 28px;
  animation: cloud-drift 28s linear infinite;
}

.pixel-cloud::before,
.pixel-cloud::after {
  content: "";
  position: absolute;
  background: #fff6f0;
  border: 3px solid var(--ink);
}

.pixel-cloud.c1 {
  top: 18%;
  left: -20%;
  width: 72px;
  animation-duration: 32s;
}

.pixel-cloud.c1::before {
  width: 36px;
  height: 28px;
  top: -18px;
  left: 12px;
}

.pixel-cloud.c1::after {
  width: 28px;
  height: 22px;
  top: -12px;
  right: 10px;
}

.pixel-cloud.c2 {
  top: 28%;
  left: -30%;
  width: 96px;
  animation-duration: 40s;
  animation-delay: -12s;
  opacity: 0.85;
}

.pixel-cloud.c2::before {
  width: 40px;
  height: 30px;
  top: -20px;
  left: 20px;
}

.pixel-cloud.c2::after {
  width: 32px;
  height: 24px;
  top: -14px;
  right: 16px;
}

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(140vw); }
}

.pixel-bird {
  position: absolute;
  width: 12px;
  height: 4px;
  background: var(--ink);
  opacity: 0.55;
  animation: bird-fly 18s linear infinite;
}

.pixel-bird::before,
.pixel-bird::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 3px;
  background: var(--ink);
  top: -2px;
}

.pixel-bird::before {
  left: -8px;
  transform: rotate(-25deg);
}

.pixel-bird::after {
  right: -8px;
  transform: rotate(25deg);
}

.pixel-bird.b1 {
  top: 22%;
  left: -10%;
  animation-duration: 22s;
}

.pixel-bird.b2 {
  top: 32%;
  left: -15%;
  animation-duration: 28s;
  animation-delay: -8s;
  transform: scale(0.8);
}

@keyframes bird-fly {
  0% { transform: translate(0, 0); }
  25% { transform: translate(30vw, -12px); }
  50% { transform: translate(60vw, 8px); }
  75% { transform: translate(90vw, -6px); }
  100% { transform: translate(120vw, 0); }
}

.hero-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background:
    repeating-linear-gradient(
      90deg,
      var(--sage-deep) 0 12px,
      #5a8a68 12px 24px
    );
  border-top: 4px solid var(--ink);
  z-index: 1;
}

.hero-ground::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 28px;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 16px,
      var(--sage) 16px 20px,
      transparent 20px 36px
    );
  clip-path: polygon(
    0 100%, 4% 40%, 8% 100%, 12% 20%, 16% 100%, 22% 50%, 28% 100%,
    34% 10%, 40% 100%, 48% 35%, 54% 100%, 62% 25%, 70% 100%,
    78% 45%, 84% 100%, 90% 15%, 96% 100%, 100% 60%, 100% 100%
  );
  background-color: var(--sage);
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 36rem;
}

.hero-eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-pixel);
  font-size: clamp(0.45rem, 1.8vw, 0.6rem);
  letter-spacing: 0.2em;
  color: var(--ink-soft);
}

.hero-names {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem 0.85rem;
  font-family: var(--font-cn);
  font-size: clamp(2.2rem, 11vw, 4.2rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(255, 245, 240, 0.7);
}

.hero-names .name {
  word-break: keep-all;
}

.hero-names .amp {
  font-family: var(--font-pixel);
  font-size: 0.45em;
  color: var(--rose-deep);
}

.hero-sub {
  margin: 1rem 0 1.75rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.pixel-couple {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
}

.sprite {
  width: 40px;
  height: 56px;
  image-rendering: pixelated;
  position: relative;
}

.sprite::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

/* CSS pixel bride (dress) */
.bride::before {
  background-image:
    linear-gradient(var(--ink) 0 0),
    linear-gradient(#f5d0c8 0 0),
    linear-gradient(#f5d0c8 0 0),
    linear-gradient(#fff 0 0),
    linear-gradient(#fff 0 0),
    linear-gradient(#fff 0 0),
    linear-gradient(var(--rose) 0 0),
    linear-gradient(#f5d0c8 0 0),
    linear-gradient(#f5d0c8 0 0);
  background-size:
    16px 8px,
    20px 12px,
    8px 8px,
    28px 20px,
    32px 8px,
    24px 10px,
    8px 6px,
    8px 10px,
    8px 10px;
  background-position:
    12px 0,
    10px 8px,
    16px 20px,
    6px 28px,
    4px 40px,
    8px 46px,
    16px 24px,
    10px 48px,
    22px 48px;
  background-repeat: no-repeat;
  animation: bounce-soft 1.2s steps(2) infinite;
}

.groom::before {
  background-image:
    linear-gradient(var(--ink) 0 0),
    linear-gradient(#e8c4a8 0 0),
    linear-gradient(#e8c4a8 0 0),
    linear-gradient(#3d4a5c 0 0),
    linear-gradient(#2a2430 0 0),
    linear-gradient(#e8c4a8 0 0),
    linear-gradient(#e8c4a8 0 0);
  background-size:
    16px 8px,
    20px 12px,
    8px 8px,
    24px 22px,
    24px 12px,
    8px 10px,
    8px 10px;
  background-position:
    12px 0,
    10px 8px,
    16px 20px,
    8px 28px,
    8px 42px,
    8px 48px,
    24px 48px;
  background-repeat: no-repeat;
  animation: bounce-soft 1.2s steps(2) infinite 0.15s;
}

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* —— Buttons —— */
.btn.pixel-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  border: 3px solid var(--ink);
  background: var(--rose);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s;
  -webkit-user-select: none;
  user-select: none;
}

.btn.pixel-btn:hover {
  background: var(--rose-deep);
}

.btn.pixel-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn.pixel-btn.ghost {
  background: var(--paper);
  color: var(--ink);
}

.btn.pixel-btn.ghost:hover {
  background: #ffe8de;
}

.btn.pixel-btn.small {
  font-size: 0.45rem;
  padding: 0.6rem 0.9rem;
}

.btn.pixel-btn[aria-pressed="true"] {
  background: var(--sage);
}

.music-icon {
  display: inline-block;
}

.btn.pixel-btn[aria-pressed="true"] .music-icon {
  animation: note-bounce 0.6s steps(2) infinite;
}

@keyframes note-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* —— Sections —— */
.section {
  position: relative;
  padding: 4.5rem max(1.25rem, env(safe-area-inset-right)) 4.5rem max(1.25rem, env(safe-area-inset-left));
  max-width: 40rem;
  margin: 0 auto;
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-pixel);
  font-size: clamp(0.7rem, 2.5vw, 0.9rem);
  line-height: 1.6;
  text-align: center;
  color: var(--ink);
}

.section-lead {
  margin: 0 0 2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* Countdown */
.countdown-section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  max-width: 28rem;
  margin: 0 auto;
}

.count-block {
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(42, 36, 48, 0.2);
  padding: 1rem 0.4rem;
  text-align: center;
}

.count-block span {
  display: block;
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 4vw, 1.35rem);
  color: var(--rose-deep);
}

.count-block small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Details */
.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-item {
  width: 100%;
  appearance: none;
  border: 3px solid var(--ink);
  background: var(--paper);
  min-height: 64px;
  padding: 1rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.25rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(42, 36, 48, 0.15);
  transition: transform 0.1s, box-shadow 0.1s, background 0.2s;
}

.detail-item:hover,
.detail-item.is-active {
  background: #ffe8de;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 rgba(42, 36, 48, 0.18);
}

.detail-icon {
  grid-row: 1 / 3;
  align-self: center;
  font-family: var(--font-pixel);
  font-size: 1rem;
  width: 2rem;
  text-align: center;
  color: var(--rose-deep);
}

.detail-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--sage-deep);
}

.detail-value {
  font-size: 1.05rem;
  color: var(--ink);
}

.detail-panel {
  margin-top: 1rem;
  padding: 1.1rem;
  border: 3px dashed var(--ink);
  background: rgba(255, 245, 240, 0.7);
  animation: panel-in 0.25s ease;
}

.detail-panel p {
  margin: 0 0 0.9rem;
  line-height: 1.6;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Garden */
.garden {
  max-width: 28rem;
}

.garden-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 1.6;
  color: var(--ink);
}

.garden-hud b {
  color: var(--rose-deep);
}

.garden-plot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--soil-dark);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(42, 36, 48, 0.2);
  touch-action: manipulation;
}

.tile {
  aspect-ratio: 1;
  min-height: 56px;
  border: 3px solid var(--ink);
  background: var(--soil);
  cursor: pointer;
  position: relative;
  image-rendering: pixelated;
  transition: filter 0.15s;
  -webkit-user-select: none;
  user-select: none;
}

.tile:hover:not(.grown) {
  filter: brightness(1.1);
}

.tile:active:not(.grown) {
  transform: scale(0.96);
}

.tile.grown {
  cursor: default;
  background: #5a8a4a;
}

.tile .sprout {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  animation: pop 0.3s steps(3);
  pointer-events: none;
}

@keyframes pop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.blessing {
  margin-top: 1.25rem;
  padding: 1.2rem;
  border: 3px solid var(--ink);
  background: linear-gradient(135deg, #ffe8de, #e8f0e0);
  text-align: center;
  animation: panel-in 0.4s ease;
}

.blessing p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Story timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-item {
  padding: 1.15rem 1.2rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 4px 4px 0 rgba(42, 36, 48, 0.12);
  transition: transform 0.2s ease, background 0.2s;
}

.timeline-item:hover,
.timeline-item:focus-visible {
  transform: translateX(6px);
  background: #fff0ea;
  outline: none;
}

.timeline-item .level {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--rose-deep);
}

.timeline-item h3 {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 400;
}

.timeline-item p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* RSVP */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.rsvp-form label,
.rsvp-form fieldset {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border: none;
  margin: 0;
  padding: 0;
}

.rsvp-form legend,
.rsvp-form label > span {
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: var(--sage-deep);
}

.rsvp-form input[type="text"],
.rsvp-form textarea,
.rsvp-form input[type="number"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  outline: none;
  font-size: 16px;
  border-radius: 0;
}

.rsvp-form input:focus,
.rsvp-form textarea:focus {
  box-shadow: 3px 3px 0 var(--rose);
}

.rsvp-form fieldset {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.radio {
  flex-direction: row !important;
  align-items: center;
  gap: 0.4rem !important;
  padding: 0.55rem 0.8rem;
  border: 3px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.radio:has(input:checked) {
  background: #ffe0d8;
}

.radio input {
  accent-color: var(--rose-deep);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 3px solid var(--ink);
  background: var(--paper);
  width: fit-content;
}

.stepper button {
  appearance: none;
  width: 3rem;
  height: 3rem;
  min-width: 48px;
  min-height: 48px;
  border: none;
  background: transparent;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
}

.stepper button:hover {
  background: #ffe8de;
}

.stepper input {
  width: 3rem !important;
  text-align: center;
  border: none !important;
  border-left: 3px solid var(--ink) !important;
  border-right: 3px solid var(--ink) !important;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  padding: 0.5rem 0 !important;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  appearance: none;
}

.rsvp-success {
  text-align: center;
  padding: 2rem 1rem;
  animation: panel-in 0.35s ease;
}

.rsvp-success p {
  font-size: 1.15rem;
  margin: 0 0 1.25rem;
}

.pixel-heart-burst {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  background: var(--rose);
  clip-path: polygon(
    50% 90%,
    15% 55%,
    15% 35%,
    30% 20%,
    50% 30%,
    70% 20%,
    85% 35%,
    85% 55%
  );
  border: none;
  animation: heart-pulse 0.8s steps(2) infinite;
}

@keyframes heart-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.footer {
  text-align: center;
  padding:
    2.5rem
    max(1rem, env(safe-area-inset-right))
    calc(3.5rem + env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.footer-note {
  margin: 0.5rem 0 0;
  font-family: var(--font-cn);
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  .seal-hint {
    font-size: 0.5rem;
    max-width: 16rem;
    text-align: center;
  }

  .envelope {
    width: min(260px, 78vw);
  }

  .hero {
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom));
  }

  .hero-content {
    width: 100%;
  }

  .hero-eyebrow {
    font-size: 0.42rem;
    letter-spacing: 0.12em;
  }

  .hero-names {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
  }

  .hero-names .amp {
    font-size: 0.4em;
  }

  .hero-sub {
    font-size: 1rem;
    padding: 0 0.25rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .pixel-couple {
    bottom: 12%;
    transform: translateX(-50%) scale(0.9);
  }

  .pixel-sun {
    width: 48px;
    height: 48px;
    top: 10%;
    right: 10%;
  }

  .section {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .section-title {
    font-size: 0.62rem;
    line-height: 1.8;
  }

  .section-lead {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }

  .countdown {
    gap: 0.4rem;
  }

  .count-block {
    padding: 0.8rem 0.15rem;
  }

  .count-block span {
    font-size: 0.85rem;
  }

  .count-block small {
    font-size: 0.75rem;
  }

  .detail-value {
    font-size: 0.95rem;
    line-height: 1.45;
    word-break: break-word;
  }

  .garden-hud {
    font-size: 0.4rem;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .garden-plot {
    gap: 5px;
    padding: 8px;
  }

  .tile {
    min-height: 64px;
  }

  .rsvp-form fieldset {
    flex-direction: column;
  }

  .radio {
    width: 100%;
    min-height: 48px;
  }

  .timeline-item h3 {
    font-size: 1.15rem;
  }
}

@media (max-width: 380px) {
  .hero-names {
    font-size: 2rem;
  }

  .garden-plot {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
