* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: #f4f1ea;
  color: #161616;
  font-family: Outfit, "Segoe UI", sans-serif;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(390px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  overflow: visible;
  background:
    linear-gradient(rgba(22, 22, 22, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 22, 22, 0.04) 1px, transparent 1px),
    #f7f4ee;
  background-size: 22px 22px, 22px 22px, auto;
}

.logo {
  display: block;
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 10px 24px rgba(22, 22, 22, 0.08);
}

.help {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.slot {
  display: inline-block;
  position: relative;
  height: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  color: #111;
  transition: width 0.5s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.phrase {
  display: inline-block;
  white-space: nowrap;
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
  transition: transform 0.45s ease, filter 0.45s ease, opacity 0.45s ease;
}

.phrase.leave {
  transform: translateY(-110%);
  filter: blur(6px);
  opacity: 0;
}

.phrase.enter {
  transform: translateY(110%);
  filter: blur(6px);
  opacity: 0;
  transition: none;
}

h1 {
  margin: 8px 0 0;
  max-width: 11ch;
  font-size: 38px;
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.word {
  display: inline-block;
  margin-right: 0.22em;
  opacity: 0;
  transform: translateY(20px);
  animation: wordIn 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.word:nth-child(1) { animation-delay: 0s; }
.word:nth-child(2) { animation-delay: 0.08s; }
.word:nth-child(3) { animation-delay: 0.16s; }

.deck {
  margin: 12px 0 0;
  max-width: 32ch;
  color: #4e4944;
  font-size: 15px;
  line-height: 1.45;
  opacity: 0;
  animation: fadeIn 0.35s ease 0.62s forwards;
}

@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.92); }
  62% { opacity: 1; transform: scale(1.045); }
  100% { opacity: 1; transform: scale(1); }
}

.points {
  margin: 22px 0 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(22, 22, 22, 0.06);
}

.points li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.points li + li { border-top: 1px solid #efeae2; }

.points span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #161616;
  color: #f7f4ee;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.foot {
  margin-top: auto;
  padding-top: 18px;
}

.fine, .ads {
  margin: 0;
  color: #6d675f;
  font-size: 11px;
  line-height: 1.45;
}

.ads { margin-top: 8px; }

.ads a { color: inherit; }

.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 12px;
}

.legal a {
  color: #6d675f;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-page {
  width: min(390px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 22px 18px 32px;
}

.legal-page a.back {
  color: #161616;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.legal-page h1 {
  max-width: none;
  margin: 18px 0 0;
  font-size: 28px;
}

.legal-page p {
  margin: 12px 0 0;
  color: #4e4944;
  font-size: 15px;
  line-height: 1.5;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 18px auto 0;
  min-height: 54px;
  padding: 15px 18px;
  border-radius: 999px;
  background: #111;
  color: #f7f4ee;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.22);
  opacity: 0;
  animation: popIn 0.45s cubic-bezier(0.2, 1.15, 0.4, 1) 0.98s forwards;
}

.cta svg { width: 18px; height: 18px; flex-shrink: 0; }

.cta:active { transform: translateY(1px); }

.toast-root {
  position: fixed;
  left: max(12px, calc(50% - 183px));
  bottom: calc(150px + env(safe-area-inset-bottom));
  z-index: 8;
  width: min(250px, calc(100% - 36px));
}

.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 12px 12px 12px 14px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(22, 22, 22, 0.16);
  transform: translateX(-120%);
  opacity: 0;
}

.toast.show {
  animation: toastIn 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.toast.hide {
  animation: toastOut 0.4s ease forwards;
}

.toast p {
  margin: 0;
  grid-column: 1;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.toast .ago {
  grid-column: 1;
  color: #6d675f;
  font-size: 12px;
}

.toast-x {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #f4f1ea;
  color: #161616;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

@keyframes toastIn {
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  to { transform: translateX(-120%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .word, .deck, .cta { animation: none; opacity: 1; transform: none; }
  .phrase, .slot { transition: none; }
  .toast.show, .toast.hide { animation: none; }
  .toast.show { transform: none; opacity: 1; }
}

