:root {
  --paper: #8ba2a6;
  --ink: #02291e;
  color-scheme: light;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body, h1 { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
.invitation {
  min-height: 100svh;
  padding: clamp(18px, 3vh, 42px) 0 max(24px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-items: center;
}
.invitation h1 {
  width: min(100%, 1260px, 120svh);
  font-weight: 400;
}
.artwork { display: block; width: 100%; height: auto; }
.calendar-link {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  min-height: 44px;
  padding: 4px 8px;
  font-size: 15px;
  line-height: 1.4;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.calendar-link:hover { text-decoration-thickness: 2px; }
.download-icon { font-family: system-ui, sans-serif; font-size: .85em; }
.photos { position: relative; width: 100%; }
.photo-track {
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: var(--paper);
}
.photo-track::-webkit-scrollbar { display: none; }
.photo-track:focus-visible { outline-offset: -5px; }
.photo-track img {
  flex: 0 0 100%;
  width: 100%;
  height: clamp(260px, 60svh, 720px);
  object-fit: cover;
  scroll-snap-align: center;
}
.photo-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  border-radius: 40px;
}
.photo-controls button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
}
.photo-count { min-width: 4ch; text-align: center; font-variant-numeric: tabular-nums; }
.photos:not([hidden]) + .invitation { min-height: auto; padding-block: 2rem; }
@media (max-width: 600px) {
  .invitation { padding-bottom: max(32px, env(safe-area-inset-bottom)); }
  .invitation h1 { width: 100%; }
}
