@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(/fonts/nunito-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url(/fonts/nunito-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url(/fonts/nunito-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(/fonts/nunito-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: block; src: url(/fonts/nunito-cyrillic-900-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-weight: 900; font-display: block; src: url(/fonts/nunito-latin-900-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Rubik'; font-weight: 600; font-display: swap; src: url(/fonts/rubik-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Rubik'; font-weight: 600; font-display: swap; src: url(/fonts/rubik-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light only;
  --cream: #FFF4EE;
  --ink: #4A2C2A;
  --ink-2: #6B4743;
  --muted: #8A6560;
  --rose: #B8435F;
  --rose-soft: #FDE3E8;
  --rose-dim: #EBC9CF;
  --line: #F3D9DE;
  --card: rgba(255, 255, 255, 0.55);
  --card-on: #FFFFFF;
  --shadow: 0 10px 30px rgba(184, 67, 95, 0.10);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--cream); }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
}
button { font: inherit; color: inherit; touch-action: manipulation; }
h1, p { margin: 0; }

#app {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
}

/* Фон: мягкие облака */
.bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(40px); }
.b1 { width: 290px; height: 290px; left: -100px; top: -70px; background: #F9C9D4; opacity: .85; animation: drift1 18s ease-in-out infinite; }
.b2 { width: 320px; height: 320px; right: -150px; top: 42%; background: #FFD6BF; opacity: .9; animation: drift2 22s ease-in-out infinite; }
.b3 { width: 260px; height: 260px; left: -80px; bottom: -70px; background: #F4B6C6; opacity: .75; animation: drift1 20s ease-in-out infinite reverse; }
@keyframes drift1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 24px); } }
@keyframes drift2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-26px, -30px); } }

.float-heart { position: absolute; animation: floaty 6s ease-in-out infinite; pointer-events: none; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Экраны */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(var(--safe-top) + 12px) 24px calc(var(--safe-bottom) + 24px);
  opacity: 0; transform: translateY(16px);
  transition: opacity .35s ease, transform .35s ease;
}
.screen.in { opacity: 1; transform: none; }
.screen.out { opacity: 0; transform: translateY(-12px); pointer-events: none; }

.top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-top: 8px; }
.back {
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .65);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.hearts { display: flex; gap: 6px; }
.hearts svg { width: 16px; height: 16px; }
.spacer { width: 44px; }

.body { flex: 1; min-height: 0; overflow-y: auto; padding-top: 24px; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }
.title { font-family: 'Rubik', 'Nunito', sans-serif; font-weight: 600; letter-spacing: -0.01em; font-size: 32px; line-height: 1.08; }
.subtitle { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 26px; }
.card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  min-height: 156px; padding: 16px; border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, .8); background: var(--card);
  box-shadow: var(--shadow); text-align: left; cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .15s ease;
}
.card:active { transform: scale(.97); }
.card[aria-pressed="true"] { border-color: var(--rose); background: var(--card-on); }
.card.wide { flex-direction: row; align-items: center; gap: 18px; min-height: 0; padding: 22px 20px; border-radius: 28px; }
.card .ico { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--rose-soft); display: flex; align-items: center; justify-content: center; }
.card.wide .ico { width: 64px; height: 64px; }
.card .ico svg { width: 24px; height: 24px; }
.card.wide .ico svg { width: 30px; height: 30px; }
.card .name { font-size: 17px; font-weight: 800; }
.card.wide .name { font-family: 'Rubik', 'Nunito', sans-serif; font-weight: 600; font-size: 19px; line-height: 1.15; }
.card .desc { font-size: 13.5px; line-height: 1.4; color: var(--ink-2); }
.card.wide .desc { font-size: 14px; margin-top: 6px; }
.card .text { display: flex; flex-direction: column; padding-right: 20px; }
.check {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose); display: none; align-items: center; justify-content: center;
}
.card[aria-pressed="true"] .check { display: flex; animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 58px; border: 0; border-radius: 29px;
  background: var(--rose); color: #FFF; font-size: 17px; font-weight: 800;
  box-shadow: 0 12px 28px rgba(184, 67, 95, .3); cursor: pointer;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.cta:active { transform: scale(.98); }
.cta:disabled { background: var(--rose-dim); color: var(--muted); box-shadow: none; cursor: default; }
.foot { flex: none; padding-top: 8px; }
.error { min-height: 22px; margin-bottom: 8px; text-align: center; font-size: 14px; font-weight: 700; color: var(--rose); }

/* Интро */
.intro { padding: 0; align-items: center; justify-content: center; gap: 4px; }
.intro .row { display: flex; justify-content: center; }
.fl { display: inline-block; will-change: transform, opacity; opacity: 0; }
.fl canvas { display: block; margin: 0 -5px; filter: drop-shadow(0 10px 12px rgba(184, 67, 95, .32)); }

/* Главный вопрос */
.question .q-text { position: absolute; left: 0; right: 0; top: 23%; padding: 0 32px; text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.question .title { font-size: 34px; }
.caption { margin-top: 22px; min-height: 24px; font-size: 16px; font-weight: 700; color: var(--rose); }
.yes, .no {
  position: absolute; width: 120px; height: 56px; border-radius: 28px;
  font-size: 18px; cursor: pointer; user-select: none; -webkit-user-select: none;
}
.yes {
  border: 0; background: var(--rose); color: #FFF; font-weight: 800; z-index: 1;
  box-shadow: 0 12px 28px rgba(184, 67, 95, .35);
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.no {
  border: 2px solid rgba(184, 67, 95, .35); background: rgba(255, 255, 255, .75); color: var(--ink-2); font-weight: 700; z-index: 2;
  transition: left .28s cubic-bezier(.34, 1.56, .64, 1), top .28s cubic-bezier(.34, 1.56, .64, 1);
}

/* Календарь и время */
.panel { margin-top: 18px; padding: 14px 16px; border-radius: 28px; background: rgba(255, 255, 255, .7); box-shadow: var(--shadow); }
.month { text-align: center; font-family: 'Rubik', 'Nunito', sans-serif; font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); justify-items: center; row-gap: 2px; }
.wd { font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 6px; }
.day {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: #CDB3AE;
}
.day.on { background: var(--rose-soft); color: var(--ink); font-weight: 800; cursor: pointer; transition: all .2s ease; }
.day.on[aria-pressed="true"] { background: var(--rose); color: #FFF; box-shadow: 0 8px 18px rgba(184, 67, 95, .35); }
.label { margin-top: 18px; font-size: 16px; font-weight: 800; }
.time { margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.time .col { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.step { width: 56px; height: 36px; border: 0; border-radius: 18px; background: var(--rose-soft); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.step:active { transform: scale(.95); }
.digits { font-family: 'Rubik', 'Nunito', sans-serif; font-weight: 600; font-size: 34px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.colon { font-family: 'Rubik', 'Nunito', sans-serif; font-weight: 600; font-size: 34px; color: var(--rose); }

/* Итог */
.rows { padding: 6px 20px; }
.row-i { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.row-i:last-child { border-bottom: 0; }
.row-i .k { font-size: 14px; color: var(--muted); flex: none; }
.row-i .v { font-size: 16px; font-weight: 800; text-align: right; }
.row-i .v.accent { color: var(--rose); }
.wish-label { display: block; margin-top: 20px; font-size: 16px; font-weight: 800; }
.wish-label span { font-weight: 600; color: var(--muted); }
textarea {
  display: block; width: 100%; height: 104px; margin-top: 10px; padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, .9); border-radius: 22px; background: rgba(255, 255, 255, .7);
  font: 400 16px/1.45 'Nunito', sans-serif; color: var(--ink); resize: none; outline: none;
}
textarea:focus { border-color: var(--rose); }
textarea::placeholder { color: #9C7B76; }

/* Финал */
.final { align-items: center; justify-content: center; text-align: center; padding-left: 32px; padding-right: 32px; }
.final .big-heart { width: 112px; height: 112px; filter: drop-shadow(0 14px 28px rgba(184, 67, 95, .35)); }
.final .title { margin-top: 28px; font-size: 42px; line-height: 1.05; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: 14px 24px; border-radius: 999px;
  background: rgba(255, 255, 255, .8); box-shadow: 0 10px 30px rgba(184, 67, 95, .15);
  font-size: 16px; font-weight: 800; color: var(--rose);
}
.popin { opacity: 0; animation: popin .8s cubic-bezier(.34, 1.56, .64, 1) forwards; }
@keyframes popin { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

.confetti { position: absolute; top: -40px; pointer-events: none; animation: fall linear infinite; }
@keyframes fall { 0% { transform: translateY(-60px) rotate(0deg); } 100% { transform: translateY(110vh) rotate(320deg); } }

.burst { position: absolute; pointer-events: none; z-index: 5; animation: burst .9s ease-out forwards; }
@keyframes burst { 0% { opacity: 1; transform: translate(0, 0) scale(.6); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(var(--rot)); } }

.noscript { padding: 40px 24px; text-align: center; }

@media (max-height: 700px) {
  .card { min-height: 132px; padding: 14px; gap: 8px; }
  .title { font-size: 28px; }
  .question .title { font-size: 30px; }
  .day { width: 34px; height: 34px; }
}
