:root {
  --bg: var(--tg-theme-bg-color, #1a0b12);
  --text: var(--tg-theme-text-color, #fff);
  --accent: #ff3d6e;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #3a1022, #12060b 70%);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

.screen {
  position: fixed;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
  z-index: 2;
}
.screen.active { display: flex; }

h1 { margin: 0; font-size: 26px; }

input[type="date"] {
  font: inherit;
  font-size: 20px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid #ffffff33;
  background: #ffffff14;
  color: #fff;
  color-scheme: dark;
}

.row { display: flex; gap: 16px; }

.btn {
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  padding: 14px 32px;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn:active { transform: scale(.96); }

.error { color: #ff8da8; margin: 0; }
.error[hidden] { display: none; }
.shake { animation: shake .4s; }
@keyframes shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* ---- kiss screen ---- */
.status {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff1a;
}
.status.partner-online::before { content: "● "; color: #5df08a; }

#lips {
  width: min(80vw, 380px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: transform .15s ease, filter .3s ease;
  filter: drop-shadow(0 0 0 transparent);
}
#lips svg { width: 100%; display: block; pointer-events: none; }

#lips.level-1 { transform: scale(1.04); filter: drop-shadow(0 0 18px #ff3d6e88); }
#lips.level-2 {
  transform: scale(1.12);
  filter: drop-shadow(0 0 40px #ff3d6e) brightness(1.15);
  animation: pulse .7s ease-in-out infinite;
}
@keyframes pulse {
  50% { transform: scale(1.18); }
}

.hint { margin: 0; opacity: .7; min-height: 1.4em; }

/* ---- hearts ---- */
#hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.heart {
  position: absolute;
  bottom: -40px;
  width: var(--size);
  height: var(--size);
  color: var(--color);
  opacity: 0;
  animation: float var(--dur) ease-in forwards;
}
.heart svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.heart.bright { filter: drop-shadow(0 0 8px currentColor); }

@keyframes float {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  15%  { opacity: var(--alpha); }
  100% { transform: translate(var(--drift), -110vh) scale(1.1); opacity: 0; }
}
