/* Sign-up + login · design session · on top of ../ui/ui.css. Canvas: "1 · Sign up", "2 · Code". */
.auth { min-height: 100dvh; display: flex; flex-direction: column; }
.auth__head { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }
.auth__brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.auth__badge { width: 40px; height: 40px; display: block; }
.auth__word { font: 700 22px/1.3 var(--font); }
.auth__main { flex: 1; display: flex; flex-direction: column; gap: var(--s5); padding-block: var(--s3) var(--s5); }
.auth__foot { padding-block: var(--s3) calc(var(--s6) + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s3); }
.auth__foot .t-small, .auth__foot .t-label { text-align: center; }

.gift { background: var(--hero); color: #fff; border-radius: 28px 28px 28px 10px; padding: var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.gift__label { font-size: 14px; color: #C4C5CE; }
.gift__num { font: var(--t-num-l); letter-spacing: -.02em; color: var(--saffron); }
.gift__unit { font-size: 15px; color: #C4C5CE; }
.gift__coins { display: flex; align-items: center; }
.gift__coins .coin { width: 44px; height: 44px; font-size: 14px; margin-inline-start: -12px; box-shadow: 0 0 0 3px var(--hero); animation: gift-float 2.4s ease-in-out infinite; }
.gift__coins .coin:nth-child(2) { animation-delay: .3s; } .gift__coins .coin:nth-child(3) { animation-delay: .6s; }
@keyframes gift-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.pw { position: relative; }
/* the password input is dir=ltr, so use physical sides: button on the left, room for it on the left */
.pw .input { padding-left: 72px; }
.pw__toggle { position: absolute; left: 6px; top: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--r-pill); color: var(--saffron-ink); font: 600 14px/1 var(--font); }

/* the 6 code boxes: one real input on top, boxes drawn under it */
.code { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; direction: ltr; }
.code__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; font-size: 16px; z-index: 2; }
.code__box { height: 60px; border-radius: var(--r-m); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line-input); display: grid; place-items: center; font: 700 26px/1 var(--font); font-variant-numeric: tabular-nums; }
.code__box.is-now { box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 4px var(--saffron-tint); }
.code__box.is-now::after { content: ""; width: 2px; height: 26px; background: var(--ink); animation: caret 1s steps(1) infinite; }
.code__box.is-bad { box-shadow: inset 0 0 0 2px var(--alarm); }
.code:has(.code__input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 18px; }
@keyframes caret { 50% { opacity: 0; } }
.devcode { font: var(--t-label); color: var(--ink-3); background: var(--card-2); border-radius: var(--r-s); padding: 8px 12px; }

.done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s4); }
.done__mascot { width: 140px; height: 140px; }

@media (min-width: 900px) { .auth .wrap { max-width: 460px; } }
@media (prefers-reduced-motion: reduce) { .gift__coins .coin, .code__box.is-now::after { animation: none; } }
