* { box-sizing: border-box; }

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  position: relative;
  z-index: 1;
}

/* Floating petals background ------------------------------------------------ */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.petals span {
  position: absolute;
  font-size: 1.4rem;
  opacity: 0.55;
  animation: drift 9s ease-in-out infinite;
}
.petals span:nth-child(1) { top: 8%;  left: 6%;  animation-delay: 0s; }
.petals span:nth-child(2) { top: 20%; left: 88%; animation-delay: 1.2s; }
.petals span:nth-child(3) { top: 70%; left: 10%; animation-delay: 2.1s; }
.petals span:nth-child(4) { top: 82%; left: 80%; animation-delay: 0.6s; }
.petals span:nth-child(5) { top: 40%; left: 92%; animation-delay: 3s; }
.petals span:nth-child(6) { top: 55%; left: 4%;  animation-delay: 1.8s; }
.petals span:nth-child(7) { top: 12%; left: 50%; animation-delay: 2.6s; }
.petals span:nth-child(8) { top: 88%; left: 45%; animation-delay: 0.3s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(12deg); }
}

/* Card --------------------------------------------------------------------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-8) var(--space-6);
  width: min(560px, 100%);
  text-align: center;
  position: relative;
}

.headline {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
  margin: var(--space-4) 0;
}
.headline.xl { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.headline.lg { font-size: clamp(1.5rem, 4vw, 2.1rem); }

.subtle {
  color: var(--ink-soft);
  font-size: 1rem;
  margin: var(--space-2) 0 var(--space-5);
}

/* Image area / avatar ------------------------------------------------------ */
.media {
  width: 150px;
  height: 150px;
  margin: 0 auto var(--space-4);
  border-radius: 20px;
  background: var(--pink-ghost);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: inset 0 0 0 3px rgba(247, 168, 196, 0.4);
}
.media.round { border-radius: 50%; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.8rem;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(239, 127, 170, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--pink-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}
.btn-no {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  border: 2px solid var(--pink-ghost);
  background: #fff;
  color: var(--ink-soft);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(160, 80, 120, 0.12);
}

/* Reserves the "no" button's footprint in the actions row so YES stays put. */
.no-slot {
  display: inline-block;
  width: 86px;
  height: 46px;
}

.actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  margin-top: var(--space-5);
  min-height: 56px;
}

/* Forms -------------------------------------------------------------------- */
.field { text-align: left; margin: var(--space-4) 0; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-2);
  color: var(--ink);
}
.input, select.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--pink-ghost);
  border-radius: 14px;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--ink);
  background: #fff;
}
.input:focus, select.input:focus {
  outline: none;
  border-color: var(--pink);
}

/* Activity grid ------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin: var(--space-5) 0;
}
@media (max-width: 460px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
.tile {
  background: var(--pink-ghost);
  border: 2px solid transparent;
  border-radius: 18px;
  padding: var(--space-4) var(--space-2);
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.tile:hover { transform: translateY(-3px); }
.tile.selected {
  border-color: var(--pink-deep);
  background: #fff;
  box-shadow: var(--shadow);
}
.tile .emoji { font-size: 2.2rem; display: block; }
.tile .label { font-family: var(--font-display); font-weight: 600; margin-top: var(--space-2); }

.footer-note {
  margin-top: var(--space-5);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer-note a { color: var(--pink-deep); }

/* Admin -------------------------------------------------------------------- */
.admin {
  width: min(760px, 100%);
  text-align: left;
}
.admin .card { text-align: left; }
.admin table { width: 100%; border-collapse: collapse; margin-top: var(--space-3); }
.admin th, .admin td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--pink-ghost);
  font-size: 0.9rem;
}
.admin .row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: end; }
.admin .row .field { flex: 1; min-width: 140px; margin: 0; }
.error { color: #c0395b; font-size: 0.9rem; }
.actions-cell { display: flex; gap: var(--space-2); }
.actions-cell form { margin: 0; }
.btn-mini {
  font-family: var(--font-body);
  font-size: 0.8rem;
  border: 1px solid var(--pink-ghost);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
}
.btn-mini:hover { border-color: var(--pink); color: var(--ink); }
.btn-mini.danger:hover { border-color: #c0395b; color: #c0395b; }

/* Islands ------------------------------------------------------------------ */
.evasive { transition: left 0.12s ease, top 0.12s ease; }

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}
.confetti span {
  position: absolute;
  top: -10%;
  animation-name: fall;
  animation-timing-function: ease-in;
  animation-iteration-count: 1;
  opacity: 0.95;
}
@keyframes fall {
  0%   { transform: translate(0, -10vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(var(--drift), 110vh) rotate(360deg); opacity: 0.9; }
}
