:root {
  --teal: #2c726b;
  --lavender: #dfcde5;
  --mist: #e1eceb;
  --ink: #2c726b;
  --link: #9b70a8;
  --paper: #fff;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }
p { margin: 0; }

body {
  --font-sans: "Noto Sans JP", sans-serif;
  --font-script: "Damion", cursive;
  --font-abril: "Abril Fatface", serif;
  background: #f3f6f5;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
}

button, input, select, textarea { font-family: inherit; }

a { color: var(--link); }

.stage {
  min-height: 100svh;
  background: #e7f0ee url("../ornaments/com_bg.jpg") repeat;
}

.phone {
  position: relative;
  width: 100%;
  background: #fff;
}

.nav-anchor {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 0;
}

.menu-btn {
  position: absolute;
  top: 18px;
  right: 16px;
  z-index: 41;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-btn span {
  position: absolute;
  left: 5px;
  right: 5px;
  height: 2px;
  background: #fff;
  mix-blend-mode: difference;
  transition: 0.3s;
}

.menu-btn span:nth-child(1) { top: 10px; }
.menu-btn span:nth-child(2) { top: 16px; }
.menu-btn span:nth-child(3) { top: 22px; }

.menu-btn.is-open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

.menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100svh;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background: rgba(0, 0, 0, 0.84);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s;
}

.menu.is-open { opacity: 1; pointer-events: auto; }

.menu button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background: #1d3f3c;
  animation: inviteHue 9s linear infinite;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: heroFade 9s linear infinite;
}

.hero-slide:nth-child(2) { animation-delay: 3s; }
.hero-slide:nth-child(3) { animation-delay: 6s; }

@keyframes heroFade {
  0% { opacity: 0; }
  11% { opacity: 1; }
  33% { opacity: 1; }
  44% { opacity: 0; }
  100% { opacity: 0; }
}

.hero-shade {
  position: absolute;
  inset: 0;
  /* background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.12) 40%, rgba(0,0,0,.35)); */
  z-index: 1;
}

.hero-date {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 26px;
  display: flex;
  gap: 10px;
  font-family: var(--font-abril), "Abril Fatface", serif;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: var(--hero-ink);
  animation: rise 1s ease 1.1s both;
}

.hero-mark {
  position: absolute;
  z-index: 2;
  right: 18px;
  width: min(72vw, 280px);
  animation: rise 1s ease both;
}

.hero-mark.invite {
  top: 72px;
  aspect-ratio: 302.39 / 144.7;
  background-color: var(--hero-ink);
  -webkit-mask: url("../ornaments/mv_txt.svg") center / contain no-repeat;
  mask: url("../ornaments/mv_txt.svg") center / contain no-repeat;
  mask-mode: alpha;
  animation: rise 1s ease 1.6s both;
}

@property --hero-ink {
  syntax: "<color>";
  inherits: true;
  initial-value: #2c726b;
}

@keyframes inviteHue {
  0% { --hero-ink: #fff; }
  11%, 66% { --hero-ink: #2c726b; }
  77%, 100% { --hero-ink: #fff; }
}

.hero-mark.wedding {
  top: 210px;
  width: min(42vw, 150px);
  aspect-ratio: 140.21 / 60.93;
  background-color: var(--hero-ink);
  -webkit-mask: url("../ornaments/mv_wedding-txt.svg") center / contain no-repeat;
  mask: url("../ornaments/mv_wedding-txt.svg") center / contain no-repeat;
  mask-mode: alpha;
  animation: rise 1s ease 2s both;
}

.curtain {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #fff;
  animation: sweep 2.6s ease forwards;
  pointer-events: none;
}

@keyframes sweep {
  0% { transform: scaleX(1); transform-origin: left; }
  35% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

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

.crop { position: relative; width: 100%; height: 100%; overflow: hidden; }
.crop img { position: absolute; max-width: none; display: block; }

.section-title {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  margin: 0 0 28px;
  text-align: center;
}

.section-title .en {
  font-family: var(--font-script);
  font-size: 56px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--teal);
}

.section-title .ja {
  margin-top: 2px;
  font-size: 13px;
  letter-spacing: 0.18em;
}

.count {
  padding: 28px 18px 36px;
  background: #fff url("../ornaments/com_bg.jpg") repeat;
  text-align: center;
}

.count-ring {
  position: relative;
  width: min(86vw, 332px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--lavender) url("../ornaments/coutDown_frame.png") center / 92% no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-family: var(--font-sans);
}

.count-ring::before,
.count-ring::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.count-ring::before {
  top: 18px;
  width: 141px;
  height: 37px;
  background-image: url("../ornaments/countdown_top-txt.svg");
}

.count-ring::after {
  bottom: 22px;
  width: 141px;
  height: 30px;
  background-image: url("../ornaments/countdown_bottom-txt.svg");
}

.count-pending {
  visibility: hidden;
}

.count-days {
  font-size: 72px;
  line-height: 0.85;
  letter-spacing: 0.04em;
}

.count-days-label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.count-rest {
  display: flex;
  gap: 18px;
  margin-top: 14px;
}

.count-rest b {
  display: block;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.count-rest small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.count-date {
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: 0.04em;
}

.message {
  position: relative;
  margin: 0;
  padding: 28px 18px 36px;
  background: var(--lavender);
}

.message-inner {
  border: 1px solid var(--teal);
  padding: 42px 22px 28px;
  text-align: center;
}

.message-copy {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.9;
  margin: 0 0 28px;
}

.message-photo {
  position: relative;
  width: min(100%, 320px);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
}

.viewer-slide > .crop,
.message-photo > .crop,
.profile-photo > .crop,
.thumbs button > .crop {
  position: absolute;
  inset: 0;
}

.profile {
  padding: 56px 20px 28px;
  background: #fff url("../ornaments/com_bg.jpg") repeat;
  text-align: center;
}

.profile-card { margin: 0 auto 42px; max-width: 280px; }

.profile-photo {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto 18px;
}

.profile-photo::before {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--teal);
  border-radius: 50%;
}

.profile-photo .crop { border-radius: 50%; }

.profile-role { font-size: 13px; letter-spacing: 0.2em; margin-bottom: 4px; }
.profile-name { font-size: 20px; font-weight: 600; margin: 0 0 10px; }
.profile-text { font-size: 14px; line-height: 1.8; margin: 0; }

.album {
  padding: 52px 0 40px;
  background: var(--lavender);
}

.viewer {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.72;
  margin: 0;
  overflow: hidden;
  background: transparent;
}

.viewer-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
  opacity: 0;
  z-index: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: transform 0.75s ease, opacity 0.75s ease;
}

.viewer-slide.is-prev { transform: translate(calc(-50% - 94%), -50%) scale(0.78); }
.viewer-slide.is-next { transform: translate(calc(-50% + 94%), -50%) scale(0.78); }

.viewer-slide.is-near {
  opacity: 1;
  z-index: 1;
  cursor: pointer;
}

.viewer-slide.is-active {
  opacity: 1;
  z-index: 2;
  transform: translate(-50%, -50%) scale(1);
  box-shadow: 0 10px 28px rgba(44, 114, 107, 0.16);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.viewer-nav.prev { left: calc(15% + 4px); }
.viewer-nav.next { right: calc(15% + 4px); }
.viewer-nav img { width: 40px; height: 40px; }

.thumbs {
  display: flex;
  gap: 6px;
  padding: 12px 16px 0;
  overflow: hidden;
}

.thumbs button {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.thumbs button.is-active { border-color: var(--teal); }

.party {
  padding: 48px 0 40px;
  background: #fff url("../ornaments/com_bg.jpg") repeat;
}

.party .section-title .en {
  font-size: 44px;
  line-height: 1.05;
  white-space: pre-line;
}

.date-block { text-align: center; margin-bottom: 28px; }

.date-kicker {
  font-family: var(--font-script);
  letter-spacing: 0;
  font-size: 36px;
}

.date-line { font-size: 22px; letter-spacing: 0.06em; }
.date-line small { font-size: 15px; margin: 0 1px; }

.card {
  max-width: calc(100% - 40px);
  margin: 0 auto 16px;
  padding: 16px 18px 14px;
  border: 1px solid var(--teal);
  border-radius: 10px;
  background: #fff;
}

.card.venue { background: #efe6f2; }

.card h3 {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--teal);
  text-align: center;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.time-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}

.time-main b { font-size: 28px; font-weight: 500; font-family: var(--font-sans); }

.time-sub {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 14px;
}

.venue-name { font-size: 16px; letter-spacing: 0.04em; margin: 0 0 8px; }
.venue p { margin: 0 0 4px; font-size: 14px; line-height: 1.6; }
.venue a { word-break: break-all; }

.map {
  width: 100%;
  height: 220px;
  margin-top: 12px;
  border: 0;
}

.rsvp {
  padding: 36px 18px 48px;
  background: var(--teal);
  color: #fff;
}

.rsvp-head { text-align: center; }

.rsvp-head .en {
  font-family: var(--font-script);
  font-size: 50px;
  line-height: 1;
  letter-spacing: 0;
}

.rsvp-head h2 {
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.rsvp-head p { margin: 0; font-size: 15px; line-height: 1.7; }

.rsvp-limit {
  display: inline-block;
  margin: 4px 0;
  font-size: 20px;
  text-decoration: underline;
}

.note {
  margin: 14px auto 0;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid #fff;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.event-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 4px;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.event-line::before,
.event-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.85);
}

.attend-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 0;
}

.attend {
  width: 100px;
  height: 100px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  position: relative;
}

.attend::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../ornaments/attend.png") center / contain no-repeat;
  opacity: 0.45;
}

.attend.is-on::before { opacity: 1; }

.attend span,
.attend small {
  position: relative;
  z-index: 1;
  display: block;
}

.attend span { font-size: 18px; }
.attend small { margin-top: 2px; font-size: 12px; }

.form-card {
  margin-top: 18px;
  padding: 30px 20px 34px;
  background: #fff;
  color: #333;
}

.req { color: #ff1b1b; }
.req-note { margin: 0 0 16px; font-size: 13px; }

.field { margin-bottom: 18px; }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field label,
.label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.rsvp input[type="text"],
.rsvp input[type="email"],
.rsvp input[type="tel"],
.rsvp select,
.rsvp textarea {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 16px;
}

.rsvp textarea { min-height: 110px; resize: vertical; line-height: 1.6; }

.other-input { margin-top: 10px; }

.help { margin: 0 0 10px; font-size: 12px; color: #797979; font-weight: 400; }
.error { margin: 0; font-size: 13px; color: #e65c7a; }

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid #d9d9d9;
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
}

.chip.is-on {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.submit {
  display: block;
  width: min(100%, 276px);
  margin: 28px auto 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 40px;
  background: var(--teal);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.submit:disabled { opacity: 0.7; cursor: default; }

.thanks { text-align: center; }
.thanks h3 { margin: 0 0 12px; font-size: 20px; letter-spacing: 0.08em; font-weight: 500; }
.thanks p { margin: 0; line-height: 1.8; font-size: 14px; }

.closed {
  margin-top: 18px;
  text-align: center;
  font-size: 16px;
}

.pc-only { display: none; }

footer.closing {
  padding: 28px 16px 40px;
  text-align: center;
  background: #fff;
  color: var(--teal);
  letter-spacing: 0;
  font-family: var(--font-script);
  font-size: 48px;
}

@media (min-width: 768px) {
  .stage {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 28px;
  }

  .phone {
    width: 375px;
    height: 680px;
    overflow: auto;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    flex: none;
  }

  .hero { height: 680px; min-height: 0; }

  .menu { height: 680px; border-radius: 18px; }

  .pc-only {
    display: block;
    width: 280px;
    color: var(--teal);
  }

  .pc-card {
    background: var(--lavender);
    padding: 36px 22px;
    text-align: center;
  }

  .pc-card + .pc-card { margin-top: 12px; }

  .pc-card .pc-names {
    font-family: var(--font-script);
    font-size: 40px;
    line-height: 1.1;
    margin: 0 0 4px;
    white-space: nowrap;
  }

  .pc-card .pc-date {
    font-family: var(--font-sans);
    font-size: 28px;
    margin: 0;
  }

  .pc-count {
    display: flex;
    justify-content: space-around;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--teal);
    font-family: var(--font-sans);
  }

  .pc-count b { display: block; font-size: 28px; font-weight: 500; }
  .pc-count small { font-family: var(--font-sans); font-size: 11px; letter-spacing: 0.08em; }

  .pc-card p { font-size: 14px; line-height: 1.7; margin: 0; }
  .pc-card .limit { font-size: 18px; text-decoration: underline; }

  .pc-jump {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 190px);
    height: 50px;
    margin: 18px auto 0;
    border: 1px solid var(--teal);
    background: transparent;
    color: var(--teal);
    font-weight: 700;
    cursor: pointer;
  }
}
