:root {
  --paper: #ffffff;
  --wash: #f4f6f4;
  --ink: #171918;
  --muted: #626863;
  --line: #c7cbc8;
  --line-strong: #7e8580;
  --forest: #385448;
  --rose: #8f625d;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "Batang", serif;
  --sans: "Noto Sans KR", "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --header-height: 90px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--header-height);
  border-bottom: 1px solid #e5e7e5;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: grid;
  grid-template-areas: "date nav action";
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, 1480px);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 18px 40px 16px;
}

.header-date {
  grid-area: date;
  justify-self: start;
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 13px;
}

.header-action {
  display: inline-flex;
  grid-area: action;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-width: 108px;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.header-action:hover {
  background: var(--ink);
  color: var(--paper);
}

.header-action[aria-current="page"] {
  background: var(--ink);
  color: var(--paper);
}

.primary-nav {
  display: flex;
  grid-area: nav;
  justify-content: center;
  gap: 28px;
  margin-top: 0;
}

.primary-nav a {
  position: relative;
  padding: 2px 0 5px;
  color: #343735;
  font-size: 11px;
  font-weight: 400;
}

.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

.view {
  animation: view-in 360ms ease both;
}

.content-shell {
  width: min(100%, 1360px);
  margin: 0 auto;
  padding: 72px 40px 100px;
}

.main-view {
  display: flex;
  min-height: calc(100svh - var(--header-height));
  padding: 0 34px 30px;
}

.main-announcement {
  display: grid;
  width: 100%;
  min-height: calc(100svh - var(--header-height) - 30px);
  margin: 0 auto;
  place-items: center;
  background: var(--wash);
}

.main-copy {
  display: flex;
  align-items: center;
  width: min(100%, 980px);
  padding: 50px 80px;
  flex-direction: column;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--forest);
  font-size: 12px;
  font-weight: 500;
}

.heart-mark {
  margin-top: 18px;
  color: var(--rose);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
}

.long-rule {
  width: 100%;
  height: 1px;
  margin: 34px 0 44px;
  background: var(--line-strong);
}

.main-copy h1 {
  display: flex;
  align-items: center;
  margin: 0;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 78px;
  font-weight: 400;
  line-height: 1.22;
}

.main-copy h1 em {
  margin: 16px 0;
  color: var(--muted);
  font-size: 25px;
  font-style: normal;
  font-weight: 400;
}

.main-date {
  margin: -14px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
}

.location-layout {
  width: min(100%, 1080px);
  padding-top: 96px;
}

.location-content {
  padding-top: 0;
}

.location-content h2,
.section-heading h2,
.rsvp-intro h2 {
  margin: 20px 0 28px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  line-height: 1.5;
}

.invitation-copy {
  margin: 0;
  color: #353a36;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 2;
}

.event-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
  margin-top: 70px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.event-detail p {
  margin: 0;
}

.detail-label {
  margin-bottom: 11px !important;
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
}

.detail-value {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

.detail-note {
  margin-top: 6px !important;
  color: var(--muted);
  font-size: 13px;
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.outline-button,
.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
}

.outline-button {
  min-width: 120px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  transition:
    border-color 180ms ease,
    background-color 180ms ease;
}

.outline-button:hover {
  border-color: var(--ink);
  background: var(--wash);
}

.text-button {
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.gallery-shell {
  width: min(100%, 1240px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 54px;
}

.section-heading h2 {
  margin-bottom: 14px;
}

.section-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.gallery-title-break::before {
  content: " ";
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.gallery-item {
  overflow: hidden;
  width: 100%;
  padding: 0;
  background: #ecefec;
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 500ms ease;
}

.gallery-item:hover img {
  transform: scale(1.025);
}

.gallery-item-portrait {
  aspect-ratio: 2 / 3;
}

.gallery-item-wide {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.rsvp-view {
  min-height: calc(100svh - var(--header-height));
  background: var(--wash);
}

.rsvp-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(500px, 1.2fr);
  gap: 8vw;
}

.rsvp-intro {
  position: sticky;
  top: calc(var(--header-height) + 54px);
  align-self: start;
  padding-top: 24px;
}

.rsvp-intro h2 {
  font-size: 46px;
}

.rsvp-intro > p {
  color: #3f4541;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
}

.seat-notice {
  margin-top: 38px;
  padding: 17px 0 17px 20px;
  border-left: 2px solid var(--forest);
}

.seat-notice p {
  margin: 0;
}

.seat-notice p:first-child {
  margin-bottom: 7px;
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
}

.seat-notice p:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

.rsvp-form-wrap {
  min-height: 640px;
  border: 1px solid #dfe2df;
  background: var(--paper);
}

.rsvp-form {
  display: flex;
  padding: 48px;
  flex-direction: column;
  gap: 30px;
}

.form-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field > label,
.form-field > legend {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
}

.optional {
  color: var(--muted);
  font-size: 11px;
  font-weight: 300;
}

input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  outline: 0;
  transition: border-color 180ms ease;
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  height: 48px;
  padding: 0 2px;
}

textarea {
  min-height: 112px;
  padding: 12px 2px;
  resize: vertical;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus {
  border-color: var(--forest);
}

input::placeholder,
textarea::placeholder {
  color: #9ba09c;
}

.segmented-control,
.compact-options {
  display: grid;
}

.segmented-control {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-control label,
.compact-options label {
  position: relative;
}

.segmented-control input,
.compact-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span,
.compact-options span {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.segmented-control label + label span,
.compact-options label + label span {
  border-left: 0;
}

.segmented-control input:checked + span,
.compact-options input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.segmented-control input:focus-visible + span,
.compact-options input:focus-visible + span {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

.attendance-fields {
  display: flex;
  margin-top: -4px;
  flex-direction: column;
  gap: 30px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(280px, 1.3fr);
  gap: 28px;
}

.number-field {
  position: relative;
}

.number-field input {
  padding-right: 34px;
}

.number-field span {
  position: absolute;
  top: 10px;
  right: 5px;
  color: var(--muted);
  pointer-events: none;
}

.choice-check {
  display: flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  cursor: pointer;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.choice-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.form-helper {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.arrival-options span {
  min-height: 58px;
}

.submit-button {
  min-height: 54px;
  margin-top: 2px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition:
    background-color 180ms ease,
    opacity 180ms ease;
}

.submit-button:hover {
  background: var(--forest);
}

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

.form-status {
  min-height: 24px;
  margin: -18px 0 0;
  color: #a23d34;
  font-size: 12px;
  text-align: center;
}

.rsvp-success {
  display: grid;
  min-height: 640px;
  padding: 48px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 48px;
  height: 48px;
  border: 1px solid var(--forest);
  place-items: center;
  color: var(--forest);
  font-size: 20px;
}

.rsvp-success h3 {
  margin: 26px 0 12px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
}

.rsvp-success p {
  margin: 0 0 26px;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 36px 92px;
  border: 0;
  background: rgba(14, 16, 15, 0.96);
  color: var(--paper);
}

.lightbox::backdrop {
  background: rgba(14, 16, 15, 0.96);
}

.lightbox[open] {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 60px;
  align-items: center;
}

.lightbox figure {
  display: grid;
  min-width: 0;
  max-height: calc(100svh - 72px);
  margin: 0;
  place-items: center;
}

.lightbox img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100svh - 120px);
  object-fit: contain;
}

.lightbox-close,
.lightbox-arrow {
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: Arial, sans-serif;
}

.lightbox-close {
  position: fixed;
  z-index: 1;
  top: 22px;
  right: 28px;
  width: 44px;
  height: 44px;
  font-size: 34px;
  font-weight: 200;
}

.lightbox-arrow {
  width: 52px;
  height: 64px;
  font-size: 44px;
  line-height: 1;
}

.lightbox-prev {
  justify-self: start;
}

.lightbox-next {
  justify-self: end;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .rsvp-layout {
    gap: 52px;
  }

  .location-content h2,
  .section-heading h2 {
    font-size: 35px;
  }

  .event-details {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .rsvp-layout {
    grid-template-columns: minmax(240px, 0.7fr) minmax(420px, 1.3fr);
  }

  .rsvp-form {
    padding: 38px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 64px;
  }

  html,
  body {
    touch-action: pan-x pan-y;
  }

  input[type="text"],
  input[type="tel"],
  input[type="number"],
  textarea {
    font-size: 16px;
  }

  .site-header {
    min-height: var(--header-height);
  }

  .header-inner {
    grid-template-areas: "nav action";
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: var(--header-height);
    padding: 12px 18px 10px;
    gap: 12px;
  }

  .header-date {
    display: none;
  }

  .header-action {
    min-width: 88px;
    min-height: 38px;
    padding: 8px 11px;
    font-size: 11px;
  }

  .primary-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 0;
  }

  .primary-nav a {
    min-width: 48px;
    text-align: center;
  }

  .content-shell {
    padding: 50px 22px 72px;
  }

  .main-view {
    padding: 0 14px 14px;
  }

  .main-announcement {
    min-height: calc(100svh - var(--header-height) - 14px);
  }

  .main-copy {
    padding: 42px 26px;
  }

  .long-rule {
    margin: 28px 0 38px;
  }

  .main-copy h1 {
    font-size: 46px;
    line-height: 1.28;
  }

  .main-copy h1 em {
    margin: 14px 0;
    font-size: 19px;
  }

  .main-date {
    margin-top: -10px;
    font-size: 12px;
  }

  .rsvp-layout {
    grid-template-columns: 1fr;
  }

  .location-layout {
    padding-top: 58px;
  }

  .location-content {
    padding-top: 0;
  }

  .location-content h2,
  .section-heading h2,
  .rsvp-intro h2 {
    font-size: 31px;
    line-height: 1.55;
  }

  .invitation-copy {
    font-size: 16px;
  }

  .event-details {
    margin-top: 48px;
  }

  .map-actions {
    align-items: stretch;
  }

  .outline-button {
    flex: 1 1 124px;
  }

  .text-button {
    flex-basis: 100%;
  }

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

  .gallery-title-break {
    display: block;
  }

  .gallery-title-break::before {
    content: "";
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gallery-item-portrait,
  .gallery-item-wide {
    grid-row: auto;
  }

  .gallery-item-portrait {
    grid-column: auto;
    aspect-ratio: 2 / 3;
  }

  .gallery-item-wide {
    grid-column: 1 / -1;
    aspect-ratio: 3 / 2;
  }

  .gallery-item:disabled {
    cursor: default;
    pointer-events: none;
  }

  .gallery-item:disabled img {
    transform: none;
  }

  .rsvp-layout {
    gap: 38px;
  }

  .rsvp-intro {
    position: static;
    padding-top: 0;
  }

  .rsvp-form-wrap,
  .rsvp-success {
    min-height: 0;
  }

  .rsvp-form,
  .rsvp-success {
    padding: 30px 22px;
  }

  .segmented-control {
    grid-template-columns: 1fr;
  }

  .segmented-control label + label span {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .compact-options span {
    padding: 8px 4px;
  }

  .lightbox {
    padding: 60px 12px 28px;
  }

  .lightbox[open] {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .lightbox-arrow {
    width: 40px;
    font-size: 36px;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding-right: 12px;
    padding-left: 12px;
    gap: 8px;
  }

  .primary-nav {
    gap: 9px;
  }

  .primary-nav a {
    min-width: 40px;
    font-size: 10px;
  }

  .header-action {
    min-width: 82px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .main-copy {
    padding-right: 18px;
    padding-left: 18px;
  }

  .main-copy h1 {
    font-size: 40px;
  }

  .compact-options span {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
