:root {
  color-scheme: dark;
  --ink: #fff8ee;
  --muted: #d9c6b5;
  --rose: #ff6f91;
  --hot: #ff2e63;
  --mint: #7cf4d3;
  --amber: #ffc857;
  --panel: rgba(30, 18, 24, 0.72);
  --panel-strong: rgba(16, 11, 16, 0.86);
  --line: rgba(255, 248, 238, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(11, 6, 16, 0.88), rgba(50, 13, 30, 0.44), rgba(7, 12, 19, 0.82)),
    url("assets/date-night.png") center / cover fixed,
    #140b13;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 200, 87, 0.2), transparent 24rem),
    radial-gradient(circle at 88% 72%, rgba(124, 244, 211, 0.12), transparent 22rem),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 100% 3px;
  mix-blend-mode: screen;
}

#sparkCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100svh;
}

.screen {
  display: none;
  min-height: 100svh;
  padding: clamp(1rem, 2vw, 2rem);
  align-items: center;
  justify-content: center;
}

.screen-active {
  display: flex;
}

.intro-screen {
  justify-content: flex-start;
  padding-left: clamp(1.25rem, 8vw, 7rem);
}

.invite,
.panel,
.confirmation {
  width: min(100%, 760px);
}

.invite {
  padding-top: min(8vh, 5rem);
}

.kicker {
  margin: 0 0 0.8rem;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}

h1 {
  max-width: 11ch;
  font-size: clamp(4rem, 11vw, 9.8rem);
  line-height: 0.88;
  text-shadow: 0 1rem 4rem rgba(0, 0, 0, 0.5);
}

h2 {
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  line-height: 0.94;
}

.subtitle {
  max-width: 34rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.button-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  min-height: 9rem;
  margin-top: 2rem;
}

button,
.calendar-link {
  min-height: 3.25rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 850;
  letter-spacing: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.yes-button,
.confirm-button,
.calendar-link {
  color: #1a0c14;
  background: linear-gradient(135deg, var(--amber), #fff0a8 46%, var(--mint));
  box-shadow: 0 1rem 2.6rem rgba(255, 200, 87, 0.26);
}

.yes-button {
  min-width: 10rem;
  padding: 0 2.2rem;
  font-size: 1.1rem;
}

.yes-button:hover,
.confirm-button:hover,
.calendar-link:hover {
  transform: translateY(-2px) scale(1.03);
}

.no-button {
  position: relative;
  left: auto;
  top: auto;
  z-index: 4;
  min-width: 8.8rem;
  padding: 0 1.5rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.no-button.is-running {
  transition: left 280ms cubic-bezier(0.22, 1, 0.36, 1), top 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.panel,
.reaction,
.confirmation {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.panel-heading {
  margin-bottom: 1.5rem;
}

.panel-heading p:not(.kicker) {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.reaction {
  width: min(100%, 760px);
  text-align: center;
  animation: popIn 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reaction-puppy {
  display: block;
  width: clamp(8rem, 22vw, 13rem);
  max-width: 58vw;
  margin: 0 auto 1.2rem;
  filter: drop-shadow(0 1.2rem 2rem rgba(0, 0, 0, 0.45)) drop-shadow(0 0 1.6rem rgba(255, 200, 87, 0.2));
  transform-origin: center bottom;
  animation: happyBounce 950ms ease-in-out infinite alternate;
}

.reaction .subtitle {
  margin-inline: auto;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.date-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-height: min(62vh, 34rem);
  overflow: auto;
  padding-right: 0.25rem;
}

.date-option {
  min-height: 6.25rem;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.date-option:hover,
.date-option[aria-pressed="true"] {
  transform: translateY(-2px);
  background: rgba(255, 111, 145, 0.2);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.22);
}

.date-option strong {
  display: block;
  font-size: 1.05rem;
}

.date-option span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-form {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 8px;
  background: var(--panel-strong);
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 760;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr));
  gap: 0.65rem;
}

.time-option {
  min-height: 3.4rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.food-option {
  display: grid;
  min-height: 5.2rem;
  padding: 0.72rem 0.5rem;
  place-items: center;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.food-icon {
  display: grid;
  width: 2.15rem;
  aspect-ratio: 1;
  place-items: center;
  margin-bottom: 0.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.25rem;
}

.food-option span:last-child {
  font-size: 0.84rem;
  font-weight: 850;
}

.time-option:hover,
.time-option.is-selected,
.food-option:hover,
.food-option.is-selected {
  color: #1a0c14;
  background: linear-gradient(135deg, var(--amber), #fff0a8 46%, var(--mint));
  box-shadow: 0 0.8rem 1.6rem rgba(255, 200, 87, 0.22);
  transform: translateY(-1px);
}

.food-option:hover .food-icon,
.food-option.is-selected .food-icon {
  background: rgba(26, 12, 20, 0.1);
}

.food-grid.needs-choice .food-option {
  border-color: rgba(255, 200, 87, 0.72);
  box-shadow: 0 0 0 2px rgba(255, 200, 87, 0.12);
}

.calendar-note {
  margin: 0;
  padding: 0.9rem;
  color: var(--muted);
  border: 1px solid rgba(124, 244, 211, 0.24);
  border-radius: 8px;
  background: rgba(124, 244, 211, 0.08);
  font-size: 0.95rem;
  line-height: 1.45;
}

.confirm-button {
  margin-top: 0.5rem;
  padding: 0 1.2rem;
}

.confirmation {
  max-width: 660px;
  text-align: center;
}

.confirmation p:not(.kicker) {
  margin: 1.2rem auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.14rem;
  line-height: 1.6;
}

.save-note {
  color: var(--ink) !important;
}

.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.calendar-link,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 13rem;
  padding: 0 1.1rem;
  text-decoration: none;
}

.ghost-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.sound-toggle {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 8;
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sound-bars {
  display: inline-flex;
  gap: 3px;
  align-items: end;
  height: 18px;
}

.sound-bars i {
  display: block;
  width: 4px;
  height: 7px;
  border-radius: 999px;
  background: var(--mint);
}

.sound-toggle[aria-pressed="true"] .sound-bars i {
  animation: pulse 700ms ease-in-out infinite alternate;
}

.sound-bars i:nth-child(2) {
  height: 15px;
  animation-delay: 120ms;
}

.sound-bars i:nth-child(3) {
  height: 11px;
  animation-delay: 240ms;
}

@keyframes pulse {
  from {
    transform: scaleY(0.42);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes happyBounce {
  from {
    transform: rotate(-4deg) scale(0.98);
  }
  to {
    transform: rotate(4deg) scale(1.04);
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: smooth;
  }

  body {
    background-position: 58% center;
  }

  .intro-screen {
    align-items: flex-end;
    padding-left: 1rem;
    padding-bottom: 8rem;
  }

  h1 {
    font-size: clamp(3.4rem, 18vw, 5.6rem);
  }

  .booking-layout,
  .date-list {
    grid-template-columns: 1fr;
  }

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

  .food-option:last-child {
    grid-column: 1 / -1;
    min-height: 4.6rem;
  }

  .date-list {
    max-height: none;
    overflow: visible;
  }

  .date-option {
    min-height: 5.3rem;
  }

  .booking-form {
    scroll-margin-top: 4.5rem;
  }

  .time-field,
  .food-field {
    scroll-margin-top: 4.5rem;
  }

  .no-button {
    left: auto;
    top: auto;
  }

  .screen {
    padding-top: 4.5rem;
  }
}
