@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --brand-forest: #0e4a2f;
    --brand-green: #115c38;
    --brand-gold: #f7c41f;
    --brand-gold-light: #ffe45c;
    --brand-red: #b3242a;

    /* liquid-glass tokens */
    --glass-tint: rgba(255,255,255,.14);
    --glass-tint-strong: rgba(255,255,255,.22);
    --glass-edge: rgba(255,255,255,.45);
    --glass-text: #ffffff;
    --glass-muted: rgba(255,255,255,.76);
    --mx: 50%;
    --my: 0%;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', 'Segoe UI', Arial, sans-serif; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    background: var(--brand-forest);
    overflow-x: hidden;
}

/* ---------- Live background (storefront photos crossfade, pure CSS) ----------
   Kept sharp (no blur) so the glass card has real detail to refract. */
.bg-slideshow {
    position: fixed;
    inset: -30px;
    z-index: -2;
    overflow: hidden;
    filter: blur(1.5px) saturate(1.12) contrast(1.04);
    background: var(--brand-forest);
}
.bg-slideshow .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    will-change: opacity, transform;
    backface-visibility: hidden;
    animation: bgSlide 35s linear infinite;
}
.bg-slideshow .s1 { background-image: url('../images/bg-1.jpg'); animation-delay: -1.5s; }   /* already showing on load */
.bg-slideshow .s2 { background-image: url('../images/bg-2.jpg'); animation-delay: 5.5s; }
.bg-slideshow .s3 { background-image: url('../images/bg-3.jpg'); animation-delay: 12.5s; }
.bg-slideshow .s4 { background-image: url('../images/bg-4.jpg'); animation-delay: 19.5s; background-position: center 30%; }  /* storefront: keep the sign in frame */
.bg-slideshow .s5 { background-image: url('../images/bg-5.jpg'); animation-delay: 26.5s; background-position: center 12%; }  /* keep the glowing Pho Hoa sign in frame */

/* 5 photos x 7s each = 35s loop. Each photo fades in ON TOP of the previous one (1.5s), and the previous
   one only drops away once the new one has been fully opaque for ~0.6s, so the screen never dips or flashes.
   z-index is stepped so no two photos ever share a level (equal levels fall back to HTML order, which made
   the last photo pop back over the first one at the loop point):
     0 - 6.5%    incoming, z 3  (fade-in done at 4.3%; the outgoing photo drops at 6%, underneath it)
     6.5 - 26%   holding,  z 2  (slow zoom)
     26% -       gone,     z 1
   To change the number of photos: loop = photos x 7s, then rescale the percentages
   (fade 1.5s = 4.3%, outgoing drops at 26% = 9.1s, i.e. 2.1s after the next photo starts). */
/* portrait phones: shift the crop so the Pho Hoa signs stay in view */
@media (orientation: portrait) {
    .bg-slideshow .s4 { background-position: 22% 30%; }
    .bg-slideshow .s5 { background-position: 47% 8%; }
}
@keyframes bgSlide {
    0%      { opacity: 0; z-index: 3; transform: scale(1);    }
    4.3%    { opacity: 1; z-index: 3; }
    6.49%   { opacity: 1; z-index: 3; }
    6.5%    { opacity: 1; z-index: 2; }
    26%     { opacity: 1; z-index: 2; transform: scale(1.08); }
    26.01%  { opacity: 0; z-index: 1; transform: scale(1.08); }
    100%    { opacity: 0; z-index: 1; transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .bg-slideshow .slide { animation: none; }
    .bg-slideshow .s1 { opacity: 1; }
}

/* lighter scrim than before: just enough to keep white text legible */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 42%, rgba(10,60,38,.04), rgba(6,40,26,.55) 105%),
        linear-gradient(160deg, rgba(14,74,47,.26), rgba(8,40,26,.30));
    z-index: -1;
}

/* ---------- Ambient light: slow drifting colour behind the glass so it has something to refract ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: .42;
    will-change: transform;
}
.blob.b1 { width: 460px; height: 460px; left: calc(50% - 470px); top: calc(50% - 330px);
           background: radial-gradient(circle, #ffd84d 0%, rgba(255,216,77,0) 68%); animation: drift1 24s ease-in-out infinite alternate; }
.blob.b2 { width: 520px; height: 520px; left: calc(50% + 70px);  top: calc(50% - 60px);
           background: radial-gradient(circle, #1fbf78 0%, rgba(31,191,120,0) 68%); animation: drift2 28s ease-in-out infinite alternate; }
.blob.b3 { width: 340px; height: 340px; left: calc(50% - 330px); top: calc(50% + 140px);
           background: radial-gradient(circle, #b9f03c 0%, rgba(185,240,60,0) 68%); animation: drift3 20s ease-in-out infinite alternate; opacity: .30; }
@keyframes drift1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-150px, -70px) scale(.9); } }
@keyframes drift3 { to { transform: translate(110px, -110px) scale(1.2); } }

/* ---------- Slide dots (follow the photo that is showing) ---------- */
.slide-dots {
    position: fixed;
    left: 50%;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 1;
    pointer-events: none;
}
.slide-dots i {
    display: block;
    height: 6px;
    width: 6px;
    border-radius: 99px;
    background: rgba(255,255,255,.45);
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
    animation: dotOn 35s linear infinite;
}
.slide-dots i:nth-child(1) { animation-delay: -1.5s; }
.slide-dots i:nth-child(2) { animation-delay: 5.5s; }
.slide-dots i:nth-child(3) { animation-delay: 12.5s; }
.slide-dots i:nth-child(4) { animation-delay: 19.5s; }
.slide-dots i:nth-child(5) { animation-delay: 26.5s; }
@keyframes dotOn {
    0%, 19.6% { width: 24px; background: var(--brand-gold-light); }
    20%, 100% { width: 6px;  background: rgba(255,255,255,.45); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- The liquid glass card ---------- */
.login-card {
    position: relative;
    isolation: isolate;
    width: 440px;
    max-width: 100%;
    padding: 40px 42px 32px;
    border-radius: 32px;
    text-align: center;
    color: var(--glass-text);

    /* fallback when backdrop-filter is missing: a darker, more opaque tint */
    background: rgba(14,74,47,.78);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .login-card {
        background:
            linear-gradient(145deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,.02) 60%, rgba(255,255,255,.14) 100%),
            rgba(8,50,32,.34);   /* green tint keeps white text readable over the bright photos */
        -webkit-backdrop-filter: blur(18px) saturate(180%) brightness(.92);
        backdrop-filter: blur(18px) saturate(180%) brightness(.92);
    }
}
.login-card {
    border: 1px solid rgba(255,255,255,.28);
    box-shadow:
        inset 1.5px 1.5px 1px rgba(255,255,255,.70),     /* bright top-left rim   */
        inset -1.5px -1.5px 1px rgba(255,255,255,.28),   /* soft bottom-right rim */
        inset 0 0 34px rgba(255,255,255,.10),            /* body glow             */
        inset 0 -22px 40px -20px rgba(255,255,255,.18),  /* lower caustic         */
        0 2px 6px rgba(0,0,0,.10),
        0 28px 70px rgba(0,0,0,.38);
    animation: cardIn .7s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* specular sheen across the top + a light that follows the pointer */
.login-card::before,
.login-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
}
.login-card::before {
    background:
        radial-gradient(420px circle at var(--mx) var(--my), rgba(255,255,255,.30), transparent 55%),
        linear-gradient(180deg, rgba(255,255,255,.30) 0%, rgba(255,255,255,0) 22%);
    mix-blend-mode: soft-light;
    opacity: .95;
}
/* thin gradient edge that catches light at the corners */
.login-card::after {
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,0) 30%, rgba(255,255,255,0) 70%, rgba(255,255,255,.65));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    z-index: 0;
}

/* Chromium only (class added by the inline script): true lens-style refraction of the
   background using an SVG displacement map. Other browsers keep the plain blur above. */
.lg-refract .login-card {
    -webkit-backdrop-filter: url(#lg-distort) blur(10px) saturate(180%) brightness(.92);
    backdrop-filter: url(#lg-distort) blur(10px) saturate(180%) brightness(.92);
}

.logo {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    object-fit: cover;
    display: block;
    margin: 0 auto 20px;
    border: 1px solid rgba(255,255,255,.55);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.7),
        0 0 0 6px rgba(255,255,255,.12),
        0 12px 28px rgba(0,0,0,.30);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255,255,255,.30);
    background: rgba(255,255,255,.10);
    color: var(--brand-gold-light);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}

.login-card h1 {
    color: var(--glass-text);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.3px;
    margin-bottom: 8px;
    text-shadow: 0 1px 12px rgba(0,0,0,.35);
}

.subtitle {
    color: var(--glass-muted);
    font-size: 16px;
    margin-bottom: 28px;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

.login-error {
    background: rgba(179,36,42,.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,180,182,.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 18px;
    text-shadow: 0 1px 4px rgba(0,0,0,.35);
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Glass inputs ---------- */
.field {
    position: relative;
    margin-bottom: 16px;
}

.field input {
    width: 100%;
    height: 58px;
    padding: 0 52px 0 54px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 18px;
    font-size: 17px;
    color: #fff;
    background: rgba(255,255,255,.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,.16),
        inset 0 1px 0 rgba(255,255,255,.30),
        0 1px 0 rgba(255,255,255,.18);
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.field input::placeholder { color: rgba(255,255,255,.68); }
.field input:hover { background: rgba(255,255,255,.17); }
.field input:focus {
    outline: none;
    background: rgba(255,255,255,.22);
    border-color: rgba(255,228,92,.85);
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,.12),
        inset 0 1px 0 rgba(255,255,255,.45),
        0 0 0 4px rgba(247,196,31,.28),
        0 0 28px rgba(255,228,92,.25);
}
/* keep browser autofill from painting a solid white/yellow box over the glass */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff;
    caret-color: #fff;
    -webkit-box-shadow: 0 0 0 100px rgba(40,90,65,.55) inset;
    transition: background-color 9999s ease-out 0s;
}

.icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    width: 22px;
    height: 22px;
    transform: translateY(-50%);
    fill: none;
    stroke: rgba(255,255,255,.88);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

/* Show/hide password */
.toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 13px;
    cursor: pointer;
    color: rgba(255,255,255,.88);
    transition: background .2s ease;
}
.toggle-pw:hover { background: rgba(255,255,255,.18); }
.toggle-pw:focus-visible { outline: 2px solid var(--brand-gold); }
.toggle-pw svg {
    width: 22px; height: 22px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.toggle-pw .eye-on { display: none; }
.toggle-pw.is-visible .eye-on { display: block; }
.toggle-pw.is-visible .eye-off { display: none; }

/* ---------- Gold glass button ---------- */
.btn-login {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 58px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(255,244,170,.75);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,232,110,.95) 0%, rgba(247,196,31,.88) 100%);
    color: #0b3d27;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow:
        inset 0 1.5px 0 rgba(255,255,255,.85),
        inset 0 -8px 14px rgba(211,150,10,.30),
        0 10px 26px rgba(247,196,31,.30),
        0 2px 6px rgba(0,0,0,.18);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
/* glossy highlight on the top half of the button */
.btn-login::before {
    content: "";
    position: absolute;
    left: 6px; right: 6px; top: 3px;
    height: 46%;
    border-radius: 14px 14px 40px 40px / 14px 14px 20px 20px;
    background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
    pointer-events: none;
}
/* light sweep on hover */
.btn-login::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-18deg);
    transition: left .7s ease;
    pointer-events: none;
}
.btn-login:hover::after { left: 130%; }
.btn-login svg {
    position: relative;
    width: 22px; height: 22px;
    fill: none; stroke: currentColor;
    stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.btn-login:hover {
    transform: translateY(-2px);
    filter: brightness(1.04) saturate(1.05);
    box-shadow:
        inset 0 1.5px 0 rgba(255,255,255,.9),
        inset 0 -8px 14px rgba(211,150,10,.30),
        0 16px 34px rgba(247,196,31,.42),
        0 2px 6px rgba(0,0,0,.18);
}
.btn-login:active { transform: translateY(0) scale(.99); }
.btn-login:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 3px; }

/* ---------- Footer with side rules ---------- */
.login-foot {
    margin-top: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--glass-muted);
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.login-foot::before,
.login-foot::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45));
}
.login-foot::after { background: linear-gradient(270deg, transparent, rgba(255,255,255,.45)); }

/* Install-app link under the sign-in form */
.install-link {
    display: block; width: 100%; margin-top: 14px; padding: 12px;
    border: 1px dashed rgba(255,255,255,.55); border-radius: 14px;
    background: rgba(255,255,255,.08); color: #fff;
    font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
    text-shadow: 0 1px 6px rgba(0,0,0,.3);
    transition: background .2s ease;
}
.install-link:hover { background: rgba(255,255,255,.2); }
.install-link[hidden] { display: none; }

@media (max-width: 460px) {
    .login-card { padding: 30px 22px 26px; border-radius: 26px; }
    .login-card h1 { font-size: 24px; }
    .login-foot { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-card { animation: none; }
    .btn-login, .btn-login::after { transition: none; }
}


/* ================= Polish pass ================= */

/* logo: gentle glow that "breathes" */
.logo { animation: logoGlow 5s ease-in-out infinite; }
@keyframes logoGlow {
    0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 6px rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.30), 0 0 0 rgba(255,228,92,0); }
    50%      { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 8px rgba(255,255,255,.16), 0 12px 28px rgba(0,0,0,.30), 0 0 34px rgba(255,228,92,.38); }
}

/* the card's contents rise in one after another */
.login-card > * { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; }
.login-card > .logo     { animation: rise .6s .10s cubic-bezier(.2,.8,.2,1) both, logoGlow 5s 1s ease-in-out infinite; }
.login-card > .eyebrow  { animation-delay: .18s; }
.login-card > h1        { animation-delay: .24s; }
.login-card > .subtitle { animation-delay: .30s; }
.login-card > form      { animation-delay: .38s; }
.login-card > .install-link { animation-delay: .46s; }
.login-card > .login-foot   { animation-delay: .52s; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* a slow band of light that glides across the glass every few seconds */

/* wrong-password message shakes once */
.login-card > .login-error { animation: rise .6s .1s both, shake .5s .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(3px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* icons light up gold when their field is active */
.icon-left { transition: stroke .25s ease, transform .25s ease; }
.field:focus-within .icon-left { stroke: var(--brand-gold-light); transform: translateY(-50%) scale(1.08); }

/* Caps Lock hint */
.caps-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: -4px 0 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--brand-gold-light);
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.caps-warning[hidden] { display: none; }
.caps-warning svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* button: arrow nudges forward, spinner while signing in */
.btn-icon { transition: transform .25s ease; }
.btn-login:hover .btn-icon { transform: translateX(3px); }
.btn-login .spinner { display: none; }
.btn-login.is-loading { pointer-events: none; filter: saturate(.85) brightness(.97); }
.btn-login.is-loading .btn-icon { display: none; }
.btn-login.is-loading .spinner {
    display: block;
    position: relative;
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2.5px solid rgba(11,61,39,.25);
    border-top-color: #0b3d27;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 460px) {
    .slide-dots { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
    .blob.b1 { left: calc(50% - 300px); }
    .blob.b2 { left: calc(50% - 120px); }
}

@media (prefers-reduced-motion: reduce) {
    .blob, .logo, .slide-dots i, .login-card > *, .login-card > .login-error { animation: none !important; }
    .slide-dots i:first-child { width: 24px; background: var(--brand-gold-light); }
}


/* ---------- Noodle bowl mascot: pops up bottom-right and says "Xin chao!" ---------- */
.mascot {
    position: fixed;
    right: calc(22px + env(safe-area-inset-right, 0px));
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: clamp(120px, 15vw, 210px);
    z-index: 2;
    pointer-events: none;
    transform: translateY(130%);
    animation: mascotIn .9s cubic-bezier(.2, 1.4, .4, 1) .7s forwards,
               mascotBob 3.2s ease-in-out 1.7s infinite;
}
.mascot-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0,0,0,.35)); }
.mascot-bubble {
    position: absolute;
    right: 62%;
    bottom: 88%;
    padding: 9px 16px;
    border-radius: 18px 18px 4px 18px;
    background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.08));
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid rgba(247,196,31,.65);
    color: var(--brand-gold-light);
    font: 700 clamp(15px, 1.5vw, 20px)/1.1 "Segoe UI", system-ui, -apple-system, sans-serif;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    box-shadow: 0 6px 18px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.35);
    opacity: 0;
    transform: scale(.4);
    transform-origin: 100% 100%;
    animation: bubbleIn .5s cubic-bezier(.2, 1.6, .4, 1) 1.5s forwards;
}
.mascot-svg .arm { transform-box: fill-box; transform-origin: 90% 100%; animation: mascotWave 1s ease-in-out 1.6s 4; }
.mascot-svg .st { animation: steamUp 2.4s ease-in-out infinite; }
.mascot-svg .st2 { animation-delay: .5s; }
.mascot-svg .st3 { animation-delay: 1s; }
@keyframes mascotIn   { to { transform: translateY(0); } }
@keyframes mascotBob  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bubbleIn   { to { opacity: 1; transform: scale(1); } }
@keyframes mascotWave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-24deg); } 75% { transform: rotate(14deg); } }
@keyframes steamUp    { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .75; } 100% { opacity: 0; transform: translateY(-10px); } }
@media (max-width: 520px) {
    .mascot { width: 104px; right: 8px; bottom: 6px; }
    .mascot-bubble { right: 40%; font-size: 14px; padding: 7px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .mascot { animation: none; transform: none; }
    .mascot-bubble { animation: none; opacity: 1; transform: none; }
    .mascot-svg .arm, .mascot-svg .st { animation: none; }
}

/* phones: step out of the way while the keyboard is up, and shrink a bit more on very small screens */
@media (max-width: 520px) {
    .mascot { transition: opacity .25s ease, translate .3s ease; }
    body.is-typing .mascot { opacity: 0; translate: 0 40%; }
}
@media (max-width: 360px) {
    .mascot { width: 88px; }
    .mascot-bubble { font-size: 13px; padding: 6px 10px; }
}
