/* Tap2Open Stylesheet - British spelling, mobile-first */
:root {
  --brand-navy: #14213D;
  --brand-navy-dark: #0b1323;
  --brand-yellow: #FFD60A;
  --brand-white: #FFFFFF;
  --brand-gray-light: #F0F2F5;
  --brand-gray-muted: #8E9AAF;
  
  --font-display: 'Anton', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-ui: 'Oswald', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--brand-navy-dark);
  color: var(--brand-white);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--brand-navy-dark);
  color: var(--brand-white);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at 50% 30%, #151122 0%, #0b0912 60%, #050408 100%);
    display: flex;
    justify-content: center;
  }
}

.app-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background-color: var(--brand-navy);
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.75);
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .app-container {
    max-width: 500px;
    border-left: 1px solid rgba(255, 214, 10, 0.15);
    border-right: 1px solid rgba(255, 214, 10, 0.15);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.85), 0 0 15px rgba(255, 214, 10, 0.05);
  }
}

/* STAGES */
.stage {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.stage.active {
  display: block;
}

/* 1. FILM STAGE - Responsive auto-adjustment */
#film-stage {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background-color: #06050a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px; /* Locks 9:16 portrait on laptop/desktop so vertical video never crops! */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

@media (max-width: 600px) {
  .video-wrapper {
    max-width: 100%;
  }
}

#intro-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 600px) {
  #intro-video {
    object-fit: cover;
  }
}

.video-overlay-controls {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  z-index: 10;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sound {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-sound.unmuted {
  background-color: var(--brand-yellow);
  color: var(--brand-navy);
}

.btn-skip {
  background-color: rgba(0, 0, 0, 0.6);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 2. ENVELOPE STAGE - Luxurious Magical Experience */
#envelope-stage {
  padding: 40px 16px;
  background: radial-gradient(circle at 50% 45%, #181124 0%, #0d0914 60%, #06040a 100%);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#envelope-stage.active {
  display: flex;
}

.envelope-scene {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 900px;
  position: relative;
}

/* Ambient breathing aura */
.envelope-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 320px;
  background: radial-gradient(ellipse at center, rgba(255, 214, 10, 0.22) 0%, rgba(147, 51, 234, 0.14) 45%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: auraBreathe 4s ease-in-out infinite alternate;
}

@keyframes auraBreathe {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.95; }
}

/* Floating magical embers */
.envelope-embers {
  position: absolute;
  inset: -60px -20px -20px -20px;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: 0;
  left: var(--l, 50%);
  width: var(--s, 3px);
  height: var(--s, 3px);
  background: #FFD60A;
  border-radius: 50%;
  box-shadow: 0 0 6px #FFA000, 0 0 12px #FFD60A;
  opacity: 0;
  animation: floatEmber 3.8s infinite ease-in;
  animation-delay: var(--d, 0s);
}

@keyframes floatEmber {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  20% {
    opacity: 0.95;
  }
  80% {
    opacity: 0.85;
  }
  100% {
    transform: translateY(-290px) scale(0.2);
    opacity: 0;
  }
}

.envelope-hint {
  font-family: 'Cinzel', var(--font-ui), serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--brand-yellow);
  text-shadow: 0 0 10px rgba(255, 214, 10, 0.5);
  margin-bottom: 24px;
  text-align: center;
  animation: pulseHint 2.4s infinite ease-in-out;
  z-index: 2;
}

@keyframes pulseHint {
  0%, 100% { opacity: 0.8; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

/* Luxurious envelope wrapper */
.envelope-wrapper {
  position: relative;
  width: 100%;
  height: 245px;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 25px rgba(255, 214, 10, 0.15);
  z-index: 2;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #1f142b 0%, #110b17 70%, #060408 100%);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 214, 10, 0.35);
  box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.95);
  z-index: 1;
}

/* Ornate Corner Filigree Flourishes */
.gold-corner-svg {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 5;
}
.corner-tl { top: 6px; left: 6px; }
.corner-tr { top: 6px; right: 6px; transform: scaleX(-1); }
.corner-bl { bottom: 6px; left: 6px; transform: scaleY(-1); }
.corner-br { bottom: 6px; right: 6px; transform: scale(-1, -1); }

.envelope-card-peek {
  position: absolute;
  top: 25px;
  left: 18px;
  right: 18px;
  height: 205px;
  background: linear-gradient(170deg, #1f142c 0%, #140d1e 100%);
  border: 2px solid rgba(255, 214, 10, 0.7);
  outline: 1px solid rgba(255, 214, 10, 0.3);
  outline-offset: -5px;
  border-radius: var(--radius-sm);
  padding: 18px;
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 214, 10, 0.15);
}

.peek-eyebrow {
  font-family: 'Cinzel', serif, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--brand-yellow);
  letter-spacing: 2px;
  display: block;
}

.peek-title {
  font-family: 'Anton', 'Oswald', sans-serif;
  font-size: 22px;
  line-height: 1.1;
  color: #ff9e00;
  text-shadow: 0 0 15px rgba(255, 158, 0, 0.5);
  margin-top: 4px;
}

.envelope-front {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: 
    linear-gradient(to top right, rgba(28, 18, 38, 0.98) 50%, transparent 50%),
    linear-gradient(to top left, rgba(20, 13, 28, 0.98) 50%, transparent 50%);
  background-size: 50% 100%;
  background-position: left bottom, right bottom;
  background-repeat: no-repeat;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 214, 10, 0.4);
  box-shadow: inset 0 1px 3px rgba(255, 214, 10, 0.35);
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 125px;
  z-index: 4;
  background: linear-gradient(180deg, #2c1a3e 0%, #1b1026 65%, #0f0817 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  border-top: 1px solid rgba(255, 214, 10, 0.4);
}

.flap-chevron {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.envelope-wrapper.flap-open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

.envelope-wrapper.flap-open .envelope-card-peek {
  opacity: 1;
  visibility: visible;
}

.envelope-wrapper.card-revealed .envelope-card-peek {
  transform: translateY(-135px);
}

/* WAX SEAL */
.wax-seal-container {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 110px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wax-seal-button {
  width: 88px;
  height: 88px;
  border: none;
  background: transparent;
  cursor: pointer;
  outline: none;
  position: relative;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.85)) drop-shadow(0 0 10px rgba(255, 214, 10, 0.25));
}

.seal-graphic {
  width: 100%;
  height: 100%;
  transition: transform 0.15s ease;
}

.wax-seal-button:active .seal-graphic {
  transform: scale(0.94);
}

.wax-seal-container.cracking .seal-graphic {
  filter: brightness(1.25) drop-shadow(0 0 14px #FFD60A);
  animation: sealShake 0.08s infinite alternate;
}

@keyframes sealShake {
  0% { transform: scale(0.96) rotate(-2deg); }
  100% { transform: scale(0.96) rotate(2deg); }
}

.wax-seal-container.cracked {
  opacity: 0;
  transform: translateX(-50%) scale(1.35);
  transition: all 0.4s ease;
  pointer-events: none;
}

/* 3. CARD STAGE */
#card-stage {
  padding: 24px 16px 48px;
  background-color: var(--brand-navy);
}

.card-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-eyebrow {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand-yellow);
}

.card-title {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0.5px;
  color: var(--brand-white);
  margin: 6px 0;
}

.card-subtitle {
  font-size: 15px;
  color: var(--brand-gray-muted);
}

/* COUNTDOWN BAR */
.countdown-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
  background-color: var(--brand-navy-dark);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 214, 10, 0.3);
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.countdown-val {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brand-yellow);
  line-height: 1;
}

.countdown-lbl {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--brand-gray-muted);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* TILES GRID */
.tiles-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tile-card {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile-card.done {
  border-color: var(--brand-yellow);
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tile-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.tile-number {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--brand-yellow);
}

.tile-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--brand-white);
}

.tile-status {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-card.done .tile-status {
  background-color: var(--brand-yellow);
  border-color: var(--brand-yellow);
}

.tile-card.done .tile-status::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: solid var(--brand-navy);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.tile-desc {
  font-size: 14px;
  color: var(--theme-text-muted);
  margin-bottom: 12px;
}

.btn-tile {
  width: 100%;
  background-color: var(--brand-navy-dark);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-tile:hover {
  background-color: var(--brand-navy);
  border-color: var(--brand-yellow);
}

/* DETAILS LIST */
.details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-row {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-row dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand-yellow);
}

.detail-row dd {
  font-size: 15px;
  font-weight: 500;
  color: var(--brand-white);
  margin-top: 2px;
}

/* ACTION BUTTONS */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-secondary {
  background-color: var(--brand-navy-dark);
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  border-color: var(--brand-yellow);
  color: var(--brand-yellow);
}

.btn-outline {
  background-color: transparent;
  color: var(--brand-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* MINI GAME & SCATTERED PUMPKINS */
.mini-game-box {
  margin-top: 12px;
  background-color: var(--brand-navy-dark);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.game-score-num {
  color: var(--brand-yellow);
  font-family: var(--font-display);
  font-size: 18px;
}

.scattered-pumpkins-wrapper {
  position: relative;
  height: 190px;
  width: 100%;
  margin: 10px 0;
  background: radial-gradient(ellipse at center, rgba(35, 20, 50, 0.5) 0%, rgba(10, 16, 30, 0.85) 100%);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255, 214, 10, 0.25);
  overflow: hidden;
}

.pumpkin-target {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: transform 0.25s ease, filter 0.25s ease;
  outline: none;
  display: block;
}

.pumpkin-target.scatter-1 {
  position: absolute;
  top: 16px;
  left: 20px;
}

.pumpkin-target.scatter-2 {
  position: absolute;
  top: 70px;
  right: 28px;
}

.pumpkin-target.scatter-3 {
  position: absolute;
  bottom: 16px;
  left: 38%;
}

.pumpkin-art {
  width: 54px;
  height: 50px;
  display: block;
}

.pumpkin-art.lit {
  display: none;
}

.pumpkin-target.found .pumpkin-art.unlit {
  display: none;
}

.pumpkin-target.found .pumpkin-art.lit {
  display: block;
}

.pumpkin-target.found {
  pointer-events: none;
  animation: pumpkinFoundGlow 1.5s infinite alternate ease-in-out;
}

@keyframes pumpkinFoundGlow {
  0% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 6px #FFD60A) drop-shadow(0 0 12px #FF9E00);
  }
  100% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 12px #FFD60A) drop-shadow(0 0 20px #FF9E00);
  }
}

.pumpkin-target:hover:not(.found) {
  transform: scale(1.1);
  filter: brightness(1.15);
}

.game-done-text {
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--brand-yellow);
  margin-top: 10px;
}

/* RSVP FORM */
.rsvp-alert {
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
}

.rsvp-alert.success {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1px solid #28a745;
  color: #d4edda;
}

.rsvp-alert.error {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid #dc3545;
  color: #f8d7da;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label,
.form-group legend {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-yellow);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  background-color: var(--brand-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  color: var(--brand-white);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: var(--brand-yellow);
}

.radio-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: var(--brand-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-label:has(input:checked) {
  background-color: var(--brand-yellow);
  border-color: var(--brand-yellow);
}

.radio-label:has(input:checked) .radio-btn-text {
  color: var(--brand-navy);
  font-weight: 700;
}

.radio-btn-text {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.btn-primary {
  width: 100%;
  background-color: var(--brand-yellow);
  color: var(--brand-navy);
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background-color: #ffd000;
  }
}

.hidden {
  display: none !important;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  background-color: var(--brand-navy);
  border-radius: var(--radius-md);
  /* long forms have to scroll inside the box, or the bottom is unreachable on a phone */
  max-height: calc(100vh - 28px);
  max-height: calc(100svh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.modal-backdrop { align-items: flex-start; padding: 14px; overflow-y: auto; }
.modal-close-btn { position: sticky; top: 0; float: right; z-index: 3; }

.modal-close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--brand-white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 10;
}

.modal-video-wrapper video {
  width: 100%;
  display: block;
}

/* EXPIRED PAGE */
.expired-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.expired-container {
  width: 100%;
  max-width: 420px;
}

.expired-card {
  background-color: var(--brand-navy);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.expired-icon {
  margin-bottom: 16px;
}

.expired-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brand-white);
  margin-bottom: 12px;
}

.expired-message {
  color: var(--brand-gray-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.expired-party-info {
  background-color: var(--brand-navy-dark);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 214, 10, 0.2);
  font-size: 14px;
}

/* ACCESSIBILITY: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   HOST DASHBOARD STYLES (Step 2)
   ========================================================================== */
.host-body {
  background-color: var(--brand-navy-dark);
  color: var(--brand-white);
  padding: 24px 16px 64px;
}

.host-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.host-header {
  margin-bottom: 24px;
  text-align: left;
}

.host-header-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background-color: var(--brand-yellow);
  color: var(--brand-navy);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.host-title {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  color: var(--brand-white);
  margin-bottom: 6px;
}

.host-meta {
  font-size: 15px;
  color: var(--brand-gray-muted);
}

.host-countdown {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--theme-card-border, rgba(255, 214, 10, 0.3));
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

.countdown-tag {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--brand-yellow);
  letter-spacing: 0.5px;
}

.countdown-clock {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--brand-white);
}

/* Action Bar */
.host-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

/* Three Big Counts */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--brand-navy);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.metric-number {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  margin-bottom: 6px;
}

.metric-coming .metric-number {
  color: var(--status-yes, #2ec4b6);
}

.metric-not-coming .metric-number {
  color: var(--status-no, #e71d36);
}

.metric-no-reply .metric-number {
  color: var(--brand-yellow);
}

.metric-label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--brand-gray-light);
}

.metric-sub {
  font-size: 12px;
  color: var(--brand-gray-muted);
  margin-top: 4px;
}

/* Guest Table */
.guest-table-section {
  background-color: var(--brand-navy);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.section-header {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--brand-white);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guest-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.guest-table th {
  padding: 12px 14px;
  background-color: rgba(11, 19, 35, 0.6);
  color: var(--brand-yellow);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.guest-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.guest-table tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-coming {
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--status-yes, #2ec4b6);
  border: 1px solid var(--status-yes, #2ec4b6);
}

.badge-declined {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--status-no, #ff6b6b);
  border: 1px solid var(--status-no, #e71d36);
}

.badge-opened {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--brand-yellow);
  border: 1px solid var(--brand-yellow);
}

.badge-sent {   /* invitation sent, not opened yet (22/9) */
  background-color: rgba(127, 160, 255, 0.12);
  color: #9db4ff;
  border: 1px solid rgba(127, 160, 255, 0.4);
}

.badge-not-opened {
  background-color: rgba(142, 154, 175, 0.15);
  color: var(--brand-gray-muted);
  border: 1px solid rgba(142, 154, 175, 0.3);
}

.cell-center {
  text-align: center;
}

.cell-note {
  max-width: 200px;
  word-break: break-word;
  color: var(--brand-gray-light);
}

.cell-date {
  font-size: 12px;
  color: var(--brand-gray-muted);
}

.btn-nudge {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--status-send, #25D366);
  color: var(--status-send-ink, #0b1323);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-nudge:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--brand-gray-muted);
}

/* ---- the host's own questions, totalled ---- */
.question-summary { margin-bottom: 20px; }
.qs-block + .qs-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); }
.qs-title { font-family: var(--font-display); font-size: 19px; color: var(--brand-white); margin: 0 0 12px; }
.qs-row { display: grid; grid-template-columns: minmax(90px, 38%) 1fr 36px; align-items: center; gap: 12px; padding: 6px 0; }
.qs-option { font-size: 14px; color: var(--brand-white); }
.qs-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.qs-bar i { display: block; height: 100%; border-radius: 999px; background: var(--status-yes, #c9a24d); }
.qs-count { font-size: 16px; font-weight: 700; text-align: right; color: var(--status-yes, #c9a24d); }
.qs-note { font-size: 12px; color: var(--brand-gray-muted); margin: 8px 0 0; }
.qs-list { list-style: none; margin: 0; padding: 0; }
.qs-list li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 14px; color: var(--brand-white); }
.qs-list li:last-child { border-bottom: 0; }
.qs-list strong { flex: 0 0 38%; color: var(--brand-gray-muted); font-weight: 600; }
.answer-line { font-size: 13px; line-height: 1.5; }
.answer-line span { color: var(--brand-gray-muted); }
.answer-line strong { color: var(--brand-white); }

/* On a phone a seven-column table is unreadable: it scrolls sideways, so the note, the
   reply time and the nudge buttons all sit off screen and leave the rows looking empty.
   Under 700px each guest becomes one card instead, and cells with nothing in them go. */
@media (max-width: 700px) {
  .table-responsive { overflow-x: visible; }
  .guest-table, .guest-table tbody, .guest-table tr, .guest-table td { display: block; width: 100%; }
  .guest-table thead { display: none; }

  .guest-table tr.guest-row {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 3px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.02);
  }
  .guest-table tr.row-coming { border-left-color: var(--status-yes, #c9a24d); }
  .guest-table tr.row-declined { border-left-color: var(--status-no, #9a7f7f); }

  .guest-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 5px 0;
    border-bottom: 0;
    text-align: right;
  }
  .guest-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--brand-gray-muted);
    text-align: left;
  }
  .guest-table td.cell-blank { display: none; }

  /* name and status read as the card's heading, so they lose their labels */
  .guest-table td.guest-name,
  .guest-table td[data-label="Status"] { padding-top: 0; }
  .guest-table td.guest-name::before,
  .guest-table td[data-label="Status"]::before { content: none; }
  .guest-table td.guest-name { justify-content: space-between; text-align: left; }
  .guest-table td.guest-name strong { font-size: 16px; }
  .guest-table td[data-label="Status"] { justify-content: flex-start; margin-bottom: 4px; }

  .guest-table td.cell-note { text-align: right; max-width: none; }
  /* several answers stack under their label rather than squashing into one row */
  .guest-table td.cell-answers { display: block; text-align: left; }
  .guest-table td.cell-answers::before { display: block; margin-bottom: 4px; }
  .guest-table td.cell-answers.cell-blank { display: none; }   /* no answers, no empty heading */
  .guest-table td.cell-actions { flex-wrap: wrap; justify-content: flex-end; padding-top: 10px; }
  .guest-table .remind-actions-group { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
}

/* Toast */
.host-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--brand-yellow);
  color: var(--brand-navy);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 500;
  transition: opacity 0.3s ease;
}

/* Modals */
.host-modal {
  padding: 24px;
  max-width: 500px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--brand-white);
  margin-bottom: 6px;
}

.modal-desc {
  font-size: 14px;
  color: var(--brand-gray-muted);
  margin-bottom: 16px;
}

.modal-form-actions {
  margin-top: 20px;
}

.wax-seal-button * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; pointer-events: none; }

/* ---- Programme, dress-code swatches and gift reveal (theme-driven sections) ---- */
.programme-list { list-style: none; margin: 4px 0 0; padding: 0; }
.programme-row {
  display: grid; grid-template-columns: 74px 14px 1fr; align-items: center;
  gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--theme-card-border);
}
.programme-row:last-child { border-bottom: 0; }
.programme-time { font-weight: 600; letter-spacing: 1px; color: var(--theme-accent); }
.programme-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--theme-accent); opacity: .65; }
.programme-what { color: var(--theme-text-primary); }
.swatch-row { display: flex; gap: 10px; margin-top: 14px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 4px 10px rgba(0,0,0,.45); }
.gifts-secret { margin-top: 12px; font-size: 16px; letter-spacing: 1px; color: var(--theme-text-primary); }

/* host: the extra editing controls */
.modal-subtitle { font-family: var(--font-display); font-size: 18px; color: var(--brand-yellow); margin: 22px 0 6px; }
.section-toggles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; margin-top: 10px; }
.toggle-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.toggle-row input { width: 18px; height: 18px; accent-color: var(--brand-yellow); }

/* save-the-date switch at the top of Change Details */
.std-toggle {
  align-items: flex-start; margin: 4px 0 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); line-height: 1.5;
}
.std-toggle input { flex: 0 0 18px; margin-top: 3px; }
.std-toggle strong { color: var(--brand-white); }

/* the wording boxes, folded away until wanted */
.wording-box { margin: 22px 0 6px; border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-sm); padding: 0 14px; }
.wording-box summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--brand-yellow); }
.wording-box[open] { padding-bottom: 8px; }
.wording-group {
  margin: 18px 0 8px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--brand-gray-muted);
}
.wording-box .form-group { margin-bottom: 8px; }

/* the map under the address boxes on Change Details (views/host.ejs) */
.where-check { margin: 4px 0 18px; }
.where-check iframe { display: block; width: 100%; height: 190px; border: 0; border-radius: 10px; filter: grayscale(0.2); }

/* ---- reminders on the dashboard (views/host.ejs, public/js/host-reminders.js) ---- */
.rm-card { padding: 20px; margin-bottom: 24px; }
.rm-title { font-family: var(--font-display); font-size: 22px; color: var(--brand-yellow); margin-bottom: 12px; }
.rm-due {
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; margin-bottom: 16px;
  border: 1px solid var(--brand-yellow); border-radius: 12px; background: rgba(255,255,255,0.04);
}
.rm-due strong { display: block; font-family: var(--font-display); font-size: 21px; color: var(--brand-white); }
.rm-due span { display: block; font-size: 14px; color: var(--brand-gray-muted); margin-top: 2px; }
.rm-lead { font-size: 13px; color: var(--brand-gray-muted); margin: 0 0 8px; }
.rm-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.rm-kinds .btn { padding: 9px 14px; font-size: 12px; }
.rm-note { font-size: 12px; color: var(--brand-gray-muted); margin-top: 14px; }
.rm-dialog { max-width: 520px; }
.rm-label { display: block; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--brand-yellow); margin: 14px 0 6px; }
.rm-dialog textarea { width: 100%; font-size: 15px; line-height: 1.45; }
.rm-hint { font-size: 12px; margin: 6px 0 0; }
.rm-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rm-chip {
  padding: 7px 12px; border-radius: 999px; font-size: 13px; cursor: pointer;
  border: 1px solid var(--theme-card-border); background: transparent; color: var(--brand-white);
}
.rm-chip.on { border-color: var(--brand-yellow); background: var(--brand-yellow); color: var(--status-send-ink); }
.rm-list { list-style: none; margin: 0; padding: 0; max-height: 44vh; overflow-y: auto; border: 1px solid var(--theme-card-border); border-radius: 10px; }
.rm-list li { border-bottom: 1px solid var(--theme-card-border); }
.rm-list li:last-child { border-bottom: 0; }
.rm-list label { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; padding: 11px 12px; cursor: pointer; align-items: center; }
.rm-list input { width: 20px; height: 20px; accent-color: var(--brand-yellow); grid-row: span 2; }
.rm-name { font-size: 16px; color: var(--brand-white); }
.rm-meta { font-size: 12px; color: var(--brand-gray-muted); }
.rm-empty { padding: 14px; font-size: 14px; color: var(--brand-gray-muted); }
.rm-by { display: flex; gap: 16px; align-items: center; margin: 14px 0 4px; font-size: 14px; color: var(--brand-white); }
.rm-by span { color: var(--brand-gray-muted); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.rm-by input { accent-color: var(--brand-yellow); }
.rm-go { display: block; width: 100%; margin-top: 14px; text-align: center; }
.rm-go[disabled] { opacity: .45; }
.rm-share {
  display: block; width: 100%; margin-top: 12px; padding: 6px; background: none; border: 0; cursor: pointer;
  font-size: 13px; color: var(--brand-gray-muted); text-decoration: underline; text-underline-offset: 3px;
}
.rm-who { font-family: var(--font-display); font-size: 30px; color: var(--brand-white); margin: 4px 0 6px; }
.rm-step-actions { display: flex; gap: 10px; margin-top: 12px; }
.rm-step-actions .btn { flex: 1; }
/* the guest list's own two buttons, and when that guest was last reminded */
.btn-remind-alt { background: transparent !important; color: var(--brand-white) !important; border: 1px solid var(--theme-card-border); }
.rm-row-note { font-size: 11px; color: var(--brand-gray-muted); }

/* Share a picture (host dashboard, 22/9) */
.social-dialog { max-width: 620px; }
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0 6px; }
.social-item { margin: 0; text-align: center; }
.social-frame { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.social-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.social-frame-story { aspect-ratio: 9 / 16; }
.social-frame-square { aspect-ratio: 1; }
.social-item figcaption { font-size: 13px; margin-top: 8px; color: var(--brand-white); }
.social-item figcaption span { color: var(--brand-gray-muted); margin-left: 6px; }
.social-btns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.social-btns .btn { padding: 8px 14px; font-size: 13px; }
.social-note { margin-top: 10px; }
@media (max-width: 520px) { .social-grid { grid-template-columns: 1fr; } }

/* thank-you clip words (host dashboard, 22/9) */
.thanks-words label { display: block; margin: 0 0 8px; }
.thanks-words label span { display: block; font-size: 12px; color: var(--brand-gray-muted); margin: 0 0 3px; }
.thanks-words .form-control { width: 100%; box-sizing: border-box; }
.thanks-words-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* 22/9: [hidden] must beat .btn display, or hidden buttons (Choose from my contacts) show with no handler */
.btn[hidden] { display: none !important; }
