html,
body {
    font-family: Outfit;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.dark {
    background-color: #1B1B1B;
    color: #ffffff;
}

/* ==========================================================================
   Phone frame + site chrome
   The scorer is drawn for a phone, so on anything wider the app is held in a
   phone-width column with the site's nav and footer around it. On a real
   phone the chrome and the frame both drop away and the app is full-bleed.
   The screens themselves are styled by scorer.css, under `.sc`.
   ========================================================================== */

.app-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #eef2f7;
}

.dark .app-page {
    background: #0b1018;
}

.app-shell {
    position: relative;
    /* The footer art sits at z-index -1; without a stacking context here it
       would paint behind this element's own background and vanish. */
    isolation: isolate;
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 auto;
    background: #ffffff;
    /* The scoring screen is a flex column that fills this shell exactly; see
       the scoring layout block at the bottom of this file. Other flow screens
       are single children and keep their natural height. */
    display: flex;
    flex-direction: column;
}

.dark .app-shell {
    background: #1B1B1B;
}

/* The chrome is desktop-only; a phone already has the app's own header. */
.app-top,
.app-bottom {
    display: none;
}

@media only screen and (min-width: 480px) {
    .app-page {
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .app-stage {
        flex: 1;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 18px 16px;
    }

    .app-shell {
        height: 100%;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        border-radius: 30px;
        box-shadow:
            0 34px 70px -28px rgba(13, 27, 42, 0.45),
            0 0 0 1px rgba(13, 27, 42, 0.08);
    }

    .dark .app-shell {
        box-shadow:
            0 34px 70px -28px rgba(0, 0, 0, 0.85),
            0 0 0 1px rgba(255, 255, 255, 0.09);
    }

    /* ---- nav ---- */

    .app-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex: none;
        height: 60px;
        padding: 0 24px;
        border-bottom: 1px solid rgba(13, 27, 42, 0.08);
        background: rgba(255, 255, 255, 0.72);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }

    .dark .app-top {
        border-bottom-color: rgba(255, 255, 255, 0.08);
        background: rgba(11, 16, 24, 0.72);
    }

    .app-top-brand {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        text-decoration: none;
    }

    .app-top-word {
        font-size: 17.5px;
        font-weight: 700;
        letter-spacing: -0.035em;
        color: #0d1b2a;
    }

    .dark .app-top-word {
        color: #eaf2f8;
    }

    /* The number carries the accent, the same split the mark uses. */
    .app-top-word em {
        font-style: normal;
        background: linear-gradient(120deg, #0f9d63, #0a7ea4);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .dark .app-top-word em {
        background: linear-gradient(120deg, #3be08d, #38d6ff);
        -webkit-background-clip: text;
        background-clip: text;
    }

    .app-top-links {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .app-top-links a {
        font-size: 14px;
        color: #566879;
        text-decoration: none;
        transition: color 0.18s ease;
    }

    .app-top-links a:hover {
        color: #0a7ea4;
    }

    .dark .app-top-links a {
        color: #93a3b4;
    }

    .dark .app-top-links a:hover {
        color: #38d6ff;
    }

    /* ---- footer ---- */

    .app-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex: none;
        padding: 14px 24px;
        border-top: 1px solid rgba(13, 27, 42, 0.08);
        font-size: 12.5px;
        color: #6a7d8f;
    }

    .dark .app-bottom {
        border-top-color: rgba(255, 255, 255, 0.08);
        color: #7a8a9a;
    }

    .app-bottom-note {
        color: #8494a3;
    }

    .dark .app-bottom-note {
        color: #64717f;
    }
}

@media only screen and (max-width: 720px) and (min-width: 480px) {
    .app-top-links a:nth-child(n + 2) {
        display: none;
    }

    .app-bottom-note {
        display: none;
    }
}

