:root {
  color-scheme: dark;
  background: #151216;
  color: #f2e9e5;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 38rem 34rem at 50% 48%, #2a1d28 0%, transparent 75%),
    radial-gradient(ellipse at 50% 90%, #1b161b, #151216 80%);
}

.page {
  --gutter: clamp(0.75rem, 3vw, 2.5rem);
  --margin-row: clamp(4rem, 12vh, 7rem);
  display: grid;
  grid-template-rows: var(--margin-row) minmax(0, 1fr) var(--margin-row);
  align-items: center;
  justify-items: center;
  height: 100vh;
  height: 100dvh;
  min-height: 17rem;
  padding-block: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-bottom));
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.dedication {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2.125rem, 5vw, 3.875rem);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
}

.dedication em {
  color: #eeb7c6;
  font-weight: inherit;
}

.bouquet-stage {
  width: min(100%, 49rem);
  height: 100%;
  min-width: 0;
  min-height: 0;
}

#bouquet {
  display: block;
  width: 100%;
  height: 100%;
}

.signature {
  margin: 0;
  color: #eeb7c6;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1rem, 2.8vw, 1.375rem);
  font-style: italic;
  line-height: 1.25;
  text-align: center;
}

@media (orientation: landscape) and (min-aspect-ratio: 8/5) and (max-height: 34rem) {
  .page {
    grid-template-columns: minmax(0, 1fr) min(61vw, calc(100dvh - 1.5rem)) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.5rem;
  }

  .dedication {
    font-size: clamp(1.25rem, 3.6vw, 2.375rem);
  }

  .signature {
    grid-column: 2;
    grid-row: 2;
  }
}
