:root {
  color-scheme: light;
  --ivory: #fff7f0;
  --ink: #0b0d58;
  --gold: #a46519;
  --line: #bc9359;
  --paper: #fff9f5;
  --button-radius: 14px;
  --serif: 'Times New Roman', Times, Georgia, serif;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: #f9e7e3;
}
*, *::before, *::after { box-sizing: border-box }
[hidden] { display: none !important }
body { margin: 0 }
h1, h2, .monogram, .event-name { font-family: var(--serif); margin: 0 }
p { margin: 0 }
button, input, select { font: inherit }
button, a { touch-action: manipulation }
:focus-visible { outline: 3px solid #745299; outline-offset: 3px }
.invitation {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  margin: 18px auto;
  max-width: 465px;
  min-height: calc(100vh - 36px);
  min-height: calc(100svh - 36px);
  padding: 74px 30px 52px;
  text-align: center;
  background: radial-gradient(ellipse at 0 25%, #f6dedd80, transparent 65%), radial-gradient(ellipse at 100% 90%, #f5d5d580, transparent 65%), var(--ivory);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.invitation::before {
  content: '';
  position: absolute;
  z-index: -2;
  inset: 12px;
  border: 1px solid #bc9359;
  pointer-events: none;
}
.invitation::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('/floral.webp') top left / 182px auto no-repeat;
}
.invitation footer::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 145px;
  height: 145px;
  z-index: -1;
  background: url('/floral.webp') center / contain no-repeat;
  transform: rotate(180deg);
  pointer-events: none;
}
.monogram { color: var(--gold); font-size: 49px; line-height: 1; letter-spacing: -.07em }
.monogram span { font-size: .56em; letter-spacing: 0; margin: 0 .09em }
.ornament { margin: 6px auto 16px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); font: 26px/1 var(--serif) }
.ornament svg { width: 22px; height: 22px }
.event-name { font-size: clamp(18px, 4.6vw, 23px); font-style: italic; color: var(--gold); overflow-wrap: anywhere; margin-top: 16px }
.invitation h1 { font-size: clamp(45px, 12vw, 65px); font-weight: 500; letter-spacing: -.045em; line-height: 1.02 }
.lead { font-family: var(--serif); font-size: 19px; line-height: 1.4; margin: 9px 0 0 }
.upload { margin-top: 30px }
.button {
  --button-edge: #58300b;
  display: inline-flex;
  min-height: 68px;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 16px;
  border: 1px solid #784311;
  border-radius: var(--button-radius);
  box-shadow: 0 3px 0 var(--button-edge), inset 0 1px 0 #ffffff40;
  background: #784311;
  color: white;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #61340d }
.button.secondary { --button-edge: #c79d70; background: #fff7f0; color: #784311; border-color: var(--line) }
.button.secondary:hover { background: #f6e1dc }
.button:disabled { opacity: .58; cursor: wait; box-shadow: none }

.invitation footer { margin: 29px auto 0; padding-top: 13px; width: min(220px, 100%); font-size: 13px; line-height: 1.55 }
.invitation footer span { color: #4d4860 }
.status { margin-top: 13px; border-radius: 8px; padding: 11px 12px; font-size: 14px; line-height: 1.4; background: #f7e5df; overflow-wrap: anywhere }
.status.success { background: #e4eddf; color: #23402b }
.status.error { background: #f9e6e1; color: #702e25 }
.file-list { list-style: none; padding: 0; text-align: left; margin: 0 0 12px; display: grid; gap: 8px }
.file-list li { display: flex; align-items: center; gap: 12px; justify-content: space-between; background: #fae9e3; border-radius: 8px; padding: 8px 10px 8px 13px }
.file-list li > div { min-width: 0; flex: 1 }
.file-list strong { display: block; font-size: 14px; overflow-wrap: anywhere }
.file-list small { display: block; margin-top: 2px; line-height: 1.4; color: #59516a }
progress { width: 100%; height: 8px; accent-color: #784311 }
.remove, .text-button { color: #784311; background: none; border: 0; min-height: 48px; cursor: pointer; padding: 5px 9px }
.remove { min-width: 48px; font-size: 24px; border-radius: 12px }
.remove:hover { background: #f2d8d1 }
.text-button { text-decoration: underline; text-underline-offset: 3px; font-size: 14px }
.admin-layout { max-width: 940px; margin: 0 auto; padding: 32px 18px 56px; display: grid; gap: 16px; align-items: start }
.admin-heading { text-align: center; padding: 8px 0 14px }
.admin-heading h1 { font-weight: 500; font-size: clamp(28px, 6vw, 40px); line-height: 1.05; letter-spacing: -.04em }
.admin-heading p:last-child { margin-top: 10px }
.panel { padding: 20px; background: var(--paper); border: 1px solid #dfbca7; border-radius: 12px; min-width: 0 }
.panel h2 { font-size: 27px; letter-spacing: -.035em; font-weight: 500 }
.panel h2 + p { margin-top: 6px; font-size: 14px }
form { display: grid; gap: 7px }
label { font-size: 14px; font-weight: 650; display: block }
input, select { background: #fffcfa; border: 1px solid #b7906d; border-radius: 6px; min-width: 0; padding: 9px 11px; color: var(--ink); width: 100%; min-height: 44px }
input + label { margin-top: 7px }
form .button { margin-top: 8px }
#existing { margin-top: 20px; padding-top: 17px }
#existing select { margin-top: 6px }
.result { text-align: center }
canvas { width: min(100%, 315px); height: auto; display: block; margin: 14px auto; border: 1px solid #dfbca7; }
.action-row { display: flex; gap: 8px; margin-top: 8px }
.fine { font-size: 13px; margin-top: 12px; color: #59516a }
.manage .button, .manage .file-list { margin: 10px 0 0 }
#received li { flex-wrap: wrap; row-gap: 0 }
#received li > div { flex-basis: 8ch }
#received .media-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; margin-left: auto }
.delete-media { color: #8a302b }
.delete-media:disabled { opacity: .55 }
@media (min-width: 740px) {
  .admin-layout { grid-template-columns: 1fr 1.2fr }
  .admin-heading { grid-column: 1 / -1 }
  .result { grid-column: 2; grid-row: 2 / span 2 }
}
@media (max-width: 480px) {
  .invitation { margin: 0 auto; min-height: 100svh }
}
.modes { display: grid; gap: 12px }

#controls { text-align: left }
#controls label { margin-bottom: 5px }
#controls label span { font-weight: 400 }
#visibility-note { margin: 7px 0 14px }
.gallery h2 { font-size: 25px; font-weight: 500; letter-spacing: -.025em }
.album-list { margin: 12px 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px }
.album-list button { display: block; width: 100%; padding: 0; border: 1px solid #dfbca7; border-radius: 8px; overflow: hidden; background: var(--paper); cursor: pointer; color: var(--ink); text-align: center }
.album-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; background: #f6e1dc; color: #784311; font-weight: 600; font-size: 14px }
.album-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.album-credit { display: block; font-size: 12px; padding: 8px; overflow-wrap: anywhere }
dialog { border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); padding: 16px; width: min(92vw, 660px); text-align: center }
dialog::backdrop { background: #0b0d58b0 }
.dialog-head { display: flex; justify-content: space-between; align-items: center }
.dialog-head h2 { font-size: 25px }
#media-body img, #media-body video { display: block; width: 100%; max-height: 66svh; object-fit: contain; background: #0b0d22; border-radius: 6px }
#media-body p, #media-credit { padding: 9px 0; font-size: 14px }
#media-download { display: inline-flex; align-items: center }
#gallery-switch { margin-top: 10px }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0 0 }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: #784311 }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.lead { max-width: 23ch; margin-inline: auto }
.album-mode .invitation { max-width: 920px; justify-content: start; padding-top: 78px }
.album-mode .invitation::after { background-size: clamp(155px, 27vw, 280px) }
.album-mode .invitation h1 { font-size: clamp(39px, 11vw, 65px); line-height: 1 }
.album-mode .modes { max-width: 500px; margin-inline: auto }
.album-list { gap: clamp(9px, 2vw, 19px); margin: 14px 0 20px }
.album-list button { padding: 6px; border-radius: var(--button-radius) }
.album-tile { aspect-ratio: 4 / 5; overflow: hidden; background: #f7e3dd; border-radius: 9px }
.album-credit { font: italic clamp(14px, 3vw, 18px)/1.2 var(--serif); padding: 9px 4px 6px }
.play-icon { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #0b0d58c9; display: none; place-items: center; padding-left: 2px }
.album-tile:has(img) .play-icon { display: grid }
@media (min-width: 620px) {
  .album-mode .invitation { padding-inline: 48px }
  .album-list { grid-template-columns: repeat(3, minmax(0, 1fr)) }
}
@media (max-width: 345px) {
  .invitation { padding-inline: 23px }
  .invitation h1 { font-size: clamp(36px, 12vw, 42px) }
}
.album-filter { display: flex; justify-content: center; gap: 10px; margin: 6px 0 14px; flex-wrap: wrap }
.album-filter button {
  color: #784311; background: transparent; border: 1px solid var(--line);
  border-radius: var(--button-radius); padding: 8px 13px; min-height: 56px; cursor: pointer; font-size: 15px; text-align: center;
}
.album-filter button[aria-pressed="true"] { background: #f5ddd4; border-color: #a46519; font-weight: 650 }
#headline:focus { outline: none }
.upload-mode .invitation, .album-mode .invitation { justify-content: start; padding-top: clamp(55px, 10vw, 82px) }
.upload-mode .invitation h1 { font-size: clamp(39px, 10vw, 52px) }
.upload-mode .monogram, .album-mode .monogram { font-size: 38px }
.upload-mode .ornament, .album-mode .ornament { margin-bottom: 12px }
.upload-mode .event-name, .album-mode .event-name { margin-top: 9px }
.upload-mode .upload, .album-mode .upload { margin-top: 20px }
.upload-mode .modes, .album-mode .modes {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.upload-mode .modes .button, .album-mode .modes .button {
  width: auto; min-height: 56px; padding: 8px 12px; font-size: 15px;
}
#back-mode { min-height: 56px; font-weight: 600; padding: 8px 12px }
@media (max-width: 345px) {
  .upload-mode .modes, .album-mode .modes { gap: 6px }
  .upload-mode .modes .button, .album-mode .modes .button, #back-mode { padding-inline: 8px }
}
.source-actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 20px }
.source-actions .button {
  --button-edge: #bc9359;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 8px;
  background: #f8e4dd;
  color: #65370e;
}
.source-actions .button:hover, .source-actions .button:active { background: #f1d7ce }
.source-actions svg { width: 24px; height: 24px }
.queue-label { font-weight: 650; margin: 16px 0 8px; font-size: 14px }
.file-preview { width: 43px; height: 43px; object-fit: cover; flex: 0 0 auto; border-radius: 4px }
#credit-form { margin: 16px 0 }
#see-uploads { display: block; margin: 2px auto 0 }
.button:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--button-edge), inset 0 1px 0 #ffffff40 }
.album-list button:active, .album-filter button:active { opacity: .82 }
.album-list button { border: 0 }
.album-credit { background: var(--paper) }
@media (prefers-reduced-motion: no-preference) {
  .button, .album-list button, .album-filter button { transition: opacity 140ms ease, background-color 140ms ease, transform 140ms ease, box-shadow 140ms ease }
  #controls:not([hidden]), #gallery:not([hidden]) { animation: turn-page 180ms ease-out both }
  @keyframes turn-page {
    from { opacity: .55; transform: translateY(4px) }
    to { opacity: 1; transform: translateY(0) }
  }
}

.upload-submit { display: grid; gap: 12px }
#event-retry { margin-top: 12px }
#queue-label { scroll-margin-top: 16px }
.file-list li.upload-error { background: #f9e6e1; border-inline-start: 3px solid #a5483b }
.file-list li.upload-error small { color: #702e25 }
.album-message { max-width: 420px; margin: 0 auto 14px }
.manage-actions { flex-wrap: wrap; gap: 12px; margin-block: 8px 16px }
.manage-actions .button { flex: 1 1 136px; margin: 0; min-height: 60px; font-size: 15px }
@media (max-width: 480px) {
  .upload-mode .invitation { padding-top: 44px }
  .upload-mode .invitation::after { background-size: 142px auto }
  .upload-mode .invitation h1 { font-size: clamp(35px, 9.5vw, 43px) }
  .upload-mode .modes { margin-bottom: 14px }
  .upload-mode .source-actions { margin-bottom: 14px }
}
@media (max-height: 620px) and (max-width: 480px) {
  .guest .invitation { padding-block-start: 44px }
  .guest .invitation footer { margin-top: 20px }
}
#upload-receipts { margin-top: 22px }
#upload-receipts h2 { margin-bottom: 8px; font-size: 23px }
#uploaded-files li { background: #e4eddf; color: #23402b }
#uploaded-files strong { min-width: 0 }
#uploaded-files span { flex: none; font-size: 14px }

.album-mode .invitation {
  padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
}
html:has(.album-mode #upload-mode:not([hidden])) { scroll-padding-bottom: 110px }
.album-mode #upload-mode {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 46px));
  min-height: 68px;
  translate: -50% 0;
  font-size: 18px;
  box-shadow: 0 3px 0 var(--button-edge), 0 0 0 8px var(--ivory);
}
.album-mode #upload-mode:active:not(:disabled) {
  box-shadow: 0 1px 0 var(--button-edge), 0 0 0 8px var(--ivory);
}

.projector { background: #090b28; color: #fff9f5 }
.projection {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(12px, 2vh, 24px);
  padding: clamp(16px, 3vw, 36px);
  text-align: center;
}
.projection h1 { color: #fff9f5; font-size: clamp(24px, 4vw, 48px) }
.projection-kicker { color: #e5c6a7; font-size: 14px; margin-bottom: 6px }
.projection-stage { display: grid; grid-template-rows: minmax(0, 1fr); place-items: center; min-width: 0 }
#projection-status { font-size: clamp(18px, 3vw, 28px); max-width: 32ch; margin: auto }
#projection-slide {
  width: 100%;
  height: 100%;
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px;
}
#projection-image { position: relative; min-height: 0 }
#projection-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain }
#projection-credit { color: #e5c6a7 }
.projection nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px }
.projection nav .button { width: auto; min-height: 48px; font-size: 14px; padding: 8px 14px }

/* Approved menu-inspired palette and lettering, 12 November 2026. */
.event-name { color: var(--ink); font-style: normal; text-transform: uppercase; font-weight: 600; letter-spacing: .025em }
.guest #headline.has-lettering { width: min(100%, 340px); margin-inline: auto; font-size: 0 !important; line-height: 0 !important; letter-spacing: 0 }
.guest #headline.has-lettering img { display: block; width: 100%; height: auto }
.upload-mode #headline.has-lettering { width: min(100%, 320px) }
.album-mode #headline.has-lettering { width: min(100%, 470px) }
@media (forced-colors: active) {
  .guest #headline.has-lettering { font-size: 44px !important; line-height: 1.1 !important }
  .guest #headline.has-lettering img { display: none }
}
