  :root {
    --bg: #ffe8cc;
    --bg-glow: #fff5e6;
    --ink: #c85a1e;
    --ink-soft: #e07838;
    --ink-rgb: 200, 90, 30;
    --accent: #f07830;
    --line: rgba(var(--ink-rgb), 0.18);
    --font-antiqua: "Cormorant Garamond", "Times New Roman", serif;
  }

  * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html,
  body {
    min-height: 100%;
  }

  body {
    font-family: "Montserrat", system-ui, sans-serif;
    color: var(--ink);
    background:
      radial-gradient(90% 60% at 50% -10%, var(--bg-glow) 0%, transparent 70%),
      radial-gradient(60% 40% at 80% 100%, #ffb86b 0%, transparent 70%),
      var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
  }

  .page {
    position: relative;
    margin: 0 auto;
    max-width: 720px;
    padding: 72px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .invite-title {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: clamp(15px, 3.2vw, 20px);
    font-weight: 600;
    font-style: normal;
    color: var(--ink-soft);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: -2px;
    transform: translate(clamp(58px, 17vw, 108px), 16px);
    z-index: 5;
  }

  .name {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(96px, 24vw, 154px);
    line-height: 0.9;
    letter-spacing: 0;
    color: #d45a20;
    text-shadow: 0 3px 10px rgba(var(--ink-rgb), 0.14);
    z-index: 5;
  }

  .card.invite-lead {
    position: relative;
    z-index: 6;
    text-align: center;
    background: rgba(255, 245, 235, 0.94);
  }

  .card.invite-lead p {
    font-size: 15px;
    line-height: 1.55;
    font-weight: 400;
    color: var(--ink);
    text-wrap: pretty;
  }

  .card h2,
  .card p,
  .rsvp-field label {
    text-wrap: pretty;
  }

  .card.invite-lead p + p {
    margin-top: 10px;
    color: var(--ink-soft);
  }

  .scene {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: -18px auto 48px;
    z-index: 4;
  }

  .scene svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .cards {
    position: relative;
    width: 100%;
    max-width: 520px;
    display: grid;
    gap: 24px;
    z-index: 6;
    margin-top: 8px;
  }

  .card {
    background: rgba(255, 240, 224, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 200, 150, 0.55);
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: 0 8px 32px rgba(var(--ink-rgb), 0.08);
    text-align: left;
  }

  .card.card-orange,
  .card.card-when {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .card.card-when p.event-datetime {
    margin-top: 0;
    margin-bottom: 16px;
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    color: var(--ink);
    white-space: nowrap;
  }

  .card h2 {
    font-family: var(--font-antiqua);
    font-weight: 600;
    font-size: 26px;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .card p {
    font-size: 15px;
    line-height: 1.5;
    font-weight: 400;
  }

  .highlight {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 30px;
    font-style: normal;
    font-weight: 500;
    margin: 8px 0;
    color: var(--accent);
  }

  .event-datetime {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 700;
    text-align: center;
    color: var(--accent);
    margin: 8px 0 16px;
    white-space: nowrap;
  }

  .card .cal-actions {
    margin-top: 4px;
  }

  .card .time {
    font-family: "Montserrat", sans-serif;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--ink);
    text-transform: uppercase;
    margin-top: -6px;
    margin-bottom: 20px;
  }

  .map-wrapper {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    margin-top: 14px;
    overflow: hidden;
    border: none;
    box-shadow: none;
  }

  #map {
    width: 100%;
    height: 100%;
    background: var(--bg-glow);
  }

  .map-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    width: 100%;
    padding: 12px 16px;
    background: var(--ink);
    color: #fff;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(var(--ink-rgb), 0.22);
  }

  .map-link:active {
    background: #a84818;
  }

  .calendar-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
  }

  .calendar-block h3 {
    font-family: var(--font-antiqua);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
  }

  .mini-cal {
    width: min(100%, 320px);
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    padding: 10px;
    margin: 0 auto 12px;
  }

  .mini-cal-head {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
  }

  .mini-cal-weekdays,
  .mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }

  .mini-cal-weekdays span {
    font-size: 9px;
    text-align: center;
    color: var(--ink-soft);
    font-weight: 600;
    text-transform: uppercase;
  }

  .mini-cal-grid span {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border-radius: 7px;
    color: #c46828;
  }

  .mini-cal-grid span.muted {
    opacity: 0.25;
  }

  .mini-cal-grid span.event-day {
    background: var(--ink);
    color: #fff;
    font-weight: 600;
  }

  .cal-actions {
    display: grid;
    gap: 8px;
  }

  .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid rgba(var(--ink-rgb), 0.35);
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
  }

  .rsvp {
    margin: 0;
  }

  .rsvp-field {
    display: grid;
    gap: 6px;
    margin-bottom: 12px;
  }

  .rsvp-field label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--ink);
  }

  .rsvp-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0.75;
  }

  .rsvp-field input,
  .rsvp-field textarea,
  .rsvp-field select {
    width: 100%;
    border: 1px solid rgba(var(--ink-rgb), 0.25);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
  }

  .rsvp-field textarea {
    min-height: 72px;
    resize: vertical;
  }

  .rsvp-options {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
  }

  .rsvp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(var(--ink-rgb), 0.2);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-size: 14px;
  }

  .rsvp-option input {
    accent-color: var(--ink);
  }

  .rsvp-submit {
    width: 100%;
    margin-top: 4px;
    padding: 12px 16px;
    border: none;
    border-radius: 14px;
    background: var(--ink);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(var(--ink-rgb), 0.2);
  }

  .rsvp-submit:disabled {
    opacity: 0.6;
    cursor: wait;
  }

  .rsvp-status {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.45;
  }

  .rsvp-status.ok {
    color: #5a7a42;
  }

  .rsvp-status.err {
    color: #a84848;
  }

  .rsvp-extra[hidden] {
    display: none;
  }

  .dress-code-palette {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 8px;
  }

  .color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
  }

  .color-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(var(--ink-rgb), 0.12);
    border: 2px solid #fff;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  }

  .color-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 16px rgba(var(--ink-rgb), 0.22);
  }

  .color-swatch span {
    font-size: 11px;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: 0.02em;
  }

  .swatch-white {
    background-color: #ffffff;
    border: 2px solid rgba(var(--ink-rgb), 0.15);
  }

  .swatch-beige {
    background-color: #f5c9a0;
  }

  .swatch-brown {
    background-color: #d46428;
  }

  .swatch-black {
    background-color: #2e2825;
  }

  .corner {
    position: absolute;
    z-index: 1;
    pointer-events: none;
  }

  .corner.top-left {
    top: -10px;
    left: -10px;
    width: 180px;
  }

  .corner.bottom-right {
    bottom: -10px;
    right: -10px;
    width: 160px;
    transform: scaleX(-1);
  }

  .corner svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
  }

  .float {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    width: 36px;
    height: 36px;
  }

  .float svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
  }

  .float.fa { top: 24%; left: 4%; width: 32px; }
  .float.fb { top: 28%; right: 6%; width: 38px; }
  .float.fc { top: 70%; left: 6%; width: 34px; }
  .float.fd { top: 78%; right: 8%; width: 30px; }
  .float.fe { top: 16%; left: 38%; width: 22px; }
  .float.ff { top: 86%; left: 42%; width: 24px; }
  .float.fg { top: 60%; right: 4%; width: 26px; }
  .float.fh { top: 12%; right: 26%; width: 20px; }
  .float.fi { top: 48%; left: 2%; width: 22px; }
  .float.fj { top: 92%; left: 14%; width: 22px; }

  @keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }

  @keyframes flutter {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-4px) rotate(3deg); }
  }

  @keyframes sway {
    0%, 100% { transform: translateX(0) rotate(-1.5deg); }
    50% { transform: translateX(3px) rotate(1.5deg); }
  }

  .bear-group {
    transform-origin: 50% 100%;
    animation: floaty 6s ease-in-out infinite;
    transform-box: fill-box;
  }

  .cloud-deco {
    transform-origin: 50% 50%;
    animation: floaty 8s ease-in-out infinite;
    transform-box: fill-box;
  }

  .cloud-deco.c2 {
    animation-duration: 9s;
    animation-delay: 1s;
  }

  .cloud-deco.c3 {
    animation-duration: 10s;
    animation-delay: 0.5s;
  }

  .butterfly {
    transform-origin: 50% 50%;
    animation: flutter 4s ease-in-out infinite;
    transform-box: fill-box;
  }

  .butterfly.b2 {
    animation-duration: 5s;
    animation-delay: 0.6s;
  }

  .butterfly.b3 {
    animation-duration: 4.5s;
    animation-delay: 1.1s;
  }

  .flower {
    transform-origin: 50% 50%;
    animation: sway 7s ease-in-out infinite;
    transform-box: fill-box;
  }

  @media (min-width: 600px) {
    .page {
      padding: 100px 48px 100px;
    }

    .name {
      font-size: 164px;
    }

    .scene {
      max-width: 580px;
      margin: -24px auto 28px;
    }

    .cards {
      max-width: 560px;
      gap: 32px;
    }

    .map-wrapper {
      height: 240px;
    }

    .corner.top-left {
      width: 240px;
    }

    .corner.bottom-right {
      width: 220px;
    }

    .float.fa { width: 44px; }
    .float.fb { width: 52px; }
    .float.fc { width: 46px; }
    .float.fd { width: 40px; }
  }

  @media (min-width: 1024px) {
    .page {
      max-width: 800px;
      padding: 100px 64px 120px;
    }

    .name {
      font-size: 190px;
    }

    .scene {
      max-width: 640px;
    }

    .map-wrapper {
      height: 280px;
    }

    .corner.top-left {
      width: 320px;
      top: -20px;
      left: -20px;
    }

    .corner.bottom-right {
      width: 280px;
      bottom: -20px;
      right: -20px;
    }
  }
