:root {
  --bg1: #14122b;
  --bg2: #2b1c4a;
  --ink: #fdf7ee;
  --muted: #b7aecf;
  --accent: #ffb86b;
  --accent2: #ff6f91;
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 20% 10%, rgba(255, 111, 145, .25), transparent 60%),
    radial-gradient(100% 70% at 90% 90%, rgba(255, 184, 107, .2), transparent 60%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom));
  text-align: center;
}

.hello {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font: inherit;
  cursor: pointer;
  width: min(100%, 360px);
  padding: 44px 24px 36px;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 24px 60px rgba(0, 0, 0, .35);
  backdrop-filter: blur(12px);
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}

.hello:active { transform: scale(.97); }
.hello:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.wave {
  font-size: 72px;
  line-height: 1;
  transform-origin: 70% 80%;
  animation: wave 2.4s ease-in-out infinite;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

.word {
  font-size: clamp(34px, 11vw, 46px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.swap .word, .swap .lang { animation: pop .38s cubic-bezier(.2, .9, .3, 1.3); }

@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.hint { color: var(--muted); font-size: 15px; }

.count { color: rgba(183, 174, 207, .7); font-size: 13px; min-height: 1em; }

@media (prefers-reduced-motion: reduce) {
  .wave, .swap .word, .swap .lang { animation: none; }
}
