@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@400;500;600;700;900&display=swap");

:root {
  --red-950: #571318;
  --red-900: #741820;
  --red-800: #8f1d24;
  --red-700: #a82d33;
  --gold-700: #9b6a28;
  --gold-500: #c69b55;
  --gold-300: #dfc38f;
  --ink: #2d211d;
  --ink-soft: #6d5a50;
  --paper: #f8f1e4;
  --paper-deep: #eee1cc;
  --paper-light: #fffaf1;
  --white: #fffdfa;
  --border: rgba(130, 87, 42, 0.2);
  --success: #2d6f4e;
  --error: #a61d24;
  --shadow-sm: 0 8px 24px rgba(75, 35, 23, 0.08);
  --shadow-lg: 0 30px 80px rgba(75, 30, 18, 0.14);
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  color: white;
  background: var(--red-900);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}

.shell.narrow {
  width: min(900px, calc(100% - 48px));
}

.section-pad {
  padding: 112px 0;
}

.topbar {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  color: var(--white);
  background: rgba(87, 19, 24, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 2px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(223, 195, 143, 0);
  animation: logo-breathe 3s ease-in-out infinite;
  will-change: transform, box-shadow;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

@keyframes logo-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(223, 195, 143, 0);
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 0 0 5px rgba(223, 195, 143, 0.18), 0 0 16px rgba(255, 250, 241, 0.38);
  }
}

.brand-copy {
  display: grid;
  line-height: 1.25;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.topbar-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  min-height: 44px;
  padding: 0 22px;
  color: var(--red-950);
  background: var(--paper-light);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.topbar-action:hover {
  background: #fff;
  box-shadow: 0 8px 20px rgba(40, 6, 8, 0.22);
}

.hero {
  position: relative;
  min-height: 860px;
  overflow: hidden;
  color: var(--paper-light);
  background:
    radial-gradient(circle at 12% 22%, rgba(205, 145, 84, 0.2), transparent 25%),
    radial-gradient(circle at 86% 80%, rgba(71, 8, 15, 0.7), transparent 35%),
    var(--red-900);
}

.hero-photo {
  position: absolute;
  z-index: 0;
  top: 72px;
  right: 0;
  bottom: 0;
  width: 59%;
  margin: 0;
  overflow: hidden;
}

.hero-photo::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, var(--red-900) 0%, rgba(116, 24, 32, 0.82) 18%, rgba(87, 19, 24, 0.18) 68%, rgba(87, 19, 24, 0.08) 100%);
}

.hero-photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  box-shadow: inset 0 -180px 140px -100px rgba(87, 19, 24, 0.9);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
  filter: saturate(0.82) contrast(1.02) sepia(0.08);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 96px auto auto -100px;
  width: 360px;
  aspect-ratio: 1;
  opacity: 0.14;
  border: 1px solid var(--gold-300);
  border-radius: 50%;
  box-shadow: 0 0 0 42px transparent, 0 0 0 43px var(--gold-300), 0 0 0 84px transparent, 0 0 0 85px var(--gold-300);
}

.hero-pattern::before,
.hero-pattern::after {
  content: "";
  position: absolute;
  inset: 70px;
  border: 1px solid var(--gold-300);
  transform: rotate(45deg);
}

.hero-pattern::after {
  inset: 116px;
  transform: rotate(22.5deg);
}

.hero-branch {
  position: absolute;
  z-index: 1;
  top: 38px;
  right: -24px;
  width: min(36vw, 460px);
  display: none;
  opacity: 0.68;
}

.hero-branch svg {
  width: 100%;
  overflow: visible;
}

.branch-line {
  fill: none;
  stroke: var(--gold-300);
  stroke-width: 2;
}

.branch-line.thin {
  stroke-width: 1.2;
}

.leaves path {
  fill: none;
  stroke: var(--gold-300);
  stroke-width: 1.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 860px;
  padding-top: 128px;
  padding-bottom: 36px;
}

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--gold-300);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.36em;
}

.eyebrow span {
  width: 44px;
  height: 1px;
  background: currentColor;
}

.hero-layout {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(48px, 8vw, 120px);
  padding: 56px 0 52px;
}

.hero-main {
  max-width: 870px;
  text-align: left;
}

.hero-kicker {
  margin: 0 0 14px;
  color: var(--gold-300);
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 21px);
  letter-spacing: 0.5em;
  white-space: nowrap;
}

.hero h1 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 7.3vw, 92px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-shadow: 0 8px 30px rgba(46, 4, 8, 0.2);
}

.hero h1 i {
  color: var(--gold-300);
  font-size: 0.4em;
  font-style: normal;
}

.hero-subtitle {
  margin: 18px 0 0;
  color: rgba(255, 250, 241, 0.82);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.32em;
  white-space: nowrap;
}

.invitation-seal {
  position: absolute;
  right: 0;
  flex: 0 0 auto;
  padding: 16px 10px;
  color: var(--gold-300);
  border: 1px solid currentColor;
  box-shadow: inset 0 0 0 4px var(--red-900), inset 0 0 0 5px currentColor;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.event-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 205px;
  align-items: center;
  width: min(100%, 980px);
  margin: 0 auto;
  color: var(--ink);
  background: rgba(255, 250, 241, 0.96);
  border: 1px solid rgba(223, 195, 143, 0.62);
  box-shadow: var(--shadow-lg);
}

.event-date {
  display: grid;
  align-content: center;
  min-height: 160px;
  padding: 20px 30px;
  color: var(--paper-light);
  background: var(--red-950);
  text-align: center;
}

.event-date span {
  color: var(--gold-300);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.3em;
}

.event-date strong {
  margin: -3px 0;
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1.15;
}

.event-date small {
  font-size: 12px;
  letter-spacing: 0.18em;
}

.event-details {
  display: grid;
  gap: 14px;
  padding: 18px 36px;
}

.event-detail {
  display: flex;
  align-items: center;
  gap: 16px;
}

.event-detail + .event-detail {
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.event-detail svg {
  flex: 0 0 auto;
  width: 22px;
  fill: none;
  stroke: var(--red-800);
  stroke-width: 1.7;
}

.event-detail div {
  display: grid;
  grid-template-columns: 72px auto;
  align-items: baseline;
  column-gap: 12px;
  line-height: 1.5;
}

.event-detail span {
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.event-detail strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  word-break: keep-all;
}

.event-detail small {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 12px;
  word-break: keep-all;
}

.event-detail .hotel-address {
  font-size: 11px;
  line-height: 1.65;
  white-space: normal;
}

.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 13px;
  color: var(--red-800);
  background: rgba(143, 29, 36, 0.05);
  border: 1px solid rgba(143, 29, 36, 0.3);
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.map-link:hover {
  color: white;
  background: var(--red-800);
  border-color: var(--red-800);
}

.map-link svg {
  width: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

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

.event-detail .map-actions {
  display: flex;
  grid-column: 2;
  justify-self: start;
  margin-top: 7px;
}

.event-cta {
  display: grid;
  justify-items: stretch;
  gap: 12px;
  padding: 24px;
  border-left: 1px solid var(--border);
}

.event-cta p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.event-cta p strong {
  color: var(--red-800);
  font-family: var(--serif);
  font-size: 16px;
}

.primary-button,
.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 26px;
  color: var(--paper-light);
  background: var(--red-800);
  border: 1px solid var(--red-800);
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.16em;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(143, 29, 36, 0.2);
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms var(--ease);
}

.primary-button svg,
.submit-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.primary-button:hover,
.submit-button:hover {
  background: var(--red-950);
  box-shadow: 0 12px 28px rgba(105, 17, 23, 0.28);
  transform: translateY(-2px);
}

.primary-button:active,
.submit-button:active {
  transform: translateY(0);
}

.scroll-cue {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: auto;
  color: rgba(255, 250, 241, 0.58);
  font-size: 11px;
  letter-spacing: 0.22em;
}

.scroll-cue span {
  position: relative;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.25);
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  top: 0;
  width: 1px;
  height: 14px;
  background: var(--gold-300);
  animation: scroll-cue 2s var(--ease) infinite;
}

@keyframes scroll-cue {
  from { transform: translateY(-16px); }
  to { transform: translateY(36px); }
}

.letter-section {
  position: relative;
  background:
    linear-gradient(rgba(130, 87, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 87, 42, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 40px 40px;
}

.section-heading p {
  margin: 0 0 8px;
  color: var(--gold-700);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 50px);
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  word-break: keep-all;
  text-wrap: balance;
}

.section-heading.centered {
  text-align: center;
}

.heading-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 130px;
  margin: 22px auto 0;
}

.heading-flourish::before,
.heading-flourish::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gold-500);
}

.heading-flourish i {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold-500);
  transform: rotate(45deg);
}

.letter-card {
  position: relative;
  margin-top: 56px;
  padding: 72px 80px 64px;
  overflow: hidden;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.letter-card::before,
.letter-card::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
}

.letter-card::before {
  top: 18px;
  left: 18px;
  border-top: 1px solid var(--gold-500);
  border-left: 1px solid var(--gold-500);
}

.letter-card::after {
  right: 18px;
  bottom: 18px;
  border-right: 1px solid var(--gold-500);
  border-bottom: 1px solid var(--gold-500);
}

.letter-watermark {
  position: absolute;
  right: -8px;
  bottom: -105px;
  color: rgba(143, 29, 36, 0.045);
  font-family: var(--serif);
  font-size: 320px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.letter-card p,
.letter-card footer {
  position: relative;
  z-index: 1;
}

.letter-card p {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 2.15;
  text-align: justify;
}

.letter-card > p:not(.salutation):not(.letter-closing) {
  text-indent: 2em;
}

.letter-card .salutation {
  margin-bottom: 10px;
  font-weight: 600;
}

.letter-card strong {
  color: var(--red-800);
  font-weight: 700;
}

.letter-card .letter-closing {
  margin-top: 38px;
  margin-bottom: 12px;
  color: var(--red-800);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: right;
}

.letter-card footer {
  display: grid;
  justify-items: end;
  font-family: var(--serif);
  line-height: 1.8;
}

.letter-card footer time {
  color: var(--ink-soft);
  font-size: 14px;
}

.memories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.memories div {
  position: relative;
  padding: 28px 24px;
  background: rgba(255, 250, 241, 0.54);
  border-top: 2px solid var(--red-800);
  box-shadow: var(--shadow-sm);
}

.memories span {
  position: absolute;
  top: 16px;
  right: 20px;
  color: rgba(143, 29, 36, 0.12);
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
}

.memories strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 17px;
}

.memories p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.signup-section {
  position: relative;
  overflow: hidden;
  color: var(--paper-light);
  background: var(--red-950);
}

.signup-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M0 40h80M40 0v80M12 12l56 56M68 12L12 68' fill='none' stroke='%23dfc38f' stroke-width='.6'/%3E%3C/svg%3E");
}

.signup-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
}

.section-heading.light p {
  color: var(--gold-300);
}

.section-heading.light h2 {
  color: var(--paper-light);
}

.signup-copy {
  max-width: 470px;
  margin: 28px 0 42px;
  color: rgba(255, 250, 241, 0.72);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2;
}

.signup-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(223, 195, 143, 0.22);
}

.signup-facts > div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(223, 195, 143, 0.22);
}

.signup-facts span {
  color: var(--gold-300);
  font-size: 12px;
  letter-spacing: 0.15em;
  white-space: nowrap;
}

.signup-facts strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  word-break: keep-all;
}

.fact-location {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.fact-location small {
  color: rgba(255, 250, 241, 0.68);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
}

.signup-facts .map-actions {
  display: flex;
  gap: 8px;
  margin-top: 5px;
}

.signup-facts .map-link {
  color: var(--gold-300);
  background: rgba(255, 250, 241, 0.05);
  border-color: rgba(223, 195, 143, 0.4);
}

.signup-facts .map-link:hover {
  color: var(--red-950);
  background: var(--gold-300);
  border-color: var(--gold-300);
}

.signup-form {
  padding: 44px 48px 36px;
  color: var(--ink);
  background: var(--paper-light);
  border: 1px solid rgba(223, 195, 143, 0.55);
  box-shadow: var(--shadow-lg);
}

.form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 26px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.form-heading div {
  display: grid;
}

.form-heading span {
  color: var(--gold-700);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.form-heading strong {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.12em;
}

.form-heading svg {
  width: 54px;
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 1.2;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 20px;
}

.field-group {
  padding: 0;
  margin: 0 0 22px;
  border: 0;
}

.field-group > label,
.field-group > legend {
  display: block;
  padding: 0;
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.field-group > label span,
.field-group > legend span {
  margin-right: 6px;
  color: var(--gold-700);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.field-group em {
  color: var(--red-800);
  font-style: normal;
}

.field-group > input,
.years-inputs label {
  width: 100%;
  min-height: 50px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid rgba(109, 90, 80, 0.26);
  border-radius: 2px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field-group > input {
  padding: 0 15px;
}

.field-group input::placeholder {
  color: #a99b91;
}

.field-group input:hover {
  border-color: rgba(143, 29, 36, 0.48);
}

.field-group input:focus,
.years-inputs label:focus-within {
  background: white;
  border-color: var(--red-800);
  box-shadow: 0 0 0 3px rgba(143, 29, 36, 0.12);
}

.field-group.has-error > input,
.field-group.has-error .years-inputs label,
.field-group.has-error .segmented-control {
  border-color: var(--error);
}

.gender-group .segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 50px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(109, 90, 80, 0.26);
  border-radius: 2px;
}

.segmented-control label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  cursor: pointer;
}

.segmented-control label + label {
  border-left: 1px solid rgba(109, 90, 80, 0.2);
}

.segmented-control input {
  position: absolute;
  opacity: 0;
}

.segmented-control span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}

.segmented-control input:checked + span {
  color: white;
  background: var(--red-800);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid rgba(143, 29, 36, 0.3);
  outline-offset: -3px;
}

.years-inputs {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  align-items: center;
  gap: 10px;
}

.years-inputs label {
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.years-inputs input {
  min-width: 0;
  width: 100%;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  -moz-appearance: textfield;
}

.years-inputs input::-webkit-inner-spin-button,
.years-inputs input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.years-inputs small {
  color: var(--ink-soft);
}

.years-inputs > i {
  height: 1px;
  background: var(--gold-500);
}

.teaching-hint {
  margin: -2px 0 12px;
}

.teaching-list {
  display: grid;
  gap: 10px;
}

.teaching-entry {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
}

.teaching-entry label {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 50px;
  overflow: hidden;
  background: #fffdf8;
  border: 1px solid rgba(109, 90, 80, 0.26);
  border-radius: 2px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.teaching-entry label:hover {
  border-color: rgba(143, 29, 36, 0.48);
}

.teaching-entry label:focus-within {
  background: white;
  border-color: var(--red-800);
  box-shadow: 0 0 0 3px rgba(143, 29, 36, 0.12);
}

.teaching-entry select,
.teaching-entry input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.teaching-entry select {
  cursor: pointer;
}

.suffix-field input {
  padding-right: 4px;
}

.suffix-field small {
  flex: 0 0 auto;
  padding-right: 12px;
  color: var(--ink-soft);
}

.remove-teaching-button,
.add-teaching-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: var(--red-800);
  background: transparent;
  border: 1px solid rgba(143, 29, 36, 0.28);
  border-radius: 2px;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.remove-teaching-button {
  width: 48px;
  padding: 0;
}

.remove-teaching-button:hover,
.add-teaching-button:hover {
  color: white;
  background: var(--red-800);
  border-color: var(--red-800);
}

.remove-teaching-button svg,
.add-teaching-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.add-teaching-button {
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  margin-top: 10px;
  font-size: 12px;
}

.add-teaching-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.teaching-group.has-error .teaching-entry label {
  border-color: var(--error);
}

.field-hint,
.field-error {
  min-height: 18px;
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.field-hint {
  color: var(--ink-soft);
}

.field-error {
  color: var(--error);
}

.submit-button {
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  font-size: 16px;
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.privacy-note svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.stats-section {
  background: var(--paper);
}

.stats-summary {
  display: grid;
  grid-template-columns: 1.3fr 1px repeat(3, 1fr);
  align-items: center;
  max-width: 900px;
  margin: 54px auto 34px;
  padding: 30px 44px;
  background: var(--paper-light);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.total-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.total-stat span,
.mini-stat p {
  color: var(--ink-soft);
  font-size: 13px;
}

.total-stat strong {
  color: var(--red-800);
  font-family: var(--serif);
  font-size: 52px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.total-stat small,
.mini-stat small {
  color: var(--ink-soft);
  font-size: 12px;
}

.stat-divider {
  width: 1px;
  height: 56px;
  background: var(--border);
}

.mini-stat {
  display: grid;
  grid-template-columns: 9px auto;
  align-items: center;
  justify-content: center;
  column-gap: 7px;
  line-height: 1.25;
}

.mini-stat p {
  margin: 0;
  white-space: nowrap;
}

.mini-stat strong {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.mini-stat small {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  margin: 0 0 4px 36px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-male { background: #647f8e; }
.dot-female { background: var(--red-700); }
.dot-years { background: var(--gold-500); }

.stats-panel {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 34px 32px;
  background: rgba(255, 250, 241, 0.74);
  border: 1px solid var(--border);
}

.stats-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.stats-panel-heading div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.stats-panel-heading span {
  font-family: var(--serif);
  font-weight: 600;
  white-space: nowrap;
}

.stats-panel-heading small {
  color: var(--ink-soft);
  font-size: 11px;
}

.local-badge {
  padding: 4px 10px;
  color: var(--gold-700);
  background: rgba(198, 155, 85, 0.12);
  border: 1px solid rgba(155, 106, 40, 0.25);
  font-family: var(--sans) !important;
  font-size: 10px;
  font-weight: 500 !important;
}

.decade-chart {
  min-height: 180px;
}

.chart-empty {
  display: grid;
  justify-items: center;
  padding: 30px 0 8px;
  color: var(--ink-soft);
  text-align: center;
}

.chart-empty svg {
  width: 48px;
  margin-bottom: 8px;
  fill: none;
  stroke: var(--gold-500);
  stroke-width: 1.4;
}

.chart-empty strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.chart-empty span {
  font-size: 11px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(12px, 4vw, 42px);
  height: 180px;
  padding: 32px 12px 0;
}

.chart-bar {
  display: grid;
  grid-template-rows: 20px 1fr 22px;
  align-items: end;
  justify-items: center;
  width: min(68px, 15%);
  height: 100%;
}

.chart-bar strong {
  color: var(--red-800);
  font-family: var(--serif);
  font-size: 13px;
}

.chart-bar i {
  width: min(34px, 80%);
  min-height: 5px;
  background: var(--red-800);
  border-top: 3px solid var(--gold-500);
  transition: height 350ms var(--ease);
}

.chart-bar span {
  color: var(--ink-soft);
  font-size: 11px;
}

.stats-note {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.closing-section {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--paper-light);
  background: var(--red-900);
  text-align: center;
}

.closing-section::before,
.closing-section::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(223, 195, 143, 0.14);
  transform: rotate(45deg);
}

.closing-section::before { left: -150px; top: -80px; }
.closing-section::after { right: -150px; bottom: -80px; }

.closing-inner {
  position: relative;
  z-index: 1;
}

.closing-inner p {
  margin: 0 0 8px;
  color: var(--gold-300);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.28em;
}

.closing-inner h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5.8vw, 62px);
  letter-spacing: 0.16em;
  word-break: keep-all;
}

.closing-inner > span {
  display: block;
  margin-top: 16px;
  color: rgba(255, 250, 241, 0.7);
  font-size: 13px;
  letter-spacing: 0.32em;
}

.closing-seal {
  position: absolute;
  top: 50%;
  right: 8%;
  padding: 9px;
  color: var(--gold-300);
  border: 1px solid currentColor;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.25;
  transform: translateY(-50%) rotate(6deg);
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 18px max(24px, calc((100vw - 1160px) / 2));
  color: rgba(255, 250, 241, 0.65);
  background: #3b0e12;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.page-footer p {
  margin: 0;
}

.music-toggle {
  position: fixed;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  color: var(--gold-300);
  background: rgba(87, 19, 24, 0.94);
  border: 1px solid rgba(223, 195, 143, 0.62);
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(46, 4, 8, 0.25);
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 180ms var(--ease), background 180ms ease, box-shadow 180ms ease;
}

.music-toggle:hover {
  background: var(--red-800);
  box-shadow: 0 12px 34px rgba(46, 4, 8, 0.34);
  transform: translateY(-2px);
}

.music-toggle:active { transform: scale(0.96); }

.music-toggle svg {
  width: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.music-bars {
  position: absolute;
  right: 5px;
  bottom: 8px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  padding: 2px;
  background: var(--red-950);
  border-radius: 8px;
}

.music-bars i {
  display: block;
  width: 2px;
  height: 3px;
  background: var(--paper-light);
  border-radius: 2px;
  opacity: 0.45;
  transform-origin: bottom;
}

.music-toggle.is-playing .music-bars i {
  opacity: 1;
  animation: music-bar 780ms ease-in-out infinite alternate;
}

.music-toggle.is-playing .music-bars i:nth-child(2) { animation-delay: -260ms; }
.music-toggle.is-playing .music-bars i:nth-child(3) { animation-delay: -520ms; }

@keyframes music-bar {
  from { transform: scaleY(0.75); }
  to { transform: scaleY(2.6); }
}

.toast {
  position: fixed;
  z-index: 500;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(360px, calc(100vw - 32px));
  padding: 16px 20px;
  color: white;
  background: var(--success);
  box-shadow: 0 20px 50px rgba(20, 45, 30, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 220ms ease, transform 220ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast svg {
  width: 26px;
  fill: none;
  stroke: white;
  stroke-width: 2;
}

.toast div {
  display: grid;
  line-height: 1.4;
}

.toast strong {
  font-family: var(--serif);
}

.toast span {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-content { min-height: 790px; }
  .hero-layout { gap: 40px; }
  .hero h1 { font-size: clamp(42px, 8vw, 66px); }
  .event-card { grid-template-columns: 130px 1fr; }
  .event-cta { grid-column: 2; padding-top: 0; border-left: 0; }
  .event-cta p { display: none; }
  .signup-grid { grid-template-columns: 1fr; }
  .signup-intro { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .signup-copy { margin-bottom: 0; }
  .signup-facts { grid-column: 2; grid-row: 1 / 3; align-self: end; }
}

@media (max-width: 700px) {
  .shell,
  .shell.narrow { width: min(100% - 32px, 560px); }
  .section-pad { padding: 78px 0; }
  .topbar { height: 64px; padding: 0 16px; }
  .brand-copy small { display: none; }
  .topbar-action { min-width: 86px; padding: 0 14px; }
  .hero-content { min-height: 760px; padding-top: 105px; }
  .hero-photo {
    top: 64px;
    width: 100%;
    height: 420px;
    opacity: 0.7;
  }
  .hero-photo::before {
    background: linear-gradient(180deg, rgba(87, 19, 24, 0.44), rgba(87, 19, 24, 0.82) 78%, var(--red-900));
  }
  .hero-photo::after { box-shadow: none; }
  .hero-photo img { object-position: 52% center; }
  .hero-branch { width: 250px; opacity: 0.42; }
  .hero-pattern { width: 250px; }
  .eyebrow { gap: 10px; font-size: 10px; letter-spacing: 0.22em; }
  .eyebrow span { width: 24px; }
  .hero-layout { align-items: flex-start; gap: 18px; padding: 58px 0 48px; }
  .hero-main { flex: 1; text-align: left; }
  .hero-kicker { font-size: 14px; letter-spacing: 0.28em; }
  .hero h1 { display: grid; gap: 2px; font-size: clamp(42px, 13vw, 58px); letter-spacing: 0.08em; }
  .hero h1 i { line-height: 0.65; }
  .hero-subtitle { font-size: 13px; letter-spacing: 0.16em; }
  .invitation-seal { position: static; padding: 10px 7px; font-size: 17px; }
  .event-card { grid-template-columns: 92px 1fr; }
  .event-date { min-height: 152px; padding: 18px 12px; }
  .event-date strong { font-size: 46px; }
  .event-details { gap: 12px; padding: 16px; }
  .event-detail { gap: 10px; }
  .event-detail div { grid-template-columns: 1fr; gap: 0; }
  .event-detail span { display: none; }
  .event-detail strong { font-size: 12px; }
  .event-detail small { grid-column: 1; font-size: 10px; }
  .event-detail .map-actions { grid-column: 1; width: 100%; margin-top: 8px; gap: 6px; }
  .event-detail .map-link { flex: 1 1 calc(50% - 3px); min-width: 0; gap: 4px; padding-inline: 4px; font-size: 11px; letter-spacing: 0.03em; }
  .event-detail .map-link svg { width: 14px; }
  .event-cta { grid-column: 1 / 3; padding: 12px; border-top: 1px solid var(--border); }
  .primary-button { min-height: 48px; }
  .scroll-cue { margin-top: 24px; }
  .section-heading h2 { font-size: clamp(27px, 8.3vw, 31px); letter-spacing: 0.05em; white-space: nowrap; }
  .letter-card { margin-top: 40px; padding: 48px 28px; }
  .letter-card p { font-size: 16px; line-height: 2; }
  .letter-watermark { font-size: 240px; }
  .memories { grid-template-columns: 1fr; gap: 12px; }
  .memories div { padding: 22px; }
  .signup-intro { display: block; }
  .signup-copy { margin: 24px 0 32px; }
  .signup-facts { margin-bottom: 36px; }
  .signup-form { padding: 34px 22px 28px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .teaching-entry { grid-template-columns: 1fr 1fr auto; }
  .teaching-entry .level-field { grid-column: 1 / -1; }
  .form-heading strong { font-size: 21px; }
  .stats-summary { grid-template-columns: 1fr 1fr 1fr; padding: 24px 18px; }
  .total-stat { grid-column: 1 / 4; justify-content: center; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
  .stat-divider { display: none; }
  .mini-stat { justify-content: center; }
  .mini-stat small { margin-left: 28px; }
  .stats-panel { padding: 22px 18px; }
  .stats-panel-heading { align-items: flex-start; }
  .stats-panel-heading div { display: grid; gap: 0; }
  .local-badge { white-space: nowrap; }
  .chart-bars { gap: 10px; padding-inline: 0; }
  .chart-bar { width: 17%; }
  .closing-inner p { font-size: 12px; letter-spacing: 0.18em; }
  .closing-inner h2 { font-size: clamp(27px, 8vw, 34px); letter-spacing: 0.08em; white-space: nowrap; }
  .closing-seal { display: none; }
  .page-footer { display: grid; justify-content: center; gap: 2px; text-align: center; }
  .toast { right: 16px; bottom: 16px; }
  .music-toggle {
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 380px) {
  .shell,
  .shell.narrow { width: calc(100% - 24px); }
  .brand-copy strong { font-size: 14px; }
  .brand { gap: 9px; }
  .brand-mark { width: 38px; height: 38px; }
  .topbar-action { min-width: 82px; padding-inline: 12px; }
  .hero h1 { font-size: 41px; }
  .hero-subtitle { font-size: 11px; }
  .event-card { grid-template-columns: 84px 1fr; }
  .event-date { padding-inline: 8px; }
  .event-details { padding-inline: 11px; }
  .event-detail { gap: 7px; }
  .event-detail svg { width: 16px; }
  .event-detail strong { font-size: 10.5px; white-space: nowrap; }
  .event-detail small { font-size: 9.5px; white-space: nowrap; }
  .event-detail .hotel-address { white-space: normal; line-height: 1.55; }
  .teaching-entry { gap: 7px; }
  .teaching-entry select,
  .teaching-entry input { padding-left: 9px; }
  .local-badge { display: none; }
}

@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;
  }
  .brand-mark { animation: none; }
  .music-toggle.is-playing .music-bars i { animation: none; transform: scaleY(1.5); }
}
