:root {
  color-scheme: light;
  --paper: #f6f7ec;
  --white: #fffdf8;
  --ink: #4f5f39;
  --muted: #758952;
  --green-50: #f6f7ec;
  --green-100: #dce5cb;
  --green-300: #b5c49a;
  --green-700: #758952;
  --rose-100: #f4e2e4;
  --rose-300: #e8c0c5;
  --rose-700: #b87983;
  --line: rgba(117, 137, 82, 0.2);
  --shadow: 0 20px 60px rgba(117, 137, 82, 0.14);
  --paper-texture: url("/assets/paper-texture.jpg");
  --wax-texture: url("/assets/wax-seal.png");
  font-family:
    "Cormorant Garamond", Georgia, "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

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

body.gate-closed,
body.gate-opening {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden,
.view {
  display: none !important;
}

.view.active {
  display: block !important;
}

.app {
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom);
  background:
    linear-gradient(180deg, rgba(232, 192, 197, 0.52), rgba(246, 247, 236, 0) 32rem),
    var(--paper);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.floating-language {
  position: fixed;
  z-index: 30;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(79, 95, 57, 0.28);
  backdrop-filter: blur(16px);
}

body[data-view-state="dashboard"] .floating-language {
  display: none;
}

.gate-closed .app {
  opacity: 0;
  transform: scale(0.985);
  visibility: hidden;
  pointer-events: none;
}

.invitation-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 0;
  background:
    linear-gradient(rgba(247, 238, 222, 0.48), rgba(235, 220, 198, 0.62)),
    var(--paper-texture) center/cover,
    #ead8bf;
  transition:
    opacity 0.55s ease 0.75s,
    visibility 0.55s ease 0.75s;
  pointer-events: auto;
}

.invitation-gate.opening {
  opacity: 0;
  visibility: hidden;
}

.envelope-scene {
  width: 100%;
  min-height: 100svh;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 0;
  perspective: 1100px;
  overflow: hidden;
}

.envelope {
  position: relative;
  width: 100vw;
  min-height: 100svh;
  aspect-ratio: auto;
  filter: none;
  transform-origin: center;
  transition: transform 0.8s ease;
  cursor: pointer;
  background:
    linear-gradient(rgba(250, 244, 232, 0.58), rgba(236, 220, 196, 0.72)),
    var(--paper-texture) center/cover,
    #ead8bf;
}

.invitation-gate.opening .envelope {
  transform: scale(1.04);
}

.envelope-back,
.envelope-front,
.envelope-flap,
.letter-card {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.envelope-back {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), transparent 22%, transparent 78%, rgba(107, 72, 45, 0.1)),
    linear-gradient(rgba(250, 244, 232, 0.48), rgba(238, 224, 203, 0.68)),
    var(--paper-texture) center/cover,
    #ead8bf;
  border: 0;
}

.envelope-back::before,
.envelope-back::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(112, 75, 48, 0.32), transparent);
  transform-origin: center;
}

.envelope-back::before {
  transform: rotate(31deg);
}

.envelope-back::after {
  transform: rotate(-31deg);
}

.letter-card {
  inset: 14% 9% auto;
  height: 55%;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 20px 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(251, 253, 249, 0.96)),
    var(--paper-texture) center/cover,
    #fffaf3;
  border: 1px solid rgba(184, 138, 75, 0.25);
  box-shadow: 0 16px 24px rgba(38, 53, 45, 0.08);
  transform: translateY(116%);
  transition: transform 0.95s cubic-bezier(0.2, 0.85, 0.2, 1) 0.12s;
}

.invitation-gate.opening .letter-card {
  transform: translateY(-12%);
}

.letter-kicker {
  color: var(--green-700);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.letter-card strong {
  margin-top: 8px;
  color: var(--rose-700);
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(3rem, 15vw, 5.2rem);
  font-weight: 400;
  line-height: 0.88;
  text-align: center;
}

.letter-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
}

.envelope-front {
  inset: 0;
  top: 0;
  clip-path: none;
  background:
    linear-gradient(146deg, transparent 49.75%, rgba(107, 72, 45, 0.34) 50%, transparent 50.35%),
    linear-gradient(214deg, transparent 49.75%, rgba(107, 72, 45, 0.34) 50%, transparent 50.35%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.16), rgba(122, 86, 58, 0.1)),
    var(--paper-texture) center/cover,
    #ead8bf;
  border: 0;
  z-index: 2;
  pointer-events: none;
}

.envelope-front::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(112, 75, 48, 0.34), transparent);
}

.envelope-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent 15%, transparent 85%, rgba(98, 66, 43, 0.09)),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 26%);
}

.envelope-flap {
  transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, 50% 51%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(131, 91, 61, 0.12)),
    var(--paper-texture) center top/cover,
    #ead8bf;
  border: 0;
  transition: transform 0.85s cubic-bezier(0.2, 0.85, 0.2, 1);
  z-index: 3;
  pointer-events: none;
}

.invitation-gate.opening .envelope-flap {
  transform: rotateX(178deg);
}

.wax-seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: clamp(108px, 30vw, 148px);
  height: clamp(108px, 30vw, 148px);
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: var(--wax-texture) center/contain no-repeat;
  color: #fff9f4;
  box-shadow: none;
  filter: drop-shadow(0 18px 22px rgba(72, 30, 24, 0.3));
  transition:
    opacity 0.3s ease,
    transform 0.45s ease;
  touch-action: manipulation;
  pointer-events: auto;
}

.wax-seal::before,
.wax-seal::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.wax-seal::before {
  inset: 17% 18% 44% 18%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.55), transparent 48%);
  mix-blend-mode: screen;
}

.wax-seal::after {
  inset: 22%;
  border-radius: 50%;
  border: 1px solid rgba(255, 249, 244, 0.36);
}

.wax-seal span {
  position: relative;
  z-index: 1;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(2.8rem, 11vw, 4rem);
  line-height: 1;
  transform: translateY(-16px);
  text-shadow: 0 2px 6px rgba(66, 15, 33, 0.75);
}

.invitation-gate.opening .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72) rotate(-16deg);
}

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 0;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  color: var(--white);
  pointer-events: none;
}

.topbar button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(38, 53, 45, 0.26);
  color: inherit;
  backdrop-filter: blur(18px);
  pointer-events: auto;
  font-weight: 850;
}

.language-switcher {
  justify-self: end;
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(246, 247, 236, 0.22);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.language-switcher button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 1rem;
  box-shadow: none;
  opacity: 0.62;
}

.language-switcher button.active {
  background: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.topbar span {
  justify-self: center;
  max-width: min(62vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0;
  opacity: 0.94;
}

.hero {
  min-height: 86svh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: calc(88px + env(safe-area-inset-top)) 20px 34px;
  background-image: url("/immagini/copertina/copertina.jpg");
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.floral-cascade {
  pointer-events: none;
  user-select: none;
}

.hero .floral-cascade {
  position: absolute;
  z-index: 1;
  width: clamp(170px, 44vw, 360px);
  opacity: 0.82;
  filter: saturate(0.95) drop-shadow(0 18px 32px rgba(79, 95, 57, 0.16));
  transform-origin: 50% 8%;
  animation: floralSway 7.5s ease-in-out infinite;
}

.floral-hero-left {
  left: -96px;
  bottom: -78px;
}

.floral-hero-right {
  right: -116px;
  bottom: -92px;
  transform: scaleX(-1);
  animation-name: floralSwayMirror;
  animation-delay: -2.2s;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(79, 95, 57, 0.08), rgba(79, 95, 57, 0.64)),
    linear-gradient(90deg, rgba(117, 137, 82, 0.24), rgba(232, 192, 197, 0.34));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 720px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  text-align: center;
  color: var(--white);
}

.floral-divider {
  position: relative;
  height: 92px;
  margin: -20px 0 4px;
  overflow: hidden;
}

.floral-divider .floral-cascade {
  position: absolute;
  right: -34px;
  top: -188px;
  width: 190px;
  opacity: 0.52;
  transform: rotate(-8deg);
  animation: floralFloat 9s ease-in-out infinite;
}

.eyebrow,
.section-title span {
  margin: 0;
  color: var(--rose-700);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--rose-100);
  margin-bottom: 34px;
  transform: translateY(-14px);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 13ch;
  margin: 0 0 12px;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(5.4rem, 24vw, 9rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-meta {
  display: grid;
  justify-items: center;
  margin-bottom: 14px;
}

.hero-meta span,
.verified-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  font-size: 1.02rem;
  font-weight: 700;
}

.countdown {
  position: relative;
  width: min(100%, 248px);
  min-height: 248px;
  display: grid;
  align-content: center;
  justify-items: center;
  margin: 8px 0 26px;
  padding: 34px 28px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.42), transparent 20%),
    radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 58%, rgba(232, 192, 197, 0.25) 59% 64%, transparent 65%),
    rgba(232, 192, 197, 0.16);
  box-shadow:
    inset 0 0 0 9px rgba(255, 255, 255, 0.08),
    0 18px 38px rgba(28, 42, 34, 0.18);
  backdrop-filter: blur(16px);
  text-align: center;
}

.countdown::before,
.countdown::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.countdown::before {
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.countdown::after {
  inset: -7px;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.7) 47% 53%, transparent 54%) top / 1px 18px no-repeat,
    linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.7) 47% 53%, transparent 54%) bottom / 1px 18px no-repeat,
    linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, 0.7) 47% 53%, transparent 54%) left / 18px 1px no-repeat,
    linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, 0.7) 47% 53%, transparent 54%) right / 18px 1px no-repeat;
  opacity: 0.72;
}

.countdown strong,
.countdown span {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown strong {
  color: var(--white);
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(3.8rem, 17vw, 5.4rem);
  line-height: 0.86;
  font-weight: 400;
  text-shadow: 0 1px 8px rgba(28, 42, 34, 0.28);
}

.countdown span {
  color: var(--rose-100);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-kicker {
  margin-bottom: 5px;
  color: var(--white);
}

.countdown [data-countdown="time"] {
  margin-top: 8px;
  color: var(--rose-100);
  font-size: 0.86rem;
  letter-spacing: 0;
}

.primary-cta {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--rose-300);
  color: var(--green-700);
  box-shadow: var(--shadow);
  font-size: 1.02rem;
  font-weight: 700;
}

.primary-cta.full {
  width: 100%;
  margin-top: 6px;
  background: var(--green-700);
  color: var(--white);
}

.primary-cta:disabled {
  opacity: 0.7;
}

.content,
.page-shell,
.dashboard-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 22px 18px 0;
}

.quick-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-top: -50px;
  position: relative;
  z-index: 4;
}

.quick-strip div,
.trend-grid article,
.stats-grid article,
.admin-list article,
.done-panel,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 247, 236, 0.9);
  box-shadow: 0 12px 32px rgba(38, 53, 45, 0.08);
}

.quick-strip div {
  min-width: 0;
  min-height: 112px;
  padding: 14px 10px;
  display: grid;
  align-content: start;
  gap: 5px;
}

.quick-strip a {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.quick-strip strong,
.quick-strip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-strip strong {
  color: var(--green-700);
  font-size: 0.96rem;
}

.quick-strip span {
  color: var(--muted);
  font-size: 0.76rem;
}

.mood-sequence,
.gallery-band {
  padding: 44px 0 12px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 6px 0 8px;
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(3.2rem, 13vw, 5.4rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  color: var(--green-700);
}

.page-shell .section-title h2,
.dashboard-shell .section-title h2 {
  font-size: clamp(3rem, 12vw, 4.8rem);
}

.section-title p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.mood-sequence {
  display: grid;
  gap: 18px;
}

.mood-row {
  display: grid;
  gap: 12px;
}

.mood-row img,
.gallery-track img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.mood-row img {
  aspect-ratio: 4 / 5;
  min-height: 0;
  box-shadow: 0 14px 34px rgba(38, 53, 45, 0.1);
}

.mood-copy {
  min-height: 150px;
  display: grid;
  align-content: center;
  padding: 18px 2px;
}

.mood-copy h3 {
  margin: 8px 0 8px;
  color: var(--green-700);
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-size: clamp(2.9rem, 13vw, 4.2rem);
  font-weight: 400;
  line-height: 0.9;
}

.mood-copy p {
  margin: 0;
  color: var(--rose-700);
  font-size: 1.08rem;
  line-height: 1.45;
}

.final-gallery {
  padding-top: 42px;
}

.gallery-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--rose-100);
  box-shadow: 0 16px 34px rgba(38, 53, 45, 0.12);
}

.gallery-track {
  position: relative;
  aspect-ratio: 4 / 5;
}

.gallery-track img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}

.gallery-track img.active {
  opacity: 1;
  transform: scale(1);
}

.gallery-control {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.46);
  color: var(--green-700);
  backdrop-filter: blur(14px);
  font-size: 2rem;
  line-height: 1;
}

.gallery-control.prev {
  left: 10px;
}

.gallery-control.next {
  right: 10px;
}

.final-rsvp {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 42px 0 22px;
  overflow: hidden;
}

.floral-final {
  position: absolute;
  left: -68px;
  bottom: -172px;
  width: 230px;
  opacity: 0.46;
  transform: rotate(8deg);
  animation: floralFloat 8s ease-in-out infinite;
}

.final-rsvp .primary-cta {
  position: relative;
  z-index: 1;
}

@keyframes floralSway {
  0%,
  100% {
    transform: rotate(-1.5deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(-9px);
  }
}

@keyframes floralSwayMirror {
  0%,
  100% {
    transform: scaleX(-1) rotate(-1.5deg) translateY(0);
  }
  50% {
    transform: scaleX(-1) rotate(2deg) translateY(-9px);
  }
}

@keyframes floralFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

.page-shell,
.dashboard-shell {
  padding-top: calc(90px + env(safe-area-inset-top));
}

.dashboard-shell {
  width: min(100%, 1440px);
}

.admin-tabs {
  position: sticky;
  z-index: 12;
  top: calc(64px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: 0 10px 30px rgba(79, 95, 57, 0.1);
  backdrop-filter: blur(18px);
}

.admin-tabs button {
  min-height: 44px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.admin-tabs button.active {
  background: var(--green-700);
  color: var(--white);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.progress-dots {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
}

.progress-dots span {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: var(--green-100);
}

.progress-dots span.active {
  background: var(--rose-300);
}

.form-panel {
  padding: 16px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--green-700);
  font-size: 0.86rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  padding: 13px 12px;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--green-300);
  box-shadow: 0 0 0 4px rgba(181, 196, 154, 0.34);
}

.verified-pill {
  width: fit-content;
  background: var(--green-50);
  color: var(--green-700);
  border-color: var(--green-100);
  backdrop-filter: none;
}

.choice-field {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.choice-field legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--green-700);
  font-size: 0.86rem;
  font-weight: 800;
}

.choice-field button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-weight: 850;
}

.choice-field button.selected {
  background: var(--rose-100);
  border-color: var(--rose-300);
  color: var(--rose-700);
}

.status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--green-50);
  color: var(--green-700);
  font-weight: 750;
}

.status.error {
  background: var(--rose-100);
  color: #9b4f5c;
}

.status.success {
  background: var(--green-50);
  color: var(--green-700);
}

.done-panel {
  padding: 28px 18px;
  text-align: center;
}

.done-panel h2 {
  margin: 0 0 6px;
  color: var(--green-700);
}

.done-panel p {
  margin: 0;
  color: var(--muted);
}

.dashboard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-actions {
  display: flex;
  gap: 8px;
  padding-top: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--green-700);
  box-shadow: 0 8px 18px rgba(38, 53, 45, 0.08);
  font-weight: 850;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stats-grid article {
  min-height: 96px;
  padding: 15px;
}

.stats-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.stats-grid strong {
  display: block;
  margin-top: 8px;
  color: var(--green-700);
  font-size: 2rem;
}

.admin-section {
  padding: 28px 0 0;
}

.admin-section h2 {
  margin: 0 0 12px;
  color: var(--green-700);
  font-size: 1.2rem;
}

.admin-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.seating-heading {
  display: grid;
  gap: 14px;
}

.seating-actions,
.seating-tools,
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mini-button,
.guest-chip button,
.table-tools button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(246, 247, 236, 0.82);
  color: var(--green-700);
  font-weight: 800;
}

.mini-button {
  padding: 0 14px;
}

.mini-button.strong {
  background: var(--green-700);
  color: var(--white);
}

.mini-button.danger {
  border-color: rgba(184, 121, 131, 0.36);
  background: var(--rose-100);
  color: #9b4f5c;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.seating-tools {
  margin-top: 16px;
  justify-content: space-between;
}

.seating-tools label {
  flex: 1 1 240px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.present,
.dot.present {
  --seat-color: #28a66a;
}

.absent,
.dot.absent {
  --seat-color: #d94a54;
}

.pending,
.dot.pending {
  --seat-color: #9aa19b;
}

.dot.present {
  background: #28a66a;
}

.dot.absent {
  background: #d94a54;
}

.dot.pending {
  background: #9aa19b;
}

.seating-layout {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.floor-shell {
  position: relative;
  width: 100%;
  height: min(68vh, 720px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(246, 247, 236, 0.84), rgba(244, 226, 228, 0.76)),
    var(--paper-texture) center/cover;
}

.fullscreen-close {
  display: none;
  position: fixed;
  z-index: 1002;
  top: max(14px, env(safe-area-inset-top));
  right: 14px;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--green-700);
  color: var(--white);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.floor-shell:fullscreen,
.floor-shell.fullscreen-fallback {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: var(--paper);
}

.floor-shell.fullscreen-fallback {
  position: fixed;
  z-index: 1000;
  inset: 0;
}

.floor-shell:fullscreen .fullscreen-close,
.floor-shell.fullscreen-fallback .fullscreen-close {
  display: block;
}

.floor-shell:fullscreen .floor-plan,
.floor-shell.fullscreen-fallback .floor-plan {
  min-width: 100%;
  min-height: 100%;
  padding-top: 64px;
}

body.map-open {
  overflow: hidden;
}

.floor-plan {
  position: relative;
  width: 100%;
  min-width: 1080px;
  min-height: 620px;
  aspect-ratio: 16 / 9;
  overflow: auto;
}

.floor-canvas {
  position: relative;
  width: 1600px;
  min-height: 900px;
  transform-origin: 0 0;
  transition: transform 0.16s ease;
}

.visual-table {
  position: absolute;
  width: 280px;
  min-height: 260px;
  transform: translate(-50%, -50%);
  cursor: grab;
  touch-action: none;
}

.visual-table:active {
  cursor: grabbing;
}

.table-tools {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 58px 96px 38px;
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
}

.table-tools input,
.table-tools select {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.9rem;
}

.table-tools [data-table-name] {
  min-width: 150px;
}

.table-tools button {
  border-radius: 8px;
  color: var(--rose-700);
}

.round-table {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto;
}

.imperial-table {
  position: relative;
  width: calc(100% - 28px);
  height: 150px;
  margin: 22px auto 0;
}

.imperial-table .table-center {
  inset: 31px 28px;
  border-radius: 999px;
}

.table-center {
  position: absolute;
  inset: 24%;
  border: 1px solid rgba(47, 95, 70, 0.18);
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  padding: 14px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.9), transparent 18%),
    rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 24px rgba(38, 53, 45, 0.12);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.table-center strong,
.table-center span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-center strong {
  color: var(--green-700);
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 900;
}

.table-center span {
  color: var(--muted);
  font-size: 0.78rem;
}

.seat {
  position: absolute;
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: var(--seat-color);
  color: var(--white);
  box-shadow: 0 6px 14px rgba(38, 53, 45, 0.18);
  font-size: 0.68rem;
  font-weight: 900;
}

.seat:not(.filled) {
  color: var(--green-700);
  background: rgba(255, 255, 255, 0.85);
}

.seat.filled {
  outline: 2px solid rgba(255, 255, 255, 0.45);
}

.table-guests {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.table-guests summary {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-700);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  pointer-events: auto;
  user-select: none;
}

.table-guests[open] {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.table-guests[open] summary {
  margin-bottom: 6px;
}

.guest-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
}

.guest-panel h3 {
  margin: 0 0 10px;
  color: var(--green-700);
}

.guest-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.guest-chip {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-left: 5px solid var(--seat-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.guest-chip > button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  display: grid;
  justify-items: start;
  background: transparent;
  text-align: left;
}

.guest-chip strong {
  color: var(--ink);
}

.guest-chip span {
  color: var(--muted);
  font-size: 0.8rem;
}

.guest-chip div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.guest-chip div button {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.guest-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.guest-form label {
  min-width: 0;
}

.guest-form button {
  align-self: end;
}

.cost-form .wide-field {
  grid-column: 1 / -1;
}

.cost-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.cost-stats article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.cost-stats span,
.cost-table td span,
.cost-table td small {
  display: block;
  color: var(--muted);
}

.cost-stats strong {
  display: block;
  margin-top: 6px;
  color: var(--green-700);
  font-size: 1.35rem;
}

.cost-table {
  min-width: 1080px;
}

.cost-table tr.overdue {
  background: rgba(217, 74, 84, 0.08);
}

.cost-table tr.upcoming {
  background: rgba(232, 192, 197, 0.18);
}

.cost-table details {
  margin-top: 6px;
  color: var(--muted);
}

.cost-table ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.cost-table small {
  margin-top: 6px;
  max-width: 260px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.guest-table-scroll {
  margin-top: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--seat-color);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 900;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-list article {
  padding: 14px;
}

.admin-list strong,
.admin-list span {
  display: block;
}

.admin-list span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-list p {
  margin: 10px 0 0;
  color: var(--ink);
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.88rem;
}

th {
  color: var(--green-700);
  background: var(--rose-100);
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 22px;
  right: 22px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  height: 54px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 6px;
  border: 1px solid rgba(117, 137, 82, 0.16);
  border-radius: 999px;
  background: rgba(244, 226, 228, 0.56);
  box-shadow: 0 10px 28px rgba(117, 137, 82, 0.14);
  backdrop-filter: blur(18px) saturate(1.25);
}

.bottom-nav button {
  min-width: 0;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(246, 247, 236, 0.24);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.bottom-nav button.active {
  background: rgba(117, 137, 82, 0.62);
  color: var(--white);
}

@media (min-width: 720px) {
  .topbar {
    color: var(--ink);
  }

  .topbar button {
    background: rgba(255, 255, 255, 0.72);
    color: var(--green-700);
    border-color: var(--line);
  }

  .hero {
    min-height: 82vh;
    padding-inline: 44px;
  }

  .content,
  .page-shell,
  .dashboard-shell {
    padding-inline: 28px;
  }

  .trend-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .mood-row {
    grid-template-columns: 0.88fr 1.12fr;
    align-items: center;
    gap: 26px;
  }

  .mood-row.reverse {
    grid-template-columns: 1.12fr 0.88fr;
  }

  .mood-row.reverse .mood-copy {
    order: 2;
  }

  .mood-row img,
  .gallery-track {
    aspect-ratio: 16 / 10;
  }

  .gallery-carousel {
    max-width: 820px;
    margin: 0 auto;
  }

  .form-panel,
  .done-panel {
    max-width: 620px;
  }

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

  .cost-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .seating-heading {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .seating-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .visual-table {
    width: 310px;
  }

  .floor-plan {
    min-height: 620px;
  }

  .floor-canvas {
    width: 1800px;
    min-height: 980px;
  }

  .bottom-nav {
    width: 380px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

@media (max-width: 520px) {
  .guest-form {
    grid-template-columns: 1fr;
  }
}
.privacy-consent {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.privacy-consent input {
  width: 1.1rem !important;
  height: 1.1rem;
  margin-top: 0.15rem;
}

.privacy-note {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted, #5f665f);
}

.privacy-note summary {
  cursor: pointer;
  font-weight: 600;
}
