:root {
  color-scheme: dark;
  --bg: #000;
  --text: #f5f3f7;
  --muted: #85818a;
  --pink: #ec86bd;
  --purple: #b09afa;
  --danger: #ff83a8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; min-height: 100%; margin: 0; background: #000; }
body {
  min-height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) 22px max(18px, env(safe-area-inset-bottom));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
.shell {
  width: 100%;
  max-width: 390px;
  min-height: min(520px, calc(100dvh - 36px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}
.top { display: flex; flex-direction: column; gap: 5px; }
.eyebrow { color: var(--pink); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: lowercase; }
h1 { margin: 0; color: #c6c1ca; font-size: 13px; font-weight: 500; }
.timer, .progress { display: none !important; }
.card { width: 100%; min-height: 210px; display: flex; align-items: center; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.card::before, .card::after { display: none; }
.step { width: 100%; display: flex; flex-direction: column; animation: appear .22s ease-out both; }
.step[hidden] { display: none; }
@keyframes appear { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h2 { margin: 0 0 8px; color: var(--text); font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; }
.hint { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.field { display: block; position: relative; margin: 24px 0 20px; }
.field input {
  width: 100%; padding: 20px 2px 10px; border: 0; border-bottom: 1px solid #37333b; border-radius: 0;
  outline: none; background: transparent; color: var(--text); font: 500 18px/1.3 inherit;
  font-family: inherit; font-size: 18px; transition: border-color .18s ease;
}
.field input::placeholder { color: #56515a; }
.field input:focus { border-bottom-color: var(--purple); box-shadow: none; }
.field input.invalid { border-bottom-color: var(--danger); }
.field-lbl { position: absolute; top: 0; left: 2px; color: #817a86; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; pointer-events: none; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn {
  min-height: 46px; width: 100%; padding: 12px 18px; border: 0; border-radius: 7px;
  background: linear-gradient(100deg, #dc79b0, #a38be8); color: #160d19;
  font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer; transition: opacity .16s ease, transform .16s ease;
}
.btn:active { transform: scale(.985); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-ghost { margin-top: 14px; border: 0; background: transparent; color: var(--muted); }
.turnstile-wrap { position: relative; display: flex; align-items: center; justify-content: center; min-height: 68px; margin: 22px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; }
#turnstile { min-height: 65px; }
.turnstile-skeleton { position: absolute; inset: 0; display: grid; place-items: center; background: #000; transition: opacity .2s ease; }
.turnstile-skeleton span { width: 20px; height: 20px; border: 2px solid #2c2731; border-top-color: var(--pink); border-radius: 50%; animation: spin .8s linear infinite; }
.turnstile-skeleton.hide { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.step-captcha { align-items: flex-start; }
.step-captcha h2 { max-width: 320px; margin-bottom: 2px; font-size: 19px; }
.step-final { align-items: flex-start; justify-content: center; min-height: 160px; text-align: left; }
.step-final h2 { color: var(--pink); font-size: 22px; }
.badge-row, .badge, .check, .cross { display: none !important; }
.foot { min-height: 16px; color: #706b75; font-size: 11px; }
.foot span { display: block; }
.shake { animation: shake .32s ease; }
@keyframes shake { 25% { transform: translateX(-4px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
body[data-screen="captcha"] .top,
body[data-screen="done"] .top,
body[data-screen="error"] .top,
body[data-screen="loading"] .top { display: none; }
body[data-screen="captcha"] .shell { max-width: 390px; }
body[data-screen="done"] .foot { display: none; }
body[data-screen="done"] .step-final h2 { color: var(--purple); }
body[data-screen="error"] .step-final h2 { color: var(--pink); }
body[data-screen="captcha"] .card,
body[data-screen="done"] .card,
body[data-screen="error"] .card,
body[data-screen="loading"] .card { min-height: 170px; }
@media (max-height: 540px) {
  .shell { min-height: calc(100dvh - 28px); gap: 12px; }
  .card { min-height: 160px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
