:root {
  --rose: #d98b99;
  --rose-dark: #8e4354;
  --leaf: #6d8a58;
  --sage: #dfe7d5;
  --cream: #fff8ef;
  --ink: #312824;
  --shadow: rgba(65, 43, 38, 0.24);
  --page-start: #fff8ef;
  --page-mid: #f5ddd7;
  --page-end: #dfe7d5;
  --petal-soft: rgba(217, 139, 153, 0.82);
  --petal-deep: rgba(142, 67, 84, 0.54);
  --leaf-soft: rgba(109, 138, 88, 0.76);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  font-family: Avenir, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 248, 239, 0.18), transparent 18rem),
    radial-gradient(circle at 88% 82%, rgba(217, 139, 153, 0.2), transparent 20rem),
    linear-gradient(135deg, #352b27 0%, #5c4544 48%, #87646c 100%);
}

body[data-theme="blush"] {
  --rose: #e89aaa;
  --rose-dark: #9f5064;
  --leaf: #7c9b72;
  --sage: #f4dde3;
  --cream: #fff3f5;
  --page-start: #fff7f8;
  --page-mid: #f3ccd6;
  --page-end: #dbe8d3;
  --petal-soft: rgba(232, 154, 170, 0.84);
  --petal-deep: rgba(159, 80, 100, 0.58);
  --leaf-soft: rgba(124, 155, 114, 0.76);
}

body[data-theme="sage"] {
  --rose: #b88f9c;
  --rose-dark: #5d7351;
  --leaf: #6f8a61;
  --sage: #e7eedf;
  --cream: #f5f8ef;
  --page-start: #fbf8ee;
  --page-mid: #e7eedf;
  --page-end: #c9d8bd;
  --petal-soft: rgba(184, 143, 156, 0.84);
  --petal-deep: rgba(93, 115, 81, 0.58);
  --leaf-soft: rgba(111, 138, 97, 0.78);
}

body[data-theme="daisy"] {
  --rose: #f4c84f;
  --rose-dark: #9b6b2f;
  --leaf: #6f995d;
  --sage: #fff0a8;
  --cream: #fff9df;
  --page-start: #fffbe9;
  --page-mid: #ffe9a6;
  --page-end: #d7e9c3;
  --petal-soft: rgba(244, 200, 79, 0.86);
  --petal-deep: rgba(155, 107, 47, 0.58);
  --leaf-soft: rgba(111, 153, 93, 0.78);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.booth-page {
  min-height: 100%;
  overflow: hidden;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  overflow: hidden auto;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 18% 18%, rgba(217, 139, 153, 0.26), transparent 20rem),
    radial-gradient(circle at 86% 72%, rgba(255, 240, 205, 0.72), transparent 22rem),
    linear-gradient(135deg, #fff8ef 0%, #f8ddd8 52%, #ead4c8 100%);
  transition: opacity 280ms ease, visibility 280ms ease;
}

.intro-screen.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-content {
  position: relative;
  z-index: 2;
  width: min(820px, 100%);
  color: var(--ink);
  text-align: center;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
}

.intro-content > p {
  margin: 0 0 10px;
  color: var(--rose-dark);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.intro-content h1 {
  margin: 0 auto 24px;
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 8vw, 6.6rem);
  line-height: 0.96;
}

.intro-setup {
  width: min(680px, 100%);
  margin: 0 auto 24px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(142, 67, 84, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.82);
  box-shadow: 0 22px 60px rgba(142, 67, 84, 0.16);
  backdrop-filter: blur(14px);
  text-align: left;
}

.setup-heading {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
}

.setup-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  line-height: 1;
}

.story-panel {
  position: relative;
  width: min(680px, 100%);
  margin: 0 auto 24px;
  padding: clamp(18px, 4vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(142, 67, 84, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 240, 205, 0.8), transparent 9rem),
    rgba(255, 248, 239, 0.86);
  box-shadow: 0 22px 60px rgba(142, 67, 84, 0.16);
  backdrop-filter: blur(14px);
}

.story-panel[hidden] {
  display: none;
}

.story-progress {
  margin: 0 0 8px;
  color: var(--rose-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-panel h2 {
  position: relative;
  z-index: 2;
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.7rem);
  line-height: 1;
}

.story-options {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.story-choice {
  min-height: 74px;
  border: 1px solid rgba(142, 67, 84, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 8px 20px rgba(49, 40, 36, 0.08);
  font: inherit;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 900;
}

.story-choice.is-selected {
  color: white;
  border-color: rgba(142, 67, 84, 0.7);
  background: var(--rose-dark);
  box-shadow: 0 14px 32px rgba(142, 67, 84, 0.24);
}

.story-baby {
  position: absolute;
  right: 26px;
  top: 18px;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(217, 139, 153, 0.18);
  animation: babyBounce 2.8s ease-in-out infinite;
}

.story-baby span,
.story-baby::before,
.story-baby::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: var(--rose);
}

.story-baby span {
  inset: 22px;
  background: var(--rose-dark);
}

.story-baby::before {
  left: 14px;
  top: 12px;
  width: 22px;
  height: 34px;
  transform: rotate(-38deg);
}

.story-baby::after {
  right: 14px;
  top: 12px;
  width: 22px;
  height: 34px;
  transform: rotate(38deg);
}

.story-pop {
  animation: storyPop 420ms ease-out;
}

.begin-button {
  min-width: min(440px, 100%);
  min-height: 82px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--rose-dark);
  box-shadow: 0 20px 46px rgba(142, 67, 84, 0.26);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
}

.petal-field,
.petal-field span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.petal-field span {
  width: 28px;
  height: 42px;
  border-radius: 70% 30% 70% 30%;
  background: rgba(217, 139, 153, 0.32);
  animation: floatPetal 12s ease-in-out infinite;
}

.petal-field span:nth-child(1) { left: 8%; top: 18%; animation-delay: 0s; }
.petal-field span:nth-child(2) { left: 22%; top: 72%; animation-delay: -3s; }
.petal-field span:nth-child(3) { left: 38%; top: 12%; animation-delay: -7s; }
.petal-field span:nth-child(4) { left: 54%; top: 78%; animation-delay: -2s; }
.petal-field span:nth-child(5) { left: 72%; top: 16%; animation-delay: -5s; }
.petal-field span:nth-child(6) { left: 84%; top: 58%; animation-delay: -9s; }
.petal-field span:nth-child(7) { left: 14%; top: 48%; animation-delay: -11s; }
.petal-field span:nth-child(8) { left: 66%; top: 42%; animation-delay: -4s; }

.booth-shell {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  height: 100dvh;
  padding: 0;
  background: #1f1b19;
}

.camera-stage {
  position: relative;
  justify-self: stretch;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #1f1b19;
  box-shadow: none;
}

.camera-stage::before,
.camera-stage::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 180px;
  height: 180px;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(255, 248, 239, 0.92) 0 13%, transparent 14%),
    radial-gradient(ellipse at 22% 58%, var(--petal-soft) 0 18%, transparent 19%),
    radial-gradient(ellipse at 76% 58%, var(--petal-soft) 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 78%, var(--petal-deep) 0 14%, transparent 15%),
    linear-gradient(35deg, transparent 44%, var(--leaf-soft) 45% 52%, transparent 53%);
  opacity: 0.78;
}

.camera-stage::before {
  left: 18px;
  top: 18px;
  transform: rotate(-18deg);
}

.camera-stage::after {
  right: 18px;
  bottom: 110px;
  transform: rotate(148deg);
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.live-overlay {
  position: absolute;
  right: 22px;
  bottom: clamp(154px, 20dvh, 220px);
  left: 22px;
  z-index: 3;
  max-width: min(760px, calc(100vw - 440px));
  color: #fff9f2;
  text-align: center;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.52);
}

.script {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.5vw, 2.7rem);
  font-style: italic;
}

.couple-preview {
  display: inline-block;
  max-width: min(84%, 680px);
  margin: 12px auto 0;
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--rose-dark);
  background: rgba(255, 248, 239, 0.9);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  font-size: clamp(1rem, 2vw, 1.45rem);
  font-weight: 900;
  text-shadow: none;
}

.couple-preview[hidden] {
  display: none;
}

.live-overlay h1,
.empty-state h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 4.2vw, 4.8rem);
  line-height: 1;
}

@media (max-width: 1180px) and (orientation: landscape) {
  .live-overlay {
    right: auto;
    max-width: 62vw;
  }

  .live-overlay h1 {
    font-size: clamp(1.6rem, 4vw, 3.4rem);
  }

  .script {
    font-size: clamp(1.15rem, 2.4vw, 2rem);
  }
}

.control-panel {
  position: fixed;
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 8;
  width: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateX(-50%);
}

.panel-heading {
  display: none;
}

.eyebrow {
  margin: 0;
  color: var(--rose-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  line-height: 1;
}

.hint,
.status,
.links a,
.last-photo figcaption {
  font-size: 1rem;
  line-height: 1.45;
}

.hint {
  margin: 2px 0 0;
  color: #655650;
  font-size: 0.9rem;
}

.settings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kiosk-choices {
  grid-template-columns: 1fr;
  gap: 16px;
}

.settings .field:first-child {
  grid-column: 1 / -1;
}

.settings .field {
  display: grid;
  gap: 6px;
}

.settings label {
  color: var(--rose-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.settings input,
.settings select {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(142, 67, 84, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 1.02rem;
  padding: 10px 13px;
}

.settings input:focus,
.settings select:focus {
  border-color: var(--rose-dark);
  outline: 3px solid rgba(217, 139, 153, 0.24);
}

.choice-group {
  display: grid;
  gap: 8px;
}

.choice-label {
  color: var(--rose-dark);
  font-size: 0.76rem;
  font-weight: 900;
}

.mode-toggle,
.theme-grid {
  display: grid;
  gap: 10px;
}

.mode-toggle {
  grid-template-columns: 1fr 1fr;
}

.theme-grid {
  grid-template-columns: repeat(4, 1fr);
}

.choice-button {
  display: grid;
  min-height: 76px;
  place-items: center;
  gap: 6px;
  border: 1px solid rgba(142, 67, 84, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 8px 20px rgba(49, 40, 36, 0.08);
  font: inherit;
  font-weight: 900;
}

.choice-button.is-selected {
  color: white;
  border-color: rgba(142, 67, 84, 0.7);
  background: var(--rose-dark);
  box-shadow: 0 14px 32px rgba(142, 67, 84, 0.24);
}

.choice-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.theme-swatch {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(142, 67, 84, 0.18);
}

.wildflower-swatch {
  background: linear-gradient(135deg, #fff4e7 0 38%, #d98b99 39% 68%, #6d8a58 69%);
}

.blush-swatch {
  background: linear-gradient(135deg, #fff3f5 0 38%, #e89aaa 39% 68%, #7c9b72 69%);
}

.sage-swatch {
  background: linear-gradient(135deg, #f5f8ef 0 38%, #b88f9c 39% 68%, #6f8a61 69%);
}

.daisy-swatch {
  background: linear-gradient(135deg, #fff9df 0 38%, #f4c84f 39% 68%, #6f995d 69%);
}

.capture-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  min-height: 0;
  border: 8px solid rgba(255, 248, 239, 0.96);
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 248, 239, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36), inset 0 0 0 8px rgba(142, 67, 84, 0.12);
  font-size: 1.24rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.capture-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button-icon {
  width: 46px;
  height: 46px;
  border: 5px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 10px rgba(142, 67, 84, 0.16);
}

.status {
  min-height: 0;
  max-width: min(86vw, 440px);
  padding: 9px 16px;
  border-radius: 999px;
  color: #fff9f2;
  background: rgba(49, 40, 36, 0.58);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.26);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
}

.fullscreen-button {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 9;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 248, 239, 0.56);
  border-radius: 999px;
  color: #fff9f2;
  background: rgba(49, 40, 36, 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.kiosk-panel .last-photo {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.links a {
  color: var(--rose-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.last-photo {
  margin: 0;
}

.last-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(49, 40, 36, 0.18);
}

.last-photo figcaption {
  margin-top: 6px;
  color: #6d625c;
}

.countdown {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  color: #fff9f2;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 139, 153, 0.25), transparent 22rem),
    rgba(49, 40, 36, 0.46);
  font-family: Georgia, "Times New Roman", serif;
  text-align: center;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.countdown[hidden] {
  display: none;
}

.countdown > div {
  display: grid;
  gap: 18px;
  justify-items: center;
}

.progress-text {
  min-height: 1.3em;
  color: rgba(255, 249, 242, 0.9);
  font-family: Avenir, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown strong {
  min-width: min(78vw, 820px);
  font-size: clamp(5.4rem, 18vw, 16rem);
  font-weight: 900;
  line-height: 0.95;
}

.countdown.pop {
  animation: softPulse 760ms ease-out;
}

.camera-message {
  position: absolute;
  inset: 24px 24px auto;
  z-index: 6;
  padding: 14px 16px;
  border-radius: 8px;
  color: white;
  background: rgba(49, 40, 36, 0.85);
  text-align: center;
}

.slideshow-page {
  min-height: 100%;
  overflow: hidden;
  background: #1f1b19;
}

.slideshow-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(31, 27, 25, 0.08), rgba(31, 27, 25, 0.62)),
    linear-gradient(135deg, #2d2723, #523842 50%, #526247);
}

.slideshow-banner {
  position: absolute;
  top: 28px;
  left: 28px;
  z-index: 4;
  max-width: min(560px, calc(100vw - 260px));
  padding: 14px 18px;
  border: 1px solid rgba(255, 248, 239, 0.28);
  border-radius: 8px;
  color: var(--cream);
  background: rgba(49, 40, 36, 0.42);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
  animation: bannerFloat 5.6s ease-in-out infinite;
}

.slideshow-banner .script {
  margin: 0 0 2px;
  color: #fff8ef;
  font-size: clamp(1rem, 1.8vw, 1.6rem);
}

.slideshow-banner h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  line-height: 0.96;
}

.banner-couple {
  display: inline-block;
  margin: 10px 0 0;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 248, 239, 0.9);
  font-weight: 900;
  text-shadow: none;
}

.banner-flower {
  position: absolute;
  right: -18px;
  top: -18px;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, var(--rose-dark) 0 12%, transparent 13%),
    radial-gradient(ellipse at 50% 16%, rgba(255, 248, 239, 0.92) 0 18%, transparent 19%),
    radial-gradient(ellipse at 18% 54%, var(--petal-soft) 0 22%, transparent 23%),
    radial-gradient(ellipse at 82% 54%, var(--petal-soft) 0 22%, transparent 23%),
    radial-gradient(ellipse at 50% 86%, var(--petal-deep) 0 18%, transparent 19%);
  animation: flowerSpin 8s linear infinite;
}

.slide-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 900ms ease;
}

.slide-image.is-active {
  opacity: 1;
}

.empty-state {
  color: var(--cream);
  text-align: center;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.48);
}

.slide-caption {
  position: absolute;
  right: 28px;
  bottom: 24px;
  left: 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--cream);
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  font-weight: 800;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.58);
}

.qr-card {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 4;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 248, 239, 0.9);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  font-size: 0.86rem;
  font-weight: 900;
}

.qr-card img {
  width: clamp(90px, 9vw, 132px);
  height: clamp(90px, 9vw, 132px);
}

.admin-page,
.guest-page {
  min-height: 100%;
  background:
    radial-gradient(circle at 16% 16%, rgba(217, 139, 153, 0.2), transparent 20rem),
    linear-gradient(135deg, #fff8ef 0%, #f5ddd7 52%, #dfe7d5 100%);
}

.admin-shell,
.guest-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}

.admin-panel,
.guest-panel {
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid rgba(142, 67, 84, 0.18);
  border-radius: 8px;
  background: rgba(255, 248, 239, 0.88);
  box-shadow: 0 24px 70px var(--shadow);
}

.admin-panel h1,
.guest-panel h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 1;
}

.admin-field {
  display: grid;
  gap: 8px;
  margin: 22px 0 16px;
  color: var(--rose-dark);
  font-weight: 900;
}

.admin-field input {
  min-height: 54px;
  border: 1px solid rgba(142, 67, 84, 0.24);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  font-size: 1.1rem;
  padding: 12px 14px;
}

.danger-button {
  background: #8e4354;
}

.admin-panel .capture-button,
.guest-panel .capture-button {
  width: 100%;
  height: auto;
  min-height: 64px;
  border: 0;
  border-radius: 8px;
  color: white;
  background: var(--rose-dark);
  box-shadow: 0 14px 34px rgba(142, 67, 84, 0.3);
  font-size: 1.08rem;
}

.admin-panel .danger-button {
  margin-top: 12px;
  background: #8e4354;
}

.admin-panel .status {
  margin: 14px 0 0;
  color: var(--rose-dark);
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  backdrop-filter: none;
}

.admin-panel .status:empty {
  display: none;
}

.admin-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--rose-dark);
  font-weight: 900;
}

.guest-panel {
  text-align: center;
}

.guest-photo {
  display: block;
  width: 100%;
  margin: 18px 0;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(49, 40, 36, 0.18);
}

.guest-download {
  text-decoration: none;
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: scale(0.65);
  }
  20% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0;
    transform: scale(1.28);
  }
}

@keyframes softPulse {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  24% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatPetal {
  0% {
    opacity: 0;
    transform: translate3d(0, 26px, 0) rotate(0deg) scale(0.78);
  }
  20% {
    opacity: 0.75;
  }
  50% {
    transform: translate3d(34px, -32px, 0) rotate(88deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(-18px, -92px, 0) rotate(164deg) scale(0.82);
  }
}

@keyframes storyPop {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes babyBounce {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-8px) rotate(4deg);
  }
}

@keyframes bannerFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes flowerSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .control-panel {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    gap: 10px;
    padding: 12px;
  }

  .control-panel.kiosk-panel {
    right: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 50%;
    width: auto;
    gap: 9px;
    padding: 0;
    transform: translateX(-50%);
  }

  .hint,
  .links,
  .last-photo {
    display: none;
  }

  .settings {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .kiosk-choices {
    grid-template-columns: 1fr;
  }

  .theme-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .capture-button {
    width: 104px;
    height: 104px;
    min-height: 0;
  }

  .fullscreen-button {
    width: 52px;
    height: 52px;
    font-size: 1.65rem;
  }

  .qr-card {
    top: 14px;
    right: 14px;
    padding: 8px;
  }

  .qr-card img {
    width: 82px;
    height: 82px;
  }

  .slideshow-banner {
    top: 14px;
    left: 14px;
    max-width: calc(100vw - 130px);
    padding: 12px 14px;
  }
}

@media (max-width: 560px) {
  .settings {
    grid-template-columns: 1fr;
  }

  .mode-toggle,
  .theme-grid {
    grid-template-columns: 1fr 1fr;
  }

  .intro-content h1 {
    font-size: clamp(2.8rem, 15vw, 5rem);
  }

  .intro-setup {
    margin-bottom: 18px;
  }

  .story-options {
    grid-template-columns: 1fr;
  }

  .story-baby {
    opacity: 0.45;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  .control-panel {
    width: min(360px, 36vw);
    gap: 11px;
    padding: 14px;
    border-radius: 10px;
  }

  .control-panel.kiosk-panel {
    width: auto;
    gap: 10px;
    padding: 0;
    border-radius: 0;
  }

  .control-panel h2 {
    font-size: 1.75rem;
  }

  .hint {
    display: none;
  }

  .settings {
    gap: 9px;
  }

  .kiosk-choices {
    grid-template-columns: 1fr;
  }

  .settings input,
  .settings select {
    min-height: 48px;
    font-size: 0.98rem;
  }

  .capture-button {
    width: 108px;
    height: 108px;
    min-height: 0;
    font-size: 1.1rem;
  }

  .status {
    font-size: 0.86rem;
  }

  .links {
    display: none;
  }
}

@media (orientation: portrait) and (max-width: 1180px) {
  .control-panel {
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
  }

  .control-panel.kiosk-panel {
    right: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    left: 50%;
    width: auto;
    transform: translateX(-50%);
  }

  .hint,
  .links,
  .last-photo {
    display: none;
  }

  .settings {
    grid-template-columns: 1fr 1fr;
  }

  .kiosk-choices {
    grid-template-columns: 1fr;
  }

  .settings .field:first-child {
    grid-column: 1 / -1;
  }
}
