* {
  box-sizing: border-box;
}

/* BAS: grundvärden som gäller både mobilvy och datorvy. */
:root {
  --paper: #fbf7ee;
  --ink: #806d55;
  --gold: #b89758;
  --gold-deep: #967541;
  --invitation-text: #b89758;
  --invitation-text-muted: rgba(184, 151, 88, 0.72);
  --invitation-placeholder: rgba(184, 151, 88, 0.56);
  --transition-duration: 1.4s;
  --invitation-reveal-delay: 1s;
  --invitation-animation-space: 330px;
  --transition-birds-delay: 1.15s;
  --transition-cake-size: 250px;
  --transition-cake-bottom: 18px;
  --transition-birds-size: 108px;
  --transition-birds-bottom: 162px;
  --transition-birds-extra-lift: 46px;
  --transition-birds-offset-x: 2px;
  --viewport-stage: 100dvh;
  --phone-width: min(100vw, 430px);
}

html {
  scroll-behavior: smooth;
  background: #fff;
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  background: #fff;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: none;
}

button,
input,
textarea {
  font: inherit;
}

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

/* BAS: huvudytan som håller både kuvertet och inbjudan. */
.invitation-wrapper {
  position: relative;
  width: var(--phone-width);
  min-height: var(--viewport-stage);
  margin: 0 auto;
  overflow-x: hidden;
  background: #fff;
  isolation: isolate;
}

.invitation-wrapper::before,
.invitation-wrapper::after {
  content: "";
  position: absolute;
  z-index: 45;
  pointer-events: none;
}

.invitation-wrapper::before {
  top: 20px;
  left: 50%;
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #8b775d, #6e5c44);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.26),
    0 1px 2px rgba(102, 80, 48, 0.16);
  transform: translateX(-50%);
}

.invitation-wrapper::after {
  top: 21px;
  left: calc(50% + 37px);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #96866e;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.36);
}

.language-toggle,
.music-toggle {
  position: fixed;
  top: 15px;
  z-index: 60;
  border: 1px solid rgba(184, 151, 88, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(245, 235, 218, 0.82));
  box-shadow:
    0 8px 20px rgba(104, 84, 54, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: #7b6548;
  cursor: pointer;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

.language-toggle:hover,
.music-toggle:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 251, 0.98), rgba(249, 242, 230, 0.92));
  border-color: rgba(184, 151, 88, 0.42);
  box-shadow:
    0 10px 24px rgba(104, 84, 54, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
}

.language-toggle:active,
.music-toggle:active,
.rsvp-button:active,
.family-member-add:active,
.family-member-remove:active {
  transform: translateY(0) scale(0.985);
}

.language-toggle:focus-visible,
.music-toggle:focus-visible,
.rsvp-input:focus,
.rsvp-textarea:focus,
.rsvp-button:focus-visible,
.family-member-add:focus-visible,
.family-member-remove:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(184, 151, 88, 0.16),
    0 10px 24px rgba(104, 84, 54, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* BAS: språkknappen uppe till höger. */
.language-toggle {
  right: max(14px, calc((100vw - var(--phone-width)) / 2 + 18px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 37px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.language-icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  color: var(--gold-deep);
  opacity: 0.9;
}

/* BAS: liten utvecklarsignatur i nedre högra hörnet av själva inbjudan (papper). Sitter absolut, så den syns först när användaren scrollat till slutet. */
.site-signature {
  position: absolute;
  right: clamp(18px, 4vw, 30px);
  bottom: clamp(16px, 3vw, 22px);
  margin: 0;
  color: rgba(128, 109, 85, 0.55);
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 5;
}

/* BAS: musikknappen uppe till vänster. */
.music-toggle {
  left: max(14px, calc((100vw - var(--phone-width)) / 2 + 18px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  max-width: min(148px, calc(100vw - 154px));
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  line-height: 1;
  text-align: left;
}

.music-icon {
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(145deg, #fbf6ed, #eadcc3);
  box-shadow: inset 0 0 0 1px rgba(184, 151, 88, 0.26);
}

.music-icon:not(.is-playing) {
  padding-left: 1px;
}

.music-icon.is-playing {
  font-size: 10px;
}

.music-info {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.music-title,
.music-artist {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-title {
  color: #7d6748;
  font-size: 12px;
  font-weight: 600;
}

.music-artist {
  color: rgba(128, 109, 85, 0.82);
  font-size: 11px;
}

/* BAS: kuvert-scenen innan användaren öppnar inbjudan. */
.envelope-scene {
  --env-width: min(85vw, 338px);
  --env-height: min(73dvh, 632px);
    --envelope-scale: 1;

  position: relative;
  min-height: var(--viewport-stage);
  display: grid;
  place-items: center;
  padding: 86px 22px 34px;
  overflow: hidden;
}

.envelope-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: none;
}

body.invitation-open {
  background: #fff;
}

body.invitation-open .invitation-wrapper,
body.invitation-open .envelope-scene {
  background: #fff;
}

body.invitation-open .envelope-scene::before {
  background: none;
}

/* BAS: själva klickbara kuvertet. Datorvy och mobilvy skriver över flera av dessa värden längre ner. */
.envelope {
  position: relative;
  width: var(--env-width);
  height: var(--env-height);
  transform: scale(var(--envelope-scale));
  transform-origin: center;
  transform-style: preserve-3d;
  filter: drop-shadow(0 24px 28px rgba(104, 84, 54, 0.15));
  transition:
    filter 0.3s ease,
    transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  will-change: opacity, transform;
}

body.is-ready:not(.invitation-open) .envelope {
  cursor: pointer;
}

body.is-ready:not(.invitation-open) .envelope:hover {
  filter: drop-shadow(0 28px 34px rgba(104, 84, 54, 0.19));
  transform: scale(var(--envelope-scale)) translateY(-3px);
}

body.invitation-open .envelope {
  animation: envelopeDisappear 0.75s ease forwards;
  animation-delay: 0.32s;
}

.envelope-seal {
  position: absolute;
  top: 48.5%;
  left: 50%;
  z-index: 8;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: url("assets/sigill/sigill.png") center / contain no-repeat;
  border: 0;
  box-shadow: none;
  filter: drop-shadow(0 12px 18px rgba(94, 73, 42, 0.23));
  isolation: isolate;
  transform: translate(-50%, -50%);
}

body.invitation-open .envelope-seal {
  animation: sealRelease 0.95s ease forwards;
  animation-delay: 0.08s;
}

.open-instruction {
  position: absolute;
  top: 66%;
  left: 50%;
  z-index: 7;
  width: min(80%, 230px);
  margin: 0;
  color: #8b765d;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

body.is-ready:not(.invitation-open) .open-instruction {
  opacity: 1;
  transform: translate(-50%, 0);
}

body.invitation-open .open-instruction {
  opacity: 0;
  transform: translate(-50%, -8px);
}

.transition-scene {
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: var(--invitation-animation-space);
  width: 100%;
  padding: 0 20px;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
}

body.invitation-open .transition-scene {
  animation: showTransitionScene var(--transition-duration) ease forwards;
}

.transition-stage {
  position: relative;
  width: min(86vw, 430px);
  height: 100%;
  min-height: 0;
}

.transition-cake {
  position: absolute;
  left: 50%;
  bottom: var(--transition-cake-bottom);
  z-index: 1;
  width: var(--transition-cake-size);
  height: var(--transition-cake-size);
  opacity: 0;
  transform: translateX(-50%) translateY(18px) scale(0.96);
}

body.invitation-open .transition-cake {
  animation: cakeReveal var(--transition-duration) ease forwards;
}

.transition-cake-icon {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 22px rgba(104, 84, 54, 0.1));
}

.transition-birds {
  position: absolute;
  left: 50%;
  bottom: calc(var(--transition-cake-bottom) + (var(--transition-cake-size) / 2) + var(--transition-birds-extra-lift));
  z-index: 4;
  display: none;
  width: var(--transition-birds-size);
  height: var(--transition-birds-size);
  opacity: 0;
  transform: translateX(calc(-50% + var(--transition-birds-offset-x))) translateY(10px) scale(0.94);
}

body.transition-birds-visible .transition-birds {
  display: block;
  animation: birdsAppear 1.15s ease forwards;
}

.transition-birds-icon {
  width: 100%;
  height: 100%;
  filter: none;
}

.hero-section::after,
.info-section::before,
.closing-section::before {
  content: "";
  display: block;
  width: 68px;
  height: 9px;
  margin: var(--ornament-text-gap, 16px) auto 0;
  background:
    radial-gradient(circle 2.5px at center, rgba(184, 151, 88, 0.72) 0 100%, transparent 100%) center / 8px 8px no-repeat,
    linear-gradient(to right, rgba(184, 151, 88, 0.48), rgba(184, 151, 88, 0.48)) left center / 26px 1px no-repeat,
    linear-gradient(to right, rgba(184, 151, 88, 0.48), rgba(184, 151, 88, 0.48)) right center / 26px 1px no-repeat;
  pointer-events: none;
}

/* BAS: inbjudans innehåll efter att kuvertet öppnats. */
.invitation-content {
  position: relative;
  z-index: 2;
  min-height: var(--viewport-stage);
  margin-top: calc(-1 * var(--viewport-stage));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 86px 20px 42px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(34px) scale(0.985);
  background: #fff;
}

body.invitation-open .invitation-content {
  animation: showContent 1.25s ease forwards;
  animation-delay: var(--invitation-reveal-delay);
}

body.invitation-visible .invitation-content {
  pointer-events: auto;
}

/* BAS: pappersytan som innehåller text, tidslinje, OSA och signatur. */
.paper {
  --ornament-text-gap: 20px;
  --closing-text-down-offset: 6px;
  --signature-bottom-space: 46px;
  --signature-page-bottom-offset: 0px;
  --signature-page-bottom-inset: 0px;

  position: relative;
  z-index: 2;
  width: min(100%, 250px);
  max-width: 260px;
  padding: 22px 18px var(--signature-bottom-space);
  border: 1px solid rgba(184, 151, 88, 0.52);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% -12%, rgba(255, 255, 255, 0.9), transparent 36%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(248, 241, 229, 0.97));
  box-shadow:
    0 22px 42px rgba(104, 84, 54, 0.2),
    inset 0 0 0 8px rgba(255, 251, 244, 0.72),
    inset 0 0 0 9px rgba(184, 151, 88, 0.2);
  overflow: hidden;
  text-align: center;
}

/* BAS: översta rubriken med namn och datum. */
.hero-section {
  position: relative;
  z-index: 2;
  padding: 0 0 8px;
}

.small-title {
  margin: 0 0 6px;
  color: #826f58;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.2;
}

.hero-section h2 {
  margin: 0;
  color: var(--gold);
  font-family: "Luxurious Script", "Great Vibes", cursive;
  font-size: clamp(42px, 11.6vw, 54px);
  font-weight: 400;
  line-height: 0.92;
  text-wrap: balance;
}

.hero-section h2 span {
  display: block;
}

.date {
  margin: 18px 0 0;
  color: #806d55;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}

.hero-section::after {
  display: none;
  margin-top: var(--ornament-text-gap);
}

.info-section,
.closing-section {
  position: relative;
  z-index: 2;
}

.info-section {
  padding: 10px 0 0;
}

/* BAS: allmänna rubriker i inbjudan. */
.info-section::before,
.closing-section::before {
  margin: 0 auto var(--ornament-text-gap);
}

.closing-section::before {
  display: none;
}

.info-section h3 {
  margin: 0 0 8px;
  color: var(--gold);
  font-family: "Great Vibes", cursive;
  font-size: clamp(22px, 6.4vw, 27px);
  font-weight: 400;
  line-height: 1;
}

.info-section h3[data-i18n="welcomeTitle"],
.info-section h3[data-i18n="addressTitle"],
.info-section h3[data-i18n="timelineTitle"] {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

/* BAS: bara OSA-rubriken. Här byter du font för OSA utan att påverka andra rubriker. */
.info-section h3[data-i18n="rsvpTitle"] {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}

/* BAS: extra avstånd före OSA-blocket. Datorvy och mobilvy justerar detta längre ner. */
.rsvp-section {
  padding-top: 26px;
}

.info-section p {
  max-width: 202px;
  margin: 0 auto;
  color: #806d55;
  font-size: 12.5px;
  line-height: 1.42;
  text-wrap: pretty;
}

.welcome-section p + p {
  margin-top: 10px;
}

.timeline-section {
  text-align: center;
}

.welcome-section::before,
.address-section::before,
.timeline-section::before {
  display: none;
}

.welcome-section::after,
.address-section::after,
.timeline-section::after {
  content: "";
  display: block;
  width: 68px;
  height: 9px;
  margin: var(--ornament-text-gap) auto 0;
  background:
    radial-gradient(circle 2.5px at center, rgba(184, 151, 88, 0.72) 0 100%, transparent 100%) center / 8px 8px no-repeat,
    linear-gradient(to right, rgba(184, 151, 88, 0.48), rgba(184, 151, 88, 0.48)) left center / 26px 1px no-repeat,
    linear-gradient(to right, rgba(184, 151, 88, 0.48), rgba(184, 151, 88, 0.48)) right center / 26px 1px no-repeat;
  pointer-events: none;
}

.address-section {
  text-align: center;
}

.address-map-list {
  display: grid;
  gap: 12px;
  max-width: 202px;
  margin: 11px auto 0;
}

.address-map-link {
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(184, 151, 88, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.7);
  color: #806d55;
  text-decoration: none;
  transition:
    border-color 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease;
}

.address-map-link:hover {
  border-color: rgba(184, 151, 88, 0.52);
  background: rgba(255, 253, 248, 0.94);
  transform: translateY(-1px);
}

.address-map-link:focus-visible {
  outline: 2px solid rgba(184, 151, 88, 0.48);
  outline-offset: 3px;
}

.address-map-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(184, 151, 88, 0.18);
  border-radius: 6px;
  object-fit: cover;
}

.address-map-text {
  display: grid;
  gap: 2px;
  text-align: left;
}

.address-map-label,
.address-map-title,
.address-map-address {
  display: block;
}

.address-map-label {
  color: var(--gold-deep);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.address-map-title {
  color: #806d55;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.18;
}

.address-map-address {
  color: rgba(128, 109, 85, 0.82);
  font-size: 11.5px;
  line-height: 1.22;
}

/* BAS: tidslinjen för vigsel, middag och party. */
.wedding-timeline {
  position: relative;
  display: grid;
  gap: 7px;
  max-width: 202px;
  margin: 6px auto 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.timeline-content {
  padding: 0;
}

.timeline-content .timeline-time,
.timeline-content h4 {
  display: inline;
  max-width: none;
  margin: 0;
  color: #806d55;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: 0;
  text-transform: none;
}

.timeline-content h4::before {
  content: " - ";
  color: rgba(128, 109, 85, 0.76);
}

.timeline-content p:not(.timeline-time) {
  display: none;
}

.timeline-section .ceremony-note {
  margin-top: 18px;
  font-style: italic;
  text-decoration: none;
}

.ceremony-note-emphasis {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ceremony-rings {
  display: flex;
  justify-content: center;
  margin: 12px auto 0;
}

.ceremony-rings-icon {
  display: block;
  width: min(170px, 52vw);
  height: min(170px, 52vw);
}

.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;
}

/* BAS: OSA-formuläret och dess fält. */
.rsvp-form {
  width: min(100%, 196px);
  margin: 8px auto 0;
}

.rsvp-input,
.rsvp-textarea {
  width: 100%;
  border: 1px solid rgba(184, 151, 88, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.84), rgba(247, 239, 225, 0.8));
  box-shadow:
    inset 0 1px 2px rgba(104, 84, 54, 0.05),
    0 7px 13px rgba(104, 84, 54, 0.07);
  color: #806d55;
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
  transition:
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.rsvp-input {
  min-height: 21px;
  padding: 4px 10px;
  border-radius: 999px;
}

.rsvp-textarea {
  min-height: 31px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  resize: vertical;
}

.rsvp-input::placeholder,
.rsvp-textarea::placeholder {
  color: rgba(128, 109, 85, 0.62);
}

.rsvp-input:focus,
.rsvp-textarea:focus {
  border-color: rgba(184, 151, 88, 0.68);
  background: rgba(255, 253, 248, 0.96);
}

.family-members {
  margin-top: 8px;
}

.family-members-list {
  display: grid;
  gap: 6px;
}

.family-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.family-member-input {
  min-width: 0;
}

.family-member-add,
.family-member-remove {
  min-height: 21px;
  border: 1px solid rgba(184, 151, 88, 0.38);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.84), rgba(247, 239, 225, 0.8));
  color: #806d55;
  cursor: pointer;
  font-size: 10.5px;
  line-height: 1.1;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.family-member-add {
  width: 100%;
  margin-top: 8px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.family-member-add::before {
  content: "+";
  color: var(--gold-deep);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

.family-member-remove {
  padding: 4px 8px;
  white-space: nowrap;
}

.family-member-add:hover,
.family-member-remove:hover {
  border-color: rgba(184, 151, 88, 0.6);
  background: rgba(255, 253, 248, 0.96);
  color: var(--gold-deep);
}

.rsvp-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 8px;
}

.rsvp-button {
  min-height: 22px;
  padding: 5px 10px;
  border: 1px solid rgba(151, 117, 65, 0.46);
  border-radius: 999px;
  background:
    linear-gradient(180deg, #d1b676 0%, #aa8549 100%);
  box-shadow:
    0 8px 13px rgba(104, 84, 54, 0.16),
    inset 0 1px 0 rgba(255, 244, 213, 0.32);
  color: #fff9ec;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.1;
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.rsvp-button:hover:not(:disabled) {
  filter: brightness(1.03);
  box-shadow:
    0 10px 16px rgba(104, 84, 54, 0.19),
    inset 0 1px 0 rgba(255, 244, 213, 0.35);
  transform: translateY(-1px);
}

.rsvp-button-secondary {
  border-color: rgba(184, 151, 88, 0.5);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.92), rgba(247, 239, 225, 0.84));
  box-shadow:
    0 4px 10px rgba(104, 84, 54, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  color: var(--gold-deep);
}

.rsvp-button-secondary:hover:not(:disabled) {
  filter: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 251, 0.98), rgba(249, 242, 230, 0.94));
  border-color: rgba(184, 151, 88, 0.74);
  box-shadow:
    0 6px 13px rgba(104, 84, 54, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.rsvp-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.rsvp-message {
  min-height: 15px;
  margin: 8px auto 0;
  color: #806d55;
  font-size: 10px;
  line-height: 1.28;
}

.rsvp-message.is-success {
  color: #7f683f;
}

.rsvp-message.is-error {
  color: #9d4e39;
}

.closing-section {
  position: static;
  margin-top: calc(12px + var(--closing-text-down-offset));
  padding: 0;
}

.closing-text {
  max-width: 184px;
  margin: 0 auto 8px;
  color: #8d7961;
  font-size: 10.5px;
  font-style: italic;
  line-height: 1.2;
}

.closing-signature {
  position: absolute;
  right: 0;
  bottom: calc(var(--signature-page-bottom-inset) - var(--signature-page-bottom-offset));
  left: 0;
  margin: 0;
  color: var(--gold);
  font-family: "Didot", "Bodoni 72", "Bodoni MT", "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 0.92;
  text-align: center;
}

/* ANIMATIONER: används i både mobilvy och datorvy när inbjudan öppnas. */
@keyframes envelopeDisappear {
  0% {
    opacity: 1;
    transform: scale(var(--envelope-scale));
  }

  100% {
    opacity: 0;
    pointer-events: none;
    transform: scale(var(--envelope-scale)) translateY(58px);
  }
}

@keyframes sealRelease {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  45% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9) rotate(-5deg);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.62) rotate(8deg);
  }
}

@keyframes showTransitionScene {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes cakeReveal {
  0%,
  16% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.96);
  }

  28%,
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes birdsAppear {
  0% {
    opacity: 0;
    transform: translateX(calc(-50% + var(--transition-birds-offset-x))) translateY(12px) scale(0.94);
  }

  100% {
    opacity: 1;
    transform: translateX(calc(-50% + var(--transition-birds-offset-x))) translateY(0) scale(1);
  }
}

@keyframes showContent {
  0% {
    opacity: 0;
    transform: translateY(48px) scale(0.965);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* SMÅ MOBILER: extra kompakta justeringar för väldigt smala skärmar. */
@media (max-width: 360px) {
  .rsvp-form {
    max-width: 190px;
  }
}

/* DATORVY: allt i detta block gäller skärmar bredare än 760px. */
@media (min-width: 761px) {
  :root {
    /* DATORVY: centrala värden för höjd, brevets position och inbjudans padding. */
    --phone-width: 100vw;
    --viewport-stage: 100dvh;
    --invitation-animation-space: clamp(330px, 39dvh, 420px);
    --transition-cake-bottom: 30px;
    --transition-birds-extra-lift: 60px;
    --desktop-letter-offset-x: clamp(-170px, -8vw, -56px);
    --desktop-invitation-padding-top: clamp(76px, 10dvh, 118px);
    --desktop-invitation-padding-bottom: 48px;
  }

  body {
    padding: 0;
    overflow-x: hidden;
  }

  /* DATORVY: full webbsida, inte mobilram. */
  .invitation-wrapper {
    width: 100%;
    min-height: var(--viewport-stage);
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }

  body:not(.invitation-open) .invitation-wrapper {
    height: var(--viewport-stage);
  }

  body.invitation-open .invitation-wrapper {
    overflow: visible;
  }

  .invitation-wrapper::before,
  .invitation-wrapper::after {
    display: none;
  }

  .language-toggle,
  .music-toggle {
    top: 28px;
  }

  .language-toggle {
    right: clamp(28px, 4vw, 56px);
  }

  .music-toggle {
    left: clamp(28px, 4vw, 56px);
    max-width: 178px;
  }

  /* DATORVY: fullskärmsyta för brevet innan öppning. */
  .envelope-scene {
    --env-width: min(100vw, 1180px);
    --env-height: 100dvh;
    min-height: var(--viewport-stage);
    padding: 0 clamp(56px, 8vw, 128px);
    place-items: center;
  }

  .envelope-scene::before {
    background: none;
  }

  /* DATORVY: här väljer du datorbrevets bild och position. */
  .envelope {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    background: url("assets/Letter for computer/Untitled.png") calc(50% + var(--desktop-letter-offset-x)) center / contain no-repeat;
    filter: none;
  }

  /* DATORVY: sigillet som ligger ovanpå datorbrevet. */
  .envelope-seal {
    top: 54%;
    left: calc(50% + var(--desktop-letter-offset-x));
    width: clamp(118px, 10vw, 158px);
    height: clamp(118px, 10vw, 158px);
    filter: drop-shadow(0 18px 24px rgba(66, 44, 14, 0.32));
  }

  /* DATORVY: texten under brevet innan öppning. */
  .open-instruction {
    top: min(78dvh, calc(54% + 218px));
    left: calc(50% + var(--desktop-letter-offset-x));
    width: min(88vw, 620px);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 600;
    color: #765a31;
  }

  /* DATORVY: inbjudan efter öppning. */
  .invitation-content {
    min-height: var(--viewport-stage);
    margin-top: calc(-1 * var(--viewport-stage));
    align-items: flex-start;
    justify-content: center;
    padding: var(--desktop-invitation-padding-top) clamp(32px, 6vw, 96px) var(--desktop-invitation-padding-bottom);
    overflow: visible;
    background: #fff;
  }

  /* DATORVY: innehållet är en vanlig webblayout utan kort/ram. */
  .paper {
    --ornament-text-gap: 30px;
    --closing-text-down-offset: 48px;
    --signature-bottom-space: 82px;
    --signature-page-bottom-offset: var(--desktop-invitation-padding-bottom);
    --signature-page-bottom-inset: 44px;

    width: min(100%, 760px);
    max-width: 760px;
    padding: 0 clamp(24px, 4vw, 56px) var(--signature-bottom-space);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    min-height: calc(100dvh - var(--desktop-invitation-padding-top) - var(--desktop-invitation-padding-bottom));
    display: flex;
    flex-direction: column;
  }

  .hero-section,
  .info-section,
  .closing-section {
    flex: 0 0 auto;
  }

  /* DATORVY: namn och datum högst upp i inbjudan. */
  .hero-section {
    padding-bottom: 52px;
  }

  .small-title {
    margin-bottom: 14px;
    color: #6f5f4c;
    font-size: clamp(24px, 2vw, 30px);
    font-weight: 500;
  }

  .hero-section h2 {
    color: var(--gold-deep);
    font-size: clamp(110px, 11.5vw, 164px);
    line-height: 0.9;
  }

  .date {
    margin-top: 34px;
    color: #786852;
    font-size: clamp(28px, 2.25vw, 34px);
  }

  .hero-section::after {
    display: block;
    margin-top: var(--ornament-text-gap);
  }

  .info-section {
    padding-top: 68px;
  }

  .info-section + .info-section {
    padding-top: 88px;
  }

  .info-section::before {
    display: none;
  }

  .info-section h3 {
    margin-bottom: 30px;
    color: var(--gold-deep);
    font-size: clamp(42px, 4.8vw, 64px);
    line-height: 0.96;
  }

  .info-section p {
    max-width: 580px;
    color: #6f5f4c;
    font-size: clamp(22px, 1.4vw, 25px);
    line-height: 1.56;
  }

  .welcome-section p + p {
    margin-top: 18px;
  }

  .address-map-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 620px;
    gap: 24px;
    margin-top: 22px;
  }

  .address-map-link {
    gap: 13px;
    padding: 12px;
  }

  .address-map-label {
    font-size: 17px;
  }

  .address-map-title {
    color: #6f5f4c;
    font-size: clamp(21px, 1.35vw, 24px);
    line-height: 1.2;
  }

  .address-map-address {
    color: rgba(111, 95, 76, 0.82);
    font-size: clamp(19px, 1.15vw, 21px);
    line-height: 1.24;
  }

  /* DATORVY: flyttar ner OSA och allt efter så A&Z hamnar längre ner. */
  .rsvp-section {
    margin-top: auto;
    padding-top: clamp(110px, 12dvh, 160px);
  }

  .wedding-timeline {
    --timeline-rail: 28px;
    --timeline-line-offset: calc(clamp(17px, 1.2vw, 20px) * 0.64);
    max-width: 620px;
    gap: 24px;
    margin-top: 18px;
  }

  .wedding-timeline::before {
    content: "";
    position: absolute;
    top: var(--timeline-line-offset);
    bottom: var(--timeline-line-offset);
    left: calc(var(--timeline-rail) / 2 - 0.5px);
    width: 1px;
    background: rgba(123, 90, 37, 0.3);
    pointer-events: none;
  }

  .timeline-item {
    display: block;
    text-align: left;
  }

  .timeline-content {
    display: grid;
    grid-template-columns: var(--timeline-rail) minmax(132px, auto) minmax(0, 1fr);
    align-items: baseline;
    gap: 20px;
    min-width: 0;
  }

  .timeline-content::before {
    content: "";
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-deep);
    box-shadow:
      0 0 0 5px rgba(179, 145, 83, 0.13),
      0 1px 3px rgba(87, 66, 37, 0.12);
  }

  .timeline-content .timeline-time,
  .timeline-content h4 {
    display: block;
    color: #6f5f4c;
    font-size: clamp(21px, 1.35vw, 24px);
    font-weight: 500;
    line-height: 1.28;
  }

  .timeline-content .timeline-time {
    grid-column: 2;
    text-align: left;
  }

  .timeline-content h4 {
    grid-column: 3;
  }

  .timeline-content h4::before {
    content: "";
  }

  .rsvp-form {
    width: min(100%, 430px);
    margin-top: 36px;
  }

  .rsvp-input,
  .rsvp-textarea,
  .family-member-add,
  .family-member-remove {
    border-color: rgba(179, 145, 83, 0.34);
    background: rgba(255, 252, 245, 0.58);
    box-shadow: inset 0 1px 2px rgba(87, 66, 37, 0.035);
    color: #6f5f4c;
    font-size: clamp(22px, 1.4vw, 25px);
  }

  .rsvp-input {
    min-height: 46px;
    padding: 10px 16px;
  }

  .family-members {
    margin-top: 14px;
  }

  .family-members-list {
    gap: 12px;
  }

  .family-member-row {
    gap: 12px;
  }

  .family-member-add,
  .family-member-remove {
    min-height: 44px;
    padding: 10px 16px;
  }

  .family-member-add {
    margin-top: 14px;
  }

  .rsvp-textarea {
    min-height: 84px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 12px;
  }

  .rsvp-actions {
    gap: 14px;
    margin-top: 18px;
  }

  .rsvp-button {
    min-height: 48px;
    padding: 12px 18px;
    font-size: clamp(22px, 1.4vw, 25px);
  }

  .rsvp-message {
    min-height: 22px;
    margin-top: 14px;
    font-size: 15px;
  }

  .closing-section {
    margin-top: calc(84px + var(--closing-text-down-offset));
  }

  .closing-section::before {
    margin: 0 auto var(--ornament-text-gap);
  }

  .closing-text {
    max-width: 540px;
    margin-bottom: 16px;
    color: #786852;
    font-size: clamp(21px, 1.35vw, 24px);
    line-height: 1.38;
  }

  .closing-signature {
    color: var(--gold-deep);
    font-size: 58px;
  }
}

/* DATORVY: extra mjuk skugga bara på riktigt breda skärmar. */
@media (min-width: 1180px) {
  body::after {
    content: "";
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: -1;
    width: min(1120px, 84vw);
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(104, 84, 54, 0.16), transparent 68%);
    transform: translateX(-50%);
    pointer-events: none;
  }
}

/* MOBILVY: allt i detta block gäller skärmar upp till 760px. */
@media (max-width: 760px) {
  :root {
    /* MOBILVY: egna färger och full viewport-bredd. */
    --phone-width: 100vw;
    --viewport-stage: 100dvh;
    --paper: #fbf6eb;
    --ink: #6d5737;
    --gold: #bd9652;
    --gold-deep: #7b5a25;
    --invitation-text: #b39153;
    --invitation-text-muted: rgba(179, 145, 83, 0.72);
    --invitation-placeholder: rgba(179, 145, 83, 0.56);
    --invitation-animation-space: clamp(292px, 72vw, 350px);
    --transition-cake-size: min(64vw, 250px);
    --transition-cake-bottom: 18px;
    --transition-birds-size: min(28vw, 108px);
    --transition-birds-bottom: clamp(136px, 43vw, 162px);
    --transition-birds-extra-lift: 42px;
    --transition-birds-offset-x: clamp(0px, 1vw, 2px);
  }

  html {
    width: 100%;
    min-height: 100%;
    background: #fff;
  }

  body {
    width: 100vw;
    min-height: 100dvh;
    padding: 0;
    display: block;
    overflow: hidden;
    background: #fff;
    color: var(--ink);
  }

  /* MOBILVY: ingen desktop-bakgrundstextur bakom appytan. */
  body::before {
    display: none;
  }

  /* MOBILVY: inbjudan fyller hela skärmen. */
  .invitation-wrapper {
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .invitation-wrapper::before,
  .invitation-wrapper::after {
    display: none;
  }

  .language-toggle,
  .music-toggle {
    top: clamp(22px, 3.4dvh, 34px);
    z-index: 60;
    min-height: 44px;
    border: 1px solid rgba(173, 130, 57, 0.58);
    border-radius: 999px;
    background:
      radial-gradient(circle at 35% 18%, rgba(255, 255, 255, 0.86), transparent 38%),
      linear-gradient(180deg, rgba(255, 252, 244, 0.96), rgba(244, 233, 214, 0.92));
    box-shadow:
      0 8px 15px rgba(87, 62, 25, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      inset 0 -1px 0 rgba(148, 106, 38, 0.12);
    color: #6c522b;
  }

  .music-toggle {
    left: clamp(16px, 5vw, 24px);
    gap: 8px;
    width: clamp(128px, 33vw, 146px);
    max-width: none;
    padding: 7px 15px 7px 12px;
  }

  .language-toggle {
    right: clamp(16px, 5vw, 24px);
    padding: 8px 14px;
    font-size: clamp(15px, 4vw, 19px);
    font-weight: 700;
    letter-spacing: 0;
  }

  .music-icon {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    color: var(--gold-deep);
    font-size: 14px;
    background: transparent;
    box-shadow: none;
  }

  .music-icon.is-playing {
    font-size: 13px;
  }

  .music-title {
    font-size: clamp(14px, 3.8vw, 17px);
    font-weight: 700;
    line-height: 1.02;
  }

  .music-artist {
    font-size: clamp(12px, 3.4vw, 15px);
    line-height: 1.08;
  }

  /* MOBILVY: kuvertet fyller hela skärmen innan öppning. */
  .envelope-scene {
    --env-width: 100vw;
    --env-height: 100dvh;
    min-height: var(--viewport-stage);
    padding: 0;
    place-items: center;
    overflow: hidden;
  }

  .envelope-scene::before {
    background: none;
    z-index: 1;
  }

  /* MOBILVY: använder mobilens kuvertbild. */
  .envelope {
    width: var(--env-width);
    height: var(--env-height);
    border-radius: inherit;
    background: url("assets/background/env_background.png") center / cover no-repeat;
    filter: none;
  }

  .envelope-seal {
    top: 54%;
    width: clamp(128px, 34vw, 166px);
    height: clamp(128px, 34vw, 166px);
    background: url("assets/sigill/sigill.png") center / contain no-repeat;
    box-shadow: none;
    filter: none;
  }

  .envelope-seal::before {
    content: "";
    position: absolute;
    inset: 15%;
    z-index: -1;
    border-radius: 50%;
    box-shadow: 0 12px 18px rgba(66, 44, 14, 0.16);
    pointer-events: none;
  }

  /* MOBILVY: instruktionstexten under sigillet. */
  .open-instruction {
    top: min(77dvh, calc(54% + 182px));
    width: min(88vw, 520px);
    color: #765a31;
    font-size: clamp(22px, 6vw, 30px);
    font-weight: 600;
    line-height: 1.05;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  }

  .info-section::before,
  .closing-section::before {
    width: 126px;
    height: 26px;
    margin-top: 22px;
    background:
      radial-gradient(circle 4px at 50% 50%, transparent 52%, rgba(151, 107, 43, 0.78) 56% 72%, transparent 74%) center / 23px 23px no-repeat,
      linear-gradient(45deg, transparent 39%, rgba(151, 107, 43, 0.82) 40% 60%, transparent 61%) center / 17px 17px no-repeat,
      linear-gradient(-45deg, transparent 39%, rgba(151, 107, 43, 0.82) 40% 60%, transparent 61%) center / 17px 17px no-repeat,
      radial-gradient(circle 3px at 43% 50%, rgba(151, 107, 43, 0.7) 0 70%, transparent 73%) center / 38px 18px no-repeat,
      radial-gradient(circle 3px at 57% 50%, rgba(151, 107, 43, 0.7) 0 70%, transparent 73%) center / 38px 18px no-repeat,
      linear-gradient(to right, rgba(151, 107, 43, 0.64), rgba(151, 107, 43, 0.64)) left 50% / 51px 1px no-repeat,
      linear-gradient(to right, rgba(151, 107, 43, 0.64), rgba(151, 107, 43, 0.64)) right 50% / 51px 1px no-repeat;
  }

  .info-section::before,
  .closing-section::before {
    width: 61px;
    height: 8px;
    margin-top: 12px;
    background:
      radial-gradient(circle 2px at center, rgba(179, 145, 83, 0.72) 0 100%, transparent 100%) center / 8px 8px no-repeat,
      linear-gradient(to right, rgba(179, 145, 83, 0.45), rgba(179, 145, 83, 0.45)) left center / 23px 1px no-repeat,
      linear-gradient(to right, rgba(179, 145, 83, 0.45), rgba(179, 145, 83, 0.45)) right center / 23px 1px no-repeat;
  }

  .invitation-content {
    height: var(--viewport-stage);
    min-height: var(--viewport-stage);
    margin-top: calc(-1 * var(--viewport-stage));
    align-items: flex-start;
    padding: 88px 22px 132px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    background: #fff;
  }

  .invitation-content::-webkit-scrollbar {
    width: 0;
  }

  /* MOBILVY: pappersinnehållet blir en smal kolumn som kan scrollas. */
  .paper {
    --ornament-text-gap: 22px;
    --closing-text-down-offset: 40px;
    --signature-bottom-space: 60px;
    --signature-page-bottom-offset: 108px;
    --signature-page-bottom-inset: 36px;

    width: min(100%, 334px);
    max-width: 334px;
    padding: 0 12px var(--signature-bottom-space);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    min-height: calc(100dvh - 180px);
    display: flex;
    flex-direction: column;
  }

  .hero-section,
  .info-section,
  .closing-section {
    flex: 0 0 auto;
  }

  .hero-section {
    padding: 0 0 32px;
  }

  .small-title {
    margin: 0 0 11px;
    color: #6f5f4c;
    font-size: 20px;
    font-weight: 500;
  }

  .hero-section h2 {
    color: var(--gold-deep);
    font-size: clamp(72px, 18.4vw, 88px);
    line-height: 0.92;
  }

  .date {
    margin-top: 26px;
    font-size: 22px;
    color: #786852;
  }

  .hero-section::after {
    display: block;
    margin-top: var(--ornament-text-gap);
  }

  .info-section {
    padding: 40px 0 0;
  }

  .info-section + .info-section {
    padding-top: 58px;
  }

  .info-section::before {
    display: none;
  }

  .closing-section::before {
    margin: 0 auto var(--ornament-text-gap);
  }

  .info-section h3 {
    margin: 0 0 22px;
    color: var(--gold-deep);
    font-size: clamp(30px, 8.5vw, 38px);
    line-height: 0.96;
  }

  .info-section p {
    max-width: 286px;
    color: #6f5f4c;
    font-size: 17.5px;
    line-height: 1.5;
  }

  .welcome-section p + p {
    margin-top: 14px;
  }

  .address-map-list {
    max-width: 302px;
    gap: 16px;
    margin-top: 8px;
  }

  .address-map-link {
    gap: 10px;
    padding: 10px;
  }

  .address-map-label {
    font-size: 15px;
  }

  .address-map-title {
    color: #6f5f4c;
    font-size: 18px;
    line-height: 1.18;
  }

  .address-map-address {
    color: rgba(111, 95, 76, 0.82);
    font-size: 16.5px;
    line-height: 1.22;
  }

  .timeline-section h3 {
    margin-bottom: 24px;
  }

  /* MOBILVY: flyttar ner OSA-blocket så avslutet hamnar längre ner. */
  .rsvp-section {
    margin-top: auto;
    padding-top: 94px;
  }

  .rsvp-section h3 {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
  }

  .wedding-timeline {
    --timeline-rail: 20px;
    --timeline-line-offset: 8.5px;
    max-width: 302px;
    gap: 16px;
    margin-top: 10px;
  }

  .wedding-timeline::before {
    content: "";
    position: absolute;
    top: var(--timeline-line-offset);
    bottom: var(--timeline-line-offset);
    left: calc(var(--timeline-rail) / 2 - 0.5px);
    width: 1px;
    background: rgba(123, 90, 37, 0.3);
    pointer-events: none;
  }

  .timeline-item {
    display: block;
    text-align: left;
  }

  .timeline-content {
    display: grid;
    grid-template-columns: var(--timeline-rail) minmax(82px, auto) minmax(0, 1fr);
    align-items: baseline;
    gap: 13px;
    min-width: 0;
  }

  .timeline-content::before {
    content: "";
    position: relative;
    z-index: 1;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: center;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-deep);
    box-shadow:
      0 0 0 4px rgba(179, 145, 83, 0.13),
      0 1px 3px rgba(87, 66, 37, 0.12);
  }

  .timeline-content .timeline-time,
  .timeline-content h4 {
    display: block;
    color: #6f5f4c;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.24;
    white-space: normal;
  }

  .timeline-content .timeline-time {
    grid-column: 2;
    min-width: 0;
    text-align: left;
  }

  .timeline-content h4 {
    grid-column: 3;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
  }

  .timeline-content h4::before {
    content: "";
  }

  .rsvp-form {
    width: min(100%, 286px);
    margin-top: 30px;
  }

  .rsvp-input,
  .rsvp-textarea,
  .family-member-add,
  .family-member-remove {
    border-color: rgba(179, 145, 83, 0.34);
    background: rgba(255, 252, 245, 0.58);
    box-shadow: inset 0 1px 2px rgba(87, 66, 37, 0.035);
    color: #6f5f4c;
    font-size: 17.5px;
  }

  .rsvp-input {
    min-height: 34px;
    padding: 8px 13px;
  }

  .family-members {
    margin-top: 11px;
  }

  .family-members-list {
    gap: 10px;
  }

  .family-member-row {
    gap: 10px;
  }

  .family-member-add {
    min-height: 34px;
    margin-top: 11px;
    padding: 8px 13px;
  }

  .family-member-add::after {
    content: "⌄";
    margin-left: auto;
    color: rgba(111, 95, 76, 0.62);
    font-size: 13px;
    line-height: 1;
  }

  .family-member-remove {
    min-height: 34px;
    padding: 8px 10px;
  }

  .rsvp-textarea {
    min-height: 54px;
    margin-top: 11px;
    padding: 10px 13px;
    border-radius: 10px;
  }

  .rsvp-actions {
    gap: 11px;
    margin-top: 14px;
  }

  .rsvp-button {
    min-height: 36px;
    padding: 9px 14px;
    border-color: rgba(141, 107, 57, 0.48);
    background:
      linear-gradient(180deg, #cdb27a 0%, #aa8549 100%);
    box-shadow:
      0 8px 13px rgba(87, 66, 37, 0.15),
      inset 0 1px 0 rgba(255, 244, 213, 0.32);
    font-size: 17.5px;
  }

  .rsvp-button-secondary {
    background: rgba(255, 252, 245, 0.62);
    box-shadow: inset 0 1px 2px rgba(87, 66, 37, 0.035);
    color: #6f5f4c;
  }

  .rsvp-message {
    min-height: 17px;
    margin-top: 12px;
    font-size: 12px;
  }

  .closing-section {
    margin-top: calc(56px + var(--closing-text-down-offset));
    padding-bottom: 0;
  }

  .closing-text {
    max-width: 278px;
    margin-bottom: 12px;
    color: #786852;
    font-size: 17px;
    line-height: 1.34;
  }

  .closing-signature {
    color: var(--gold-deep);
    font-size: 40px;
  }

  .site-signature {
    right: max(16px, calc(env(safe-area-inset-right) + 12px));
    bottom: calc(
      var(--signature-page-bottom-inset) - var(--signature-page-bottom-offset) - 40px + env(safe-area-inset-bottom)
    );
  }
}

/* INBJUDAN: samlar all text mot samma mjuka guldfarg som ornamenten. */
.paper,
.paper h2,
.paper h3,
.paper h4,
.paper p,
.paper span,
.paper label,
.paper a,
.paper input,
.paper textarea,
.paper .family-member-add,
.paper .family-member-remove,
.paper .rsvp-button-secondary {
  color: var(--invitation-text);
}

.paper .family-member-add::before,
.paper .family-member-add::after {
  color: var(--invitation-text);
}

.paper .address-map-address,
.paper .rsvp-message.is-success {
  color: var(--invitation-text-muted);
}

.paper .rsvp-input::placeholder,
.paper .rsvp-textarea::placeholder {
  color: var(--invitation-placeholder);
}

.paper .rsvp-button:not(.rsvp-button-secondary) {
  color: #fff9ec;
}

.paper .rsvp-message.is-error {
  color: #9d4e39;
}

/* TILLGÄNGLIGHET: minskar animationer för användare som valt reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
