/* The invitation card and its six designs. All artwork is CSS: gradients and shapes, no images or fonts. */
[data-theme] {
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
}
[data-theme=garden] { --c-bg: #f3f0e6; --c-ink: #22392a; --c-muted: #4d6353; --c-accent: #5b7f4c; --c-line: #5b7f4c59; --c-font: var(--serif); --c-weight: 600; --tint: #eef0e6; }
[data-theme=midnight] { --c-bg: #151c36; --c-ink: #f6eedb; --c-muted: #cdc4ae; --c-accent: #e0bd72; --c-line: #e0bd7266; --c-font: var(--serif); --c-weight: 500; --tint: #e9e8f0; }
[data-theme=confetti] { --c-bg: #fffaf1; --c-ink: #26222f; --c-muted: #57505f; --c-accent: #d4475f; --c-line: #26222f26; --c-font: var(--rounded); --c-weight: 800; --tint: #f8f0ef; }
[data-theme=classic] { --c-bg: #fbf8f1; --c-ink: #2e2922; --c-muted: #5e554a; --c-accent: #8a6a32; --c-line: #8a6a3266; --c-font: var(--serif); --c-weight: 400; --tint: #f3efe6; }
[data-theme=sunset] { --c-bg: #ffd7b8; --c-ink: #3a1b29; --c-muted: #5f3445; --c-accent: #8e2d4a; --c-line: #8e2d4a4d; --c-font: var(--sans); --c-weight: 760; --tint: #f9ece6; }
[data-theme=seaside] { --c-bg: #e4eef1; --c-ink: #10303d; --c-muted: #3c5965; --c-accent: #2b6b82; --c-line: #2b6b8259; --c-font: var(--sans); --c-weight: 700; --tint: #e8f0f2; }

@media (prefers-color-scheme: light) {
  .invite-page[data-theme] { --page-tint: var(--tint); }
}

.card { position: relative; overflow: hidden; border-radius: 22px; background-color: var(--c-bg); color: var(--c-ink);
  box-shadow: 0 30px 60px -30px #0006, 0 2px 10px #0000001a; text-align: center; isolation: isolate; }
.card-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 0; min-height: 460px; align-content: center;
  margin: 18px; padding: 52px clamp(20px, 6%, 48px); border: 1px solid var(--c-line); border-radius: 14px; }
.card-eyebrow { color: var(--c-accent); font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.card-title { margin-top: 16px; max-width: 16ch; font-family: var(--c-font); font-weight: var(--c-weight); font-size: clamp(2rem, 5.4vw, 3.1rem);
  line-height: 1.08; letter-spacing: -.02em; overflow-wrap: anywhere; color: var(--c-ink); }
.card-title.is-placeholder, .is-placeholder .card-value { opacity: .45; }
.card-rule { width: 64px; height: 2px; margin: 24px auto; background: var(--c-accent); border-radius: 2px; }
.card-facts { display: grid; gap: 14px; margin: 0; }
.card-fact { display: grid; gap: 1px; }
.card-label { color: var(--c-accent); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.card-value { margin: 0; font-size: 1.08rem; font-weight: 560; overflow-wrap: anywhere; }
.card-sub { display: block; color: var(--c-muted); font-size: .9rem; font-weight: 450; }
.card-note { margin-top: 24px; max-width: 46ch; color: var(--c-muted); white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }

/* Garden: two sprigs of sage leaves in opposite corners, on a soft wash. */
.card[data-theme=garden] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140'%3E%3Cpath d='M14 128C44 98 78 62 112 28' fill='none' stroke='%237f9c6c' stroke-width='2' stroke-linecap='round'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(30 110) rotate(-98)'/%3E%3Cpath fill='%23a3ba90' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(30 110) rotate(8)'/%3E%3Cpath fill='%239bb388' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(50 90) rotate(-95)'/%3E%3Cpath fill='%23b4c8a2' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(50 90) rotate(10)'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(70 70) rotate(-92)'/%3E%3Cpath fill='%23a3ba90' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(70 70) rotate(12)'/%3E%3Cpath fill='%239bb388' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(90 50) rotate(-90)'/%3E%3Cpath fill='%23b4c8a2' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(90 50) rotate(14)'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(106 34) rotate(-45)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 140'%3E%3Cg transform='rotate(180 70 70)'%3E%3Cpath d='M14 128C44 98 78 62 112 28' fill='none' stroke='%237f9c6c' stroke-width='2' stroke-linecap='round'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(30 110) rotate(-98)'/%3E%3Cpath fill='%23a3ba90' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(30 110) rotate(8)'/%3E%3Cpath fill='%239bb388' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(50 90) rotate(-95)'/%3E%3Cpath fill='%23b4c8a2' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(50 90) rotate(10)'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(70 70) rotate(-92)'/%3E%3Cpath fill='%23a3ba90' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(70 70) rotate(12)'/%3E%3Cpath fill='%239bb388' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(90 50) rotate(-90)'/%3E%3Cpath fill='%23b4c8a2' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(90 50) rotate(14)'/%3E%3Cpath fill='%238fa97c' d='M0 0C7-9 22-9 30 0C22 9 7 9 0 0Z' transform='translate(106 34) rotate(-45)'/%3E%3C/g%3E%3C/svg%3E"),
  radial-gradient(circle at 0 100%, #e2e8d4 0 130px, transparent 131px), radial-gradient(circle at 100% 0, #e2e8d4 0 130px, transparent 131px);
  background-size: 120px 120px, 120px 120px, auto, auto; background-repeat: no-repeat;
  background-position: -8px calc(100% + 8px), calc(100% + 8px) -8px, 0 0, 0 0; }

/* The sprigs reach about 112 px in from their corners: keep the text inside that clear band. */
.card[data-theme=garden] .card-inner { padding-top: 100px; padding-bottom: 100px; }

/* Midnight: a navy sky with small gold and white stars. */
.card[data-theme=midnight] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath fill='%23e0bd72' d='M52 10a30 30 0 1 0 18 46A26 26 0 0 1 52 10Z'/%3E%3C/svg%3E"),
  radial-gradient(circle at 12% 14%, #fff 0 1.4px, transparent 2px), radial-gradient(circle at 26% 8%, #e0bd72 0 1.8px, transparent 2.4px),
  radial-gradient(circle at 84% 12%, #fff 0 1.6px, transparent 2.2px), radial-gradient(circle at 92% 30%, #e0bd72 0 1.2px, transparent 1.8px),
  radial-gradient(circle at 7% 62%, #fff 0 1.2px, transparent 1.8px), radial-gradient(circle at 90% 74%, #fff 0 1.6px, transparent 2.2px),
  radial-gradient(circle at 16% 90%, #e0bd72 0 1.6px, transparent 2.2px), radial-gradient(circle at 72% 92%, #fff 0 1.1px, transparent 1.7px),
  radial-gradient(circle at 58% 5%, #fff 0 1px, transparent 1.6px), radial-gradient(circle at 40% 96%, #fff 0 1.2px, transparent 1.8px),
  radial-gradient(ellipse 120% 70% at 50% 0, #26325a, transparent 70%),
  linear-gradient(170deg, #1a2244, #0e1328);
  background-size: 54px 54px, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto; background-repeat: no-repeat;
  background-position: calc(100% - 40px) 38px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
.card[data-theme=midnight] .card-inner { border-color: #e0bd7266; }

/* Confetti: scattered dots in five colours around the edges. */
.card[data-theme=confetti] { background-image:
  radial-gradient(circle at 8% 10%, #f2a541 0 7px, transparent 8px), radial-gradient(circle at 18% 4%, #4aa3a2 0 5px, transparent 6px),
  radial-gradient(circle at 30% 9%, #d4475f 0 4px, transparent 5px), radial-gradient(circle at 70% 6%, #6c63c9 0 6px, transparent 7px),
  radial-gradient(circle at 88% 11%, #4aa3a2 0 8px, transparent 9px), radial-gradient(circle at 95% 28%, #f2a541 0 5px, transparent 6px),
  radial-gradient(circle at 4% 40%, #6c63c9 0 5px, transparent 6px), radial-gradient(circle at 96% 58%, #d4475f 0 6px, transparent 7px),
  radial-gradient(circle at 5% 78%, #d4475f 0 7px, transparent 8px), radial-gradient(circle at 14% 94%, #4aa3a2 0 6px, transparent 7px),
  radial-gradient(circle at 46% 96%, #f2a541 0 4px, transparent 5px), radial-gradient(circle at 80% 93%, #6c63c9 0 8px, transparent 9px),
  radial-gradient(circle at 93% 86%, #f2a541 0 4px, transparent 5px); }
.card[data-theme=confetti] .card-inner { border-style: dashed; }

/* Classic: cream paper, a double rule and a small diamond. */
.card[data-theme=classic] { background-image: repeating-linear-gradient(0deg, #00000005 0 1px, transparent 1px 4px); }
.card[data-theme=classic] .card-inner { border: 3px double #8a6a3299; }
.card[data-theme=classic] .card-title { font-style: italic; letter-spacing: -.01em; }
.card[data-theme=classic] .card-rule { width: 12px; height: 12px; border-radius: 1px; transform: rotate(45deg); box-shadow: 22px -22px 0 -4px #8a6a3299, -22px 22px 0 -4px #8a6a3299; }

/* Sunset: a warm gradient with a low sun. */
.card[data-theme=sunset] { background-image:
  radial-gradient(circle at 50% 118%, #fff3e4 0 96px, #ffe1c766 97px 136px, transparent 137px),
  linear-gradient(176deg, #ffd9b6 0%, #f8b3a6 52%, #dca6c9 100%); }
.card[data-theme=sunset] .card-inner { border-color: #8e2d4a33; }

/* Seaside: calm blue with soft waves along the bottom and one at the top. */
.card[data-theme=seaside] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cpath d='M0 8C10 1 30 1 40 8S70 15 80 8' fill='none' stroke='%239cc0cc' stroke-width='2.2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cpath d='M0 8C10 1 30 1 40 8S70 15 80 8' fill='none' stroke='%23c3dae1' stroke-width='2.2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 16'%3E%3Cpath d='M0 8C10 1 30 1 40 8S70 15 80 8' fill='none' stroke='%23c3dae1' stroke-width='2.2'/%3E%3C/svg%3E"),
  linear-gradient(180deg, #eef5f7, #d9e7eb);
  background-size: 80px 16px, 80px 16px, 80px 16px, auto; background-repeat: repeat-x, repeat-x, repeat-x, no-repeat;
  background-position: 0 calc(100% - 30px), 40px calc(100% - 50px), 20px 30px, 0 0; }

/* Small design chips in the form. */
.chip { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 9px;
  background: var(--c-bg); color: var(--c-ink); font-family: var(--c-font); font-weight: var(--c-weight); font-size: 1.05rem;
  border: 1px solid var(--c-line); }
.chip[data-theme=midnight] { background: linear-gradient(170deg, #1a2244, #0e1328); color: #e0bd72; }
.chip[data-theme=sunset] { background: linear-gradient(176deg, #ffd9b6, #f8b3a6 52%, #dca6c9); }
.chip[data-theme=confetti] { background: radial-gradient(circle at 20% 22%, #f2a541 0 3px, transparent 4px), radial-gradient(circle at 80% 78%, #4aa3a2 0 3px, transparent 4px), radial-gradient(circle at 78% 20%, #d4475f 0 2px, transparent 3px), #fffaf1; }
.chip[data-theme=classic] { font-style: italic; border: 3px double #8a6a3299; }
.chip[data-theme=garden] { background: radial-gradient(circle at 0 0, #b9cba6 0 14px, transparent 15px), #f3f0e6; }
.chip[data-theme=seaside] { background: linear-gradient(180deg, #edf4f6 60%, #b8d3dc 60% 66%, #dbe8ec 66%); }

.preview .card-inner { min-height: 420px; }

@media (max-width: 520px) {
  .card { border-radius: 18px; }
  .card-inner { min-height: 0; margin: 12px; padding: 40px 18px; }
  .preview .card-inner { min-height: 0; }
}
@media (max-width: 520px) {
  .card[data-theme=garden] { background-size: 84px 84px, 84px 84px, auto, auto; }
  .card[data-theme=garden] .card-inner { padding-top: 72px; padding-bottom: 72px; }
  .card[data-theme=midnight] { background-size: 40px 40px, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto; background-position: calc(100% - 28px) 28px, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
}
