:root {
  --gold: #b08d4f;
  --gold-deep: #8a6d3c;
  --gold-light: #e6d6ae;
  --sage: #8a9678;
  --sage-deep: #5f6b53;
  --sage-light: #e6ebe0;
  --ink: #38362f;
  --charcoal: #211f1a;
  --cream: #f9f9f7;
  --paper: #fffdf9;
  --error: #9b4438;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-pill: 999px;

  /* Guest page theme — customizable per-wedding via the admin "Personnaliser" panel. */
  --guest-bg: #f9f9f7;
  --guest-card-bg: #fffdf9;
  --guest-text: #38362f;
  --guest-title: #5f6b53;
  --guest-accent: #b08d4f;
  --guest-input-bg: #e6ebe0;
  --guest-input-text: #38362f;
  --guest-input-border: #e6d6ae;
  --guest-table-color: #b08d4f;
  --guest-chair-color: #5f6b53;
  --guest-canvas-bg: #e6ebe0;
  --guest-font-title: 'Playfair Display', serif;
  --guest-font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
}

/* Mobile Chrome's address bar collapses/expands on scroll or even a tap,
   which changes the visual viewport height after `100vh` was already
   measured — if body's own painted area ends just short of the new, taller
   viewport, the gap shows through to <html>'s default (white) background
   instead of the page's own, looking like a hard line cutting across
   whatever happens to sit near the bottom of the screen at that moment.
   The background lives here (not on body) so it stays the document's
   canvas background: body has none of its own, which lets elements like
   .guest-decoration-layer (negative z-index) keep painting above the
   canvas instead of being covered by a separate, opaque body box.
   --guest-bg defaults to --cream and gets overridden per-wedding on
   guest-facing pages, so this tracks whichever theme is actually in use. */
html {
  background: var(--guest-bg);
  background-image: radial-gradient(circle at 50% 0%, #ffffff 0%, var(--guest-bg) 60%);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page.page-wide {
  max-width: 1080px;
}

.page.poster-page {
  padding-top: 24px;
}

.page.invitation-page {
  padding-top: 24px;
}

header.hero {
  position: relative;
  /* Gives the negative z-index .guest-decoration-layer its own stacking
     context, scoped to this element's children only — so it can never again
     end up hidden behind an ancestor's background (e.g. body/html), no
     matter what gets added there later. */
  isolation: isolate;
  text-align: center;
  margin-bottom: 44px;
  padding: 12px 50px;
}

header.hero::before,
header.hero::after {
  content: '';
  position: absolute;
  width: 68px;
  height: 68px;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.55;
}

header.hero::before {
  top: -10px;
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14 92 C 34 70, 22 42, 54 10' stroke='%238a9678' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cellipse cx='32' cy='62' rx='11' ry='5.5' fill='%238a9678' transform='rotate(-45 32 62)'/%3E%3Cellipse cx='42' cy='42' rx='10' ry='5' fill='%238a9678' transform='rotate(-35 42 42)'/%3E%3Cellipse cx='53' cy='22' rx='8.5' ry='4.5' fill='%23b08d4f' transform='rotate(-22 53 22)'/%3E%3C/svg%3E");
}

header.hero::after {
  bottom: -10px;
  right: 0;
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14 92 C 34 70, 22 42, 54 10' stroke='%238a9678' stroke-width='2.5' fill='none' stroke-linecap='round'/%3E%3Cellipse cx='32' cy='62' rx='11' ry='5.5' fill='%238a9678' transform='rotate(-45 32 62)'/%3E%3Cellipse cx='42' cy='42' rx='10' ry='5' fill='%238a9678' transform='rotate(-35 42 42)'/%3E%3Cellipse cx='53' cy='22' rx='8.5' ry='4.5' fill='%23b08d4f' transform='rotate(-22 53 22)'/%3E%3C/svg%3E");
}

.guest-decoration-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.guest-decoration-item {
  position: absolute;
  width: 130px;
  height: 130px;
  color: var(--guest-accent);
  opacity: 0.85;
}

.guest-decoration-item svg,
.guest-decoration-item img {
  width: 100%;
  height: 100%;
  display: block;
}

.guest-decoration-item img {
  object-fit: contain;
}

.guest-decoration-fireworks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 640px) {
  .guest-decoration-item {
    width: 88px;
    height: 88px;
  }
}

header.hero.invite-hero {
  padding: 96px 20px 16px;
  margin-bottom: 36px;
}

/* The corner branches used to be hardcoded here — now superseded by the
   couple's own choice of decoration (.guest-decoration-layer), so this
   header no longer draws its own. */
header.hero.invite-hero::before,
header.hero.invite-hero::after {
  content: none;
}

.script-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  min-height: 3.4rem;
}

.script-word {
  font-family: 'Parisienne', cursive;
  font-size: 3.4rem;
  font-weight: 400;
  color: var(--sage-deep);
  line-height: 1;
}

.title-heart {
  font-size: 1.8rem;
  color: var(--gold-light);
  transform: translateY(2px);
}

.tracked-subtitle {
  text-transform: uppercase;
  letter-spacing: 2.2px;
  font-size: 0.78rem;
  font-weight: 500;
  font-style: normal !important;
  font-family: var(--guest-font-body) !important;
  color: #8a7e6e;
  margin: 16px 0 0 !important;
}

header.hero .eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 18px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage-deep);
  font-weight: 600;
  background: var(--sage-light);
  border-radius: var(--radius-pill);
}

header.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.25;
}

header.hero p:not(.eyebrow) {
  color: #8a7e6e;
  margin: 14px 0 0;
  font-size: 1.02rem;
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
}

.divider::before,
.divider::after {
  content: '';
  height: 1px;
  width: 46px;
  background: linear-gradient(90deg, transparent, var(--gold-light));
}

.divider::after {
  background: linear-gradient(90deg, var(--gold-light), transparent);
}

.divider span {
  font-size: 0.9rem;
  color: var(--gold);
  line-height: 1;
}

.divider span::after {
  content: '♥';
}

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 22px;
  box-shadow: 0 20px 44px rgba(138, 109, 60, 0.1);
}

.card::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(176, 141, 79, 0.18);
  border-radius: calc(var(--radius) - 7px);
  pointer-events: none;
}

input, select, textarea {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  padding: 0 14px;
  height: 42px;
  border: 1px solid rgba(176, 141, 79, 0.3);
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  color: var(--ink);
  width: 100%;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  height: auto;
  min-height: 90px;
  padding: 10px 14px;
  line-height: 1.5;
  resize: vertical;
}

input::placeholder, textarea::placeholder {
  color: var(--sage-deep);
  opacity: 0.45;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(176, 141, 79, 0.14);
}

.phone-input-group {
  display: flex;
  border-radius: var(--radius-sm);
  transition: box-shadow 0.15s ease;
}

/* The select and input each keep their own (half-rounded) border-radius so
   they read as one merged pill, but that means each one's default focus
   box-shadow doesn't line up with the pill's true outer shape and visibly
   bleeds past the seam between them. Suppress the per-control glow and draw
   a single correctly-rounded one on the shared wrapper instead. */
.phone-input-group .phone-code-select:focus,
.phone-input-group input:focus {
  box-shadow: none;
}

.phone-input-group:focus-within {
  box-shadow: 0 0 0 4px rgba(176, 141, 79, 0.14);
}

.phone-input-group .phone-code-select {
  flex: 0 0 auto;
  width: 88px;
  min-width: 88px;
  padding: 0 6px;
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-input-group input {
  flex: 1;
  min-width: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--sage-deep);
  pointer-events: none;
}

.search-field input {
  padding-left: 42px;
  padding-right: 42px;
}

.search-clear-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  margin-top: -15px;
}

.icon-btn.search-clear-btn {
  width: 30px;
  height: 30px;
}

.search-clear-btn[hidden] {
  display: none;
}

button, a.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.2px;
  font-weight: 600;
  padding: 0 22px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #c8a868, var(--gold-deep));
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(138, 109, 60, 0.22);
  transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover, a.secondary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(138, 109, 60, 0.3);
}

/* `button { display: inline-flex }` above is an author rule, which beats the
   browser's own `[hidden] { display: none }` regardless of specificity —
   without this, setting `.hidden = true` on any button silently does
   nothing and it stays visible. */
button[hidden], a[hidden] {
  display: none;
}

button:active, a.secondary:active {
  transform: translateY(0);
}

button.secondary, a.secondary {
  background: transparent;
  color: var(--sage-deep);
  border: 1.5px solid var(--sage-deep);
  text-decoration: underline;
  text-decoration-color: rgba(95, 107, 83, 0.5);
  text-underline-offset: 3px;
  box-shadow: none;
}

button.secondary:hover, a.secondary:hover {
  background: var(--sage-light);
  color: var(--charcoal);
  filter: none;
  box-shadow: none;
}

.result {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result .table-number {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 16px 30px;
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-pill);
  background: var(--sage-light);
}

.result .guest-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
}

.result .table-sep {
  width: 1px;
  height: 30px;
  background: var(--gold-light);
}

.result .table-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.result .table-label {
  font-size: 0.62rem;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--sage-deep);
  font-weight: 600;
}

.result .table-value {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.55rem;
  color: var(--gold-deep);
}

.guest-match {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.18);
  transition: background 0.15s ease, transform 0.1s ease;
}

.guest-match:last-child {
  margin-bottom: 0;
}

.guest-match .match-table {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold-deep);
}

.guest-match:hover {
  background: var(--gold-light);
  transform: translateX(2px);
}

.muted {
  color: #998c77;
  font-size: 0.88rem;
}

.support-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 28px 0 4px;
  font-size: 0.82rem;
  color: #998c77;
  margin: 0;
}

.support-footer svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.support-footer a {
  color: var(--accent-teal);
  font-weight: 600;
  text-decoration: none;
}

.support-footer a:hover {
  text-decoration: underline;
}

.error-msg {
  color: var(--sage-deep);
  margin-top: 6px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.98rem;
  text-align: center;
  line-height: 1.5;
}

nav.admin-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
  font-size: 0.85rem;
}

nav.admin-nav strong {
  letter-spacing: 0.4px;
  font-size: 0.95rem;
  color: var(--charcoal);
  font-weight: 700;
  font-family: 'Playfair Display', serif;
}

nav.admin-nav a {
  color: var(--sage-deep);
  text-decoration: none;
  font-weight: 600;
}

nav.admin-nav a:hover {
  color: var(--charcoal);
}

.admin-nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Specificity note: `nav.admin-nav a` (element+class+element) already sets a
   plain text color with no background, and would otherwise win over a bare
   `.admin-nav-chip` rule — scoping through the parent class here is what lets
   this pill styling actually take effect instead of looking like plain text. */
.admin-nav-actions .admin-nav-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-teal-light);
  color: var(--accent-teal-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-nav-actions .admin-nav-chip:hover {
  color: var(--accent-teal-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(27, 36, 64, 0.18);
}

nav.admin-nav:not(.admin-nav-stacked) .admin-nav-actions {
  margin-top: 14px;
}

nav.admin-nav.admin-nav-stacked {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.wedding-countdown {
  text-align: center;
  margin-bottom: 32px;
}

.wedding-countdown-units {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.wedding-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--gold-light) 55%, transparent);
}

.wedding-countdown-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.wedding-countdown-label {
  margin-top: 2px;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink);
}

.wedding-countdown-caption {
  margin-top: 8px;
  font-size: 0.72rem;
  font-style: italic;
  color: var(--ink);
}

.poster-workspace {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.poster-toolbox {
  flex: 0 0 auto;
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.poster-toolbox-title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.poster-bg-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(245, 248, 249, 0.92);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-size: 0.78rem;
  color: var(--ink);
  white-space: nowrap;
}

.poster-bg-swatch {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.poster-bg-swatch svg {
  pointer-events: none;
}

.poster-bg-swatch input[type='color'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  opacity: 0;
  cursor: pointer;
}

.color-hex-input {
  width: 78px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.78rem;
  font-family: 'Inter', monospace;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.icon-number-field {
  position: relative;
  align-items: center;
}
.icon-number-field:not([hidden]) {
  display: inline-flex;
}

.icon-number-field-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  pointer-events: none;
  color: var(--ink);
  opacity: 0.6;
}

.poster-text-toolbar .icon-number-field input[type='number'] {
  padding-left: 26px;
}

.poster-toolbox-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.poster-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 62px;
  height: 62px;
  padding: 6px;
  font-size: 0.62rem;
  white-space: normal;
  text-align: center;
  border-radius: var(--radius-sm);
  background: none;
  box-shadow: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.poster-tool-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  box-shadow: none;
  transform: none;
}

.poster-canvas-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  overflow: auto;
}

#poster-content nav.admin-nav {
  margin-bottom: 16px;
}

.poster-sheet {
  position: relative;
  flex: 0 0 auto;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.poster-sheet-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.poster-guide {
  position: absolute;
  background: var(--gold-deep);
  opacity: 0.45;
  pointer-events: none;
  z-index: 50;
}

.poster-guide:not([hidden]) {
  display: block;
}

.poster-guide-v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.poster-guide-h {
  left: 0;
  right: 0;
  height: 1px;
}

.poster-text-el {
  position: absolute;
}

.poster-text-content {
  min-width: 24px;
  min-height: 1.2em;
  padding: 2px 6px;
  outline: none;
  cursor: text;
  white-space: pre-wrap;
}

.poster-el {
  /* Without this, a touch-drag on these elements scrolls/zooms the page
     instead of being delivered as pointermove events. */
  touch-action: none;
}

.poster-el.selected {
  outline: 1.5px dashed var(--gold-deep);
}

.poster-text-drag-handle {
  position: absolute;
  top: 50%;
  left: -28px;
  transform: translateY(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--gold-deep);
  color: #fff;
  cursor: move;
  user-select: none;
  touch-action: none;
}

.poster-el.selected .poster-text-drag-handle {
  display: flex;
}

.poster-qr-el,
.poster-icon-el,
.poster-image-el {
  position: absolute;
  cursor: move;
}

.poster-image-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.poster-qr-canvas {
  width: 100%;
  height: 100%;
}

.poster-qr-canvas canvas,
.poster-qr-canvas img {
  width: 100%;
  height: 100%;
  display: block;
}

.poster-resize-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--gold-deep);
  cursor: nwse-resize;
  touch-action: none;
}

.poster-el.selected .poster-resize-handle {
  display: block;
}

.poster-text-width-handle {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--gold-deep);
  cursor: ew-resize;
  touch-action: none;
}

.poster-el.selected .poster-text-width-handle {
  display: block;
}

.poster-rotate-handle {
  position: absolute;
  left: -6px;
  bottom: -6px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-deep);
  color: #fff;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.poster-el.selected .poster-rotate-handle {
  display: flex;
}

.poster-divider-resize-handle {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--gold-deep);
  cursor: ew-resize;
  touch-action: none;
}

.poster-el.selected .poster-divider-resize-handle {
  display: block;
}

.poster-divider-el {
  position: absolute;
  display: flex;
  align-items: center;
  height: 24px;
  cursor: move;
}

.poster-divider-line {
  flex: 1;
  height: 1px;
  background: currentColor;
}

.poster-divider-ornament {
  padding: 0 8px;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.poster-icon-glyph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.poster-image-menu {
  position: fixed;
  z-index: 60;
  flex-direction: column;
  gap: 6px;
  width: 220px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

.poster-image-menu:not([hidden]) {
  display: flex;
}

.poster-image-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 0.82rem;
  text-align: left;
  background: none;
  box-shadow: none;
  border: 1px solid transparent;
  color: var(--ink);
}

.poster-image-menu-item:hover {
  background: rgba(15, 23, 42, 0.05);
  box-shadow: none;
  transform: none;
}

.poster-image-menu-url {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  color: var(--ink);
}

.poster-image-menu-url input[type='text'] {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.poster-image-menu-url button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.poster-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.poster-text-toolbar {
  position: fixed;
  z-index: 60;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 86px 6px 8px;
  max-width: calc(100vw - 16px);
  border-radius: var(--radius-sm);
  background: var(--paper);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

#poster-delete-text-btn {
  position: absolute;
  top: 6px;
  right: 8px;
}

#poster-duplicate-btn {
  position: absolute;
  top: 6px;
  right: 46px;
}

.poster-text-toolbar:not([hidden]) {
  display: flex;
}

.poster-text-toolbar select {
  width: auto;
  height: 32px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.poster-text-toolbar input[type='number'] {
  width: 80px;
  height: 32px;
  padding: 0 6px;
}

.poster-text-toolbar input[type='color'] {
  width: 32px;
  height: 32px;
  padding: 2px;
}

.poster-text-toolbar .color-hex-input {
  width: 70px;
  height: 32px;
}

.poster-text-toolbar .icon-btn {
  width: 32px;
  height: 32px;
}

.poster-text-toolbar .icon-btn.active {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--gold-deep);
}

@media (max-width: 760px) {
  .poster-workspace {
    flex-direction: column;
    align-items: center;
  }

  .poster-toolbox {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .poster-toolbox-tools {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .poster-canvas-area {
    width: 100%;
  }
}

.invitation-workspace {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.invitation-toolbox {
  flex: 0 0 auto;
  width: 200px;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.invitation-toolbox-title {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.invitation-toolbox-tools {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invitation-tool-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  border-radius: var(--radius-sm);
  background: none;
  box-shadow: none;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: var(--ink);
}

.invitation-tool-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  box-shadow: none;
  transform: none;
}

.invitation-canvas-area {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 12px;
  overflow: auto;
}

#invitation-content nav.admin-nav {
  margin-bottom: 16px;
}

/* Real iPhone mockup PNG (images/phone-frame.png, 1146x2443 — status bar,
   notch and home indicator are baked into the image, not drawn in CSS).
   The frame keeps that exact aspect ratio so the artwork never distorts;
   the iframe sits inside it as a normal child, which is enough to paint it
   "above" the image (the image is this element's own background, children
   always paint over their parent's background) while leaving the image's
   status bar / notch / home indicator visible in the margins around it. */
.invitation-phone-frame {
  position: relative;
  flex: 0 0 auto;
  width: 320px;
  aspect-ratio: 1146 / 2443;
  background: url('../images/phone-frame.png') center / 100% 100% no-repeat;
}

.invitation-phone-screen {
  /* top/bottom + height:auto doesn't reliably stretch a replaced element
     like <iframe> across browsers — it falls back to the intrinsic 150px
     default height instead. Explicit width/height (not bottom) avoids that.
     Insets are measured pixel-for-pixel from images/phone-frame.png itself
     (its visible phone shape isn't centered in the canvas — there's more
     shadow padding on the left than the right), not guessed/symmetric. */
  position: absolute;
  top: 5.5%;
  left: 3%;
  width: 96.5%;
  height: 91.7%;
  display: block;
  border: none;
  /* Square top (clears the notch/status-bar area easily) but the bottom
     inset sits inside the artwork's own corner curve (measured ~10% of the
     frame's width) — a square bottom corner pokes past that curve. */
  border-radius: 0 0 32px 32px;
  background: #f2f2f6;
}

.invitation-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  margin-top: 16px;
}

.invitation-link-row .icon-btn {
  flex: 0 0 34px;
}

.invitation-link-display {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid rgba(138, 150, 120, 0.3);
  color: var(--ink);
  font-family: 'Inter', monospace;
  font-size: 0.78rem;
  text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Wix-style "Text Settings" panel — lives in the parent page (not the
   iframe) since a real side panel needs more room than a 320px phone mockup
   has. invitation.js shows/hides it and syncs its fields via direct calls
   into invitation-page.js's exposed window functions (same-origin iframe). */
/* position:fixed (not a flex sibling of .invitation-canvas-area) on purpose
   — it's a popover that appears next to the selected text, positioned in JS
   by invitation.js, and must never shift the phone-frame layout around when
   it opens/closes. */
.invitation-text-settings {
  position: fixed;
  z-index: 40;
  width: 240px;
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

/* `display: none` above is the default/closed state — [hidden] and this
   class rule have equal specificity, so without this the class's own
   `display` would silently win over the hidden attribute and the panel
   would stay visible (with no widget selected) at all times. */
.invitation-text-settings:not([hidden]) {
  display: flex;
}

.invitation-text-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.invitation-text-settings-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

.invitation-text-settings-header .icon-btn {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

.invitation-text-settings-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.invitation-text-settings-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.invitation-text-settings-label {
  font-size: 0.72rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}

.invitation-text-settings-size-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invitation-text-settings-size-row input[type='range'] {
  flex: 1 1 auto;
  accent-color: var(--gold);
}

.invitation-text-settings-size-row input[type='number'] {
  flex: 0 0 56px;
  width: 56px;
  padding: 4px 6px;
  text-align: center;
  font-size: 0.82rem;
}

.invitation-text-settings-row {
  flex-direction: row;
  align-items: center;
}

.invitation-text-settings-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid rgba(15, 23, 42, 0.14);
  color: var(--ink);
  box-shadow: none;
  font-size: 0.9rem;
}

.invitation-text-settings-toggle:hover {
  background: rgba(15, 23, 42, 0.04);
  box-shadow: none;
  transform: none;
}

.invitation-text-settings-toggle.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.invitation-text-settings-row input[type='color'] {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: var(--radius-sm);
}

.invitation-text-settings-delete {
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-sm);
  background: none;
  box-shadow: none;
  color: var(--error);
  font-weight: 600;
  text-align: center;
}

.invitation-text-settings-delete:hover {
  background: color-mix(in srgb, var(--error) 8%, transparent);
  box-shadow: none;
  transform: none;
}

@media (max-width: 760px) {
  .invitation-workspace {
    flex-direction: column;
    align-items: center;
  }

  .invitation-toolbox {
    width: 100%;
  }

  .invitation-canvas-area {
    width: 100%;
  }

  /* Below this width invitation.js skips positioning the panel near the
     widget (no room next to a 280px phone) — it becomes a bottom sheet
     instead. `!important` is needed because JS still sets inline top/left
     on the element from the last time it positioned a popup above this
     breakpoint; the stylesheet must win over that leftover inline style. */
  .invitation-text-settings {
    left: 0 !important;
    top: auto !important;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .invitation-phone-frame {
    width: 280px;
  }

  .invitation-link-row {
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .wedding-countdown-units {
    gap: 8px;
  }

  .wedding-countdown-unit {
    min-width: 52px;
    padding: 8px 10px;
  }

  .wedding-countdown-value {
    font-size: 1.3rem;
  }
}

.admin-tools {
  margin-bottom: 28px;
}

.admin-tools-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage-deep);
  font-weight: 600;
}

.admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-tool-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  height: 132px;
  padding: 18px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--gold-deep) 25%, transparent);
  white-space: normal;
  text-align: left;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-tool-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px color-mix(in srgb, var(--gold-deep) 32%, transparent);
}

.admin-tool-tile-icon {
  position: absolute;
  bottom: -8px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  color: rgba(255, 255, 255, 0.4);
}

.admin-tool-tile-icon svg {
  width: 56px;
  height: 56px;
}

.admin-tool-tile-label {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.admin-tool-tile-desc {
  position: relative;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
}

.admin-tool-tile.is-disabled {
  cursor: default;
  opacity: 0.55;
}

.admin-tool-tile.is-disabled:hover {
  transform: none;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--gold-deep) 25%, transparent);
}

.admin-tool-tile-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 3px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-pill);
}

/* Defensive cap only — with the shortened "contact us" wording this badge
   is normally as narrow as the existing coming-soon one, but very tight
   tile widths (small screens) could still force it onto two lines. */
#poster-tile-badge {
  max-width: 62%;
  text-align: right;
  line-height: 1.3;
}

.admin-tool-tile.tile-accent-blue {
  background: linear-gradient(135deg, var(--sage), var(--sage-deep));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--sage-deep) 25%, transparent);
}

.admin-tool-tile.tile-accent-blue:hover {
  box-shadow: 0 16px 30px color-mix(in srgb, var(--sage-deep) 32%, transparent);
}

.admin-tool-tile.tile-accent-teal {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-deep));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--accent-teal-deep) 25%, transparent);
}

.admin-tool-tile.tile-accent-teal:hover {
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent-teal-deep) 32%, transparent);
}

/* Mobile-only label/badge text — shorter wording (eg. "Personnaliser"
   instead of "Personnaliser la page invité") so the compact mobile tile
   never has to truncate. Hidden on desktop, where the full label/badge
   above is used instead. */
.admin-tool-tile-label-mobile,
.admin-tool-tile-badge-mobile {
  display: none;
}

/* On phones, 7 tall tiles with title+description meant a lot of vertical
   scroll just to get past the tools section — shrink to a dense icon grid
   (icon + one short label line, no description) instead. Disabled tiles
   keep a tiny "soon" corner badge rather than losing the signal entirely. */
@media (max-width: 600px) {
  body.admin-theme .admin-tools-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  body.admin-theme .admin-tool-tile {
    height: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 4px;
    border-radius: 14px;
    gap: 4px;
  }

  body.admin-theme .admin-tool-tile-icon {
    margin-bottom: 0;
  }

  /* Extra headroom so the corner "soon" badge doesn't sit right on top of
     the icon below it. */
  body.admin-theme .admin-tool-tile.is-disabled {
    padding-top: 22px;
  }

  body.admin-theme .admin-tool-tile-label {
    display: none;
  }

  body.admin-theme .admin-tool-tile-label-mobile {
    display: block;
    max-width: 100%;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1.2;
  }

  body.admin-theme .admin-tool-tile-desc,
  body.admin-theme .admin-tool-tile-badge {
    display: none;
  }

  body.admin-theme .admin-tool-tile-badge-mobile {
    display: block;
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 1px 6px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--gold-deep);
    background: var(--gold-light);
    border-radius: var(--radius-pill);
    line-height: 1.4;
  }
}

.todo-card h2 {
  margin: 0 0 18px;
}

.todo-progress {
  margin-bottom: 22px;
}

.todo-progress-label {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
}

.todo-progress-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  overflow: hidden;
}

.todo-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  transition: width 0.2s ease;
}

.todo-add-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-bottom: 18px;
  border-radius: var(--radius-pill);
  border: 1.5px dashed color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

.todo-add-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--gold-light);
  color: var(--gold-deep);
  cursor: pointer;
  transition: background 0.15s ease;
}

.todo-add-icon:hover {
  background: var(--gold);
  color: var(--paper);
}

.todo-add-form input {
  flex: 1;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 0.9rem;
}

.todo-add-form input:focus {
  box-shadow: none;
}

.todo-add-form select {
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  color: var(--ink);
  font-size: 0.78rem;
}

.todo-add-form select:focus {
  box-shadow: none;
}

.todo-layout {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.todo-sidebar {
  flex: 0 0 200px;
  padding-top: 6px;
}

.todo-filter-group {
  margin-bottom: 26px;
}

.todo-filter-group:last-child {
  margin-bottom: 0;
}

.todo-filter-heading {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.todo-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.todo-filter-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--charcoal);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  height: auto;
  white-space: normal;
  box-shadow: none;
}

.todo-filter-link:hover {
  background: var(--sage-light);
  transform: none;
  box-shadow: none;
}

.todo-filter-link.active {
  background: var(--gold-light);
  color: var(--gold-deep);
  font-weight: 700;
}

.todo-filter-count {
  font-size: 0.75rem;
  color: var(--ink);
}

.todo-filter-link.active .todo-filter-count {
  color: var(--gold-deep);
}

.todo-category-custom-tag {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--gold-deep) 12%, transparent);
  color: var(--gold-deep);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.todo-category-add-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 7px 10px;
  border: 1.5px dashed color-mix(in srgb, var(--gold-deep) 35%, transparent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gold-deep);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  height: auto;
  box-shadow: none;
}

.todo-category-add-btn:hover {
  background: var(--gold-light);
  transform: none;
  box-shadow: none;
}

.todo-category-modal-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  max-height: 320px;
  overflow-y: auto;
  list-style: none;
}

.todo-category-modal-empty {
  margin: 6px 0;
  font-size: 0.85rem;
  font-style: italic;
}

.todo-category-modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 0.9rem;
  color: var(--charcoal);
}

.todo-category-modal-form {
  display: flex;
  gap: 8px;
}

.todo-category-modal-form input {
  flex: 1;
  min-width: 0;
}

.todo-confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.todo-confirm-modal-confirm {
  background: var(--error);
  color: #fff;
  box-shadow: none;
}

.todo-confirm-modal-confirm:hover {
  filter: brightness(0.93);
  transform: none;
  box-shadow: none;
}

.todo-card {
  flex: 1;
  min-width: 0;
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.18);
  box-shadow: 0 6px 16px rgba(138, 109, 60, 0.06);
  transition: background 0.15s ease;
}

.todo-row:last-child {
  margin-bottom: 0;
}

.todo-row-check {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--gold-deep) 50%, transparent);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.todo-row.done .todo-row-check {
  background: var(--gold);
  border-color: var(--gold);
}

.todo-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.todo-row-text {
  font-size: 0.92rem;
  color: var(--charcoal);
}

.todo-row-text[data-action='edit'],
.todo-row-category[data-action='edit'] {
  cursor: pointer;
}

.todo-row:hover .todo-row-text[data-action='edit'] {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

.todo-row.done .todo-row-text {
  color: var(--ink);
  text-decoration: line-through;
}

.todo-row-default-tag {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  color: var(--sage-deep);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  vertical-align: middle;
}

.todo-row-category {
  align-self: flex-start;
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  color: var(--sage-deep);
  font-size: 0.68rem;
  font-weight: 600;
}

.todo-row-edit-main {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.todo-row-edit-input {
  flex: 1;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  font-size: 0.9rem;
}

.todo-row-edit-category {
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.todo-row.editing {
  background: var(--sage-light);
}

.todo-row-delete {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.todo-row:hover .todo-row-delete,
.todo-row:focus-within .todo-row-delete {
  opacity: 1;
  pointer-events: auto;
}

body.admin-theme .todo-add-form {
  border-color: color-mix(in srgb, var(--gold-deep) 35%, transparent);
}

body.admin-theme .todo-row {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* On mobile the sidebar's button lists would either eat a lot of vertical
   space or need horizontal scrolling, so it's swapped for two compact
   native <select> dropdowns (same status/category filters) instead. */
.todo-mobile-filters {
  display: none;
}

@media (max-width: 760px) {
  .todo-sidebar {
    display: none;
  }

  .todo-mobile-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
  }

  .todo-mobile-filter-field {
    flex: 1 1 140px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .todo-mobile-filter-field label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ink);
    padding-left: 2px;
  }

  .todo-mobile-filters select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    font-size: 0.8rem;
  }
}

.menu-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.menu-stat-card {
  flex: 1 1 150px;
  min-width: 140px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--cream);
}

.menu-stat-card-label {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}

.menu-stat-card-value {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold-deep);
}

.menu-stat-card-warn {
  background: color-mix(in srgb, var(--error) 12%, var(--cream));
}

.menu-stat-card-warn .menu-stat-card-value {
  color: var(--error);
}

.menu-add-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  margin-bottom: 22px;
  border-radius: var(--radius-pill);
  border: 1.5px dashed color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

.menu-add-form input {
  flex: 1;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 0.9rem;
}

.menu-add-form input:focus {
  box-shadow: none;
}

.menu-add-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background: var(--gold-light);
  color: var(--gold-deep);
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-add-icon:hover {
  background: var(--gold);
  color: var(--paper);
}

.menu-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.menu-card {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.18);
  box-shadow: 0 6px 16px rgba(138, 109, 60, 0.06);
}

.menu-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.menu-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
}

.menu-card-header:hover .menu-card-title {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

.menu-card-title-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  margin-right: 8px;
  padding: 0 8px;
  font-size: 1rem;
  font-weight: 700;
}

.menu-card-delete,
.menu-dish-delete {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.menu-dish-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-dish-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--cream);
}

.menu-dish-text {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--charcoal);
  cursor: pointer;
}

.menu-dish-row:hover .menu-dish-text {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

.menu-dish-edit-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 0 8px;
  font-size: 0.86rem;
}

.menu-dish-empty {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-style: italic;
}

.menu-dish-add-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px;
  border-radius: var(--radius-pill);
  border: 1.5px dashed color-mix(in srgb, var(--gold-deep) 35%, transparent);
}

.menu-dish-add-form .menu-add-icon {
  width: 26px;
  height: 26px;
}

.menu-dish-add-form input {
  flex: 1;
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 6px 4px;
  font-size: 0.84rem;
}

.menu-dish-add-form input:focus {
  box-shadow: none;
}

.menu-confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.menu-confirm-modal-confirm {
  background: var(--error);
  color: #fff;
  box-shadow: none;
}

.menu-confirm-modal-confirm:hover {
  filter: brightness(0.93);
  transform: none;
  box-shadow: none;
}

body.admin-theme .menu-add-form,
body.admin-theme .menu-dish-add-form {
  border-color: color-mix(in srgb, var(--gold-deep) 35%, transparent);
}

body.admin-theme .menu-card {
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.partner-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 32px rgba(138, 109, 60, 0.1);
}

.partner-card-media-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.partner-card-photo {
  flex: 0 0 110px;
  width: 110px;
  height: 110px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--sage-light);
  cursor: pointer;
  box-shadow: none;
}

.partner-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.partner-card-photo:hover,
.partner-card-photo:active {
  filter: none;
  transform: none;
  box-shadow: 0 0 0 2px var(--gold-light);
}

.partner-card-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 20px;
  padding: 3px 10px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--gold-light);
  border-radius: var(--radius-pill);
}

.partner-card-category svg {
  width: 13px;
  height: 13px;
}

/* Hardcoded pastel hues (not --sage/--accent-teal) so these stay genuinely
   colored regardless of theme-token changes elsewhere — js/partners.js
   assigns "blue"/"teal"/"violet" per category to give the partner grid the
   same scattered-pastel-colors feel as mariages.net, rather than one flat
   accent everywhere. */
.partner-card-category.cat-blue {
  color: #3f66b3;
  background: #e3edfd;
}

.partner-card-category.cat-teal {
  color: #2f8a5c;
  background: #e1f5ea;
}

.partner-card-category.cat-violet {
  color: #7c52b3;
  background: #ede3fb;
}

.partner-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--charcoal);
  min-height: 2.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partner-card-desc {
  font-size: 0.84rem;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  white-space: pre-line;
}

.partner-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.modal-panel.photo-lightbox-panel {
  max-width: 90vw;
  max-height: 90vh;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.photo-lightbox-panel img {
  display: block;
  align-self: center;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-sm);
}

.photo-lightbox-panel .modal-close {
  top: -14px;
  right: -14px;
  background: var(--paper);
  box-shadow: 0 6px 16px rgba(33, 31, 26, 0.25);
}

.admin-quick-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.admin-login-card {
  max-width: 380px;
  margin: 60px auto;
}

.form-error-text {
  margin: -6px 0 4px;
  font-size: 0.82rem;
  color: var(--error);
}

.google-signin-btn {
  width: 100%;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1px solid rgba(60, 64, 67, 0.3);
  box-shadow: none;
}

.google-signin-btn:hover {
  background: #f7f7f7;
  filter: none;
  box-shadow: none;
  transform: none;
}

.partner-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 8px;
  max-width: 420px;
  min-width: 0;
}

.partner-contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.partner-contacts-grid .field label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.partner-stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0 24px;
}

.partner-stat-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--gold-light) 60%, transparent);
}

.partner-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--charcoal);
}

.partner-stat-label {
  font-size: 0.78rem;
  color: var(--ink);
}

.partner-stats-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.partner-stats-bar-row {
  display: grid;
  grid-template-columns: minmax(100px, 160px) 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.partner-stats-bar-label {
  color: var(--charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-stats-bar-track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--gold-light) 70%, transparent);
  overflow: hidden;
}

.partner-stats-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
}

.partner-stats-bar-count {
  text-align: right;
  font-weight: 600;
  color: var(--charcoal);
}

.partner-stats-table-wrap {
  overflow-x: auto;
  margin-bottom: 8px;
}

.partner-stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.partner-stats-table th,
.partner-stats-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 18%, transparent);
  white-space: nowrap;
}

.partner-stats-table th {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.partner-stats-table td {
  color: var(--charcoal);
}

.partner-icon-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--sage-light);
  box-shadow: none;
  color: var(--sage-deep);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.partner-icon-option:hover {
  background: var(--paper);
}

.partner-icon-option.active {
  border-color: var(--gold);
  background: var(--paper);
  color: var(--gold-deep);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* Longer forms (e.g. the partner form, with a textarea/icon-grid/multiple
   sections) opt out of the 640px+ multi-column layout below, which was
   designed for the compact 3-field "new wedding" form and otherwise squashes
   wider field types into narrow columns. */
.field-grid.field-grid-single {
  grid-template-columns: 1fr;
}

.field-grid[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field label {
  font-size: 0.68rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sage-deep);
}

.field-grid > button {
  margin-top: 4px;
  width: 100%;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: 2fr 1fr 1fr auto;
    align-items: end;
  }

  .field-grid.field-grid-guest {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid.field-grid-guest > button {
    grid-column: 1 / -1;
  }

  .field-grid.field-grid-single > button {
    width: 100%;
  }

  .field-grid > button {
    grid-column: auto;
    margin-top: 0;
    width: auto;
    justify-self: start;
  }

  #wedding-form {
    grid-template-columns: 1.6fr 1.3fr 1fr auto;
  }

  #wedding-form .field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  #wedding-form .field-date {
    min-width: 150px;
  }
}

@media (min-width: 900px) {
  .field-grid.field-grid-guest {
    grid-template-columns: 1.4fr 0.5fr 1.6fr 1.3fr auto;
    align-items: end;
  }

  .field-grid.field-grid-guest > button {
    grid-column: auto;
    margin-top: 0;
    width: auto;
    justify-self: start;
  }
}

.mode-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  flex: 0 0 auto;
}

.mode-btn {
  height: 30px;
  padding: 0 14px;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--sage-deep);
  border: none;
  box-shadow: none;
}

.mode-btn svg {
  flex: 0 0 auto;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  filter: none;
  transform: none;
  box-shadow: none;
}

.mode-btn.active {
  background: var(--paper);
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(138, 109, 60, 0.18);
}

.view-switch {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  margin-bottom: 28px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
}

.view-switch-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--sage-deep);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

a.view-switch-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--charcoal);
}

.view-switch-tab.active {
  background: var(--paper);
  color: var(--charcoal);
  box-shadow: 0 2px 8px rgba(138, 109, 60, 0.18);
  cursor: default;
}

.muted.small {
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.bulk-textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--charcoal);
  background: var(--sage-light);
  border: none;
  border-radius: var(--radius-sm);
  resize: vertical;
}

#bulk-add-submit {
  margin-top: 12px;
}

.bulk-add-feedback {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--sage-deep);
}

#download-template-btn {
  margin-bottom: 14px;
}

.file-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 20px;
  text-align: center;
  color: var(--sage-deep);
  background: var(--sage-light);
  border: 2px dashed rgba(138, 150, 120, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.file-dropzone p {
  margin: 0;
  font-size: 0.85rem;
}

.file-dropzone:hover,
.file-dropzone:focus-visible {
  border-color: var(--gold);
}

.file-dropzone.dragover {
  background: var(--gold-light);
  border-color: var(--gold-deep);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(33, 31, 26, 0.55);
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(33, 31, 26, 0.3);
  overflow: hidden;
}

.modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

body.modal-open {
  overflow: hidden;
}

.modal-panel h3 {
  margin-bottom: 16px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--sage-deep);
  border: none;
  box-shadow: none;
  font-size: 1.3rem;
  line-height: 1;
}

.modal-close:hover {
  background: var(--sage-light);
  filter: none;
  transform: none;
  box-shadow: none;
}

.qr-canvas-wrap {
  display: flex;
  justify-content: center;
  padding: 12px;
  background: var(--paper);
  border-radius: var(--radius-sm);
}

.qr-canvas-wrap canvas {
  display: block;
  max-width: 100%;
}

.qr-modal-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

.wedding-list, .guest-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wedding-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  gap: 12px;
  transition: background 0.15s ease;
}

.wedding-item:hover {
  background: #dde5d3;
}

.wedding-item:last-child {
  margin-bottom: 0;
}

.wedding-item .info {
  flex: 1;
  min-width: 160px;
}

.wedding-item .actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.18s ease;
}

.wedding-item:hover .actions,
.wedding-item:focus-within .actions,
.wedding-item.revealed .actions {
  max-width: 400px;
}

.app-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 480px;
  overflow-y: auto;
}

.app-log-item {
  padding: 12px 16px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
}

.app-log-item:last-child {
  margin-bottom: 0;
}

.app-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #998c77;
  margin-bottom: 4px;
}

.app-log-page {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.app-log-message {
  font-size: 0.92rem;
  word-break: break-word;
}

.app-log-extra {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.wedding-item-location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  min-width: 0;
}

.wedding-item-location svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.wedding-item-location-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wedding-item .info strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
}

.feature-toggle-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.feature-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

.feature-toggle-item:last-child {
  border-bottom: none;
}

.feature-toggle-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.feature-toggle-icon {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--gold-deep);
}

.feature-toggle-label {
  font-size: 0.92rem;
  color: var(--charcoal);
  text-align: left;
}

.toggle-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 44px;
  height: 26px;
  cursor: pointer;
}

.toggle-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.3);
  transition: background 0.18s ease;
}

.toggle-switch-track::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.3);
  transition: transform 0.18s ease;
}

.toggle-switch input:checked + .toggle-switch-track {
  background: var(--gold-deep);
}

body.admin-theme .toggle-switch input:checked + .toggle-switch-track {
  background: var(--gold);
}

.toggle-switch input:checked + .toggle-switch-track::before {
  transform: translateX(18px);
}

.toggle-switch input:focus-visible + .toggle-switch-track {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 40%, transparent);
}

.table-group {
  margin-bottom: 22px;
}

.table-group:last-child {
  margin-bottom: 0;
}

.table-group-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.table-group-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-deep);
}

.table-group-count {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: #998c77;
}

.table-group-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.table-group-title-row:hover .table-group-actions,
.table-group-title-row:focus-within .table-group-actions,
.table-group-title-row.revealed .table-group-actions {
  opacity: 1;
  pointer-events: auto;
}

.table-guest-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  min-height: 12px;
  border-radius: var(--radius-sm);
  background: rgba(138, 150, 120, 0.08);
}

.table-guest-list-empty {
  padding: 10px 8px;
  font-size: 0.85rem;
  font-style: italic;
  color: #998c77;
}

.guest-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.18);
  box-shadow: 0 6px 16px rgba(138, 109, 60, 0.06);
  cursor: grab;
  transition: background 0.15s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.guest-row:last-child {
  margin-bottom: 0;
}

.guest-row-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px dashed rgba(176, 141, 79, 0.35);
  background: transparent;
  color: #998c77;
  font-size: 0.85rem;
  font-style: italic;
}

.guest-row-empty:last-child {
  margin-bottom: 0;
}

.guest-row-empty-label {
  flex: 1;
}

.guest-row-empty-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.guest-row-empty:hover .guest-row-empty-actions,
.guest-row-empty:focus-within .guest-row-empty-actions,
.guest-row-empty.revealed .guest-row-empty-actions {
  opacity: 1;
  pointer-events: auto;
}

.guest-row-empty-fill,
.guest-row-empty-delete {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
}

.guest-row-add-seat {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

.guest-row-add-seat .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px dashed rgba(176, 141, 79, 0.4);
  color: #998c77;
  background: transparent;
}

.guest-row-add-seat .icon-btn:hover {
  border-style: solid;
  border-color: var(--gold-deep);
  color: var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}

body.admin-theme .guest-row-add-seat .icon-btn {
  border-color: color-mix(in srgb, var(--gold) 40%, transparent);
}

body.admin-theme .guest-row-add-seat .icon-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
}

.guest-row:hover {
  background: var(--sage-light);
  box-shadow: 0 10px 22px rgba(138, 109, 60, 0.1);
}

.guest-row.dragging {
  transform: scale(1.04) rotate(-1deg);
  box-shadow: 0 18px 32px rgba(138, 109, 60, 0.28);
  background: var(--sage-light);
  cursor: grabbing;
  z-index: 5;
}

/* While reordering, the row under the cursor keeps changing as the list
   reshuffles — letting :hover and the transition react to that made rows
   flicker constantly and made it hard to tell where a drop would land. */
body.dragging-guest-row .guest-row,
body.dragging-guest-row .guest-row-empty {
  transition: none;
}

body.dragging-guest-row .guest-row:not(.dragging):hover {
  background: var(--paper);
  box-shadow: 0 6px 16px rgba(138, 109, 60, 0.06);
}

body.admin-theme.dragging-guest-row .guest-row:not(.dragging):hover {
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* The row currently under the pointer while dragging — this is the seat the
   guest would land in if dropped right now. */
.guest-row-drop-target {
  border-color: var(--gold-deep) !important;
  background: color-mix(in srgb, var(--gold) 16%, var(--paper)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 40%, transparent) !important;
}

body.admin-theme .guest-row-drop-target {
  border-color: var(--gold) !important;
  background: color-mix(in srgb, var(--gold) 14%, var(--paper)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent) !important;
}

.guest-row-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -130%);
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.3);
}

.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.guest-row-name {
  flex: 1;
  min-width: 120px;
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease;
}

.guest-row-name:hover {
  text-decoration-color: color-mix(in srgb, var(--charcoal) 35%, transparent);
}

.guest-row-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.guest-row-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  color: var(--sage-deep);
  background: var(--sage-light);
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.guest-row-contact-icon:hover {
  color: var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 16%, transparent);
}

body.admin-theme .guest-row-contact-icon {
  color: var(--charcoal);
  background: color-mix(in srgb, var(--gold) 10%, transparent);
}

body.admin-theme .guest-row-contact-icon:hover {
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 18%, transparent);
}

.guest-menu-edit-wrap,
.guest-rsvp-edit-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.guest-menu-edit {
  flex: 0 0 auto;
  width: auto;
  height: auto;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--sage-light);
  color: var(--sage-deep);
}

/* The RSVP control is icon + colour only, on every screen size (3 states
   are easy to read at a glance without text) — unlike the menu pill, which
   keeps showing its text everywhere since there can be many menus and an
   icon alone wouldn't say which one is assigned. */
.guest-rsvp-edit-wrap {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fdf3d6;
}

.guest-rsvp-edit-wrap select {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  font-size: 0;
  color: transparent;
  background: transparent;
  cursor: pointer;
}

/* The select itself is shrunk to an invisible icon-sized circle so only the
   icon overlay shows — but its dropdown <option> list inherits the same
   font-size:0/transparent unless reset, which on Windows Chrome renders the
   popup with blank, unreadable rows (macOS happened to mask this). */
.guest-rsvp-edit-wrap select option {
  font-size: 1rem;
  color: initial;
}

.guest-rsvp-edit-wrap .guest-row-mobile-icon {
  display: flex;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #92750c;
}

.guest-rsvp-edit-wrap[data-rsvp="confirmed"] {
  background: #ddf3e3;
}

.guest-rsvp-edit-wrap[data-rsvp="confirmed"] .guest-row-mobile-icon {
  color: #2f7a4d;
}

.guest-rsvp-edit-wrap[data-rsvp="declined"] {
  background: #fbdfdf;
}

.guest-rsvp-edit-wrap[data-rsvp="declined"] .guest-row-mobile-icon {
  color: var(--error);
}

.guest-menu-edit-wrap .guest-row-mobile-icon {
  display: none;
}

.guests-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.guests-title-row h2 {
  margin: 0;
}

.guests-title-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.guest-search {
  display: flex;
  align-items: center;
}

.guest-search-toggle {
  flex: 0 0 auto;
  color: var(--gold-deep);
}

.guest-search.is-open .guest-search-toggle {
  background: var(--gold-light);
  border-color: var(--gold-deep);
}

/* The pill border/radius lives on this collapsing wrapper (not on the input
   inside it) so the shape itself animates as one piece — clipping a
   separately-rounded child via overflow:hidden while max-width animates
   caused stray curved seams at the corners in Chrome. */
.guest-search-field {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 0;
  overflow: hidden;
  margin-left: 0;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--paper);
  transition: max-width 0.3s ease, margin-left 0.3s ease, border-color 0.15s ease;
}

.guest-search.is-open .guest-search-field {
  max-width: 240px;
  margin-left: 8px;
  border-color: rgba(15, 23, 42, 0.12);
}

.guest-search-field:focus-within {
  border-color: var(--gold-deep) !important;
}

.guest-search-input {
  flex: 0 0 220px;
  width: 220px;
  padding: 7px 32px 7px 12px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 0.88rem;
  font-family: inherit;
}

.guest-search-input:focus {
  outline: none;
}

.guest-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  box-shadow: none;
}

.guest-search-field .guest-search-clear:hover {
  background: var(--sage-light);
  /* .icon-btn:hover (defined later, same specificity as a plain :hover
     class rule) resets transform to none, which would otherwise undo the
     translateY(-50%) centering above and drop the button down. */
  transform: translateY(-50%);
}

.guest-rsvp-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guest-rsvp-summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  background: #fdf3d6;
  color: #92750c;
}

.guest-rsvp-summary-pill svg {
  width: 14px;
  height: 14px;
}

.guest-rsvp-summary-pill[data-rsvp="confirmed"] {
  background: #ddf3e3;
  color: #2f7a4d;
}

.guest-rsvp-summary-pill[data-rsvp="declined"] {
  background: #fbdfdf;
  color: var(--error);
}

.guest-table-edit {
  width: 56px;
  flex: 0 0 auto;
  padding: 6px 8px;
  font-size: 16px;
  text-align: center;
  border-radius: var(--radius-sm);
}

.guest-row-more {
  position: relative;
  flex: 0 0 auto;
  display: flex;
}

.guest-row-more-btn {
  color: var(--sage-deep);
}

.guest-row-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 15;
  flex-direction: column;
  gap: 8px;
  min-width: 170px;
  padding: 10px;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px rgba(138, 109, 60, 0.16);
}

.guest-row-more-menu:not([hidden]) {
  display: flex;
}

.guest-row-more-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.guest-row-more-field span {
  font-size: 0.68rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--sage-deep);
}

.guest-row-more-field .guest-table-edit {
  width: 64px;
}

.guest-row-more-delete {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: none;
  border-radius: calc(var(--radius-sm) - 5px);
  background: transparent;
  color: var(--error);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.guest-row-more-delete:hover {
  background: #fbdfdf;
}

.guest-row-more-delete svg {
  flex-shrink: 0;
}

/* Keep the row to a glance: name + RSVP status only. The phone, menu pill
   and "..." actions are real but secondary, so they collapse to zero width
   (not just invisible — that would still leave the name squeezed) and only
   reappear on hover/focus, or via a tap on the row toggling .revealed for
   touch screens, which have no hover. */
.guest-row-contact,
.guest-menu-edit-wrap,
.guest-row-more {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.guest-row:hover .guest-row-contact,
.guest-row:hover .guest-menu-edit-wrap,
.guest-row:hover .guest-row-more,
.guest-row:focus-within .guest-row-contact,
.guest-row:focus-within .guest-menu-edit-wrap,
.guest-row:focus-within .guest-row-more,
.guest-row.revealed .guest-row-contact,
.guest-row.revealed .guest-menu-edit-wrap,
.guest-row.revealed .guest-row-more {
  opacity: 1;
  max-width: none;
  pointer-events: auto;
}

/* .guest-row-more's overflow:hidden above only exists to make the zero-width
   collapse trick work — once revealed it must go back to visible, or the
   "..." dropdown menu (an absolutely-positioned child) gets clipped by that
   same box and silently fails to show. */
.guest-row:hover .guest-row-more,
.guest-row:focus-within .guest-row-more,
.guest-row.revealed .guest-row-more {
  overflow: visible;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid rgba(138, 150, 120, 0.3);
  color: var(--sage-deep);
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: var(--sage-light);
  color: var(--charcoal);
  transform: none;
  box-shadow: none;
  filter: none;
}

.icon-btn.icon-btn-danger {
  color: var(--error);
  border-color: #e3c9c4;
}

.icon-btn.icon-btn-danger:hover {
  background: #f8eeec;
}

.icon-btn.icon-btn-large {
  width: 52px;
  height: 52px;
  background: var(--sage-light);
  border-color: transparent;
}

.icon-btn.icon-btn-large:hover {
  background: var(--gold-light);
  color: var(--charcoal);
}

.wedding-item .icon-btn,
.wedding-item .mini-lang-select {
  opacity: 0;
  pointer-events: none;
}

.wedding-item:hover .icon-btn,
.wedding-item:hover .mini-lang-select,
.wedding-item:focus-within .icon-btn,
.wedding-item:focus-within .mini-lang-select,
.wedding-item.revealed .icon-btn,
.wedding-item.revealed .mini-lang-select {
  opacity: 1;
  pointer-events: auto;
}

h2 {
  margin-top: 0;
  margin-bottom: 20px;
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--charcoal);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.card-header-row h2 {
  margin-bottom: 0;
}

.add-guest-toggle {
  display: none;
}

.add-guest-toggle svg {
  transition: transform 0.2s ease;
}

/* Mobile-only: the add-guest card opens collapsed (just the title + this
   button) since the full form pushes the guest list far down the page on a
   small screen. Desktop keeps the form always open — this toggle and the
   collapsing rules below only exist inside the 600px media query. Intentionally
   not persisted (no localStorage): every page load starts collapsed again,
   only the open/closed clicks within a session carry over while adding
   several guests in a row. */
@media (max-width: 600px) {
  .add-guest-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    margin-left: auto;
  }

  .add-guest-card:not(.is-open) .add-guest-toggle svg {
    transform: rotate(0deg);
  }

  .add-guest-card.is-open .add-guest-toggle svg {
    transform: rotate(45deg);
  }

  .add-guest-card:not(.is-open) #add-mode-switch,
  .add-guest-card:not(.is-open) #add-guest-fields {
    display: none;
  }

  #add-guest-card.add-guest-card:not(.is-open) {
    padding: 8px 16px;
  }

  .add-guest-card:not(.is-open) .card-header-row {
    margin-bottom: 0;
  }

  .add-guest-card:not(.is-open) .card-header-row h2 {
    font-size: 0.95rem;
  }

  .add-guest-card.is-open .add-guest-toggle {
    position: absolute;
    top: 22px;
    right: 22px;
    margin-left: 0;
  }

  /* The 3 mode buttons' natural widths (icon+label+padding) add up to more
     than the card's content width on a phone, so .mode-switch overflows
     past the row's right edge instead of just looking off-center. Making it
     span the full row and its buttons share that width equally fixes the
     overflow (and centering falls out for free). */
  .add-guest-card.is-open #add-mode-switch {
    width: 100%;
    margin: 0;
  }

  .add-guest-card.is-open #add-mode-switch .mode-btn {
    flex: 1 1 0;
    padding: 0 6px;
  }
}

.empty-state {
  text-align: center;
  color: #998c77;
  font-style: italic;
  font-family: 'Playfair Display', serif;
  padding: 24px 0;
}

.lang-switcher-mount {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: calc(18px + env(safe-area-inset-right, 0px));
  z-index: 10;
}

.lang-switcher {
  position: relative;
}

.lang-switcher-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.4px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-light);
  background: var(--paper);
  color: var(--sage-deep);
  box-shadow: 0 4px 12px rgba(138, 109, 60, 0.1);
  cursor: pointer;
}

/* Without resetting these, the generic button:hover rule (a much bigger
   lift + shadow, meant for the gold gradient CTA buttons) wins on
   specificity and applies here too — normally invisible on desktop since
   the mouse moves off again right away, but mobile browsers can latch
   :hover on for as long as a tapped element stays focused (e.g. while its
   own dropdown is open), making that oversized shadow show up and overflow
   past the bottom of a short viewport. */
.lang-switcher-trigger:hover {
  background: var(--sage-light);
  filter: none;
  transform: none;
  box-shadow: 0 4px 12px rgba(138, 109, 60, 0.1);
}

.lang-switcher-icon {
  display: flex;
  align-items: center;
  color: var(--gold);
}

.lang-switcher-current-short {
  display: none;
}

.lang-switcher-chevron {
  font-size: 0.6rem;
  color: var(--gold);
  transition: transform 0.15s ease;
}

.lang-switcher-trigger[aria-expanded='true'] .lang-switcher-chevron {
  transform: rotate(180deg);
}

.lang-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 36px rgba(138, 109, 60, 0.16);
  z-index: 20;
}

.lang-switcher-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: calc(var(--radius-sm) - 5px);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease;
}

.lang-switcher-option:hover {
  background: var(--sage-light);
}

.lang-switcher-option[aria-selected='true'] {
  color: var(--sage-deep);
  font-weight: 700;
}

.lang-switcher-option .check {
  width: 14px;
  flex-shrink: 0;
  display: inline-block;
  color: var(--gold-deep);
  font-size: 0.72rem;
}

select.mini-lang-select {
  width: auto;
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  color: var(--sage-deep);
  border: 1px solid rgba(138, 150, 120, 0.3);
}

.empty-state.small {
  font-size: 0.82rem;
  padding: 6px 0;
}

/* A deliberately bold, sticky banner — the whole point of moving theme
   settings to its own page was that couples didn't realize these controls
   change the OTHER page (the guest-facing one). This stays in view while
   scrolling through the (long) settings list below, so the prompt to go
   check the result is never more than a glance away. */
.theme-settings-preview-banner {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 20px 26px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  background: var(--gold-deep);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

/* Collapsed to nothing until the first saved change reveals it (see
   .is-revealed and theme-settings.js) — with no title/desc yet, there's
   no point reserving space for them; the banner just wraps the button
   with even padding above and below. Once revealed, this grows open
   and the title/desc type themselves out inside it. */
.theme-settings-preview-banner-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.theme-settings-preview-banner-text.is-revealed {
  max-height: 90px;
}

.theme-settings-preview-banner-title {
  margin: 0 0 4px;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.theme-settings-preview-banner-desc {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.theme-settings-preview-btn {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1.5px solid rgba(15, 23, 42, 0.1);
  color: var(--gold-deep);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.theme-settings-preview-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  color: var(--gold-deep);
}

/* Fires after every saved change, so the button itself draws the eye
   toward "go check what you just changed" instead of relying on the
   couple to remember to click it. The badge sticks around until the
   link is actually opened; the pulse is just a few seconds of motion to
   catch the eye at the moment of the change. */
.theme-settings-preview-btn.has-update::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e0533f;
  border: 2px solid var(--gold-deep);
}

.theme-settings-preview-btn.pulse-attention {
  animation: theme-preview-pulse 0.9s ease-in-out 2;
}

@keyframes theme-preview-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(255, 255, 255, 0.6);
  }
  50% {
    transform: scale(1.07);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22), 0 0 0 9px rgba(255, 255, 255, 0);
  }
}

@media (max-width: 600px) {
  .theme-settings-preview-banner {
    top: 6px;
    padding: 10px 14px;
    gap: 8px;
    margin-bottom: 16px;
  }

  .theme-settings-preview-banner-title {
    font-size: 0.85rem;
    margin: 0 0 2px;
  }

  .theme-settings-preview-banner-desc {
    font-size: 0.72rem;
  }

  .theme-settings-preview-btn {
    width: 100%;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.theme-preset-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: auto;
  padding: 18px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--sage-light);
  box-shadow: none;
  white-space: normal;
  cursor: pointer;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-preset-option:hover {
  background: var(--paper);
}

.theme-preset-option.active {
  border-color: var(--gold);
  background: var(--paper);
}

.theme-preset-swatches {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.theme-preset-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.theme-font-heading {
  margin: 18px 0 10px;
  font-size: 0.85rem;
}

.theme-font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.theme-font-option {
  height: auto;
  padding: 14px 10px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--sage-light);
  box-shadow: none;
  white-space: normal;
  cursor: pointer;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-font-option:hover {
  background: var(--paper);
}

.theme-font-option.active {
  border-color: var(--gold);
  background: var(--paper);
}

.theme-custom-toggle {
  display: block;
  width: max-content;
  margin: 8px auto 4px;
}

.theme-custom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.theme-custom-grid[hidden] {
  display: none;
}

.theme-color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
}

.theme-color-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sage-deep);
  text-transform: none;
  letter-spacing: 0;
}

.theme-color-field-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-color-field input[type='color'] {
  width: 40px;
  height: 32px;
  padding: 2px;
  border: 1px solid rgba(138, 150, 120, 0.3);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
}

.theme-color-field .color-hex-input {
  width: 76px;
  height: 32px;
}

.theme-decoration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.theme-decoration-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: auto;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--sage-light);
  box-shadow: none;
  white-space: normal;
  cursor: pointer;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-decoration-option:hover {
  background: var(--paper);
}

.theme-decoration-option.active {
  border-color: var(--gold);
  background: var(--paper);
}

.theme-decoration-preview-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  color: var(--gold-deep);
}

.theme-decoration-preview-box svg {
  width: 40px;
  height: 40px;
}

body.admin-theme .theme-decoration-preview-box {
  color: var(--gold);
}

.theme-decoration-upload {
  margin-top: 14px;
}

.theme-decoration-upload .secondary {
  margin-top: 6px;
}

.theme-decoration-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.theme-decoration-preview img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  padding: 6px;
}

.theme-decoration-position-field {
  margin: 14px 0 22px;
}

.theme-decoration-position-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
}

.theme-decoration-position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "top-left top-center top-right"
    "bottom-left . bottom-right";
  gap: 8px;
  max-width: 320px;
  margin: 8px auto 0;
}

.theme-decoration-position-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  background: var(--sage-light);
  box-shadow: none;
  white-space: normal;
  cursor: pointer;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--charcoal);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.theme-decoration-position-arrow {
  display: inline-flex;
  color: var(--gold-deep);
}

body.admin-theme .theme-decoration-position-arrow {
  color: var(--gold);
}

.theme-decoration-position-option:hover {
  background: var(--paper);
}

.theme-decoration-position-option.active {
  border-color: var(--gold);
  background: var(--paper);
}

#add-table-btn {
  flex: 0 0 auto;
}

.landmark-picker-wrap {
  position: relative;
  flex: 0 0 auto;
}

#add-landmark-btn {
  flex: 0 0 auto;
}

.landmark-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.3);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 26px rgba(138, 109, 60, 0.22);
}

.landmark-picker[hidden] {
  display: none;
}

.landmark-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  box-shadow: none;
  color: var(--charcoal);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}

.landmark-picker-option:hover {
  background: var(--sage-light);
  transform: none;
  box-shadow: none;
}

.landmark-picker-option svg {
  flex: 0 0 auto;
  color: var(--sage-deep);
}

.landmark-unit {
  position: absolute;
  width: 0;
  height: 0;
}

.landmark-shape {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 8px;
  background: var(--paper);
  border: 1px solid rgba(138, 150, 120, 0.4);
  border-radius: var(--radius-sm);
  color: var(--sage-deep);
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 1;
}

.landmark-shape:hover {
  border-color: var(--gold);
  color: var(--charcoal);
}

.landmark-shape.dragging-landmark {
  border-color: var(--gold-deep);
  box-shadow: 0 10px 22px rgba(138, 109, 60, 0.25);
  z-index: 5;
  cursor: grabbing;
}

.landmark-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
}

.landmark-delete-btn {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 22px;
  height: 22px;
  z-index: 2;
  cursor: pointer;
  touch-action: auto;
}

.landmark-delete-btn svg {
  width: 11px;
  height: 11px;
}

.floor-plan-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#add-landmark-btn,
#add-table-btn {
  gap: 6px;
}

.btn-icon {
  flex-shrink: 0;
}

.zoom-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.3);
  border-radius: var(--radius-pill);
  padding: 3px;
}

.zoom-controls .icon-btn {
  width: 28px;
  height: 28px;
}

.zoom-reset-btn {
  min-width: 44px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  color: var(--sage-deep);
  background: none;
  border: none;
  box-shadow: none;
  cursor: pointer;
  padding: 4px 2px;
}

.zoom-reset-btn:hover {
  color: var(--charcoal);
  transform: none;
}

.floor-canvas-viewport {
  position: relative;
  margin-top: 18px;
  height: 60vh;
  min-height: 420px;
  max-height: 640px;
  overflow: auto;
  border: 1px solid rgba(176, 141, 79, 0.25);
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.floor-plan-card.fullscreen-active .fullscreen-close-btn {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
}

.fullscreen-close-btn {
  z-index: 5;
}

.floor-plan-card.fullscreen-active {
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.floor-plan-card.fullscreen-active::before {
  display: none;
}

.floor-plan-card.fullscreen-active .floor-canvas-viewport {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  margin-top: 0;
  border: none;
  border-radius: 0;
  background-image: radial-gradient(circle, rgba(138, 109, 60, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
}

.floor-plan-card.fullscreen-active .card-header-row h2,
.floor-plan-card.fullscreen-active > .muted.small {
  display: none;
}

.floor-plan-card.fullscreen-active .card-header-row {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: calc(12px + env(safe-area-inset-left, 0px));
  z-index: 2;
  margin-bottom: 0;
  width: auto;
  max-width: calc(100vw - 80px);
}

.floor-plan-card.fullscreen-active #fullscreen-btn {
  display: none;
}

.floor-plan-card.fullscreen-active .floor-plan-toolbar {
  background: rgba(255, 253, 249, 0.94);
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 16px rgba(138, 109, 60, 0.18);
}

.floor-plan-card.fullscreen-active .floor-canvas-sizer {
  margin-top: 90px;
}

.floor-plan-card.fullscreen-active .floor-canvas {
  background-image: none;
}

.floor-canvas-viewport.panning {
  cursor: grabbing;
}

.floor-canvas-sizer {
  position: relative;
}

.floor-canvas {
  position: relative;
  width: 1500px;
  height: 900px;
  background-image: radial-gradient(circle, rgba(138, 109, 60, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  transform-origin: 0 0;
  overflow: visible;
}

.table-unit {
  position: absolute;
  width: 0;
  height: 0;
}

.chair {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  margin: -11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--sage-deep);
  transform: rotate(var(--chair-angle, 0deg)) translate(0, var(--chair-radius, -60px));
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.chair.occupied {
  background: var(--gold);
  border-color: var(--gold-deep);
}

#floor-canvas .chair {
  pointer-events: auto;
  transition: box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

#floor-canvas .chair.occupied {
  cursor: pointer;
  touch-action: none;
}

#floor-canvas .chair.picked {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent);
  animation: chair-pick-pulse 1.1s ease-in-out infinite;
  z-index: 3;
}

#floor-canvas .chair.just-dropped {
  animation: chair-drop-pop 0.6s ease;
}

#floor-canvas .chair.drop-target {
  border-style: solid;
  border-color: var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 35%, var(--paper));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 30%, transparent);
}

.chair-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  margin: -15px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--gold-deep);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.3);
}

@keyframes chair-pick-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 55%, transparent);
  }
  50% {
    box-shadow: 0 0 0 7px color-mix(in srgb, var(--gold) 25%, transparent);
  }
}

@keyframes chair-drop-pop {
  0% {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 70%, transparent);
  }
  40% {
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--gold) 35%, transparent);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.chair.chair-you {
  box-shadow: 0 0 0 3px rgba(176, 141, 79, 0.45);
}

.chair.chair-fixed {
  transform: none;
}

.chair-initials {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  transform: rotate(var(--chair-counter-angle, 0deg));
}

.table-shape {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform: translate(-50%, -50%);
  background: var(--paper);
  border: 2px solid var(--gold);
  box-shadow: 0 8px 18px rgba(138, 109, 60, 0.18);
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 1;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.table-shape.round {
  width: 88px;
  height: 88px;
  border-radius: 50%;
}

.table-shape.rectangle {
  border-radius: var(--radius-sm);
}

/* Head table (table des mariés) — chairs on one side only. Diagonal stripe
   pattern keeps it visually distinct from plain rectangular tables at a glance. */
.table-shape.head {
  border-radius: var(--radius-sm);
  background: repeating-linear-gradient(
    -45deg,
    var(--guest-canvas-bg, #e6ebe0) 0px,
    var(--guest-canvas-bg, #e6ebe0) 6px,
    #fff 6px,
    #fff 12px
  );
  border-color: var(--gold-deep);
}

.table-shape:hover {
  border-color: var(--gold-deep);
  box-shadow: 0 12px 26px rgba(138, 109, 60, 0.26);
}

.table-shape:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.table-shape.dragging-table {
  border-color: var(--gold-deep);
  box-shadow: 0 16px 32px rgba(138, 109, 60, 0.32);
  z-index: 5;
  cursor: grabbing;
}

.table-shape-label {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--charcoal);
}

.table-shape-count {
  font-size: 0.7rem;
  color: var(--sage-deep);
}

.table-rotate-overlay-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  z-index: 2;
  cursor: pointer;
  touch-action: auto;
}

.table-rotate-overlay-btn svg {
  width: 13px;
  height: 13px;
}

.table-preview {
  width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(176, 141, 79, 0.18);
}

.table-preview-title {
  margin: 0 0 14px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
}

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

.table-preview-switch {
  display: flex;
  width: fit-content;
  margin: 0 auto 18px;
}

.table-preview-canvas {
  position: relative;
  height: 180px;
  margin: 0 auto 18px;
}

.table-preview-canvas .table-shape {
  cursor: default;
  touch-action: auto;
}

.table-preview-canvas .table-shape:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(138, 109, 60, 0.18);
}

.table-preview-canvas .chair.occupied {
  pointer-events: auto;
  cursor: pointer;
}

.chair-tooltip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 8px));
  white-space: nowrap;
  background: var(--charcoal);
  color: var(--paper);
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(33, 31, 26, 0.25);
  z-index: 10;
}

.chair-tooltip[hidden] {
  display: none;
}

.table-preview-names {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

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

.table-preview-name {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.25);
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  color: var(--ink);
}

.table-preview-name.you {
  background: var(--gold-light);
  border-color: var(--gold);
  color: var(--charcoal);
  font-weight: 700;
}

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

.table-preview-menu-title {
  margin: 0 0 10px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--charcoal);
}

.table-preview-menu-dishes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.table-preview-menu-dish {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.25);
  font-family: 'Playfair Display', serif;
  font-size: 0.9rem;
  text-align: center;
  color: var(--ink);
}

.table-preview-menu-empty {
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--ink);
  opacity: 0.7;
}

.wayfinding-panel {
  width: 100%;
}

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

.wayfinding-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wayfinding-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wayfinding-field label {
  font-size: 0.7rem;
  color: var(--sage-deep);
}

.wayfinding-field select {
  font-size: 0.85rem;
  padding: 7px 10px;
}

.wayfinding-arrow-sep {
  margin-top: 16px;
  color: var(--gold-deep);
  font-size: 1.1rem;
}

.wayfinding-map {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 100 / 68;
  margin: 0 auto;
  background: var(--sage-light);
  border: 1px solid rgba(176, 141, 79, 0.3);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.wayfinding-marker {
  position: absolute;
  z-index: 1;
}

/* The route line's start/end points are computed in JS to land exactly on
   the marker's (left, top) anchor — so the icon/shape must be centered on
   that same anchor directly, via their own transform. Previously the whole
   icon+label stack was centered as one flex column, which silently shifted
   the icon away from the anchor whenever the label was visible (active
   markers only), making the line appear to touch the icon off-center. The
   label is now positioned independently below the icon so it can never
   affect where the icon itself sits. */
.wayfinding-marker-shape {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--sage-deep);
}

.wayfinding-marker-table.rectangle .wayfinding-marker-shape {
  width: 22px;
  height: 13px;
  border-radius: 3px;
}

.wayfinding-marker-table.rectangle.rotated .wayfinding-marker-shape {
  width: 13px;
  height: 22px;
}

.wayfinding-marker-icon {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  color: var(--sage-deep);
}

.wayfinding-marker-icon svg {
  width: 17px;
  height: 17px;
}

/* Only the active from/to markers get an inline label (see the override
   below) — with every landmark/table labeled at once, text overlapped as
   soon as two points were close together. Everything else is identified
   via the legend underneath the map instead. Positioned independently of
   the icon/shape (see comment on .wayfinding-marker-shape above) so it
   never shifts the anchor the route line attaches to. */
.wayfinding-marker-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, 13px);
  display: none;
  font-family: var(--guest-font-body);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 0 3px var(--sage-light), 0 0 3px var(--sage-light), 0 0 3px var(--sage-light);
}

.wayfinding-marker.active-from .wayfinding-marker-label,
.wayfinding-marker.active-to .wayfinding-marker-label {
  display: block;
}

.wayfinding-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  margin: 14px auto 0;
  max-width: 440px;
}

.wayfinding-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--guest-font-body);
  font-size: 0.74rem;
  color: var(--charcoal);
}

.wayfinding-legend-icon {
  display: inline-flex;
  color: var(--sage-deep);
}

.wayfinding-legend-icon svg {
  width: 14px;
  height: 14px;
}

.wayfinding-legend-shape {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--sage-deep);
}

.wayfinding-marker.active-from .wayfinding-marker-shape,
.wayfinding-marker.active-from .wayfinding-marker-icon {
  color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(95, 107, 83, 0.3);
}

.wayfinding-marker.active-from .wayfinding-marker-shape {
  box-shadow: 0 0 0 3px rgba(95, 107, 83, 0.3);
}

.wayfinding-marker.active-to .wayfinding-marker-shape {
  background: var(--gold);
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(176, 141, 79, 0.35);
}

.wayfinding-marker.active-to .wayfinding-marker-icon {
  color: var(--gold-deep);
}

.wayfinding-arrow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wayfinding-arrow-line {
  fill: none;
  stroke: #8a6d3c;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.unassigned-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unassigned-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid rgba(176, 141, 79, 0.18);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(138, 109, 60, 0.06);
}

.unassigned-row select {
  width: auto;
  flex: 0 0 auto;
}

.modal-panel-wide {
  max-width: 460px;
  text-align: left;
}

.modal-panel-wide h3 {
  text-align: left;
}

.table-modal {
  padding: 38px 22px 20px;
}

.table-modal > .field {
  margin-bottom: 16px;
}

.table-modal > .field:last-child {
  margin-bottom: 0;
}

.table-modal-top-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.table-modal-top-row .field {
  flex: 1;
  margin-bottom: 0;
}

.table-name-field input {
  height: 38px;
}

.table-label-input {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  background: var(--sage-light);
}

.table-modal-top-row .icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
}

.table-modal-divider {
  height: 1px;
  margin: 10px 0;
  background: rgba(176, 141, 79, 0.2);
}

.table-modal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
}

.table-modal-row .field {
  margin-bottom: 0;
}

.guest-modal-panel {
  max-width: 400px;
  text-align: left;
  padding: 28px 24px;
}

.guest-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

.guest-modal-avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-light);
  color: var(--gold-deep);
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.guest-modal-name-input {
  width: auto;
  max-width: 100%;
  height: auto;
  border: 1px solid transparent;
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.guest-modal-name-input:hover {
  background: var(--sage-light);
}

.guest-modal-name-input:focus {
  background: var(--sage-light);
  border-color: transparent;
  box-shadow: none;
}

.guest-modal-rsvp-group {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.guest-modal-rsvp-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 4px;
  height: auto;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  color: var(--sage-deep);
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  box-shadow: none;
}

.guest-modal-rsvp-btn:hover {
  filter: none;
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--sage-deep) 12%, var(--sage-light));
}

.guest-modal-rsvp-btn.active[data-rsvp="pending"] {
  background: #fdf3d6;
  color: #92750c;
  border-color: #92750c;
}

.guest-modal-rsvp-btn.active[data-rsvp="confirmed"] {
  background: #ddf3e3;
  color: #2f7a4d;
  border-color: #2f7a4d;
}

.guest-modal-rsvp-btn.active[data-rsvp="declined"] {
  background: #fbdfdf;
  color: var(--error);
  border-color: var(--error);
}

.guest-modal-field {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.guest-modal-field .field {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.guest-modal-field .field select {
  text-overflow: ellipsis;
}

.guest-modal-field-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage-deep);
}

.guest-modal-row-2col {
  display: flex;
  gap: 14px;
}

.guest-modal-row-2col .guest-modal-field {
  flex: 1;
  min-width: 0;
}

.guest-modal-delete-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  height: auto;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--error);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
}

.guest-modal-delete-link:hover {
  filter: none;
  transform: none;
  box-shadow: none;
  background: #fbdfdf;
}

.contact-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-modal-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--sage-light);
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease;
}

.contact-modal-action:hover {
  background: color-mix(in srgb, var(--gold) 16%, var(--sage-light));
}

.contact-modal-action-open {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.contact-modal-action-copy {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--sage-deep);
  box-shadow: none;
}

.contact-modal-action-copy:hover {
  filter: none;
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--gold) 18%, var(--paper));
}

.contact-modal-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--sage-deep);
}

.contact-modal-action-icon-whatsapp {
  color: #25d366;
  background: rgba(37, 211, 102, 0.14);
}

.contact-modal-action-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.contact-modal-action-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.contact-modal-action-value {
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


/* Shape picker always takes the full row width (3 options no longer fit
   side-by-side with the seats stepper since "Table des mariés" is long). */
.table-modal-row .field:first-child {
  flex: 1 1 100%;
}

.table-modal-row .field:last-child {
  flex: 0 0 auto;
}

.shape-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shape-picker {
  display: flex;
  flex: 1;
  gap: 6px;
}

.table-rotate-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
}

.table-rotate-btn[hidden] {
  display: none;
}

.shape-option {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 6px;
  border: 1.5px solid rgba(176, 141, 79, 0.25);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--sage-deep);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.shape-option input[type='radio'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.shape-option:hover {
  border-color: var(--gold);
}

.shape-option:has(input:checked) {
  border-color: var(--gold-deep);
  background: var(--sage-light);
  color: var(--charcoal);
}

.shape-option-icon {
  flex: 0 0 auto;
  border: 2px solid var(--sage-deep);
  background: var(--paper);
  transition: border-color 0.15s ease;
}

.shape-option-icon-round {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.shape-option-icon-rectangle {
  width: 20px;
  height: 13px;
  border-radius: 3px;
}

.shape-option-icon-head {
  width: 28px;
  height: 10px;
  border-radius: 3px;
  background: repeating-linear-gradient(
    -45deg,
    currentColor 0px,
    currentColor 2px,
    transparent 2px,
    transparent 5px
  );
  opacity: 0.5;
}

.shape-option:has(input:checked) .shape-option-icon {
  border-color: var(--gold-deep);
}

.seats-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.seats-stepper .icon-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.seats-stepper input {
  width: 44px;
  height: 38px;
  padding: 0 4px;
  text-align: center;
  flex: 0 0 auto;
}

.table-modal-guests-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.table-modal-subtitle {
  margin-bottom: 0;
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--charcoal);
}

.table-modal-guest-count {
  flex: 0 0 auto;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  color: var(--sage-deep);
  font-size: 0.74rem;
  font-weight: 700;
}

.table-modal-guest-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 130px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.table-modal-guest-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--sage-light);
  border-radius: var(--radius-sm);
}

.table-modal-guest-row .guest-row-name {
  flex: 1;
  font-size: 0.86rem;
}

.table-modal-guest-row select {
  width: 72px;
  height: 32px;
  padding: 0 8px;
  flex: 0 0 auto;
}

.table-modal-guest-row .icon-btn {
  width: 28px;
  height: 28px;
}

.table-modal-add {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-modal-add select,
.table-modal-add input {
  flex: 1;
  height: 42px;
}

.table-modal-add button {
  flex: 0 0 auto;
}

.table-modal-add .icon-btn {
  width: 42px;
  height: 42px;
}

@media (max-width: 600px) {
  .page {
    padding: 64px 14px 56px;
  }

  .card {
    padding: 20px;
  }

  header.hero {
    padding: 12px 8px;
  }

  header.hero.invite-hero {
    padding: 90px 16px 16px;
  }

  header.hero h1 {
    font-size: 1.7rem;
  }

  .script-word {
    font-size: 2.4rem;
  }

  /* Mirrors the dropup pattern already used on tableme.app's landing page:
     pinned to the bottom-right instead of the top (out of the way of
     page headers/banners), with the menu opening upward so it doesn't run
     off the bottom of a short viewport. */
  .lang-switcher-mount {
    top: auto;
    bottom: 12px;
    right: 12px;
  }

  /* Several attempts at tuning this shadow's size/direction all still
     produced a visible hard-edged smear on real mobile browsers (most
     likely interacting with the address bar collapsing/expanding on tap,
     which we can't reproduce or control from CSS) — dropping the shadow
     entirely on mobile sidesteps the whole problem. The tint + border
     already carry the "this is a button" visual weight on their own. */
  .lang-switcher-menu {
    top: auto;
    bottom: calc(100% + 8px);
    box-shadow: none;
  }

  body.admin-theme .lang-switcher-menu {
    box-shadow: none;
  }

  .lang-switcher-current {
    display: none;
  }

  .lang-switcher-current-short {
    display: inline;
  }

  /* Text-only + a faint border was easy to miss as a tappable control on a
     small screen — a stronger tint plus the globe icon makes it read as a
     "change language" button at a glance, not just a label. */
  .lang-switcher-trigger {
    padding: 7px 12px;
    font-size: 0.7rem;
    background: var(--gold-light);
    border-color: var(--gold);
    box-shadow: none;
  }

  .lang-switcher-icon svg {
    width: 16px;
    height: 16px;
  }

  .table-preview-switch .mode-btn {
    padding: 0 9px;
    font-size: 0.68rem;
  }

  .wedding-item .actions,
  .table-group .actions {
    width: 100%;
    max-width: none;
    flex-wrap: wrap;
  }

  .wedding-item .info strong {
    font-size: 1rem;
  }

  .guest-row {
    padding: 10px 12px;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .guest-row-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  /* On mobile there's no room for a full text pill next to the guest's
     name (that's what made the name itself get squeezed to zero width) —
     the menu select collapses to a small round icon button instead. The
     <select> itself stays functionally in place (full native dropdown
     with real text options) but is rendered invisible, sized to match its
     icon overlay, so tapping the icon opens the real picker. The rsvp
     control is already icon-only on every screen size, so it needs no
     mobile-specific override here. */
  .guest-menu-edit-wrap {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--sage-light);
  }

  .guest-menu-edit-wrap select {
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    font-size: 0;
    color: transparent;
    background: transparent;
  }

  /* Same fix as .guest-rsvp-edit-wrap select option above — without this,
     the dropdown's own popup list (not just the closed circle) inherits
     font-size:0 and renders blank on Windows Chrome. */
  .guest-menu-edit-wrap select option {
    font-size: 1rem;
    color: initial;
  }

  .guest-menu-edit-wrap .guest-row-mobile-icon {
    display: flex;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: var(--sage-deep);
    opacity: 0.4;
  }

  .guest-menu-edit-wrap[data-has-menu="1"] .guest-row-mobile-icon {
    opacity: 1;
  }

  .guest-row-more-field .guest-table-edit {
    width: 56px;
  }

  .guest-row .icon-btn {
    width: 28px;
    height: 28px;
  }

  .drag-handle {
    min-width: 22px;
    min-height: 28px;
  }

  nav.admin-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .floor-canvas-viewport {
    height: 70vh;
    min-height: 360px;
  }

  .modal-panel-wide {
    max-width: 100%;
  }

  .table-modal-row {
    flex-direction: column;
    gap: 10px;
  }

  .floor-plan-card.fullscreen-active .card-header-row {
    top: 8px;
    left: 8px;
    max-width: calc(100vw - 16px);
  }

  .floor-plan-card.fullscreen-active .floor-plan-toolbar {
    border-radius: var(--radius-pill);
    gap: 6px;
    padding: 4px;
    flex-wrap: nowrap;
  }

  .floor-plan-card.fullscreen-active .floor-canvas-sizer {
    margin-top: 64px;
  }

  .floor-plan-card.fullscreen-active .zoom-controls .icon-btn {
    width: 24px;
    height: 24px;
  }

  .floor-plan-card.fullscreen-active .zoom-reset-btn {
    min-width: 32px;
    font-size: 0.66rem;
    padding: 2px;
  }

  .floor-plan-card.fullscreen-active #fullscreen-btn,
  .floor-plan-card.fullscreen-active #add-landmark-btn,
  .floor-plan-card.fullscreen-active #add-table-btn {
    width: 30px;
    height: 30px;
    padding: 0;
  }

  .floor-plan-card.fullscreen-active .btn-label {
    display: none;
  }
}

/* Admin theme: repurposes the shared --gold/--sage slots as a violet (primary) +
   sky-blue (secondary) accent duo for admin.html/wedding-admin.html/etc., scoped
   via body.admin-theme so the guest-facing pages keep their wedding styling. */
body.admin-theme {
  --gold: #1aafaa;
  --gold-deep: #0e7c78;
  --gold-light: #dff6f5;
  /* Repurposed as a neutral gray (not the orange "peach" it used to be) —
     mariages.net's UI has exactly one accent color (its red, our teal); every
     "secondary"/muted role across the admin theme borrows --sage for that,
     so retargeting these three tokens removes peach everywhere in one place
     instead of hunting down each of its ~70 consumers individually. */
  --sage: #8a93a3;
  --sage-deep: #586273;
  --sage-light: #eef1f4;
  --ink: #6b7280;
  --charcoal: #2c4363;
  --cream: #f0f4f6;
  --paper: #ffffff;
  --accent-teal: #2e3a59;
  --accent-teal-deep: #1b2440;
  --accent-teal-light: #e7e9f0;
  /* mariages.net-inspired tokens: soft lavender banner backdrop + a softer
     dual-layer card elevation, layered on top of the teal accent above
     instead of swapping it out. */
  --admin-banner: #eef1fb;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

/* Admin theme uses Inter instead of the guest theme's wedding-style Playfair
   Display serif — !important since Playfair is hardcoded on many unscoped
   selectors (h1/h3/.modal-panel h3/etc.) throughout this file. Inter (not
   Lato) specifically because Lato's diacritic glyphs (ă, â, î, ș, ț) render
   with a detached/misplaced breve mark — Inter is built for broad Unicode
   coverage and renders Romanian diacritics correctly. */
body.admin-theme,
body.admin-theme * {
  font-family: 'Inter', sans-serif !important;
}

/* Font-picker buttons preview the actual font they offer, so the blanket
   Inter override above must not apply to them. The family is passed in via
   a custom property (set inline per-button in theme-settings.js) rather
   than a plain inline font-family, since only a custom property can win
   against the equally-`!important`, higher-specificity rule above. */
body.admin-theme .theme-font-option {
  font-family: var(--font-preview) !important;
}

body.admin-theme header.hero::before,
body.admin-theme header.hero::after {
  display: none;
}

body.admin-theme header.hero p:not(.eyebrow) {
  color: var(--gold);
}

body.admin-theme .divider span::after {
  content: '';
}

body.admin-theme .card {
  background: var(--paper);
  border-color: transparent;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--card-shadow);
}

body.admin-theme .card::before {
  display: none;
}

body.admin-theme input,
body.admin-theme select,
body.admin-theme textarea {
  background: var(--paper);
  border: 1px solid #e2e5ea;
  box-shadow: none;
}

body.admin-theme input:focus,
body.admin-theme select:focus,
body.admin-theme textarea:focus {
  border-color: transparent;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold-deep) 15%, transparent);
}

body.admin-theme button:not([class]) {
  background: var(--gold-deep);
  box-shadow: 0 4px 10px color-mix(in srgb, var(--gold-deep) 28%, transparent);
}

body.admin-theme button:not([class]):hover {
  background: color-mix(in srgb, var(--gold-deep) 85%, black);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--gold-deep) 38%, transparent);
  filter: none;
}

body.admin-theme button.secondary,
body.admin-theme a.secondary {
  text-decoration: none;
}

body.admin-theme .icon-btn {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body.admin-theme .mode-btn.active,
body.admin-theme .view-switch-tab.active {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

body.admin-theme .view-switch-tab {
  color: var(--charcoal);
}

body.admin-theme .file-dropzone {
  border-color: color-mix(in srgb, var(--gold) 35%, transparent);
}

body.admin-theme .table-guest-list {
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}

body.admin-theme .guest-row {
  border-color: color-mix(in srgb, var(--gold) 18%, transparent);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

body.admin-theme .guest-row:hover {
  background: color-mix(in srgb, var(--gold) 6%, var(--paper));
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

body.admin-theme .guest-row.dragging {
  background: color-mix(in srgb, var(--gold) 6%, var(--paper));
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.15);
}

body.admin-theme .guest-row-empty {
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
}

/* The generic "body.admin-theme select" rule above (white paper background +
   grey border) otherwise outranks the menu/rsvp pill colors declared earlier
   in this file (same .class specificity, but plain "select" adds an extra
   element to the selector) and paints right over them. */
body.admin-theme .guest-menu-edit {
  background: var(--sage-light);
  border-color: transparent;
}

body.admin-theme .guest-rsvp-edit-wrap select,
body.admin-theme .guest-menu-edit-wrap select {
  background: transparent;
  border: none;
}

body.admin-theme .wedding-item {
  background: var(--paper);
  border: 1px solid #eef0f3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.admin-theme .wedding-item:hover {
  background: color-mix(in srgb, var(--gold) 6%, var(--paper));
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}

body.admin-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.5);
}

body.admin-theme .modal-panel:not(.photo-lightbox-panel) {
  background: var(--paper);
  border-color: transparent;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow), 0 14px 40px rgba(15, 23, 42, 0.18);
}

body.admin-theme .lang-switcher-trigger {
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

body.admin-theme .lang-switcher-menu {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.15);
}

body.admin-theme .lang-switcher-chevron,
body.admin-theme .lang-switcher-option,
body.admin-theme .lang-switcher-option[aria-selected='true'],
body.admin-theme .lang-switcher-option .check {
  color: var(--charcoal);
}

body.admin-theme select.mini-lang-select,
body.admin-theme .modal-close,
body.admin-theme .partner-icon-option:not(.active),
body.admin-theme .bulk-add-feedback,
body.admin-theme .table-shape-count,
body.admin-theme .landmark-picker-option svg,
body.admin-theme .shape-option,
body.admin-theme .table-modal-guest-count,
body.admin-theme .theme-color-field label {
  color: var(--charcoal);
}

body.admin-theme .muted,
body.admin-theme .table-group-count,
body.admin-theme .table-guest-list-empty,
body.admin-theme .guest-row-empty,
body.admin-theme .empty-state {
  color: var(--charcoal);
}

body.admin-theme nav.admin-nav a,
body.admin-theme .admin-tools-label,
body.admin-theme .field label,
body.admin-theme .mode-btn,
body.admin-theme .icon-btn:not(.icon-btn-danger),
body.admin-theme .lang-switcher-trigger {
  color: var(--charcoal);
}

/* Mode-switch icons (Un par un / Plusieurs / Fichier) get their own pastel
   hue, same idea as the tool-tile badges — the icon glyph itself recolors
   via currentColor regardless of the button's active/inactive text color. */
body.admin-theme .mode-btn[data-mode='single'] svg {
  color: #c2487a;
}

body.admin-theme .mode-btn[data-mode='bulk'] svg {
  color: #3f66b3;
}

body.admin-theme .mode-btn[data-mode='file'] svg {
  color: #2f8a5c;
}

body.admin-theme button.secondary,
body.admin-theme a.secondary {
  color: var(--gold-deep);
  border-color: var(--gold-deep);
}

body.admin-theme button.secondary:hover,
body.admin-theme a.secondary:hover {
  background: var(--gold-light);
  color: var(--gold-deep);
}

/* Floor-plan canvas: the --gold/--sage variables above already neutralize most of this,
   but a few shadows/borders use hardcoded warm-tinted rgba() values. */
body.admin-theme .landmark-picker {
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

body.admin-theme .landmark-shape.dragging-landmark {
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
}

body.admin-theme .zoom-controls {
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
}

body.admin-theme .zoom-reset-btn {
  color: var(--charcoal);
}

body.admin-theme .floor-plan-card.fullscreen-active .floor-plan-toolbar {
  background: rgba(248, 250, 252, 0.94);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

body.admin-theme .floor-canvas-viewport {
  border-color: color-mix(in srgb, var(--gold) 25%, transparent);
}

body.admin-theme .floor-canvas {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--gold) 18%, transparent) 1px, transparent 1px);
}

body.admin-theme .floor-plan-card.fullscreen-active .floor-canvas-viewport {
  background-image: radial-gradient(circle, color-mix(in srgb, var(--gold) 18%, transparent) 1px, transparent 1px);
}

body.admin-theme .chair.chair-you {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-deep) 40%, transparent);
}

body.admin-theme .table-shape {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
}

body.admin-theme .table-shape:hover {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.16);
}

body.admin-theme .table-shape.dragging-table {
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
}

body.admin-theme .unassigned-row {
  border-color: color-mix(in srgb, var(--gold) 18%, transparent);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

body.admin-theme .table-modal-divider {
  background: color-mix(in srgb, var(--gold) 20%, transparent);
}

body.admin-theme .shape-option {
  border-color: color-mix(in srgb, var(--gold) 25%, transparent);
}

/* mariages.net-inspired restyle: nav bar as a white card-like strip, a soft
   icon badge on each tool tile instead of a big bleeding watermark icon,
   a pale banner backdrop behind the countdown, and editorial serif headings
   against the otherwise clean sans-serif UI — accent color stays teal. */
body.admin-theme nav.admin-nav {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--card-shadow);
}

/* The nav turning into its own card (above) left the page's original
   56px top padding looking like dead space above it — :not(.poster-page)
   keeps poster.html's (and invitation.html's) own already-tuned 24px
   override untouched. */
body.admin-theme .page:not(.poster-page):not(.invitation-page) {
  padding-top: 28px;
}

/* On wedding-admin.html/floor-plan.html, the countdown sits inline as a
   middle flex item of nav.admin-nav itself (name -- countdown -- actions),
   instead of stacking below it — this keeps the whole header a single thin
   row/banner rather than a taller two-row card. poster.html/partenaires.html
   don't have a countdown, so their nav.admin-nav is unaffected. */
body.admin-theme .admin-nav-actions .admin-nav-chip {
  background: transparent;
  color: var(--gold-deep);
}

body.admin-theme .admin-nav-actions .admin-nav-chip:hover {
  background: var(--gold-light);
  color: var(--gold-deep);
  box-shadow: none;
}

body.admin-theme .admin-nav-actions .admin-nav-chip.is-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

body.admin-theme nav.admin-nav .wedding-countdown {
  margin-bottom: 0;
}

body.admin-theme .wedding-countdown-units {
  gap: 8px;
}

/* Chips get a neutral gray fill (not white) so they stay visible against
   the white nav bar instead of disappearing into it. */
body.admin-theme .wedding-countdown-unit {
  min-width: 42px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #f4f5f7;
}

body.admin-theme .wedding-countdown-value {
  font-size: 1rem;
}

body.admin-theme .wedding-countdown-label {
  font-size: 0.55rem;
}

/* No room for a full caption sentence inline in the nav row — the numbers
   alone are self-explanatory next to the wedding name. */
body.admin-theme nav.admin-nav .wedding-countdown-caption {
  display: none;
}

body.admin-theme .admin-tool-tile {
  background: var(--paper);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius);
  color: var(--charcoal);
}

body.admin-theme .admin-tool-tile:hover {
  box-shadow: var(--card-shadow), 0 4px 10px color-mix(in srgb, var(--gold-deep) 18%, transparent);
}

body.admin-theme .admin-tool-tile.is-disabled:hover {
  box-shadow: var(--card-shadow);
}

body.admin-theme .admin-tool-tile-icon {
  position: static;
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--gold-deep);
}

body.admin-theme .admin-tool-tile-icon svg {
  width: 20px;
  height: 20px;
}

body.admin-theme .admin-tool-tile-label {
  color: var(--charcoal);
}

body.admin-theme .admin-tool-tile-desc {
  color: var(--ink);
}

body.admin-theme .admin-tool-tile-badge {
  color: var(--gold-deep);
  background: var(--gold-light);
}

/* Each tool tile gets its own pastel hue (hardcoded, not routed through
   --sage/--accent-teal, so a future token change can't silently flatten
   these back to gray again) — mariages.net scatters a few soft colors
   across its dashboard icons instead of using one accent everywhere. */
body.admin-theme #theme-settings-btn .admin-tool-tile-icon {
  background: #fde2ec;
  color: #c2487a;
}

body.admin-theme .admin-tool-tile.tile-accent-blue .admin-tool-tile-icon {
  background: #e3edfd;
  color: #3f66b3;
}

body.admin-theme .admin-tool-tile.tile-accent-teal .admin-tool-tile-icon {
  background: #e1f5ea;
  color: #2f8a5c;
}

body.admin-theme #poster-tile .admin-tool-tile-icon {
  background: #ede3fb;
  color: #7c52b3;
}

body.admin-theme .view-switch,
body.admin-theme .mode-switch {
  background: #eef1f4;
}

body.admin-theme h1,
body.admin-theme h2,
body.admin-theme h3 {
  font-family: 'Playfair Display', serif !important;
}

/* Guest theme: index.html reads colors from the --guest-* variables (set above, and
   overridden per-wedding at runtime by js/guest.js) instead of the shared --gold/--sage scheme. */
body.guest-theme {
  color: var(--guest-text);
  font-family: var(--guest-font-body);
}

body.guest-theme input,
body.guest-theme select,
body.guest-theme button,
body.guest-theme a.secondary,
body.guest-theme .lang-switcher-trigger,
body.guest-theme .lang-switcher-option,
body.guest-theme .chair-tooltip,
body.guest-theme .chair-initials {
  font-family: var(--guest-font-body);
}

body.guest-theme header.hero h1,
body.guest-theme header.hero p:not(.eyebrow) {
  font-family: var(--guest-font-title);
}

body.guest-theme .muted,
body.guest-theme .empty-state {
  color: var(--guest-text);
  opacity: 0.75;
}

body.guest-theme .card {
  background: var(--guest-card-bg);
  border-color: var(--guest-input-border);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.06);
}

body.guest-theme .card::before {
  border-color: rgba(0, 0, 0, 0.06);
}

body.guest-theme input,
body.guest-theme select {
  background: var(--guest-input-bg);
  color: var(--guest-input-text);
  border-color: var(--guest-input-border);
}

body.guest-theme input::placeholder {
  color: var(--guest-input-text);
  opacity: 0.45;
}

body.guest-theme input:focus,
body.guest-theme select:focus {
  border-color: var(--guest-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--guest-accent) 16%, transparent);
}

body.guest-theme .search-field .search-icon {
  color: var(--guest-accent);
}

body.guest-theme .icon-btn.search-clear-btn {
  background: var(--guest-card-bg);
  color: var(--guest-accent);
  border-color: var(--guest-input-border);
}

body.guest-theme .mode-switch {
  background: var(--guest-input-bg);
}

body.guest-theme .mode-btn {
  color: var(--guest-text);
}

body.guest-theme .mode-btn.active {
  background: var(--guest-card-bg);
  color: var(--guest-title);
}

.script-word {
  color: var(--guest-title);
}

.title-heart {
  color: var(--guest-accent);
}

.result .table-number {
  border-color: var(--guest-input-border);
  background: var(--guest-input-bg);
}

.result .guest-name {
  color: var(--guest-text);
  font-family: var(--guest-font-title);
}

.result .table-sep {
  background: var(--guest-input-border);
}

.result .table-label {
  color: var(--guest-text);
  opacity: 0.7;
}

.result .table-value {
  color: var(--guest-accent);
  font-family: var(--guest-font-title);
}

.guest-match {
  background: var(--guest-card-bg);
  border-color: var(--guest-input-border);
}

.guest-match .match-table {
  color: var(--guest-accent);
}

.guest-match:hover {
  background: var(--guest-input-bg);
}

.error-msg {
  color: var(--guest-text);
  font-family: var(--guest-font-body);
}

.rsvp-greeting {
  margin-bottom: 4px;
  font-family: var(--guest-font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--guest-title);
}

.rsvp-choice-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.rsvp-choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: auto;
  padding: 12px 16px;
  background: var(--guest-input-bg);
  color: var(--guest-text);
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--guest-font-body);
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  box-shadow: none;
}

.rsvp-choice-btn:hover {
  filter: none;
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--guest-accent) 14%, var(--guest-input-bg));
}

.rsvp-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--guest-card-bg);
  color: var(--guest-text);
  opacity: 0.6;
}

.rsvp-choice-btn.active[data-rsvp="confirmed"] {
  background: #ddf3e3;
  color: #2f7a4d;
  border-color: #2f7a4d;
}

.rsvp-choice-btn.active[data-rsvp="confirmed"] .rsvp-choice-icon {
  background: #fff;
  color: #2f7a4d;
  opacity: 1;
}

.rsvp-choice-btn.active[data-rsvp="declined"] {
  background: #fbdfdf;
  color: #b3433f;
  border-color: #b3433f;
}

.rsvp-choice-btn.active[data-rsvp="declined"] .rsvp-choice-icon {
  background: #fff;
  color: #b3433f;
  opacity: 1;
}

.rsvp-choice-btn.active[data-rsvp="pending"] {
  background: #fdf3d6;
  color: #92750c;
  border-color: #92750c;
}

.rsvp-choice-btn.active[data-rsvp="pending"] .rsvp-choice-icon {
  background: #fff;
  color: #92750c;
  opacity: 1;
}

.rsvp-thanks {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--guest-input-bg);
  color: var(--guest-text);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.table-preview {
  border-top-color: color-mix(in srgb, var(--guest-text) 15%, transparent);
}

.table-preview-title {
  color: var(--guest-text);
  font-family: var(--guest-font-title);
}

.table-preview-canvas {
  background: var(--guest-canvas-bg);
  border-radius: var(--radius-sm);
}

.table-preview-canvas .table-shape {
  background: var(--guest-card-bg);
  border-color: var(--guest-table-color);
}

.table-preview-canvas .table-shape-label,
.table-preview-canvas .table-shape-count {
  color: var(--guest-text);
}

.table-preview-canvas .table-shape-label {
  font-family: var(--guest-font-title);
}

.table-preview-canvas .chair {
  background: var(--guest-card-bg);
  border-color: var(--guest-chair-color);
}

.table-preview-canvas .chair.occupied {
  background: var(--guest-accent);
  border-color: var(--guest-accent);
}

.table-preview-canvas .chair.chair-you {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--guest-accent) 45%, transparent);
}

.table-preview-canvas .chair-initials {
  color: var(--guest-card-bg);
}

.table-preview-switch.mode-switch {
  background: var(--guest-input-bg);
}

.table-preview-name {
  background: var(--guest-card-bg);
  border-color: var(--guest-input-border);
  color: var(--guest-text);
  font-family: var(--guest-font-title);
}

.table-preview-name.you {
  background: var(--guest-input-bg);
  border-color: var(--guest-accent);
  color: var(--guest-text);
}

.table-preview-menu-title {
  color: var(--guest-text);
  font-family: var(--guest-font-title);
}

.table-preview-menu-dish {
  background: var(--guest-card-bg);
  border-color: var(--guest-input-border);
  color: var(--guest-text);
  font-family: var(--guest-font-title);
}

.table-preview-menu-empty {
  color: var(--guest-text);
}

.chair-tooltip {
  background: var(--guest-text);
  color: var(--guest-card-bg);
}

.wayfinding-field label {
  color: var(--guest-text);
  opacity: 0.75;
}

.wayfinding-map {
  background: var(--guest-canvas-bg);
}

.wayfinding-marker-shape {
  background: var(--guest-card-bg);
  border-color: var(--guest-chair-color);
}

.wayfinding-marker-icon {
  color: var(--guest-chair-color);
}

.wayfinding-marker-label {
  color: var(--guest-text);
}

.wayfinding-legend-item {
  color: var(--guest-text);
  font-family: var(--guest-font-body);
}

.wayfinding-legend-icon {
  color: var(--guest-chair-color);
}

.wayfinding-legend-shape {
  background: var(--guest-card-bg);
  border-color: var(--guest-chair-color);
}

.wayfinding-marker.active-from .wayfinding-marker-shape,
.wayfinding-marker.active-from .wayfinding-marker-icon {
  color: var(--guest-table-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--guest-table-color) 35%, transparent);
}

.wayfinding-marker.active-to .wayfinding-marker-shape {
  background: var(--guest-accent);
  border-color: var(--guest-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--guest-accent) 35%, transparent);
}

.wayfinding-marker.active-to .wayfinding-marker-icon {
  color: var(--guest-accent);
}

.wayfinding-arrow-line {
  stroke: var(--guest-accent);
}
