@charset "UTF-8";
/**
 * Global CSS Properties:
 * Default values are specified in lib/config.php
 */
:root {
  --ui-scale: 100%;
  --primary-color: transparent;
  --primary-light-color: transparent;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --success-color: #198754;
  --secondary-color: transparent;
  --highlight-color: transparent;
  --secondary-font-color: transparent;
  --button-font-color: transparent;
  --start-text-color: transparent;
  --countdown-font-color: transparent;
  --background-countdown-color: transparent;
  --cheese-color: transparent;
  --panel-color: transparent;
  --border-color: transparent;
  --box-color: transparent;
  --gallery-button-color: transparent;
  --buzzer-message-font-color: transparent;
  --background-default: none;
  --background-admin: none;
  --background-chroma: none;
  --background-preview: none;
  --font-family: 'Dosis', sans-serif;
  --font-color: transparent;
  --preview-rotation: 0deg;
  --ui-scale-result: contain;
}

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

body {
  margin: 0;
  font-family: var(--font-family-default, --font-family), sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--font-color);
  background-color: #ffffff;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin: 0.5em 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
  font-weight: 300;
}
@media (min-width: 1024px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 1.5rem;
  font-weight: 300;
}

h3 {
  font-size: 1.25rem;
  font-weight: normal;
}

/**
 * Base
 */
* {
  user-select: none;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  -webkit-border-radius: 0px;
  border-radius: 0px;
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  -webkit-border-radius: 0px;
  background: var(--secondary-color);
}

html {
  touch-action: none;
  font-size: var(--ui-scale);
}

html,
body {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-light-color);
  background-image: var(--background-default);
  background-position: center center;
  background-size: cover;
  text-size-adjust: auto;
}

/**
 * Utility
 */
.hidden {
  display: none !important;
}

/**
 * Text
 */
.text-danger {
  color: var(--error-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-success {
  color: var(--success-color);
}

/**
 * Button
 */
:root {
  --button-color: var(--button-font-color);
  --button-background: var(--primary-color);
  --button-font-size: 1rem;
  --button-font-weight: 400;
  --button-font-family: 'DefaultFont', 'Dosis', sans-serif;
  --button-icon-size: 1rem;
  --button-padding-y: 1rem;
  --button-padding-x: 1rem;
  --button-border-width: 0;
  --button-border-color: var(--border-color);
  --button-border-radius: 0;
  --button-height: auto;
  --button-width: auto;
  --button-gap: 0.25rem;
  --button-direction: row;
  --button-focus-background: color-mix(in srgb, var(--button-background), var(--button-color) 20%);
}

@media (min-width: 1024px) {
  :root {
    --button-gap: 0.5rem;
    --button-padding-y: 1.5rem;
    --button-padding-x: 2.5rem;
  }
}
.button {
  display: inline-flex;
  flex-direction: var(--button-direction);
  padding: var(--button-padding-y) var(--button-padding-x);
  gap: var(--button-gap);
  font-size: var(--button-font-size);
  font-weight: var(--button-font-weight);
  font-family: var(--font-family-button, --font-family-default), "Dosis", sans-serif;
  font-style: var(--button-font-style, normal);
  color: var(--button-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  height: var(--button-height);
  width: var(--button-width);
  border: var(--button-border-width) solid var(--button-border-color);
  border-radius: var(--button-border-radius);
  background: var(--button-background);
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}
.button.focused, .button:focus-visible {
  --button-background: var(--button-focus-background);
}
.button--icon {
  font-size: var(--button-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    --button-background: var(--button-focus-background);
  }
}
[data-ui-button=classic_rounded] {
  --button-border-radius: 0.625rem;
}

[data-ui-button=modern] {
  --button-icon-size: 2rem;
  --button-padding-y: 0;
  --button-padding-x: 0;
  --button-border-width: 2px;
  --button-border-radius: 50%;
  --button-width: 4rem;
  --button-height: 4rem;
  --button-background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color) 50%);
  --button-focus-background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--highlight-color), var(--button-color) 10%),
    color-mix(in srgb, var(--primary-color), var(--button-color) 10%) 50%
  );
}
@media (min-width: 1024px) {
  [data-ui-button=modern] {
    --button-width: 5rem;
    --button-height: 5rem;
  }
}
[data-ui-button=modern] .button--label {
  display: none;
}

[data-ui-button=modern_squared] {
  --button-font-size: 0.75rem;
  --button-icon-size: 1.5rem;
  --button-padding-y: 0;
  --button-padding-x: 0;
  --button-width: 4rem;
  --button-height: 4rem;
  --button-gap: 0.45rem;
  --button-border-radius: 15%;
  --button-direction: column;
}
@media (min-width: 1024px) {
  [data-ui-button=modern_squared] {
    --button-icon-size: 2rem;
    --button-width: 5rem;
    --button-height: 5rem;
  }
}
[data-ui-button=modern_squared] .button--label {
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: calc(100% - 1rem);
}

/**
 * Select menu
 */
#collageSelector {
  width: 100%;
  margin-top: 0.75rem;
}

.collageSelector__trigger {
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.collageSelector__current {
  display: block;
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.collageSelector__options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.collageSelector__option {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 1.05rem;
  text-align: left;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.collageSelector__option:focus,
.collageSelector__option:hover,
.collageSelector__option.is-selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color), #fff 70%);
}

.collageSelector__limit {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.35rem;
}

[data-ui-button=classic_rounded] .collageSelector__option,
[data-ui-button=modern] .collageSelector__option,
[data-ui-button=modern_squared] .collageSelector__option {
  border-radius: 0.75rem;
}

/**
 * Buttonbar
 */
.buttonbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.buttonbar--middle {
  position: absolute;
  top: 50%;
  left: 2rem;
  right: 2rem;
  translate: 0 -50%;
}
.buttonbar--top {
  position: absolute;
  top: 2rem;
  left: 2rem;
  right: 2rem;
}
.buttonbar--top-left {
  position: absolute;
  top: 2rem;
  left: 2rem;
}
.buttonbar--top-right {
  position: absolute;
  top: 2rem;
  left: 2rem;
}
.buttonbar--bottom {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
}
.buttonbar--actions {
  justify-content: flex-end;
}

.buttonbar--print-copies {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
}

.collageSelector__preview-container {
  margin-bottom: 0.75rem;
  border-radius: 0.25rem;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.collageSelector__preview {
  width: 100%;
  max-width: 120px;
  height: auto;
  display: block;
}

.collageSelector__label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

/**
 * Sidenav
 */
:root {
  --sidenav-background: rgba(0, 0, 0, 0.75);
  --sidenav-padding-y: 1.5rem;
  --sidenav-padding-x: 1.5rem;
  --sidenav-close-color: var(--button-font-color);
  --sidenav-close-background: var(--primary-color);
  --sidenav-close-border-radius: var(--button-border-radius);
  --sidenav-close-font-size: 2rem;
  --sidenav-close-height: 4rem;
  --sidenav-close-width: 4rem;
  --sidenav-list-item-boder-radius: 0;
  --sidenav-list-item-color: var(--button-font-color);
  --sidenav-list-item-background: var(--primary-color);
  --sidenav-list-item-font-size: 1rem;
  --sidenav-list-item-font-weight: 400;
  --sidenav-list-item-padding-y: 0.75rem;
  --sidenav-list-item-padding-x: 1rem;
  --sidenav-list-item-hover-background: color-mix(
    in srgb,
    var(--sidenav-list-item-background),
    var(--sidenav-list-item-color) 10%
  );
  --sidenav-list-item-focus-background: color-mix(
    in srgb,
    var(--sidenav-list-item-background),
    var(--sidenav-list-item-color) 20%
  );
  --sidenav-list-item-active-background: color-mix(
    in srgb,
    var(--sidenav-list-item-background),
    var(--sidenav-list-item-color) 30%
  );
}

.sidenav {
  width: 100%;
  position: fixed;
  z-index: 1005;
  top: 0;
  bottom: 0;
  right: 0;
  background: var(--sidenav-background);
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--sidenav-padding-y) var(--sidenav-padding-x);
  padding-top: calc(var(--sidenav-padding-y) + var(--sidenav-close-height));
  transition: translate 0.5s;
  translate: 100% 0;
  backdrop-filter: blur(10px);
}
@media (min-width: 576px) {
  .sidenav {
    width: 250px;
  }
}
.sidenav--open {
  translate: 0 0;
}

.sidenav-close {
  position: absolute;
  right: var(--sidenav-padding-x);
  top: 0;
  color: var(--sidenav-close-color);
  background: var(--sidenav-close-background);
  font-size: var(--sidenav-close-font-size);
  border-bottom-left-radius: var(--sidenav-close-border-radius);
  border-bottom-right-radius: var(--sidenav-close-border-radius);
  width: var(--sidenav-close-width);
  height: var(--sidenav-close-height);
  border: none;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sidenav-close:hover {
  background: var(--highlight-color);
}

.sidenav-list {
  display: grid;
  gap: 0.25rem;
  padding: 0;
}

.sidenav-list-item {
  border: none;
  padding: var(--sidenav-list-item-padding-y) var(--sidenav-list-item-padding-x);
  font-size: var(--sidenav-list-item-font-size);
  font-weight: var(--sidenav-list-item-font-weight);
  border-radius: var(--sidenav-list-item-boder-radius);
  line-height: 1;
  color: var(--sidenav-list-item-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  background: var(--sidenav-list-item-background);
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
  text-transform: uppercase;
}
.sidenav-list-item:hover {
  --sidenav-list-item-background: var(--sidenav-list-item-hover-background);
}
.sidenav-list-item.focused, .sidenav-list-item:focus {
  --sidenav-list-item-background: var(--sidenav-list-item-focus-background);
}
.sidenav-list-item--active {
  --sidenav-list-item-background: var(--sidenav-list-item-active-background);
}

[data-ui-button=classic_rounded] {
  --sidenav-list-item-boder-radius: var(--button-border-radius);
}

[data-ui-button=modern_squared] {
  --sidenav-list-item-boder-radius: 0.625rem;
}

[data-ui-button=modern] {
  --sidenav-list-item-boder-radius: 2rem;
}

/**
 * Stage
 */
:root {
  --stage-color: inherit;
  --stage-background: transparent;
  --stage-background-image: none;
  --stage-background-size: contain;
  --stage-start-color: var(--start-text-color);
  --stage-start-background: transparent;
  --stage-chroma-color: inherit;
  --stage-chroma-background: var(--background-chroma);
  --stage-loader-color: inherit;
  --stage-loader-background: var(--background-countdown-color);
  --stage-result-color: inherit;
  --stage-result-background: var(--background-countdown-color);
  --stage-result-scale-background: var(--ui-scale-result);
}

.stage {
  display: none;
  height: 100dvh;
  width: 100dvw;
  justify-content: center;
  align-items: center;
  color: var(--stage-color);
  background: var(--stage-background);
  background-repeat: no-repeat;
  background-image: var(--stage-background-image);
  background-position: center center;
  background-size: var(--stage-background-size);
}
.stage--active {
  display: flex;
}
.stage--start {
  --stage-color: var(--stage-start-color);
  --stage-background: var(--stage-start-background);
}
.stage--start #collageDiv {
  font-size: var(--button-font-size);
  font-weight: bold;
  color: var(--button-color);
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 1rem;
}
.stage--chroma {
  --stage-color: var(--stage-chroma-color);
  --stage-background: var(--stage-chroma-background);
}
.stage--loader {
  --stage-color: var(--stage-loader-color);
  --stage-background: var(--stage-loader-background);
}
.stage--result {
  --stage-color: var(--stage-result-color);
  --stage-background: var(--stage-result-background);
  --stage-background-size: var(--stage-result-scale-background);
  position: relative;
  overflow: hidden;
}
.stage--result::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stage-background-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(40px);
  transform: scale(1.1);
  z-index: 0;
}
.stage--result::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stage-background-image);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: var(--stage-background-size);
  z-index: 1;
}
.stage--result > * {
  position: relative;
  z-index: 2;
}
.stage-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  height: 100%;
  width: 100%;
  padding: 2rem;
  gap: 1rem;
}
.stage-inner #selfie-preview {
  display: none;
  max-width: 40vw;
  max-height: 40vh;
  object-fit: contain;
}
.stage-image {
  position: absolute;
  display: none;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: center center no-repeat;
  background-size: contain;
}
.stage-image.flip-horizontal {
  scale: -1 1;
}
.stage-image.flip-vertical {
  scale: 1 -1;
}
.stage-image.flip-both {
  scale: -1 -1;
}
.stage-code {
  position: absolute;
  width: 10rem;
  box-sizing: border-box;
  text-align: center;
  color: #000;
  background: #fff;
  padding: 0.6rem;
  border-radius: var(--button-border-radius, 0.8rem);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stage-code__image {
  display: block;
  width: 100%;
  height: auto;
}
.stage-code__caption {
  margin: 0;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.stage-code.left {
  left: 2rem;
}
.stage-code.left--top {
  top: 10rem;
}
.stage-code.left--center {
  top: 50%;
  translate: 0 -50%;
}
.stage-code.left--bottom {
  bottom: 10rem;
}
.stage-code.right {
  right: 2rem;
}
.stage-code.right--top {
  top: 10rem;
}
.stage-code.right--center {
  top: 50%;
  translate: 0 -50%;
}
.stage-code.right--bottom {
  bottom: 10rem;
}
.stage-message {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  font-size: 3rem;
  text-align: center;
  width: calc(100% - 4rem);
}
.stage-message--error {
  color: var(--error-color);
}
.stage-message--warning {
  color: var(--warning-color);
}
.stage-message--success {
  color: var(--success-color);
}

.stage--start .stage-start__text {
  display: flex;
  pointer-events: none;
  z-index: 1;
  width: 100%;
}
.stage--start .stage-start__text--top, .stage--start .stage-start__text--center, .stage--start .stage-start__text--left-top, .stage--start .stage-start__text--left-center {
  position: absolute;
  width: auto;
  left: 4rem;
  right: 4rem;
}
.stage--start .stage-start__text--right-top, .stage--start .stage-start__text--right-center {
  position: absolute;
  width: auto;
  left: -4rem;
  right: 4rem;
}
.stage--start .stage-start__text--top, .stage--start .stage-start__text--left-top, .stage--start .stage-start__text--right-top {
  top: 4rem;
}
.stage--start .stage-start__text--center, .stage--start .stage-start__text--left-center, .stage--start .stage-start__text--right-center {
  top: 35%;
  translate: 0 -50%;
}
.stage--start .stage-start__text--top, .stage--start .stage-start__text--center, .stage--start .stage-start__text--bottom {
  justify-content: center;
  text-align: center;
}
.stage--start .stage-start__text--left-top, .stage--start .stage-start__text--left-center, .stage--start .stage-start__text--left-bottom {
  justify-content: flex-start;
  text-align: left;
}
.stage--start .stage-start__text--right-top, .stage--start .stage-start__text--right-center, .stage--start .stage-start__text--right-bottom {
  justify-content: flex-end;
  text-align: right;
}
.stage--start .stage-start__text--bottom, .stage--start .stage-start__text--left-bottom, .stage--start .stage-start__text--right-bottom {
  margin-bottom: 0;
}
.stage--start .stage-start__actions {
  position: relative;
  z-index: 2;
  width: 100%;
}
.stage--start .names {
  max-width: min(100%, 40rem);
}

.stage--start .names .start-text {
  font-family: var(--font-family-start-text, --font-family-default), "Dosis", sans-serif;
  color: var(--start-text-color, inherit);
  font-weight: var(--start-text-weight, 400);
  font-style: var(--start-text-style, normal);
}

.stage--start .names .event-text {
  font-family: var(--font-family-event-text, --font-family-default), "Dosis", sans-serif;
  color: var(--event-text-color, inherit);
  font-weight: var(--event-text-weight, 400);
  font-style: var(--event-text-style, normal);
}

@media (max-width: 767px) {
  .stage--start .stage-start__text--top, .stage--start .stage-start__text--center, .stage--start .stage-start__text--left-top, .stage--start .stage-start__text--left-center {
    left: 1rem;
    right: 1rem;
  }
  .stage--start .stage-start__text--right-top, .stage--start .stage-start__text--right-center {
    left: -1rem;
    right: 1rem;
  }
  .stage--start .stage-start__text--top, .stage--start .stage-start__text--left-top, .stage--start .stage-start__text--right-top {
    top: 1rem;
  }
  .stage--start .stage-start__text--center, .stage--start .stage-start__text--left-center, .stage--start .stage-start__text--right-center {
    top: 35%;
  }
}
/* Respect iOS safe areas when viewport-fit=cover hides the status bar */
body,
.stage {
  padding-top: env(safe-area-inset-top, 0);
}

.screensaver-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
  background-size: contain;
  background-position: center;
  z-index: 20;
  cursor: pointer;
}
.screensaver-overlay--active {
  display: flex;
}
.screensaver-overlay--gallery {
  display: flex;
  flex-direction: column;
  padding: 6vh 0;
  box-sizing: border-box;
}
.screensaver-overlay video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
}
.screensaver-overlay__image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}
.screensaver-overlay__text {
  position: absolute;
  width: 100%;
  text-align: center;
  color: var(--screensaver-text-color, #ffffff);
  font-family: var(--font-family-screensaver-text, --font-family-default), "Dosis", sans-serif;
  font-weight: var(--screensaver-text-weight, 400);
  font-style: var(--screensaver-text-style, normal);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
  box-sizing: border-box;
  padding: 0.75rem 1.25rem;
  background: rgba(32, 32, 32, 0.55);
  backdrop-filter: blur(3px);
}
.screensaver-overlay__text--top {
  top: 3rem;
}
.screensaver-overlay__text--center {
  top: 50%;
  transform: translateY(-50%);
}
.screensaver-overlay__text--bottom {
  bottom: 3rem;
}
.screensaver-overlay--gallery .screensaver-overlay__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

/**
 * Preview
 */
#preview-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-height: 100vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#preview-wrapper {
  position: relative;
  height: 100%;
}

#preview--none,
#preview--ipcam,
#preview--video,
#previewframe--picture,
#previewframe--collage {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  height: 100%;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  translate: -50% -50%;
  font-size: 1.75em;
  color: var(--start-text-color);
  text-align: center;
}

#preview--none,
#preview--ipcam,
#preview--video {
  translate: unset;
}

#preview--ipcam,
#preview--video,
#previewframe--picture,
#previewframe--collage {
  rotate: var(--preview-rotation);
}

#preview--none,
#previewframe--picture,
#previewframe--collage {
  height: auto;
  width: auto;
}

#preview--ipcam,
#preview--video,
#previewframe--picture,
#previewframe--collage {
  background-image: none;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
}
#preview--ipcam.fill,
#preview--video.fill,
#previewframe--picture.fill,
#previewframe--collage.fill {
  object-fit: fill;
}
#preview--ipcam.contain,
#preview--video.contain,
#previewframe--picture.contain,
#previewframe--collage.contain {
  object-fit: contain;
}
#preview--ipcam.cover,
#preview--video.cover,
#previewframe--picture.cover,
#previewframe--collage.cover {
  background-size: cover;
  object-fit: cover;
}
#preview--ipcam.none,
#preview--video.none,
#previewframe--picture.none,
#previewframe--collage.none {
  object-fit: none;
}
#preview--ipcam.scale-down,
#preview--video.scale-down,
#previewframe--picture.scale-down,
#previewframe--collage.scale-down {
  object-fit: scale-down;
}
#preview--ipcam.flip-horizontal,
#preview--video.flip-horizontal,
#previewframe--picture.flip-horizontal,
#previewframe--collage.flip-horizontal {
  scale: -1 1;
}
#preview--ipcam.flip-vertical,
#preview--video.flip-vertical,
#previewframe--picture.flip-vertical,
#previewframe--collage.flip-vertical {
  scale: 1 -1;
}

#preview--ipcam.streaming {
  background-image: var(--background-preview);
}

/**
 * Logo
 */
.logo {
  position: absolute;
  max-width: 30vw;
  height: auto;
  width: auto;
}
.logo--top_left {
  top: 4rem;
  left: 4rem;
}
.logo--top_right {
  top: 4rem;
  right: 4rem;
}
.logo--center {
  top: 50%;
  left: 50%;
  translate: -50% -50%;
}
.logo--bottom_left {
  bottom: 4rem;
  left: 4rem;
}
.logo--bottom_right {
  bottom: 4rem;
  right: 4rem;
}
.logo img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/**
 * Admin Shortcut
 */
.adminshortcut {
  position: absolute;
  z-index: 50;
  height: 4rem;
  width: 4em;
  border: 0;
  padding: 0;
  margin: 0;
  background-color: transparent;
}
.adminshortcut--top-left {
  top: 0rem;
  left: 0rem;
}
.adminshortcut--top-right {
  top: 0rem;
  right: 0rem;
}
.adminshortcut--bottom-left {
  bottom: 0rem;
  left: 0rem;
}
.adminshortcut--bottom-right {
  bottom: 0rem;
  right: 0rem;
}

/**
 * Countdown
 */
.countdown {
  z-index: 1500;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--countdown-font-color);
  font-family: var(--font-family-countdown, --font-family-default), "Dosis", sans-serif;
  font-weight: var(--countdown-font-weight, 700);
  font-style: var(--countdown-font-style, normal);
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
}
.countdown-number {
  animation: tick 1s normal forwards ease-in;
}

@keyframes tick {
  from {
    opacity: 1;
    font-size: 80vh;
  }
  to {
    opacity: 0.1;
    font-size: 0;
  }
}
/**
 * Cheese
 */
.cheese {
  z-index: 1500;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--cheese-color);
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  font-size: 3em;
  user-select: none;
}

/**
 * Shutter
 */
.shutter {
  z-index: 1500;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}
.shutter-flash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background-color: #fff;
}
.shutter-aperture {
  box-sizing: content-box;
  width: 150%;
  padding-bottom: 150%;
  height: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: solid 2000px #000000;
  border-radius: 50%;
}

.buzzer-message {
  font-family: var(--font-family-button_buzzer_message, --font-family-default), "Dosis", sans-serif;
  font-weight: var(--buzzer-message-font-weight, var(--font-weight, 400));
  font-style: var(--buzzer-message-font-style, var(--font-style, normal));
  color: var(--buzzer-message-font-color, var(--font-color));
  font-size: 1.125rem;
  line-height: 1.75rem;
}
@media (min-width: 1024px) {
  .buzzer-message {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
}

/**
 * Gallery
 */
:root {
  --gallery-background: var(--primary-light-color);
  --gallery-color: var(--secondary-font-color);
  --gallery-bar-background: var(--secondary-color);
  --gallery-bar-color: var(--secondary-font-color);
  --gallery-card-color: var(--secondary-font-color);
  --gallery-card-background: var(--primary-light-color);
  --gallery-card-border-radius: 0.25rem;
  --gallery-card-focus-background: var(--primary-color);
  --gallery-card-focus-color: var(--button-font-color);
  --gallery-card-width-base: 200px;
  --gallery-card-width-multiplier: 1;
  --gallery-card-width: calc(var(--gallery-card-width-base) * var(--gallery-card-width-multiplier));
}
@media (min-width: 1024px) {
  :root {
    --gallery-card-width-multiplier: 1.5;
  }
}

.gallery {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--gallery-background);
  color: var(--gallery-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
}
.gallery-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: var(--gallery-bar-background);
  color: var(--gallery-bar-color);
}
.gallery-body {
  padding: 2rem;
  flex-grow: 1;
  overflow-y: scroll;
}
.gallery-title {
  flex-grow: 1;
}
.gallery-title h1 {
  margin: 0;
  font-family: var(--font-family-gallery-title, --font-family-default), "Dosis", sans-serif;
  color: var(--gallery-title-color, inherit);
  font-weight: var(--gallery-title-weight, 400);
  font-style: var(--gallery-title-style, normal);
}

.gallery-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(var(--gallery-card-width), 1fr));
}
.gallery-list a {
  display: block;
  overflow: hidden;
  text-decoration: none;
  border-radius: var(--gallery-card-border-radius);
  color: var(--gallery-card-color);
  background-color: var(--gallery-card-background);
  box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2);
}
.gallery-list a:active, .gallery-list a:focus, .gallery-list a:hover, .gallery-list a.focused {
  --gallery-card-color: var(--gallery-card-focus-color);
  --gallery-card-background: var(--gallery-card-focus-background);
}
.gallery-list a:active img, .gallery-list a:focus img, .gallery-list a:hover img, .gallery-list a.focused img {
  opacity: 0.75;
}
.gallery-list figure {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  height: 100%;
  margin: 0;
}
.gallery-list img {
  border: none;
  max-width: 100%;
  height: auto;
  display: block;
}
.gallery-list figcaption {
  margin: 0;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  text-align: center;
}

/**
 * Overlay
 **/
.gallery-mode--overlay .gallery {
  translate: -100% 0;
  transition: translate 0.3s ease-in-out;
}
.gallery-mode--overlay .gallery-body {
  overflow: hidden;
  height: 0;
  width: 0;
  flex-grow: 0;
  padding: 0;
}
.gallery-mode--overlay .gallery.gallery--open {
  translate: 0 0;
}
.gallery-mode--overlay .gallery.gallery--open .gallery-body {
  overflow-y: scroll;
  padding: 2rem;
  height: auto;
  width: auto;
  flex-grow: 1;
}

/**
 * Cheese
 */
.chroma-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  translate: -50% -50%;
}
.chroma-canvas canvas {
  margin: 0 auto;
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.chroma-background-selector {
  position: absolute;
  max-width: 100%;
  display: flex;
  gap: 0.5rem;
  left: 2rem;
  right: 2rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  bottom: calc(4rem + var(--button-height));
}

.chroma-background-selector-image {
  cursor: pointer;
  max-width: 120px;
  max-height: 80px;
  border: 2px solid var(--border-color);
}

/**
 * Form
 */
.form > *:last-child {
  margin-bottom: 0;
}

.form-input {
  border: 1px solid rgba(0, 0, 0, 0.5);
  width: 100%;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5em;
}

.form-message {
  margin-bottom: 0.5em;
}

.form-input-copies {
  border: 1px solid rgba(0, 0, 0, 0.5);
  width: 20%;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  font-size: 2rem;
  text-align: center;
}

/**
 * Modal
 */
:root {
  --modal-backdrop: rgba(0, 0, 0, 0.8);
  --modal-color: #313131;
  --modal-background: #ffffff;
  --modal-font-size: 1rem;
  --modal-line-height: 1.2;
  --modal-padding: 2rem;
  --modal-spacing: 1.5rem;
  --modal-max-width: 960px;
  --modal-button-color: var(--button-font-color);
  --modal-button-background: var(--primary-color);
  --modal-button-font-size: 1rem;
  --modal-button-font-weight: 400;
  --modal-button-icon-size: 1rem;
  --modal-button-padding-y: 1rem;
  --modal-button-padding-x: 1rem;
  --modal-button-border-width: 0;
  --modal-button-border-color: var(--border-color);
  --modal-button-border-radius: 0;
  --modal-button-height: auto;
  --modal-button-width: auto;
  --modal-button-gap: 0.25rem;
  --modal-button-direction: row;
  --modal-button-focus-background: color-mix(in srgb, var(--modal-button-background), var(--modal-button-color) 20%);
}

.modal {
  display: flex;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--modal-backdrop);
  justify-content: center;
  align-items: center;
  z-index: 16777372;
}
.modal-inner {
  flex-direction: column;
  display: flex;
  position: relative;
  color: var(--modal-color);
  background: var(--modal-background);
  width: min(var(--modal-max-width), 100dvw - var(--modal-spacing) * 2);
  max-width: min(var(--modal-max-width), 100dvw - var(--modal-spacing) * 2);
  min-width: min(640px, 100dvw - var(--modal-spacing) * 2);
  max-height: calc(100dvh - var(--modal-spacing) * 2);
}
.modal-body {
  width: 100%;
  text-align: center;
  overflow-y: scroll;
  font-size: var(--modal-font-size);
  line-height: var(--modal-line-height);
  padding: var(--modal-padding);
}
.modal-body img {
  display: block;
  margin: 0 auto;
  height: auto;
  max-width: 100%;
}
.modal-body > *:first-child {
  margin-top: 0;
}
.modal-body > *:last-child {
  margin-bottom: 0;
}

.modal-buttonbar {
  display: flex;
  background: color-mix(in srgb, var(--modal-button-background), var(--modal-button-color) 40%);
  gap: 1px;
}

.modal-button {
  flex-grow: 1;
  display: inline-flex;
  flex-direction: var(--modal-button-direction);
  padding: var(--modal-button-padding-y) var(--modal-button-padding-x);
  gap: var(--modal-button-gap);
  font-size: var(--modal-button-font-size);
  font-weight: var(--modal-button-font-weight);
  color: var(--modal-button-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  height: var(--modal-button-height);
  width: var(--modal-button-width);
  border: var(--modal-button-border-width) solid var(--modal-button-border-color);
  border-radius: var(--modal-button-border-radius);
  background: var(--modal-button-background);
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}
.modal-button.focused, .modal-button:hover, .modal-button:focus {
  --modal-button-background: var(--modal-button-focus-background);
}
.modal-button[disabled] {
  opacity: 0.5;
}
.modal-button--icon {
  font-size: var(--modal-button-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

/**
 * Dialog
 */
:root {
  --dialog-color: #313131;
  --dialog-background: #ffffff;
  --dialog-font-size: 1rem;
  --dialog-line-height: 1.2;
  --dialog-padding: 2rem;
  --dialog-spacing: 2rem;
  --dialog-button-color: var(--button-font-color);
  --dialog-button-background: var(--primary-color);
  --dialog-button-font-size: 1rem;
  --dialog-button-font-weight: 400;
  --dialog-button-icon-size: 1rem;
  --dialog-button-padding-y: 1rem;
  --dialog-button-padding-x: 1rem;
  --dialog-button-border-width: 0;
  --dialog-button-border-color: var(--border-color);
  --dialog-button-border-radius: 0;
  --dialog-button-height: auto;
  --dialog-button-width: auto;
  --dialog-button-gap: 0.25rem;
  --dialog-button-direction: row;
  --dialog-button-focus-background: color-mix(in srgb, var(--dialog-button-background), var(--dialog-button-color) 20%);
}

.dialog {
  flex-direction: column;
  display: flex;
  position: relative;
  color: var(--dialog-color);
  background: var(--dialog-background);
  max-width: calc(100dvw - var(--dialog-spacing) * 2);
  max-height: calc(100dvh - var(--dialog-spacing) * 2);
  border: 0;
  padding: 0;
}
.dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.8);
}
.dialog-message {
  text-align: center;
  overflow-y: scroll;
  font-size: var(--dialog-font-size);
  line-height: var(--dialog-line-height);
  padding: var(--dialog-padding);
}

.dialog-buttonbar {
  display: flex;
  background: color-mix(in srgb, var(--dialog-button-background), var(--dialog-button-color) 40%);
  gap: 1px;
}

.dialog-button {
  flex-grow: 1;
  display: inline-flex;
  flex-direction: var(--dialog-button-direction);
  padding: var(--dialog-button-padding-y) var(--dialog-button-padding-x);
  gap: var(--dialog-button-gap);
  font-size: var(--dialog-button-font-size);
  font-weight: var(--dialog-button-font-weight);
  color: var(--dialog-button-color);
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  height: var(--dialog-button-height);
  width: var(--dialog-button-width);
  border: var(--dialog-button-border-width) solid var(--dialog-button-border-color);
  border-radius: var(--dialog-button-border-radius);
  background: var(--dialog-button-background);
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  line-height: 1;
}
.dialog-button.focused, .dialog-button:hover, .dialog-button:focus {
  --dialog-button-background: var(--dialog-button-focus-background);
}
.dialog-button[disabled] {
  opacity: 0.5;
}
.dialog-button--icon {
  font-size: var(--dialog-button-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
}

/**
 * Overlay
 */
:root {
  --overlay-color: #ffffff;
  --overlay-background: rgba(0, 0, 0, 0.8);
  --overlay-padding: 2rem;
  --overlay-font-size: 2rem;
}

.overlay {
  display: flex;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  color: var(--overlay-color);
  background: var(--overlay-background);
  padding: var(--overlay-padding);
  font-size: var(--overlay-font-size);
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 16777373;
  pointer-events: none;
}
.overlay[data-type=success] {
  --overlay-color: var(--success-color);
}
.overlay[data-type=warning] {
  --overlay-color: var(--warning-color);
}
.overlay[data-type=error] {
  --overlay-color: var(--error-color);
}

#virtual-keyboard {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: var(--highlight-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: fit-content;
  margin: 0 auto;
}
#virtual-keyboard .keyboard-row {
  display: flex;
  justify-content: center;
}
#virtual-keyboard .keyboard-row .keyboard-button {
  margin: 5px;
  padding: 15px;
  font-size: 1.2rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: var(--button-font-color);
  background-color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 40px;
  min-height: 40px;
}
#virtual-keyboard .keyboard-row .keyboard-button.backspace {
  background-color: #f44336;
  color: #fff;
  min-width: 50px;
}
#virtual-keyboard .keyboard-row .keyboard-button.active {
  background-color: var(--highlight-color);
  transform: scale(0.95);
}

:root {
  --github-corner-color: var(--button-font-color);
  --github-corner-bg: var(--primary-color);
}

@keyframes octocat-wave {
  0%, 100% {
    transform: rotate(0);
  }
  20%, 60% {
    transform: rotate(-25deg);
  }
  40%, 80% {
    transform: rotate(10deg);
  }
}
.github-corner:hover .octo-arm {
  animation: octocat-wave 560ms ease-in-out;
}
.github-corner .octo {
  color: var(--github-corner-color) !important;
  fill: var(--github-corner-bg) !important;
}
@media (max-width: 500px) {
  .github-corner .github-corner:hover .octo-arm {
    animation: none;
  }
  .github-corner .github-corner .octo-arm {
    animation: octocat-wave 560ms ease-in-out;
  }
}

#video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--countdown-font-color);
}
#video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

:root {
  --viewer-background: var(--primary-light-color);
  --viewer-foreground: var(--font-color, #111);
  --viewer-surface: #ffffff;
  --viewer-accent: var(--secondary-color, #444);
  --viewer-accent-foreground: var(--secondary-font-color, #fff);
  --viewer-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.viewer-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--viewer-background), white 10%), transparent 32%), radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--primary-color, #2196f3), white 12%), transparent 28%), linear-gradient(135deg, color-mix(in srgb, var(--viewer-background), var(--primary-color, #2196f3) 35%), var(--primary-color, #2196f3));
  font-family: "DefaultFont", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--viewer-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.viewer {
  width: min(960px, 100%);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: var(--viewer-shadow);
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.viewer__inner {
  background: var(--viewer-surface);
  border-radius: 14px;
  padding: clamp(14px, 3vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.viewer__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.viewer__title {
  margin: 0;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.viewer__title-line {
  font-size: clamp(22px, 5vw, 34px);
  color: var(--viewer-accent);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.viewer__accent {
  height: 6px;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-color, #2196f3), var(--secondary-color, #3f51b5));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.viewer__badge {
  background: var(--viewer-accent);
  color: var(--viewer-accent-foreground);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.viewer__media {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  border: 2px solid rgba(0, 0, 0, 0.05);
  max-height: 70vh;
  display: grid;
  place-items: center;
  box-shadow: inset 0 12px 22px rgba(0, 0, 0, 0.04);
}

.viewer__media img,
.viewer__media video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.viewer__media video {
  background: #000;
}

.viewer__btn {
  min-height: 56px;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  padding-inline: 2.2rem;
  width: 100%;
}

.viewer__tip {
  margin: 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.64);
  text-align: center;
}

@media (min-width: 720px) {
  .viewer__actions {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 540px) {
  .viewer {
    padding: 12px;
  }
  .viewer__inner {
    padding: 14px;
  }
  .viewer__title {
    font-size: clamp(18px, 6vw, 26px);
  }
}
#videoAnimation {
  display: none;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}

#videoAnimation * {
  box-sizing: content-box;
}

#videoAnimation ul {
  display: block;
  padding: 0;
  margin: 0;
}

#videoAnimation ul > li {
  display: block;
  color: #000;
  background-color: #fff;
  width: 25px;
  height: 25px;
  border: 10px solid black;
}

#videoAnimation .right {
  display: block;
  margin: auto;
  right: 0;
  position: absolute;
}

#videoAnimation .left {
  display: block;
  margin: auto;
  left: 0;
  position: absolute;
}

#videoAnimation li {
  position: relative;
  animation: va-scroll 1s linear infinite;
  -webkit-animation: va-scroll 1s linear infinite;
  -moz-animation: va-scroll 1s linear infinite;
}

@keyframes va-scroll {
  0% {
    top: 0;
  }
  100% {
    top: -400px;
  }
}
@-webkit-keyframes va-scroll /* Safari and Chrome */ {
  0% {
    top: 0;
  }
  100% {
    top: -400px;
  }
}
#resultVideo {
  display: none;
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
}

#resultVideoQR {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 80px;
  min-width: 15%;
  max-height: 30%;
}

.pswp__button--close,
.pswp__button--qrcode,
.pswp__button--print,
.pswp__button--print-chroma-keying,
.pswp__button--download,
.pswp__button--custom-download,
.pswp__button--mail,
.pswp__button--playpause,
.pswp__button--share,
.pswp__button--zoom,
.pswp__button--fs,
.pswp__button--delete,
.pswp__button--reload {
  color: var(--gallery-button-color);
  background: transparent !important;
  font-size: 1.625em;
  width: 2.375em;
  height: 1.375em;
}
.pswp__button--close:hover,
.pswp__button--qrcode:hover,
.pswp__button--print:hover,
.pswp__button--print-chroma-keying:hover,
.pswp__button--download:hover,
.pswp__button--custom-download:hover,
.pswp__button--mail:hover,
.pswp__button--playpause:hover,
.pswp__button--share:hover,
.pswp__button--zoom:hover,
.pswp__button--fs:hover,
.pswp__button--delete:hover,
.pswp__button--reload:hover {
  opacity: 1;
}
.pswp__button--close > i,
.pswp__button--qrcode > i,
.pswp__button--print > i,
.pswp__button--print-chroma-keying > i,
.pswp__button--download > i,
.pswp__button--custom-download > i,
.pswp__button--mail > i,
.pswp__button--playpause > i,
.pswp__button--share > i,
.pswp__button--zoom > i,
.pswp__button--fs > i,
.pswp__button--delete > i,
.pswp__button--reload > i {
  position: relative;
  z-index: -1;
}
.pswp__button--close .center,
.pswp__button--qrcode .center,
.pswp__button--print .center,
.pswp__button--print-chroma-keying .center,
.pswp__button--download .center,
.pswp__button--custom-download .center,
.pswp__button--mail .center,
.pswp__button--playpause .center,
.pswp__button--share .center,
.pswp__button--zoom .center,
.pswp__button--fs .center,
.pswp__button--delete .center,
.pswp__button--reload .center {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.pswp__counter {
  width: 56px;
}

.pswp__top-bar {
  top: 13px;
  padding-right: 30px;
}

.pswp__custom-caption {
  color: var(--gallery-button-color);
  background: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  width: 20ch;
  max-width: 400px;
  padding: 2px 8px;
  border-radius: 4px;
  position: absolute;
  left: 30px;
  bottom: 16px;
}

.pswp__custom-caption a {
  color: var(--gallery-button-color);
  text-decoration: underline;
}

.pswp__print-counter {
  color: var(--gallery-button-color);
  background: rgba(0, 0, 0, 0.5);
  font-size: 16px;
  line-height: 1;
  font-weight: bold;
  height: auto;
  align-self: center;
  padding: 4px 6px 5px;
  margin-right: 4px;
}

.pswp__button--print.warning,
.pswp__print-counter.warning {
  color: orange;
}
.pswp__button--print.error,
.pswp__print-counter.error {
  color: var(--error-color);
}

.pswp-rotary-focus {
  background: var(--primary-color) !important;
}

.pswp-qrcode {
  position: absolute;
  width: 8rem;
  box-sizing: border-box;
  background: #fff;
  color: #000;
  padding: 0.5rem;
  border-radius: var(--button-border-radius, 0.8rem);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.pswp-qrcode__image {
  display: block;
  width: 100%;
  height: auto;
}
.pswp-qrcode__caption {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: center;
}
.pswp-qrcode.left {
  left: 2rem;
}
.pswp-qrcode.left--top {
  top: 4rem;
}
.pswp-qrcode.left--center {
  top: 50%;
  translate: 0 -50%;
}
.pswp-qrcode.left--bottom {
  bottom: 4rem;
}
.pswp-qrcode.right {
  right: 2rem;
}
.pswp-qrcode.right--top {
  top: 4rem;
}
.pswp-qrcode.right--center {
  top: 50%;
  translate: 0 -50%;
}
.pswp-qrcode.right--bottom {
  bottom: 4rem;
}
.pswp-qrcode.center {
  left: 50%;
  translate: -50% 0;
}
.pswp-qrcode.center--bottom {
  bottom: 4rem;
}
.pswp-qrcode.center--top {
  top: 4rem;
}

/**
 * Classic Theme
 */
[data-ui-theme=classic] .stage--start .stage-start__text,
[data-ui-theme=classic_rounded] .stage--start .stage-start__text {
  width: auto;
}
[data-ui-theme=classic] .stage--start .names,
[data-ui-theme=classic_rounded] .stage--start .names {
  width: auto;
  max-width: 40rem;
  text-align: center;
}
[data-ui-theme=classic] .stage--start .names-inner,
[data-ui-theme=classic_rounded] .stage--start .names-inner {
  position: relative;
  padding: 2rem;
}
[data-ui-theme=classic] .stage--start .names-inner:before,
[data-ui-theme=classic_rounded] .stage--start .names-inner:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: color-mix(in srgb, var(--primary-color), transparent 75%);
  backdrop-filter: blur(10px);
}
[data-ui-theme=classic] .stage--start .names-inner > *,
[data-ui-theme=classic_rounded] .stage--start .names-inner > * {
  position: relative;
}
[data-ui-theme=classic] .stage--start .names--decoration:before, [data-ui-theme=classic] .stage--start .names--decoration:after,
[data-ui-theme=classic] .stage--start .names--decoration .names-inner:before,
[data-ui-theme=classic] .stage--start .names--decoration .names-inner:after,
[data-ui-theme=classic_rounded] .stage--start .names--decoration:before,
[data-ui-theme=classic_rounded] .stage--start .names--decoration:after,
[data-ui-theme=classic_rounded] .stage--start .names--decoration .names-inner:before,
[data-ui-theme=classic_rounded] .stage--start .names--decoration .names-inner:after {
  content: "";
  display: block;
  margin: 1rem auto;
  border-top: 1px solid currentColor;
}
[data-ui-theme=classic] .stage--start .names--decoration:before, [data-ui-theme=classic] .stage--start .names--decoration:after,
[data-ui-theme=classic_rounded] .stage--start .names--decoration:before,
[data-ui-theme=classic_rounded] .stage--start .names--decoration:after {
  width: 50%;
}
[data-ui-theme=classic] .stage--start button[data-command=gallery-button],
[data-ui-theme=classic_rounded] .stage--start button[data-command=gallery-button] {
  position: fixed;
  top: 2rem;
  left: 2rem;
}
[data-ui-theme=classic] .stage--start button[data-command=cups-button],
[data-ui-theme=classic_rounded] .stage--start button[data-command=cups-button] {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
}
[data-ui-theme=classic] .stage--result button[data-command=homebtn],
[data-ui-theme=classic_rounded] .stage--result button[data-command=homebtn] {
  position: fixed;
  top: 2rem;
  right: 2rem;
}
[data-ui-theme=classic] .stage--result button[data-command=gallerybtn],
[data-ui-theme=classic_rounded] .stage--result button[data-command=gallerybtn] {
  position: fixed;
  top: 2rem;
  left: 2rem;
}

[data-ui-theme=classic_rounded] .stage--start .names-inner,
[data-ui-theme=classic_rounded] .stage--start .names-inner:before {
  border-radius: 1rem;
}
[data-ui-theme=classic_rounded] .stage--start #collageDiv {
  border-radius: 1rem;
}

/**
 * Modern Theme
 */
[data-ui-theme=modern] .stage--start #collageDiv,
[data-ui-theme=modern_squared] .stage--start #collageDiv {
  background: color-mix(in srgb, var(--primary-color), transparent 75%);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
}
[data-ui-theme=modern] .stage--start button[data-command=cups-button],
[data-ui-theme=modern_squared] .stage--start button[data-command=cups-button] {
  position: fixed;
  top: 2rem;
  left: 2rem;
}
[data-ui-theme=modern] .stage--result button[data-command=homebtn],
[data-ui-theme=modern_squared] .stage--result button[data-command=homebtn] {
  position: fixed;
  top: 2rem;
  left: 2rem;
}

[data-ui-theme=modern] .stage--start .stage-start__text {
  display: flex;
  justify-content: flex-end;
}
[data-ui-theme=modern] .stage--start .names {
  text-align: right;
}
[data-ui-theme=modern] .pswp-rotary-focus {
  background: radial-gradient(var(--highlight-color), var(--primary-color), var(--secondary-color)) !important;
}

[data-ui-theme=modern_squared] .stage--start .names {
  text-align: center;
}

/* Wedding theme: Mathéo & Megan — start */
@font-face {
  font-family: "Wedding Script Fallback";
  src: url("../fonts/GreatVibes-Regular.ttf") format("truetype");
  font-display: swap;
}
:root {
  --wedding-terracotta: #b73c2c;
  --wedding-terracotta-dark: #8d2b20;
  --wedding-yellow: #ffd663;
  --wedding-pink: #f7c6ce;
  --wedding-blue: #b3ebf2;
  --wedding-button-blue: #17418f;
  --wedding-button-blue-dark: #0f306d;
  --wedding-cream: #fff9f2;
  --wedding-black: #242424;
  --wedding-white: #ffffff;
  --wedding-radius: 1.25rem;
  --wedding-shadow: 0 0.5rem 1.5rem rgb(36 36 36 / 12%);
  --wedding-font-display: "The Seasons", "C059", "Nimbus Roman", Georgia, serif;
  --wedding-font-script: "Symphony", "Wedding Script Fallback", cursive;
  --wedding-font-body: "Nourd", Inter, "Inter Display", Arial, sans-serif;
}

[data-ui-button=modern] {
  --button-background: var(--wedding-terracotta);
  --button-focus-background: var(--wedding-terracotta-dark);
}

html,
body {
  background: var(--wedding-cream);
  color: var(--wedding-black);
  cursor: auto;
  font-family: var(--wedding-font-body);
}

button,
a,
input,
.rotaryfocus {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.rotaryfocus:focus-visible {
  outline: 0.28rem solid var(--wedding-blue);
  outline-offset: 0.24rem;
}

.stage--wedding {
  background-color: var(--wedding-cream);
  background-image: url("../../private/wedding-theme/matheo-megan/images/background-home.webp");
  background-position: center;
  background-size: cover;
  isolation: isolate;
  overflow: hidden;
}

.wedding-home {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: clamp(0.65rem, 1.4vh, 1.25rem);
  height: 100%;
  justify-content: center;
  margin: 0 auto;
  max-width: 74rem;
  min-width: 0;
  padding: clamp(1.25rem, 3vh, 2.5rem) clamp(2rem, 7vw, 7rem);
  position: relative;
  text-align: center;
  z-index: 3;
}

.wedding-home__header {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1;
  max-width: 100%;
  min-width: 0;
}

.wedding-home__logo {
  display: block;
  filter: drop-shadow(0 0.25rem 0.55rem rgba(36, 36, 36, 0.14));
  height: clamp(12rem, 17.333vw, 17.333rem);
  margin: 0 auto clamp(0.15rem, 0.5vh, 0.35rem);
  object-fit: cover;
  object-position: center;
  width: clamp(12rem, 17.333vw, 17.333rem);
}

.wedding-home__eyebrow {
  color: var(--wedding-terracotta-dark);
  font-size: clamp(0.78rem, 1.5vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.wedding-home__title {
  align-items: baseline;
  color: var(--wedding-black);
  display: flex;
  font-family: var(--wedding-font-display);
  font-size: clamp(3.1rem, 8vw, 7rem);
  font-weight: 600;
  gap: clamp(0.45rem, 1.5vw, 1.25rem);
  justify-content: center;
  letter-spacing: -0.045em;
  margin: 0;
  max-width: 100%;
}

.wedding-home__title > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wedding-home__ampersand {
  color: var(--wedding-terracotta);
  font-family: var(--wedding-font-script);
  font-size: 0.82em;
  font-weight: 400;
  transform: rotate(-5deg);
}

.wedding-home__date {
  font-family: var(--wedding-font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0.2rem 0 0;
  text-transform: uppercase;
}

.wedding-home__choices {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
  grid-template-columns: repeat(2, minmax(18rem, 31rem));
  margin-top: clamp(0.6rem, 1.4vh, 1.15rem);
  max-width: 100%;
  min-width: 0;
}

.wedding-choice.button {
  align-items: center;
  background: var(--wedding-white);
  border: 0.2rem solid var(--wedding-black);
  border-radius: var(--wedding-radius);
  box-shadow: var(--wedding-shadow);
  color: var(--wedding-black);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  min-height: clamp(8rem, 18vh, 11rem);
  overflow: hidden;
  padding: clamp(1rem, 2.5vw, 1.75rem);
  position: relative;
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  width: 100%;
}

.wedding-choice.button:hover,
.wedding-choice.button:focus-visible {
  box-shadow: 0 0.8rem 2rem rgba(36, 36, 36, 0.18);
  transform: translateY(-0.28rem);
}

.wedding-choice.button:active {
  box-shadow: 0 0.25rem 0.8rem rgba(36, 36, 36, 0.14);
  transform: translateY(0.08rem) scale(0.99);
}

.wedding-choice--photo.button {
  background: var(--wedding-button-blue);
  border-color: var(--wedding-black);
  color: var(--wedding-white);
}

.wedding-choice--collage.button {
  background: var(--wedding-yellow);
  padding-inline-end: clamp(1.75rem, 3vw, 2.5rem);
}

.wedding-choice__icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  display: flex;
  font-size: clamp(2.4rem, 5vw, 4rem);
  height: clamp(5rem, 10vw, 6.5rem);
  justify-content: center;
  width: clamp(5rem, 10vw, 6.5rem);
}

.wedding-choice__copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}

.wedding-choice__copy strong {
  font-family: var(--wedding-font-display);
  font-size: clamp(2rem, 4.4vw, 3.45rem);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.wedding-choice--collage .wedding-choice__copy strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.wedding-choice__copy small {
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.wedding-home__secondary {
  display: flex;
  justify-content: center;
}

.wedding-secondary.button {
  --button-background: var(--wedding-white);
  --button-color: var(--wedding-black);
  border: 0.12rem solid rgba(36, 36, 36, 0.22);
  border-radius: 999px;
  box-shadow: none;
  flex-direction: row;
  gap: 0.55rem;
  min-height: 3.4rem;
  padding: 0.7rem 1.25rem;
  transition: background-color 180ms ease, transform 180ms ease;
  width: auto;
}

.wedding-secondary.button .button--label {
  display: inline-block;
  font-weight: 750;
}

.wedding-secondary.button:hover {
  background: var(--wedding-blue);
  transform: translateY(-0.12rem);
}

.wedding-doodle {
  height: auto;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.wedding-doodle--top {
  left: clamp(0.25rem, 1.2vw, 1.25rem);
  top: clamp(0.25rem, 1.2vw, 1.25rem);
  width: clamp(10rem, 17vw, 20rem);
}

.wedding-doodle--bottom {
  bottom: clamp(0.25rem, 1vw, 1rem);
  right: clamp(0.25rem, 1vw, 1rem);
  width: clamp(13rem, 21vw, 24rem);
}

.wedding-muscade {
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.wedding-muscade img {
  display: block;
  height: auto;
  width: 100%;
}

.wedding-muscade--home {
  bottom: 0.75rem;
  left: clamp(0.5rem, 2.5vw, 2rem);
  width: clamp(8rem, 13vw, 12rem);
}

.stage--loader {
  background-color: var(--wedding-blue);
  background-image: url("../../private/wedding-theme/matheo-megan/images/background-countdown.webp");
  background-position: center;
  background-size: cover;
}

body:has(.stage--loader.stage--active) #preview-container {
  max-height: calc(100dvh - 10rem);
  max-width: calc(100dvw - 2rem);
  width: min(82dvw, 86rem, (100dvh - 10rem) * 16 / 9);
}

body:has(.stage--loader.stage--active) #preview-wrapper {
  border-radius: var(--wedding-radius);
  box-shadow: 0 0.8rem 2.4rem rgba(36, 36, 36, 0.22);
  outline: 0.45rem solid rgba(255, 249, 242, 0.94);
  overflow: hidden;
}

.stage--loader::before {
  color: var(--wedding-black);
  content: "Regardez l’objectif";
  font-family: var(--wedding-font-display);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: 700;
  left: 50%;
  position: absolute;
  top: clamp(1.2rem, 4vh, 3rem);
  transform: translateX(-50%);
  z-index: 8;
}

.countdown {
  pointer-events: none;
  z-index: 12;
}

.countdown-number {
  color: var(--wedding-cream);
  filter: drop-shadow(0 0.4rem 0 rgba(36, 36, 36, 0.24));
  font-family: var(--wedding-font-display);
  font-size: clamp(11rem, 35vw, 29rem);
  font-weight: 800;
  line-height: 0.8;
}

.cheese-label {
  color: var(--wedding-cream);
  font-family: var(--wedding-font-display);
  font-size: clamp(5rem, 14vw, 11rem);
  text-shadow: 0 0.35rem 0 var(--wedding-terracotta-dark);
}

.stage--loader .stage-message:empty,
.stage--loader .buttonbar--bottom:empty {
  display: none;
}

.stage--loader .stage-message:not(:empty) {
  background: rgba(255, 249, 242, 0.92);
  border-radius: var(--wedding-radius);
  color: var(--wedding-black);
  font-family: var(--wedding-font-body);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 750;
  margin: auto;
  max-width: min(80vw, 44rem);
  padding: clamp(1rem, 2vw, 1.6rem);
}

.stage--loader .stage-message:has(p)::after {
  background: url("../../private/wedding-theme/matheo-megan/images/muscade-processing.webp") center/contain no-repeat;
  content: "";
  display: block;
  height: clamp(7rem, 18vh, 12rem);
  margin: 0.75rem auto 0;
  pointer-events: none;
  width: clamp(7rem, 18vh, 12rem);
}

.stage-message--error {
  border: 0.22rem solid var(--wedding-terracotta);
}

.stage--result {
  background-color: var(--wedding-cream);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.wedding-result-status {
  background: var(--wedding-cream);
  border-radius: 0 0 1rem 1rem;
  color: var(--wedding-black);
  font-family: var(--wedding-font-display);
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  font-weight: 750;
  left: 50%;
  margin: 0;
  max-width: calc(100vw - 1rem);
  overflow-wrap: anywhere;
  padding: 0.55rem 1.4rem 0.7rem;
  position: absolute;
  text-align: center;
  top: 0;
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  z-index: 3;
}

.wedding-result-muscade {
  bottom: clamp(4.8rem, 11vh, 7rem);
  pointer-events: none;
  position: absolute;
  right: clamp(0.6rem, 2vw, 1.5rem);
  width: clamp(6rem, 14vw, 10rem);
  z-index: 3;
}

.wedding-result-muscade img {
  display: block;
  height: auto;
  width: 100%;
}

.stage--result .buttonbar--bottom {
  background: transparent;
  border-top: 0;
  gap: clamp(0.3rem, 1vw, 0.8rem);
  padding: 0.7rem clamp(0.5rem, 2vw, 1.5rem);
}

.stage--loader .buttonbar--bottom:not(:empty) {
  background: rgba(255, 249, 242, 0.96);
  border-top: 0.12rem solid rgba(36, 36, 36, 0.14);
  gap: clamp(0.3rem, 1vw, 0.8rem);
  padding: 0.7rem clamp(0.5rem, 2vw, 1.5rem);
}

.stage--result .button,
.stage--loader .button,
.gallery .button,
.modal-button,
.dialog-button {
  border-radius: 0.8rem;
  min-height: 3.5rem;
  transition: filter 160ms ease, transform 160ms ease;
}

.stage--result .button:hover,
.stage--loader .button:hover,
.gallery .button:hover,
.modal-button:hover,
.dialog-button:hover {
  filter: brightness(1.08);
  transform: translateY(-0.12rem);
}

.stage--result .printbtn {
  --button-background: var(--wedding-white);
  --button-color: var(--wedding-black);
  background: var(--wedding-white);
  background-image: none;
  border: 0.15rem solid var(--wedding-black);
  box-shadow: 0 0.55rem 1.25rem rgba(36, 36, 36, 0.16);
  color: var(--wedding-black);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 850;
  min-height: 4.65rem;
}

.stage--result .printbtn .button--icon {
  font-size: 1.25em;
}

.stage--result .printbtn:hover,
.stage--result .printbtn:focus-visible {
  box-shadow: 0 0.75rem 1.65rem rgba(36, 36, 36, 0.22);
}

.stage--result .newpic {
  background: var(--wedding-button-blue);
  color: var(--wedding-white);
}

.stage--result .newcollage {
  background: var(--wedding-yellow);
  color: var(--wedding-black);
}

.stage--result .qrbtn {
  background: var(--wedding-blue);
  color: var(--wedding-black);
}

.stage--result .gallerybtn {
  background: var(--wedding-pink);
  color: var(--wedding-black);
}

.wedding-result-actions {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0 auto;
  max-width: 76rem;
  min-width: 0;
  width: 100%;
}

.wedding-result-primary {
  align-items: stretch;
  display: grid;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  grid-template-columns: minmax(15rem, 1.75fr) repeat(3, minmax(8.5rem, 1fr));
  min-width: 0;
  width: 100%;
}

.wedding-result-primary > .button {
  flex-direction: row;
  gap: 0.4rem;
  height: 100%;
  margin: 0;
  min-width: 0;
  padding-inline: clamp(0.55rem, 1.2vw, 0.9rem);
  width: 100%;
}

.stage--result .wedding-result-primary > .button .button--label,
.stage--result .wedding-result-more > .button .button--label {
  display: inline-block;
  font-family: var(--wedding-font-body);
  font-size: clamp(0.875rem, 1.15vw, 1rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stage--result .wedding-result-primary > button.homebtn[data-command=homebtn] {
  --button-background: var(--wedding-pink);
  --button-color: var(--wedding-black);
  background: var(--wedding-pink);
  background-image: none;
  bottom: auto;
  color: var(--wedding-black);
  inset: auto;
  left: auto;
  position: static;
  right: auto;
  top: auto;
  transform: none;
  translate: none;
}

.stage--result .wedding-result-more-toggle {
  background: var(--wedding-button-blue);
  color: var(--wedding-white);
  font-weight: 780;
}

.stage--result .wedding-result-more-toggle[aria-expanded=true] {
  background: var(--wedding-button-blue-dark);
}

.wedding-result-more {
  border-top: 0.12rem solid rgba(36, 36, 36, 0.18);
  display: grid;
  gap: clamp(0.45rem, 1vw, 0.8rem);
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  min-width: 0;
  padding-top: 0.65rem;
  width: 100%;
}

.wedding-result-more > .button {
  flex-direction: row;
  gap: 0.4rem;
  margin: 0;
  min-width: 0;
  padding-inline: clamp(0.55rem, 1.2vw, 0.9rem);
  width: 100%;
}

[hidden] {
  display: none !important;
}

.gallery {
  background: var(--wedding-cream);
  color: var(--wedding-black);
}

.gallery-header {
  background: var(--wedding-terracotta);
  color: var(--wedding-white);
}

.gallery-title h1 {
  font-family: var(--wedding-font-display);
  letter-spacing: 0.02em;
}

.gallery-instruction {
  color: var(--wedding-cream);
  font-family: var(--wedding-font-body);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0.3rem 0 0;
  max-width: 48ch;
}

.gallery-list {
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.gallery-list-item {
  background: var(--wedding-white);
  border: 0.65rem solid var(--wedding-white);
  border-bottom-width: 1.4rem;
  border-radius: 0.35rem;
  box-shadow: var(--wedding-shadow);
  min-width: 10rem;
  transform: rotate(-0.35deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.gallery-list-item:nth-child(even) {
  transform: rotate(0.35deg);
}

.gallery-list-item:hover,
.gallery-list-item:focus-visible {
  box-shadow: 0 0.8rem 2rem rgba(36, 36, 36, 0.2);
  transform: translateY(-0.3rem) rotate(0deg);
}

.modal-inner,
.dialog {
  background: var(--wedding-cream);
  border: 0.18rem solid var(--wedding-black);
  border-radius: var(--wedding-radius);
  box-shadow: 0 1.2rem 4rem rgba(36, 36, 36, 0.28);
  color: var(--wedding-black);
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  max-width: calc(100vw - 1rem);
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-body,
.dialog-message {
  font-family: var(--wedding-font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
}

.modal-body img {
  display: block;
  margin: 0 auto 1rem;
  max-height: min(58vh, 31rem);
  max-width: min(70vw, 31rem);
  width: min(55vw, 26rem);
}

.modal-buttonbar,
.dialog-buttonbar {
  background: var(--wedding-pink);
}

.buttonbar--print-copies {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: 4.5rem minmax(5rem, 8rem) 4.5rem;
  justify-content: center;
  padding: 1rem 2rem 1.5rem;
}

.form-input-copies {
  background: var(--wedding-white);
  border: 0.15rem solid var(--wedding-black);
  border-radius: 0.7rem;
  color: var(--wedding-black);
  font-size: 2rem;
  font-weight: 800;
  min-height: 4.5rem;
  text-align: center;
  width: 100%;
}

.overlay {
  background: rgba(36, 36, 36, 0.78);
  color: var(--wedding-cream);
  font-family: var(--wedding-font-display);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
}

.overlay[data-type=success] {
  background: rgba(183, 60, 44, 0.94);
}

.overlay[data-type=warning] {
  background: rgba(255, 214, 99, 0.96);
  color: var(--wedding-black);
}

.overlay[data-type=error] {
  background: rgba(141, 43, 32, 0.96);
}

.overlay:has(.wedding-print-error) {
  pointer-events: auto;
}

.wedding-recovery {
  display: grid;
  gap: 0.65rem;
  margin: 0 auto;
  max-width: 38rem;
  width: 100%;
}

.wedding-recovery p {
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.wedding-recovery p:first-child {
  color: var(--wedding-terracotta-dark);
  font-family: var(--wedding-font-display);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 800;
}

.wedding-recovery p:nth-child(2) {
  font-family: var(--wedding-font-body);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
}

.stage--loader .wedding-recovery__retry,
.stage--loader .wedding-recovery__home,
.stage--loader .wedding-recovery__help-toggle {
  aspect-ratio: auto;
  border-radius: 0.8rem;
  flex: 1 1 10rem;
  flex-direction: row;
  font-weight: 800;
  gap: 0.4rem;
  height: auto;
  margin: 0;
  min-height: 3.5rem;
  min-width: 9.5rem;
  padding: 0.65rem 0.85rem;
  width: auto;
}

.stage--loader .wedding-recovery__retry .button--label,
.stage--loader .wedding-recovery__home .button--label,
.stage--loader .wedding-recovery__help-toggle .button--label {
  display: inline-block;
  font-family: var(--wedding-font-body);
  font-size: clamp(0.875rem, 1.15vw, 1rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.stage--loader .wedding-recovery__retry {
  background: var(--wedding-terracotta);
  color: var(--wedding-white);
}

.stage--loader .wedding-recovery__home {
  background: var(--wedding-blue);
  color: var(--wedding-black);
}

.stage--loader .wedding-recovery__help-toggle {
  background: var(--wedding-yellow);
  color: var(--wedding-black);
}

.wedding-recovery__help {
  border-top: 0.1rem solid rgba(36, 36, 36, 0.22);
  color: var(--wedding-terracotta-dark);
  font-family: var(--wedding-font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 800;
  line-height: 1.4;
  margin: 0.2rem 0 0;
  padding-top: 0.65rem;
}

.wedding-print-error {
  background: var(--wedding-cream);
  border-radius: 1rem;
  box-shadow: 0 1.2rem 4rem rgba(36, 36, 36, 0.32);
  color: var(--wedding-black);
  margin: auto;
  max-height: calc(100vh - 1rem);
  max-height: calc(100dvh - 1rem);
  max-width: 42rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  text-align: center;
  width: min(90vw, 42rem);
}

.wedding-print-error > p {
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.wedding-print-error > p:first-child {
  color: var(--wedding-terracotta-dark);
  font-family: var(--wedding-font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 800;
}

.wedding-print-error > p:nth-child(2) {
  font-family: var(--wedding-font-body);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  font-weight: 700;
  margin-top: 0.65rem;
}

.wedding-print-error .buttonbar {
  background: transparent;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.25rem;
  padding: 0;
  position: static;
  transform: none;
  width: 100%;
}

.wedding-print-error .button {
  border-radius: 0.8rem;
  flex-direction: row;
  font-weight: 800;
  gap: 0.4rem;
  margin: 0;
  min-height: 3.75rem;
  min-width: 0;
  padding: 0.65rem 0.85rem;
  width: 100%;
}

.wedding-print-error .buttonbar > .button .button--label {
  display: inline-block;
  font-family: var(--wedding-font-body);
  font-size: clamp(0.875rem, 1.15vw, 1rem);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.wedding-print-error__close {
  background: var(--wedding-terracotta);
  color: var(--wedding-white);
}

.wedding-print-error__help-toggle {
  background: var(--wedding-yellow);
  color: var(--wedding-black);
}

.wedding-print-error .wedding-recovery__help {
  margin-top: 1rem;
}

button:disabled,
.button:disabled,
[aria-disabled=true] {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.52;
  transform: none;
}

@media (forced-colors: active) {
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  .rotaryfocus:focus-visible {
    outline-color: Highlight;
  }
  .wedding-choice.button,
  .stage--result .button,
  .stage--loader .button,
  .gallery .button,
  .modal-button,
  .dialog-button,
  .wedding-print-error .button {
    border: 0.15rem solid ButtonText;
  }
  .stage-message--error,
  .modal-inner,
  .dialog,
  .wedding-print-error {
    border-color: CanvasText;
  }
}
@media (max-width: 900px), (max-height: 650px) {
  .wedding-home {
    justify-content: flex-start;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
  }
  .wedding-home__title {
    font-size: clamp(2.8rem, 8vw, 4.4rem);
  }
  .wedding-home__logo {
    height: 7.333rem;
    width: 7.333rem;
  }
  .wedding-home__choices {
    grid-template-columns: repeat(2, minmax(13rem, 1fr));
    width: min(100%, 48rem);
  }
  .wedding-choice.button {
    min-height: 7rem;
  }
  .wedding-muscade--home {
    opacity: 0.7;
    width: 6rem;
  }
  .wedding-result-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .wedding-result-primary > .printbtn {
    grid-column: 1/-1;
  }
  .wedding-result-more {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stage--loader .buttonbar:has(.wedding-recovery__help-toggle) {
    flex-wrap: wrap;
  }
  .wedding-print-error {
    padding: 1.25rem;
    width: min(92vw, 38rem);
  }
}
@media (max-width: 620px) {
  .wedding-home__title {
    flex-wrap: wrap;
    gap: 0.25rem 0.6rem;
  }
  .wedding-home__choices {
    grid-template-columns: 1fr;
  }
  .wedding-muscade,
  .wedding-result-muscade,
  .wedding-doodle {
    display: none;
  }
  .wedding-result-status {
    font-size: 1.25rem;
    max-width: calc(100vw - 1rem);
    padding-inline: 0.8rem;
  }
  .stage--result .buttonbar--bottom,
  .stage--loader .buttonbar--bottom {
    padding: 0.55rem;
  }
  .wedding-result-actions {
    gap: 0.5rem;
  }
  .wedding-result-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wedding-result-primary > .printbtn,
  .wedding-result-primary > .homebtn:last-child {
    grid-column: 1/-1;
  }
  .stage--result .printbtn {
    min-height: 4.2rem;
  }
  .wedding-result-more {
    grid-template-columns: 1fr;
    max-height: 38vh;
    overflow-y: auto;
  }
  .gallery-instruction {
    font-size: 0.88rem;
    line-height: 1.3;
  }
  .wedding-recovery {
    gap: 0.5rem;
  }
  .stage--loader .buttonbar:has(.wedding-recovery__help-toggle) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage--loader .wedding-recovery__retry,
  .stage--loader .wedding-recovery__home,
  .stage--loader .wedding-recovery__help-toggle {
    min-width: 0;
    width: 100%;
  }
  .stage--loader .wedding-recovery__help-toggle {
    grid-column: 1/-1;
  }
  .wedding-print-error {
    padding: 1rem;
    width: calc(100vw - 1rem);
  }
  .wedding-print-error .buttonbar {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Wedding theme: Mathéo & Megan — end */