/* Mobile gate — Design Wallet is a desktop workspace, so a phone gets a note
   instead of a cramped version of it.

   The HIDING is done here, in a media query, not in JavaScript. That matters:
   a class toggled by a script runs after first paint, so the phone would show
   a flash of the real page before the gate covered it. A media query applies
   on the first paint, so there is nothing to flash.

   `body > *` catches every page's wrapper — .page-shell on most, .sal-body's
   own structure on /salary/ — so this works without knowing each page's
   markup. The panel itself is injected by mobile-gate.js. */

/* Panel styling. It stays hidden until the media query at the foot of this
   file switches it on — and that query has to come LAST, because it matches
   this rule's specificity exactly and would otherwise lose the cascade to it.
   (It did, on the first pass: the phone got a blank page.) */
#dw-mobile-gate {
    display: none;
    position: fixed;
    z-index: 2147483000;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 28px 400px;
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 60%),
        #070707;
    color: #f5f5f5;
    font-family: "Geist", "Inter", system-ui, -apple-system, sans-serif;
    text-align: center;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dw-gate-inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-width: 420px;
    flex-direction: column;
    align-items: center;
    margin: 10% 0% 10% 0%;
}

.dw-gate-logo {
    width: 150px;
    height: auto;
    margin-bottom: 30px;
    opacity: 0.92;
}

.dw-gate-title {
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

/* The 3D wallet mark, anchored to the foot of the screen and bleeding off it
   slightly so it reads as part of the ground rather than a pasted sticker.
   Served as a 15KB WebP derivative, never the 249KB source PNG (§7). */

.dw-gate-stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.dw-gate-mark {
    position: absolute;
    z-index: 1;
    bottom: 0%;
    left: 50%;
    width: min(400px, 100vw);
    height: auto;
    transform: translateX(-50%);
    pointer-events: none;
    user-select: none;
}

/* A short viewport — a phone on its side — has no room for it, and it would
   land on top of the headline. */
@media (max-height: 620px) {
    .dw-gate-mark {
        display: none;
    }
}

@media (max-width: 767px), (pointer: coarse) and (orientation: landscape) and (max-height: 520px) {
    html,
    body {
        overflow: hidden;
        height: 100%;
        background: #070707;
    }

    body > *:not(#dw-mobile-gate) {
        display: none !important;
    }

    /* If the script never runs — blocked, failed, whatever — a phone would
       otherwise get a blank page. This is the floor. */
    body:not(.dw-gate-ready)::after {
        content: "Size matters. This site got big-screen energy. \01F525  Catch it on desktop!";
        position: fixed;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 28px;
        background: #070707;
        color: #f5f5f5;
        font-family: "Geist", "Inter", system-ui, sans-serif;
        font-size: 1rem;
        line-height: 1.6;
        text-align: center;
    }

    #dw-mobile-gate {
        display: flex;
    }
}
