:root {
  --background: #f5f4f8;
  --ink: #25232a;
  --muted: #76727d;
  --soft-muted: #9a96a0;
  --surface: rgba(255, 255, 255, 0.58);
  --surface-strong: rgba(255, 255, 255, 0.78);
  --surface-border: rgba(255, 255, 255, 0.82);
  --accent: #9d5f72;
  --accent-dark: #7e4658;
  --accent-soft: #f5e7eb;
  --lavender: #dfd8ee;
  --success: #52765f;
  --danger: #b24f60;
  --shadow: 0 24px 60px rgba(71, 54, 75, 0.12);
  --shadow-soft: 0 10px 30px rgba(71, 54, 75, 0.08);
  --radius-xl: 36px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --content-width: 860px;
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--background);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(157, 95, 114, 0.36);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.app-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  padding: clamp(16px, 3vw, 42px);
  place-items: center;
  isolation: isolate;
}

.ambient-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.9), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(255, 255, 255, 0.52), transparent 24%),
    linear-gradient(145deg, #f7f5f8 0%, #f1eff6 48%, #f8f4f2 100%);
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.76;
}

.ambient-orb--rose {
  top: -14rem;
  right: -8rem;
  width: min(42vw, 38rem);
  aspect-ratio: 1;
  background: radial-gradient(circle at 35% 35%, #f7e5e8 0%, #e9c9d1 68%, transparent 70%);
}

.ambient-orb--lavender {
  bottom: -18rem;
  left: -11rem;
  width: min(50vw, 46rem);
  aspect-ratio: 1;
  background: radial-gradient(circle at 65% 36%, #e6e1f1 0%, #cec3e2 66%, transparent 68%);
}

.ambient-orb--gold {
  top: 38%;
  left: 22%;
  width: 17rem;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 231, 196, 0.62) 0%, transparent 70%);
}

.date-app {
  width: min(100%, var(--content-width));
  min-height: min(780px, calc(100vh - clamp(32px, 6vw, 84px)));
  overflow: hidden;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(142%);
  -webkit-backdrop-filter: blur(24px) saturate(142%);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 clamp(24px, 5vw, 48px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 27px;
  height: 27px;
  color: var(--accent);
  border: 1px solid rgba(157, 95, 114, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.95rem;
  place-items: center;
}

.step-indicator {
  margin: 0;
  color: var(--soft-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.step-indicator span:first-child {
  color: var(--accent);
}

.progress-track {
  width: 100%;
  height: 1px;
  overflow: hidden;
  background: rgba(90, 72, 93, 0.1);
}

.progress-track__value {
  display: block;
  width: 16.6667%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #cb91a0);
  transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

#date-form {
  position: relative;
  min-height: 696px;
}

.flow-step {
  width: 100%;
  min-height: 696px;
  padding: clamp(48px, 8vw, 88px) clamp(24px, 7vw, 80px);
}

.flow-step[hidden] {
  display: none;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 530px;
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.06;
}

h1 {
  font-size: clamp(3.25rem, 7vw, 5.85rem);
}

h2 {
  font-size: clamp(2.7rem, 5.6vw, 4.55rem);
}

h1 em,
h2 em {
  color: var(--accent);
  font-weight: 600;
}

.hero-content__copy,
.step-content__intro {
  max-width: 500px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  line-height: 1.65;
}

.hero-content .button {
  margin-top: 38px;
}

.quiet-note {
  margin: 0;
  color: var(--soft-muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.035em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, #ad7182, #8b5063);
  box-shadow: 0 12px 22px rgba(139, 80, 99, 0.23);
}

.button--primary:hover:not(:disabled) {
  box-shadow: 0 16px 27px rgba(139, 80, 99, 0.3);
}

.button--secondary {
  color: var(--accent-dark);
  border-color: rgba(157, 95, 114, 0.2);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 6px 20px rgba(71, 54, 75, 0.04);
}

.button--secondary:hover:not(:disabled) {
  border-color: rgba(157, 95, 114, 0.4);
  background: rgba(255, 255, 255, 0.8);
}

.step-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(100%, 680px);
  min-height: 550px;
  margin: 0 auto;
}

.step-content--narrow {
  width: min(100%, 560px);
}

.step-content--centered {
  align-items: center;
  text-align: center;
}

.step-content--centered .step-content__intro {
  max-width: 540px;
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 37px;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-message.is-success {
  color: var(--success);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  border: 0;
}

.activity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.activity-card:hover {
  transform: translateY(-3px);
  border-color: rgba(157, 95, 114, 0.28);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 15px 30px rgba(71, 54, 75, 0.1);
}

.activity-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.activity-card:has(input:focus-visible) {
  outline: 3px solid rgba(157, 95, 114, 0.36);
  outline-offset: 3px;
}

.activity-card:has(input:checked) {
  border-color: rgba(157, 95, 114, 0.58);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 231, 235, 0.75));
  box-shadow: 0 16px 32px rgba(139, 80, 99, 0.13);
}

.activity-card__icon {
  display: grid;
  width: 37px;
  height: 37px;
  margin-bottom: auto;
  color: var(--accent);
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 1.1rem;
  place-items: center;
}

.activity-card__title {
  display: block;
  margin-top: 18px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.activity-card__text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.activity-card__check {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 24px;
  height: 24px;
  color: #fff;
  border-radius: 50%;
  background: var(--accent);
  font-size: 0.73rem;
  opacity: 0;
  transform: scale(0.72);
  place-items: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.activity-card:has(input:checked) .activity-card__check {
  opacity: 1;
  transform: scale(1);
}

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
}

.text-button {
  padding: 9px 2px;
  color: var(--muted);
  border: 0;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  transition: color 160ms ease;
}

.text-button:hover {
  color: var(--accent-dark);
}

.field-label {
  display: block;
  margin: 35px 0 9px;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.field-label span {
  color: var(--soft-muted);
  font-weight: 500;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 22px rgba(71, 54, 75, 0.05);
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input-wrap:focus-within {
  border-color: rgba(157, 95, 114, 0.45);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(139, 80, 99, 0.1);
}

.input-wrap > span {
  color: var(--accent);
  font-size: 1.15rem;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 600;
}

.input-wrap input::placeholder {
  color: #aaa6af;
  font-weight: 500;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 36px 0 0;
  padding: 0;
  border: 0;
}

.time-option {
  position: relative;
  display: grid;
  min-height: 57px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  place-items: center;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.time-option:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 95, 114, 0.3);
  background: rgba(255, 255, 255, 0.72);
}

.time-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.time-option:has(input:focus-visible) {
  outline: 3px solid rgba(157, 95, 114, 0.36);
  outline-offset: 3px;
}

.time-option:has(input:checked) {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 10px 18px rgba(139, 80, 99, 0.18);
}

.summary-card {
  margin: 34px 0 0;
  padding: 8px 23px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow-soft);
}

.summary-card div {
  display: grid;
  grid-template-columns: minmax(88px, 0.55fr) 1fr;
  gap: 16px;
  padding: 17px 0;
}

.summary-card div + div {
  border-top: 1px solid rgba(78, 62, 81, 0.09);
}

.summary-card dt {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 600;
}

.summary-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
}

.success-content {
  max-width: 600px;
}

.success-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin-bottom: 25px;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #bd7d8f, #8e5366);
  box-shadow: 0 15px 30px rgba(139, 80, 99, 0.24);
  font-family: var(--font-display);
  font-size: 2rem;
  place-items: center;
}

.success-content .button {
  margin-top: 33px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.flatpickr-calendar {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 42px rgba(71, 54, 75, 0.18);
  font-family: var(--font-sans);
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
}

.flatpickr-weekday {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
}

.flatpickr-day {
  color: var(--ink);
  border-radius: 50%;
  font-weight: 600;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
  border-color: var(--accent);
  background: var(--accent);
}

@media (max-width: 640px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .date-app {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .app-header {
    min-height: 72px;
    padding: 0 22px;
  }

  .brand {
    font-size: 0.76rem;
  }

  .brand__mark {
    width: 24px;
    height: 24px;
  }

  #date-form,
  .flow-step {
    min-height: calc(100svh - 73px);
  }

  .flow-step {
    padding: 48px 22px 36px;
  }

  .hero-content,
  .step-content {
    min-height: calc(100svh - 180px);
  }

  h1 {
    font-size: clamp(3rem, 15vw, 4.25rem);
  }

  h2 {
    font-size: clamp(2.55rem, 12vw, 3.65rem);
  }

  .hero-content__copy,
  .step-content__intro {
    margin-top: 22px;
    font-size: 0.98rem;
  }

  .hero-content .button {
    margin-top: 31px;
  }

  .activity-grid {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 29px;
  }

  .activity-card {
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    min-height: 108px;
    padding: 17px 18px;
  }

  .activity-card__icon {
    grid-row: 1 / span 2;
    width: 38px;
    height: 38px;
    margin: 0;
  }

  .activity-card__title {
    align-self: end;
    margin: 0;
  }

  .activity-card__text {
    margin: 0;
  }

  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 29px;
  }

  .step-actions {
    margin-top: 23px;
  }
}

@media (max-width: 390px) {
  .brand > span:last-child {
    display: none;
  }

  .flow-step {
    padding-right: 18px;
    padding-left: 18px;
  }

  .button {
    min-height: 49px;
    padding: 0 19px;
    font-size: 0.88rem;
  }

  .summary-card {
    padding-right: 17px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
