:root {
  color-scheme: dark;
  --ink: #131b18;
  --paper: #f7eacb;
  --gold: #d6b77a;
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--ink);
  color: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid white;
  outline-offset: 5px;
}
.poster {
  width: min(1200px, 100%);
  margin: auto;
  padding: clamp(25px, 5vh, 64px) 5vw;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: clamp(32px, 6vw, 100px);
  align-items: center;
  justify-content: center;
  min-height: 100svh;
}
figure {
  margin: 0;
  display: flex;
  justify-content: center;
}
.engraving {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 88svh;
  object-fit: contain;
  box-shadow: 0 12px 55px #04090680;
}
.club,
.toolbar,
.scan,
.text-link,
.controls,
#intro p,
button,
.action {
  font-family: system-ui, sans-serif;
}
.club {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--gold);
  margin: 0 0 clamp(20px, 5vh, 56px);
}
.club span {
  display: inline-block;
  margin-right: 0.5em;
  font-size: 1.6em;
  vertical-align: -0.08em;
}
h1 {
  font-size: clamp(3.6rem, 8.9vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
  margin: 0;
}
h1 i {
  color: var(--gold);
}
.lead {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  margin: 1.25em 0 1.6em;
}
.scan {
  border-top: 1px solid #786d4d;
  padding-top: 1.6rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.scan h2 {
  font-size: 1.12rem;
  margin: 0 0 0.5em;
}
.scan p {
  line-height: 1.5;
  margin: 0;
  color: #d3c9b0;
}
#qr {
  background: white;
  width: clamp(120px, 12vw, 160px);
  flex-shrink: 0;
  aspect-ratio: 1;
}
#qr img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
}
.text-link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--gold);
  text-underline-offset: 4px;
}
.camera-page {
  min-height: 100svh;
  background: var(--ink);
}
#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}
.camera-ui {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.camera-ui :is(a, button) {
  pointer-events: auto;
}
.toolbar {
  width: min(100%, 720px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}
.toolbar a,
.toolbar span {
  background: #14201de6;
  padding: 0.6em 0.85em;
  border-radius: 4px;
  text-decoration: none;
}
.toolbar span {
  color: var(--gold);
}
#intro {
  margin: 24px auto;
  text-align: center;
  max-width: 350px;
}
.miniature {
  display: block;
  width: auto;
  height: min(30svh, 230px);
  margin: auto auto 1.6rem;
}
#intro h1 {
  font-size: clamp(2.5rem, 9vw, 3.4rem);
  line-height: 1;
}
#intro p {
  color: #ded6c3;
  line-height: 1.5;
  margin: 1em auto 1.5em;
}
button,
.action {
  display: inline-block;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.9em 1.5em;
  cursor: pointer;
}
button:hover,
.action:hover {
  background: white;
}
.controls {
  max-width: 440px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.65rem;
}
#status:not(:empty) {
  background: #131b18e8;
  color: #fff6e5;
  border-radius: 5px;
  padding: 0.65em 1em;
  margin: 0;
  line-height: 1.45;
}
#status:empty {
  display: none;
}
#retry {
  background: var(--ink);
  color: var(--paper);
}
@media (max-width: 650px) and (orientation: portrait) {
  .poster {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 22px;
    align-items: stretch;
  }
  .engraving {
    max-height: 50svh;
  }
  .club {
    margin-bottom: 12px;
  }
  .invitation h1 {
    font-size: 3.2rem;
  }
  .invitation h1 br {
    display: none;
  }
  .invitation h1 i::before {
    content: ' ';
  }
  .lead {
    margin: 0.75em 0 1em;
  }
}
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  :root {
    background: white;
    color: #191811;
  }
  .poster {
    display: block;
    min-height: 0;
    padding: 0;
  }
  .engraving {
    height: 166mm;
    max-height: none;
    box-shadow: none;
  }
  .invitation {
    margin: 7mm auto 0;
    max-width: 139mm;
  }
  .club,
  .text-link {
    display: none;
  }
  .invitation h1 {
    font-size: 32pt;
  }
  .invitation h1 br {
    display: none;
  }
  .invitation h1 i::before {
    content: ' ';
  }
  .lead {
    font-size: 14pt;
    margin: 2mm 0;
  }
  .scan {
    padding-top: 2mm;
  }
  .scan p,
  h1 i {
    color: inherit;
  }
  #qr {
    width: 35mm;
  }
}
