/* ============================================================================
   auth-login.css — the sign-in popup (.signIn) and its backdrop (.overlay-glass)
   ----------------------------------------------------------------------------
   Markup: index.html (.signIn block). Behaviour stays where it was:
     • ui-manager.js ShowLogin()/HideLogin() set .signIn and .overlay-glass to
       inline display flex|block / none — every rule here lays out for that.
     • auth-manager.js wires #signIn (hosted /auth page) and reveals
       #directGAuth with an inline display only inside the Android app; its
       default display:none lives in style.css (#directGAuth) and nothing here
       sets display on it, so it stays hidden everywhere else.
     • auth-login.js wires #signUpBtn and moves focus into the dialog.

   Desktop (> 768px): a centred two-column card (illustration | sign-in).
   Mobile web (<= 768px): a full-screen sheet with the art as a banner.
   Android app (html.native-app): mobile-app.css owns that screen. The new
   layout rules are scoped to html:not(.native-app); the native block at the
   end only hides/aligns the NEW elements so the app keeps its old look.

   Note: style.css paints `* { color: var(--text-color); outline: none }`, so
   children set their colour explicitly and focus rings are re-enabled here.
   ========================================================================= */

/* ── Palette ──────────────────────────────────────────────────────────────── */
.signIn {
    /* UI */
    --si-line-strong: rgba(245, 238, 230, 0.17);
    --si-tint: rgba(245, 238, 230, 0.035);
    --si-accent-text: color-mix(in srgb, var(--accent, #b7795c) 58%, #ffffff);
    --si-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 28px 70px -18px rgba(0, 0, 0, 0.6), 0 10px 28px -10px rgba(40, 22, 12, 0.45);

    /* Illustration — dusk (dark theme) */
    --sa-sky-1: #231d1a;
    --sa-sky-2: #3a2a23;
    --sa-sky-3: #5b3b2e;
    --sa-star: #f6e6d2;
    --sa-star-opacity: 0.75;
    --sa-sun: #c98462;
    --sa-sun-halo: #8a5640;
    --sa-sun-shine: rgba(255, 226, 196, 0.38);
    --sa-cloud: rgba(246, 226, 204, 0.1);
    --sa-hill-far: #5c4336;
    --sa-hill-mid: #4d5642;
    --sa-hill-near: #3a4333;
    --sa-hill-warm: #7c4b38;
    --sa-line: rgba(246, 226, 204, 0.26);
    --sa-cypress: #2e3829;
    --sa-cypress-hi: rgba(246, 226, 204, 0.2);
    --sa-path: #a78467;
    --sa-stone-dot: rgba(60, 40, 30, 0.38);
    --sa-shadow: rgba(10, 6, 4, 0.38);
    --sa-stone: #efe3d2;
    --sa-stone-2: #d6c2aa;
    --sa-cella: #6e4535;
    --sa-door: #f2b866;
    --sa-roof: #b7795c;
    --sa-ink: #2a1d17;
    --sa-beacon: #f5c66c;
    --sa-flower: #e9b48f;
    --sa-bubble: #f6ece0;
    --sa-paper-fold: #dccab5;
    --sa-accent: #c47f5e;
    --sa-accent-deep: #9a5b41;
    --sa-sage-deep: #5f7350;
    --sa-sage-soft: #9fb08a;
    --sa-spark: #f7dcb6;
    --sa-olive: #36402f;
    --sa-olive-hi: rgba(246, 226, 204, 0.22);
    --sa-trunk: #2a1d17;
    --sa-head: #efe3d2;
    --sa-grain-opacity: 0.55;
}

body.light_mode .signIn {
    --si-line-strong: rgba(62, 54, 47, 0.2);
    --si-tint: rgba(62, 54, 47, 0.035);
    --si-accent-text: var(--accent-strong, #975d46);
    --si-shadow: 0 1px 2px rgba(62, 40, 28, 0.08), 0 30px 70px -20px rgba(92, 58, 38, 0.32), 0 10px 26px -12px rgba(92, 58, 38, 0.18);

    /* Illustration — morning (light theme) */
    --sa-sky-1: #fbf2e6;
    --sa-sky-2: #f6e0ca;
    --sa-sky-3: #f0cdb0;
    --sa-star-opacity: 0;
    --sa-sun: #eca67b;
    --sa-sun-halo: #f4c6a3;
    --sa-sun-shine: rgba(255, 250, 242, 0.7);
    --sa-cloud: #fff8ef;
    --sa-hill-far: #e7cca9;
    --sa-hill-mid: #b9c09a;
    --sa-hill-near: #97a47e;
    --sa-hill-warm: #d99c78;
    --sa-line: rgba(91, 63, 51, 0.36);
    --sa-cypress: #6e7f5d;
    --sa-cypress-hi: rgba(255, 248, 238, 0.4);
    --sa-path: #fbf1e3;
    --sa-stone-dot: rgba(150, 110, 85, 0.35);
    --sa-shadow: rgba(91, 63, 51, 0.18);
    --sa-stone: #fffaf2;
    --sa-stone-2: #f0e1cd;
    --sa-cella: #cf9674;
    --sa-door: #f8cf86;
    --sa-roof: #c27a59;
    --sa-ink: #5b3f33;
    --sa-beacon: #f5bf5f;
    --sa-flower: #fff4e6;
    --sa-bubble: #fffaf4;
    --sa-paper-fold: #efe1cf;
    --sa-accent: #c27a59;
    --sa-accent-deep: #975d46;
    --sa-sage-deep: #6b7f58;
    --sa-sage-soft: #b3c19c;
    --sa-spark: #d98b62;
    --sa-olive: #879672;
    --sa-olive-hi: rgba(255, 250, 240, 0.55);
    --sa-trunk: #7d5f4c;
    --sa-head: #fff6ea;
    --sa-grain-opacity: 0.36;
}

/* ── Backdrop: fully opaque ───────────────────────────────────────────────
 * This scrim must NEVER be translucent. Earlier it was a 0.64-alpha wash over
 * a blur, so the app's loading skeletons and shimmer rows showed through
 * around the sign-in card and the screen looked broken. Solid base colour
 * (per theme) with the faint warm gradients painted ON TOP of it. */
.overlay-glass {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    background:
        radial-gradient(110% 80% at 22% 18%, rgba(183, 121, 92, 0.2), transparent 62%),
        radial-gradient(90% 70% at 85% 92%, rgba(120, 138, 98, 0.12), transparent 60%),
        #141110 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    pointer-events: auto;
}

body.light_mode .overlay-glass {
    background:
        radial-gradient(110% 80% at 22% 18%, rgba(214, 152, 118, 0.26), transparent 62%),
        radial-gradient(90% 70% at 85% 92%, rgba(160, 176, 130, 0.18), transparent 60%),
        #f3ece4 !important;
}

/* ── Shared inner layout (desktop + mobile web) ─────────────────────────── */
.signIn .signin-art {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--sa-sky-2);
}

.signIn .signin-illustration {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* Paper grain over the flat colours (a static image, so the light SVG
   animations never re-run a filter). */
.signIn .signin-art::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .24 0 0 0 0 .19 1.7 0 0 0 -.62'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: multiply;
    opacity: var(--sa-grain-opacity);
}

.signIn .signin-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.signIn .signin-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.signIn .signin-mark {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: #f6eee4;
    box-shadow: inset 0 0 0 1px rgba(91, 63, 51, 0.12), 0 1px 2px rgba(40, 24, 14, 0.12);
}

.signIn .signin-mark img {
    display: block;
    width: 30px;
    height: 30px;
}

.signIn .signin-title {
    margin: 0 0 8px;
    font-family: ui-serif, Georgia, 'Times New Roman', serif;
    font-size: 33px;
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.012em;
    color: var(--text-color);
}

.signIn .signin-tagline {
    max-width: 34ch;
    margin: 0 0 24px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--subheading-color);
}

.signIn .signin-actions {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
}

/* Buttons */
.signIn .signin-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.005em;
    text-align: center;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.signIn .signin-btn * {
    color: inherit;
}

.signIn .signin-btn svg {
    flex: none;
    display: block;
}

/* Primary — accent-strong keeps white text above 4.5:1 for the default
   accent (plain --accent #b7795c only reaches ~3.6:1). */
.signIn .signin-btn--primary {
    font-weight: 600;
    background: var(--accent-strong, #975d46);
    color: var(--accent-contrast, #ffffff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 20px -10px var(--accent-strong, #975d46);
}

.signIn .signin-btn--primary:hover {
    background: color-mix(in srgb, var(--accent-strong, #975d46) 86%, #000000);
}

.signIn .signin-btn--primary .signin-btn-arrow {
    transition: transform 0.2s ease;
}

.signIn .signin-btn--primary:hover .signin-btn-arrow {
    transform: translateX(3px);
}

/* Secondary — neutral outline (Google, Android app only) */
.signIn .signin-btn--outline {
    background: var(--primary-color);
    color: var(--text-color);
    border-color: var(--si-line-strong);
}

.signIn .signin-btn--outline:hover {
    background: var(--secondary-color);
}

/* Tertiary — soft accent wash */
.signIn .signin-btn--soft {
    background: var(--accent-soft, rgba(183, 121, 92, 0.13));
    color: var(--si-accent-text);
    border-color: color-mix(in srgb, var(--accent, #b7795c) 24%, transparent);
}

.signIn .signin-btn--soft:hover {
    background: color-mix(in srgb, var(--accent, #b7795c) 20%, transparent);
}

.signIn .signin-btn:active {
    transform: translateY(1px);
}

.signIn .signin-btn:focus-visible,
.signIn .signin-legal a:focus-visible {
    outline: 2px solid var(--accent, #b7795c);
    outline-offset: 3px;
}

.signIn .signin-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 1px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--subheading-color);
}

.signIn .signin-divider::before,
.signIn .signin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.signIn .signin-divider span {
    color: var(--subheading-color);
}

.signIn .signin-trust {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 18px 0 0;
    padding: 10px 13px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--si-tint);
    font-size: 12.5px;
    line-height: 1.5;
    text-align: left;
    color: var(--subheading-color);
}

.signIn .signin-trust svg {
    flex: none;
    margin-top: 1.5px;
    color: var(--si-accent-text);
}

.signIn .signin-trust span {
    color: var(--subheading-color);
}

.signIn .signin-legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--subheading-color);
}

.signIn .signin-legal a {
    border-radius: 4px;
    color: var(--subheading-color);
    text-decoration: none;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.signIn .signin-legal a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.signIn .signin-legal span {
    color: var(--subheading-color);
    opacity: 0.7;
}

/* ── Illustration paint ──────────────────────────────────────────────────── */
.signIn .sa-stop-1 { stop-color: var(--sa-sky-1); }
.signIn .sa-stop-2 { stop-color: var(--sa-sky-2); }
.signIn .sa-stop-3 { stop-color: var(--sa-sky-3); }
.signIn .sa-glow-1 { stop-color: var(--sa-beacon); stop-opacity: 0.7; }
.signIn .sa-glow-2 { stop-color: var(--sa-beacon); stop-opacity: 0; }
.signIn .sa-stars circle { fill: var(--sa-star); opacity: var(--sa-star-opacity); }
.signIn .sa-sun-halo2 { fill: var(--sa-sun-halo); opacity: 0.34; }
.signIn .sa-sun-halo { fill: var(--sa-sun-halo); opacity: 0.62; }
.signIn .sa-sun { fill: var(--sa-sun); }
.signIn .sa-sun-shine { fill: none; stroke: var(--sa-sun-shine); stroke-width: 3; stroke-linecap: round; }
.signIn .sa-cloud { fill: var(--sa-cloud); }
.signIn .sa-hill-far { fill: var(--sa-hill-far); }
.signIn .sa-hill-mid { fill: var(--sa-hill-mid); }
.signIn .sa-hill-near { fill: var(--sa-hill-near); }
.signIn .sa-hill-warm { fill: var(--sa-hill-warm); }
.signIn .sa-line { fill: none; stroke: var(--sa-line); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.signIn .sa-cypress { fill: var(--sa-cypress); }
.signIn .sa-ink-line { fill: none; stroke: var(--sa-cypress-hi); stroke-width: 1.4; stroke-linecap: round; }
.signIn .sa-path { fill: var(--sa-path); }
.signIn .sa-stones ellipse { fill: var(--sa-stone-dot); }
.signIn .sa-shadow { fill: var(--sa-shadow); }
.signIn .sa-stone { fill: var(--sa-stone); }
.signIn .sa-stone-2 { fill: var(--sa-stone-2); }
.signIn .sa-cella { fill: var(--sa-cella); }
.signIn .sa-door { fill: var(--sa-door); }
.signIn .sa-roof { fill: var(--sa-roof); }
.signIn .sa-ink,
.signIn .sa-ink path { fill: none; stroke: var(--sa-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.signIn .sa-ink .sa-ink-thin { stroke-width: 1.1; opacity: 0.6; }
.signIn .sa-beacon-rays path { fill: none; stroke: var(--sa-beacon); stroke-width: 2.2; stroke-linecap: round; }
.signIn .sa-beacon { fill: var(--sa-beacon); stroke: var(--sa-ink); stroke-width: 1.5; }
.signIn .sa-beacon-hi { fill: #ffffff; opacity: 0.85; }
.signIn .sa-tufts path { fill: none; stroke: var(--sa-line); stroke-width: 1.5; stroke-linecap: round; }
.signIn .sa-flowers circle { fill: var(--sa-flower); }
.signIn .sa-trail { fill: none; stroke: var(--sa-line); stroke-width: 1.7; stroke-linecap: round; stroke-dasharray: 1 6; }
.signIn .sa-paper { fill: var(--sa-bubble); }
.signIn .sa-paper-fold { fill: var(--sa-paper-fold); }
.signIn .sa-bubble { fill: var(--sa-bubble); stroke: var(--sa-ink); stroke-width: 1.7; stroke-linejoin: round; }
.signIn .sa-dot { fill: var(--sa-accent); }
.signIn .sa-glyph { fill: none; stroke: var(--sa-accent-deep); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.signIn .sa-glyph-sage { stroke: var(--sa-sage-deep); }
.signIn .sa-shape-sage { fill: var(--sa-sage-soft); }
.signIn .sa-shape-accent { fill: var(--sa-accent); }
.signIn .sa-spark { fill: var(--sa-spark); }
.signIn .sa-furrow { stroke-dasharray: 5 8; opacity: 0.8; }
.signIn .sa-olive { fill: var(--sa-olive); }
.signIn .sa-olive-hi { fill: none; stroke: var(--sa-olive-hi); stroke-width: 1.6; stroke-linecap: round; }
.signIn .sa-trunk { fill: none; stroke: var(--sa-trunk); stroke-width: 2.2; stroke-linecap: round; }
.signIn .sa-robe { fill: var(--sa-accent); stroke: var(--sa-ink); stroke-width: 1.2; stroke-linejoin: round; }
.signIn .sa-head { fill: var(--sa-head); stroke: var(--sa-ink); stroke-width: 1.2; }
.signIn .sa-ink.sa-staff { stroke-width: 1.4; }

/* Light motion only — none at all under prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
    .signIn .sa-float { animation: sa-float 6.5s ease-in-out infinite; }
    .signIn .sa-float-b { animation-duration: 7.6s; animation-delay: -2.4s; }
    .signIn .sa-float-c { animation-duration: 8.2s; animation-delay: -4.1s; }
    .signIn .sa-float-d { animation-duration: 6s; animation-delay: -1.3s; }
    .signIn .sa-plane { transform-box: fill-box; transform-origin: center; animation: sa-plane 7s ease-in-out infinite; }
    .signIn .sa-spark { transform-box: fill-box; transform-origin: center; animation: sa-twinkle 3.4s ease-in-out infinite; }
    .signIn .sa-tw-2 { animation-duration: 4.2s; animation-delay: -1.1s; }
    .signIn .sa-tw-3 { animation-duration: 3.8s; animation-delay: -2.3s; }
    .signIn .sa-beacon-rays { animation: sa-pulse 3.2s ease-in-out infinite; }
    .signIn .sa-dot { animation: sa-typing 1.6s ease-in-out infinite; }
    .signIn .sa-dot-2 { animation-delay: 0.2s; }
    .signIn .sa-dot-3 { animation-delay: 0.4s; }
}

@keyframes sa-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes sa-plane {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(5px, -6px) rotate(-4deg); }
}

@keyframes sa-twinkle {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.55); opacity: 0.4; }
}

@keyframes sa-pulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 0.35; }
}

@keyframes sa-typing {
    0%, 60%, 100% { opacity: 0.35; }
    30% { opacity: 1; }
}

/* ── Desktop: centred two-column card ────────────────────────────────────── */
@media (min-width: 769px) {
    html:not(.native-app) .signIn {
        width: min(880px, calc(100vw - 48px));
        height: min(560px, calc(100vh - 48px));
        max-width: none;
        max-height: none;
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        overflow: hidden;
        background: var(--primary-color);
        border: 1px solid var(--border-color);
        border-radius: 24px;
        box-shadow: var(--si-shadow);
    }

    html:not(.native-app) .signIn .signin-art {
        flex: 0 0 48%;
        box-shadow: inset -1px 0 0 var(--border-color);
    }

    html:not(.native-app) .signIn .signin-panel {
        flex: 1 1 auto;
        padding: 40px clamp(28px, 4.6vw, 54px) 22px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    html:not(.native-app) .signIn .signin-body {
        margin: auto 0;
    }

    html:not(.native-app) .signIn .signin-legal {
        padding-top: 18px;
    }

    @media (prefers-reduced-motion: no-preference) {
        html:not(.native-app) .signIn { animation: si-card-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
        html:not(.native-app) .overlay-glass { animation: si-fade-in 0.3s ease both; }
    }
}

@keyframes si-card-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)) scale(0.985); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes si-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Mobile web: full-screen sheet, art as a banner ─────────────────────── */
@media (max-width: 768px) {
    html:not(.native-app) .signIn {
        inset: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: var(--primary-color);
    }

    html:not(.native-app) .signIn .signin-art {
        flex: none;
        width: calc(100% - 24px);
        max-width: 520px;
        height: clamp(180px, min(32vh, 86vw), 340px);
        margin: 12px auto 0;
        border-radius: 22px;
    }

    /* Keep the art at its own aspect ratio and frame the temple + sun. */
    html:not(.native-app) .signIn .signin-illustration {
        inset: auto;
        top: 50%;
        left: 0;
        width: 100%;
        height: auto;
        aspect-ratio: 440 / 540;
        transform: translateY(-39%);
    }

    /* Phones: hero at the top, actions anchored low within thumb reach. */
    html:not(.native-app) .signIn .signin-panel {
        flex: 1 0 auto;
        width: 100%;
        max-width: 460px;
        margin: 0 auto;
        padding: 0 22px 10px;
    }

    html:not(.native-app) .signIn .signin-body {
        flex: 1 0 auto;
        align-items: center;
        text-align: center;
    }

    html:not(.native-app) .signIn .signin-actions {
        margin-top: auto;
    }

    /* The mark sits on the banner's lower edge. */
    html:not(.native-app) .signIn .signin-mark {
        width: 56px;
        height: 56px;
        margin: -28px 0 16px;
        border-radius: 17px;
        box-shadow: 0 0 0 5px var(--primary-color), inset 0 0 0 1px rgba(91, 63, 51, 0.12), 0 6px 16px rgba(30, 18, 10, 0.25);
    }

    html:not(.native-app) .signIn .signin-mark img {
        width: 34px;
        height: 34px;
    }

    html:not(.native-app) .signIn .signin-title {
        font-size: 29px;
    }

    html:not(.native-app) .signIn .signin-tagline {
        margin-bottom: 22px;
    }

    html:not(.native-app) .signIn .signin-btn {
        min-height: 50px;
        border-radius: 14px;
        font-size: 15.5px;
    }

    html:not(.native-app) .signIn .signin-legal {
        justify-content: center;
        padding-top: 16px;
    }

    /* Tall phones: more of the scene instead of empty space above the actions. */
    @media (min-height: 760px) {
        html:not(.native-app) .signIn .signin-art {
            height: clamp(180px, min(38vh, 90vw), 340px);
        }
    }

    /* Small tablets / large phones in a wide window: centre the column as one
       group (auto margins stay scroll-safe when it does not fit). */
    @media (min-width: 540px) {
        html:not(.native-app) .signIn {
            padding-top: max(24px, env(safe-area-inset-top, 0px));
            padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
        }

        html:not(.native-app) .signIn .signin-art {
            max-width: 460px;
            height: clamp(240px, 34vh, 340px);
            margin-top: auto;
        }

        html:not(.native-app) .signIn .signin-illustration {
            transform: translateY(-37%);
        }

        html:not(.native-app) .signIn .signin-panel {
            flex: none;
            margin-bottom: auto;
        }

        html:not(.native-app) .signIn .signin-body {
            flex: none;
        }

        html:not(.native-app) .signIn .signin-actions {
            margin-top: 0;
        }

        html:not(.native-app) .signIn .signin-legal {
            padding-top: 26px;
        }
    }

    @media (prefers-reduced-motion: no-preference) {
        html:not(.native-app) .signIn { animation: si-sheet-in 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
    }
}

@keyframes si-sheet-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* ── Android app: mobile-app.css styles this screen (logo, #signIn pill,
   hidden #directGAuth). Only the elements this redesign added are tuned here
   so that screen keeps its look. ─────────────────────────────────────────── */
html.native-app .signIn .signin-art,
html.native-app .signIn .signin-mark,
html.native-app .signIn .signin-title,
html.native-app .signIn .signin-tagline,
html.native-app .signIn .signin-divider,
html.native-app .signIn .signin-trust,
html.native-app .signIn .signin-btn-arrow {
    display: none;
}

html.native-app .signIn .signin-panel,
html.native-app .signIn .signin-body,
html.native-app .signIn .signin-actions {
    align-items: center;
    width: 100%;
}

html.native-app .signIn .signin-actions {
    gap: 12px;
}

html.native-app .signIn #signUpBtn {
    width: min(320px, 100%);
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: var(--n-sheet, rgba(255, 255, 255, 0.08));
    color: var(--n-text, #ffffff);
    font: 600 16px var(--n-sans, sans-serif);
}

html.native-app .signIn .signin-legal {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(10px + var(--n-bottom, 0px));
    justify-content: center;
}
