@import url("https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #fff7f8;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --ink: #311827;
  --muted: #765b69;
  --primary: #b42360;
  --primary-dark: #7f1d4e;
  --primary-soft: #ffe4ec;
  --accent: #f3b4c7;
  --line: rgba(127, 29, 78, 0.13);
  --shadow: 0 28px 70px rgba(91, 26, 55, 0.17);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Manrope", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 206, 221, 0.68), transparent 30%),
    radial-gradient(circle at 88% 88%, rgba(244, 184, 201, 0.52), transparent 31%),
    linear-gradient(145deg, #fffafa 0%, #fff1f4 48%, #fce9ef 100%);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
  pointer-events: none;
}

.ambient-one {
  top: 8%;
  right: -90px;
  background: linear-gradient(145deg, #ffc5d6, #f07ba3);
  animation: drift 12s ease-in-out infinite alternate;
}

.ambient-two {
  bottom: 5%;
  left: -100px;
  background: linear-gradient(145deg, #ffe4ba, #f6a8c0);
  animation: drift 15s ease-in-out infinite alternate-reverse;
}

.site-header,
.site-footer,
.experience {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), #e24f83);
  box-shadow: 0 10px 26px rgba(180, 35, 96, 0.26);
  color: white;
  font-size: 1rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(96, 35, 61, 0.08);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(180, 35, 96, 0.3);
  background: white;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.music-toggle[aria-pressed="true"] {
  border-color: rgba(180, 35, 96, 0.22);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.experience {
  display: grid;
  min-height: calc(100vh - 168px);
  place-items: center;
  padding: 24px 0 40px;
}

.proposal-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(420px, 1.12fr);
  width: 100%;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.visual-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(155deg, rgba(127, 29, 78, 0.94), rgba(180, 35, 96, 0.86)),
    radial-gradient(circle at 20% 10%, #ff9bbd, transparent 36%);
  color: white;
}

.visual-panel::before,
.visual-panel::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.visual-panel::before {
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
}

.visual-panel::after {
  bottom: -120px;
  left: -90px;
  width: 330px;
  height: 330px;
}

.image-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 410px);
  margin-inline: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 50px rgba(46, 8, 27, 0.22);
  transform: rotate(-1.5deg);
}

.image-frame img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
}

.visual-caption {
  position: relative;
  z-index: 1;
  max-width: 32ch;
  margin: 28px auto 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.93rem;
  text-align: center;
}

.content-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(28px, 5vw, 68px);
}

.progress-block {
  margin-bottom: clamp(36px, 6vw, 74px);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #f4e3e9;
}

.progress-track span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-dark), #e25283);
  transition: width 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.slides {
  position: relative;
  display: grid;
  flex: 1;
  align-items: center;
}

.slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease, visibility 320ms ease;
}

.slide.is-active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 14ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.proposal-slide h2,
.success-slide h2 {
  max-width: 12ch;
}

.lead {
  max-width: 50ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  margin-top: 34px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  border: 1px solid var(--primary);
  background: linear-gradient(145deg, var(--primary), #d93c75);
  box-shadow: 0 14px 28px rgba(180, 35, 96, 0.24);
  color: white;
}

.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(180, 35, 96, 0.3);
}

.secondary-button {
  border: 1px solid rgba(127, 29, 78, 0.18);
  background: #fff8fa;
  color: var(--primary-dark);
}

.secondary-button:hover {
  transform: translateY(-2px);
  background: var(--primary-soft);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(180, 35, 96, 0.28);
  outline-offset: 4px;
}

.choice-area {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 136px;
  margin-top: 8px;
}

.choice-area .primary-button,
.choice-area .secondary-button {
  margin-top: 24px;
}

.yes-button {
  position: relative;
  z-index: 2;
}

.no-button {
  position: relative;
  z-index: 3;
  transition: left 190ms ease, top 190ms ease, transform 180ms ease, background 180ms ease;
}

.playful-message {
  min-height: 28px;
  margin: 4px 0 0;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--primary), #ec6996);
  box-shadow: 0 15px 30px rgba(180, 35, 96, 0.24);
  color: white;
  font-size: 1.45rem;
  animation: heartbeat 1.7s ease-in-out infinite;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

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

.floating-heart {
  position: fixed;
  bottom: -40px;
  z-index: -1;
  color: rgba(180, 35, 96, 0.16);
  font-size: var(--size);
  animation: float-up var(--duration) linear infinite;
  animation-delay: var(--delay);
  pointer-events: none;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 9999;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  text-align: center;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-20px, 24px, 0) scale(1.08); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), -115vh, 0) rotate(24deg); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@media (max-width: 900px) {
  .experience {
    padding-top: 10px;
  }

  .proposal-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .visual-panel {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 22px;
    padding: 24px;
  }

  .image-frame {
    width: 150px;
    padding: 8px;
    border-radius: 20px;
  }

  .image-frame img {
    border-radius: 14px;
  }

  .visual-caption {
    max-width: 34ch;
    margin: 0;
    text-align: left;
  }

  .content-panel {
    min-height: 540px;
    padding: 34px;
  }

  .progress-block {
    margin-bottom: 46px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .site-footer,
  .experience {
    width: min(100% - 20px, 1180px);
  }

  .site-header {
    min-height: 72px;
  }

  .music-label {
    display: none;
  }

  .icon-button {
    width: 44px;
    padding: 10px;
    justify-content: center;
  }

  .proposal-shell {
    border-radius: 24px;
  }

  .visual-panel {
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 18px;
  }

  .image-frame {
    width: 92px;
    padding: 5px;
    border-radius: 16px;
  }

  .image-frame img {
    border-radius: 11px;
  }

  .visual-caption {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .content-panel {
    min-height: 540px;
    padding: 28px 22px 32px;
  }

  .progress-block {
    margin-bottom: 38px;
  }

  h1,
  h2 {
    font-size: clamp(2.45rem, 13vw, 3.45rem);
  }

  .lead {
    margin-top: 18px;
    font-size: 0.96rem;
  }

  .primary-button,
  .secondary-button {
    min-height: 50px;
    width: 100%;
    margin-top: 26px;
  }

  .choice-area {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    min-height: 154px;
  }

  .choice-area .primary-button,
  .choice-area .secondary-button {
    margin-top: 14px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding-top: 14px;
  }
}

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

  .floating-hearts,
  .ambient {
    display: none;
  }
}

/* =========================================================
   Compact v2 layout — keeps the full experience in one view
   and gives the proposal buttons their own safe zones.
   ========================================================= */
body {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.site-header {
  height: 68px;
  min-height: 68px;
}

.experience {
  min-height: 0;
  height: calc(100dvh - 102px);
  padding: 6px 0 10px;
}

.proposal-shell {
  min-height: 0;
  height: min(620px, 100%);
  max-height: 100%;
  grid-template-columns: minmax(280px, 0.82fr) minmax(390px, 1.18fr);
}

.visual-panel {
  padding: clamp(24px, 3.4vw, 44px);
}

.image-frame {
  width: min(100%, 330px);
  padding: 10px;
  border-radius: 26px;
}

.image-frame img {
  max-height: 330px;
  object-fit: cover;
}

.visual-caption {
  margin-top: 18px;
}

.content-panel {
  min-height: 0;
  padding: clamp(24px, 3.5vw, 46px);
}

.progress-block {
  margin-bottom: clamp(18px, 3vh, 30px);
}

.slides {
  min-height: 0;
}

h1,
h2 {
  font-size: clamp(2.25rem, 4.15vw, 4.15rem);
  line-height: 1;
}

.lead {
  margin-top: 16px;
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  margin-top: 22px;
  padding: 11px 20px;
}

.choice-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.82fr);
  align-items: stretch;
  gap: 12px;
  min-height: 82px;
  margin-top: 14px;
}

.choice-area .primary-button,
.choice-area .secondary-button {
  margin-top: 0;
}

.yes-button {
  width: 100%;
  min-height: 58px;
  align-self: center;
  transform-origin: center;
}

.no-zone {
  position: relative;
  min-width: 0;
  min-height: 76px;
  overflow: hidden;
  border: 1px dashed rgba(180, 35, 96, 0.2);
  border-radius: 20px;
  background: rgba(255, 244, 248, 0.72);
}

.no-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: auto;
  min-width: 112px;
  margin: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}

.playful-message {
  min-height: 22px;
  margin-top: 6px;
}

.site-footer {
  height: 34px;
  min-height: 34px;
  padding: 0 0 8px;
  font-size: 0.75rem;
}

@media (max-width: 900px) {
  .experience {
    height: calc(100dvh - 102px);
    padding: 4px 0 8px;
  }

  .proposal-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 96px minmax(0, 1fr);
    height: 100%;
  }

  .visual-panel {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
    padding: 12px 18px;
  }

  .image-frame {
    width: 70px;
    padding: 4px;
    border-radius: 16px;
  }

  .image-frame img {
    border-radius: 11px;
  }

  .visual-caption {
    margin: 0;
    font-size: 0.82rem;
  }

  .content-panel {
    min-height: 0;
    padding: 20px 28px 22px;
  }

  .progress-block {
    margin-bottom: 18px;
  }

  h1,
  h2 {
    font-size: clamp(2.2rem, 7vw, 3.35rem);
  }
}

@media (max-width: 560px) {
  .site-header,
  .experience {
    width: min(100% - 14px, 1180px);
  }

  .site-header {
    height: 58px;
    min-height: 58px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .brand {
    gap: 8px;
    font-size: 0.92rem;
  }

  .icon-button {
    width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 8px;
  }

  .experience {
    height: calc(100dvh - 58px);
    padding: 3px 0 7px;
  }

  .proposal-shell {
    grid-template-rows: 72px minmax(0, 1fr);
    border-radius: 22px;
  }

  .visual-panel {
    grid-template-columns: 52px 1fr;
    gap: 12px;
    padding: 8px 12px;
  }

  .image-frame {
    width: 52px;
    padding: 3px;
    border-radius: 13px;
  }

  .image-frame img {
    border-radius: 9px;
  }

  .visual-caption {
    font-size: 0.73rem;
    line-height: 1.35;
  }

  .content-panel {
    min-height: 0;
    padding: 14px 16px 16px;
  }

  .progress-block {
    margin-bottom: 12px;
  }

  .progress-meta {
    margin-bottom: 7px;
    font-size: 0.66rem;
  }

  .progress-track {
    height: 5px;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 0.65rem;
  }

  h1,
  h2 {
    max-width: 15ch;
    font-size: clamp(1.95rem, 9.8vw, 2.75rem);
    line-height: 0.98;
  }

  .proposal-slide h2,
  .success-slide h2 {
    max-width: 14ch;
  }

  .lead {
    margin-top: 12px;
    font-size: 0.88rem;
    line-height: 1.48;
  }

  .primary-button,
  .secondary-button {
    min-height: 44px;
    margin-top: 16px;
    padding: 9px 16px;
    font-size: 0.9rem;
  }

  .choice-area {
    grid-template-columns: 1fr;
    grid-template-rows: 48px 68px;
    gap: 8px;
    min-height: 124px;
    margin-top: 12px;
  }

  .yes-button {
    min-height: 48px;
  }

  .no-zone {
    min-height: 68px;
    border-radius: 16px;
  }

  .no-zone .no-button {
    width: auto;
    min-width: 104px;
    min-height: 42px;
    margin: 0;
  }

  .playful-message {
    min-height: 18px;
    margin-top: 4px;
    font-size: 0.8rem;
  }

  .success-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 14px;
    border-radius: 16px;
  }

  .site-footer {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 901px) {
  .site-header {
    height: 56px;
    min-height: 56px;
  }

  .experience {
    height: calc(100dvh - 56px);
    padding: 4px 0 8px;
  }

  .proposal-shell {
    height: 100%;
  }

  .site-footer {
    display: none;
  }

  .image-frame {
    width: min(100%, 270px);
  }

  .image-frame img {
    max-height: 270px;
  }

  .content-panel {
    padding: 24px 34px;
  }

  .progress-block {
    margin-bottom: 16px;
  }

  h1,
  h2 {
    font-size: clamp(2.15rem, 4vw, 3.25rem);
  }

  .lead {
    margin-top: 12px;
  }

  .primary-button,
  .secondary-button {
    margin-top: 16px;
  }
}

@media (max-width: 560px) and (max-height: 620px) {
  .proposal-shell {
    grid-template-rows: 54px minmax(0, 1fr);
  }

  .visual-panel {
    grid-template-columns: 40px 1fr;
    padding: 5px 10px;
  }

  .image-frame {
    width: 40px;
  }

  .visual-caption {
    font-size: 0.68rem;
  }

  .content-panel {
    padding: 10px 14px 12px;
  }

  .progress-block {
    margin-bottom: 8px;
  }

  h1,
  h2 {
    font-size: clamp(1.7rem, 8.5vw, 2.2rem);
  }

  .lead {
    margin-top: 8px;
    font-size: 0.82rem;
  }

  .choice-area {
    grid-template-rows: 44px 60px;
    min-height: 112px;
    margin-top: 8px;
  }

  .yes-button {
    min-height: 44px;
  }

  .no-zone {
    min-height: 60px;
  }
}
