.auth-page {
    min-height: 100svh;
    padding: clamp(16px, 4vw, 48px);
    background: radial-gradient(ellipse at 85% 2%, var(--acS), transparent 55%), var(--bg);
}
.auth-frame {
    display: grid;
    grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr);
    width: min(100%, 880px);
    min-height: 476px;
    overflow: hidden;
    border: 1px solid var(--ln);
    border-radius: 30px;
    background: var(--sf);
    box-shadow: var(--sh2);
}
.auth-stage {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 100%;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(ellipse at 45% 47%, #30435b, #13243a 70%);
}
.auth-stage::before,
.auth-stage::after {
    position: absolute;
    z-index: -1;
    content: "";
    border-radius: 50%;
    pointer-events: none;
}
.auth-stage::before {
    width: 57%;
    aspect-ratio: 1;
    border: 1px solid #aab9ca35;
    box-shadow: 0 0 0 32px #aab9ca14, 0 0 0 64px #aab9ca0d;
    transform: rotate(-18deg) scaleX(1.1);
}
.auth-stage::after {
    width: 205px;
    height: 26px;
    background: #01081560;
    filter: blur(12px);
    transform: translateY(88px);
}
.auth-brand {
    position: absolute;
    inset-block-start: 30px;
    inset-inline-start: 32px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 800;
}
.auth-brand .avino { width: 22px; height: 20px; }
.auth-character {
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 42%;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.auth-character:focus-visible { outline-color: #ffda36; }
.auth-avatar.avino {
    width: clamp(146px, 22vw, 218px);
    height: auto;
    aspect-ratio: 552 / 470;
    filter: drop-shadow(0 16px 16px #07112455);
    transition: transform .20s ease-out;
}
.auth-frame:has(.auth-secret:focus) .auth-avatar {
    --avino-eyes: 0;
    --avino-closed-eyes: 1;
    transform: rotate(-5deg) translateY(2px);
}
.auth-frame[data-auth-state="busy"] .auth-avatar { transform: rotate(4deg) scale(.97); }
.auth-frame[data-auth-state="error"] .auth-stage { background: radial-gradient(ellipse at 45% 47%, #3a4155, #13243a 70%); }
.auth-avatar.auth-wave { animation: auth-wave .44s ease-out; }
@keyframes auth-wave {
    35% { transform: translateY(-9px) rotate(-9deg) scale(1.02); }
    68% { transform: translateY(-3px) rotate(4deg); }
}
.auth-page .auth-form {
    width: auto;
    min-width: 0;
    align-self: center;
    gap: 20px;
    padding: clamp(28px, 5vw, 58px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.auth-steps {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 3px;
    padding: 0;
    list-style: none;
    color: var(--mu);
    font-size: 12px;
    font-weight: 650;
}
.auth-steps li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.auth-steps li + li::before { width: 18px; height: 1px; margin-inline-end: 5px; background: var(--ln2); content: ""; }
.auth-steps li span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sf2); }
.auth-steps li span .i { width: 13px; height: 13px; }
.auth-steps .done span { background: var(--acS); color: var(--tx); }
.auth-steps [aria-current="step"] { color: var(--tx); font-weight: 800; }
.auth-steps [aria-current="step"] span { background: #ffce09; color: #17243a; }
.auth-intro h1 { color: var(--tx); font-size: clamp(26px, 4.2vw, 36px); font-weight: 850; line-height: 1.45; }
.auth-intro p { margin-top: 8px; color: var(--mu); font-size: 14px; line-height: 1.85; }
.auth-form .field { gap: 7px; color: var(--tx); font-weight: 700; }
.auth-form .input { min-width: 0; height: 52px; padding-inline: 15px; border-radius: 12px; font-size: 17px; }
.auth-form .auth-pin { padding-inline: 12px; text-align: center; font-size: 22px; letter-spacing: .48em; }
.auth-form .auth-error { margin: -4px 0 0; overflow-wrap: anywhere; }
.auth-form .auth-submit { position: relative; min-height: 52px; border-radius: 12px; }
.auth-submit-icon { position: absolute; inset-inline-end: 14px; display: grid; place-items: center; }
.auth-submit-icon .i { transform: scaleX(-1); }
.auth-form[aria-busy="true"] .auth-submit { opacity: .8; }
.auth-form[aria-busy="true"] .auth-submit-icon .i { display: none; }
.auth-form[aria-busy="true"] .auth-submit-icon::after {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    border-radius: 50%;
    content: "";
    animation: auth-spin .8s linear 1;
}
@keyframes auth-spin { to { transform: rotate(1turn); } }
.auth-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: space-between; }
.auth-actions .btn { min-height: 44px; padding-inline: 7px; font-size: 13px; }
@media (max-width: 630px) {
    .auth-frame { grid-template-columns: minmax(0, 1fr); width: min(100%, 430px); min-height: 0; border-radius: 24px; }
    .auth-stage { min-height: 150px; }
    .auth-stage::before { width: min(40%, 120px); box-shadow: 0 0 0 18px #aab9ca14, 0 0 0 36px #aab9ca0d; }
    .auth-stage::after { width: 110px; transform: translateY(44px); }
    .auth-brand { inset-block-start: 12px; inset-inline-start: 15px; font-size: 12px; gap: 5px; }
    .auth-brand .avino { width: 16px; height: 15px; }
    .auth-avatar.avino { width: 100px; }
    .auth-page .auth-form { gap: 15px; padding: clamp(18px, 5vw, 28px); }
}
@media (prefers-reduced-motion: reduce) {
    .auth-frame .auth-avatar { animation: none; transition: none; transform: none; }
    .auth-frame:has(.auth-secret:focus) .auth-avatar { transform: none; }
}

/* ---------- a friendlier stage (owner, 22 Nov 2026): Avino talks, glows and reacts ---------- */
.auth-stage { background: radial-gradient(ellipse at 50% 58%, #ffd54a33, transparent 46%), radial-gradient(ellipse at 45% 47%, #30435b, #13243a 70%); }
.auth-bubble {
    position: absolute;
    inset-block-start: 74px;
    inset-inline: 28px;
    margin: 0 auto;
    max-width: 290px;
    padding: 10px 16px;
    border-radius: 18px 18px 18px 4px;
    background: #fff;
    color: #17243a;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.8;
    text-align: center;
    box-shadow: 0 10px 24px -12px #000a;
    animation: auth-pop .45s cubic-bezier(.2, 1.4, .5, 1) both;
}
.auth-bubble::after {
    position: absolute;
    inset-block-end: -8px;
    inset-inline-start: 50%;
    width: 16px;
    height: 16px;
    background: #fff;
    content: "";
    transform: translateX(50%) rotate(45deg);
    border-radius: 3px;
}
@keyframes auth-pop { from { opacity: 0; transform: translateY(8px) scale(.9); } }
.auth-character { margin-block-start: 70px; }
.auth-avatar.avino { animation: auth-float 3.6s ease-in-out infinite; }
@keyframes auth-float { 50% { translate: 0 -7px; } }
.auth-avatar.avino.auth-wave { animation: auth-wave .44s ease-out; }
.auth-spark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #ffda36; box-shadow: 0 0 12px #ffda36; opacity: .8;
    animation: auth-twinkle 2.8s ease-in-out infinite; pointer-events: none; }
.auth-spark.s1 { inset-block-start: 46%; inset-inline-start: 16%; }
.auth-spark.s2 { inset-block-start: 70%; inset-inline-end: 18%; width: 6px; height: 6px; animation-delay: .9s; }
.auth-spark.s3 { inset-block-start: 34%; inset-inline-end: 22%; width: 5px; height: 5px; animation-delay: 1.7s; }
@keyframes auth-twinkle { 50% { opacity: .15; transform: scale(.5); } }
.auth-frame[data-auth-state="error"] .auth-avatar { animation: auth-shake .5s ease-in-out 1; }
@keyframes auth-shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.auth-frame:has(input[name="extension"]:focus) .auth-avatar { transform: rotate(6deg) translateX(-6px); }
.auth-form input[name="extension"] { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: .2em; }
@media (max-width: 630px) {
    .auth-stage { min-height: 250px; place-items: end center; padding-block-end: 14px; }
    .auth-bubble { inset-block-start: 40px; font-size: 13px; padding: 7px 12px; max-width: 250px; }
    .auth-character { margin-block-start: 0; padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-bubble, .auth-spark, .auth-avatar.avino { animation: none; }
}
