:root {
    color-scheme: dark;
    --bg: #07101f;
    --surface: rgba(15, 27, 48, .74);
    --surface-solid: #101c30;
    --surface-border: rgba(255, 255, 255, .11);
    --text: #f7f9fc;
    --muted: #aab6ca;
    --muted-2: #7888a1;
    --accent: #35d3a7;
    --accent-strong: #07c86a;
    --accent-2: #19bff1;
    --danger: #ff7085;
    --warning: #f5c35b;
    --shadow: 0 30px 80px rgba(0, 0, 0, .44);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 15% 10%, rgba(25, 191, 241, .17), transparent 35%), radial-gradient(circle at 90% 80%, rgba(53, 211, 167, .15), transparent 32%), linear-gradient(145deg, #050b16 0%, #09172a 52%, #07101f 100%);
}

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        opacity: .22;
        background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
        background-size: 42px 42px;
        mask-image: linear-gradient(to bottom, black, transparent 82%);
    }

a {
    color: inherit;
}

button, input, select, textarea {
    font: inherit;
}

button, select {
    cursor: pointer;
}

img {
    max-width: 100%;
}

.site-shell {
    position: relative;
    isolation: isolate;
    width: min(1180px, 100%);
    min-height: 100svh;
    margin: 0 auto;
    padding: max(22px, env(safe-area-inset-top)) clamp(20px, 5vw, 64px) max(24px, env(safe-area-inset-bottom));
}

.topbar, .footer, .admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
    font-weight: 780;
    letter-spacing: -.02em;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 13px;
    background: linear-gradient(145deg, rgba(25,191,241,.17), rgba(53,211,167,.12));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 14px 35px rgba(0,0,0,.22);
}

    .brand-mark img {
        width: 31px;
        height: 31px;
        object-fit: contain;
    }

.platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255,255,255,.045);
    font-size: 13px;
    font-weight: 650;
    backdrop-filter: blur(16px);
}

    .platform-chip svg {
        width: 16px;
        height: 16px;
        color: var(--accent);
    }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .78fr);
    align-items: center;
    gap: clamp(44px, 8vw, 110px);
    padding: clamp(66px, 10vh, 124px) 0 clamp(54px, 9vh, 100px);
}

.eyebrow, .section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #c8d3e5;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.eyebrow {
    margin-bottom: 22px;
}

    .eyebrow::before {
        content: "";
        width: 28px;
        height: 1px;
        background: linear-gradient(90deg, var(--accent), var(--accent-2));
        box-shadow: 0 0 16px var(--accent);
    }

.hero-copy h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(50px, 8vw, 96px);
    line-height: .94;
    letter-spacing: -.065em;
    text-wrap: balance;
}

.lead {
    max-width: 560px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.55;
}

.version-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-top: 34px;
}

.version-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

    .version-picker label {
        display: grid;
        gap: 7px;
        color: var(--muted-2);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
    }

    .version-picker select {
        min-width: 240px;
        min-height: 46px;
        padding: 0 42px 0 14px;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 13px;
        color: var(--text);
        background: #101c30;
        outline: none;
    }

        .version-picker select:focus {
            border-color: rgba(53,211,167,.65);
            box-shadow: 0 0 0 3px rgba(53,211,167,.12);
        }

.recommended-badge, .disabled-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 780;
    letter-spacing: .02em;
}

.recommended-badge {
    color: #8af1d4;
    background: rgba(53,211,167,.12);
    border: 1px solid rgba(53,211,167,.22);
}

    .recommended-badge.compact {
        min-height: 22px;
        padding-inline: 8px;
        font-size: 10px;
    }

.disabled-badge {
    color: #ffb6c0;
    background: rgba(255,112,133,.12);
    border: 1px solid rgba(255,112,133,.2);
}

.release-message {
    margin: 18px 0 0;
    color: #d6dfed;
    font-size: 16px;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 25px;
}

.download-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 58px;
    padding: 0 24px;
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    color: #04130f;
    background: linear-gradient(120deg, #77eed0, var(--accent));
    box-shadow: 0 18px 42px rgba(53,211,167,.22), inset 0 1px 0 rgba(255,255,255,.6);
    font-weight: 820;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

    .download-button::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -80%;
        left: -30%;
        width: 42%;
        height: 260%;
        transform: rotate(24deg);
        background: rgba(255,255,255,.36);
        transition: left .55s ease;
    }

    .download-button:hover {
        transform: translateY(-2px);
        filter: saturate(1.08);
        box-shadow: 0 24px 52px rgba(53,211,167,.28), inset 0 1px 0 rgba(255,255,255,.65);
    }

        .download-button:hover::before {
            left: 118%;
        }

    .download-button:active {
        transform: translateY(0) scale(.985);
    }

    .download-button:focus-visible {
        outline: 3px solid rgba(25,191,241,.6);
        outline-offset: 4px;
    }

    .download-button svg {
        width: 22px;
        height: 22px;
        stroke-width: 2.2px;
    }

.full-width {
    width: 100%;
}

.file-meta {
    color: #7f8da4;
    font-size: 13px;
    font-weight: 600;
}

.visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 430px;
}

.halo {
    position: absolute;
    width: min(430px, 92vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(53,211,167,.16), rgba(25,191,241,.06) 42%, transparent 70%);
    filter: blur(4px);
    animation: pulse 5s ease-in-out infinite;
}

.phone {
    position: relative;
    width: min(292px, 74vw);
    aspect-ratio: 9 / 18.3;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 42px;
    background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.035));
    box-shadow: 0 38px 100px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.22);
    transform: rotate(4deg);
    backdrop-filter: blur(18px);
}

.phone-screen {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 33px;
    background: radial-gradient(circle at 80% 20%, rgba(25,191,241,.25), transparent 30%), linear-gradient(155deg, #0c1930, #07111f 62%, #0b1a27);
}

    .phone-screen::before {
        content: "";
        position: absolute;
        inset: 0;
        opacity: .18;
        background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
        background-size: 26px 26px;
    }

.notch {
    position: absolute;
    z-index: 2;
    top: 9px;
    left: 50%;
    width: 38%;
    height: 24px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #040914;
}

.app-ui {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 58px 22px 22px;
}

.app-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-bottom: 13px;
}

.app-label {
    color: #8291a9;
    font-size: 11px;
    font-weight: 760;
    letter-spacing: .12em;
}

.app-title {
    max-width: 200px;
    margin-top: 10px;
    font-size: 29px;
    line-height: 1.04;
    font-weight: 840;
    letter-spacing: -.045em;
}

.status-card {
    margin-top: 25px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #dce6f4;
    font-size: 13px;
    font-weight: 720;
}

    .status-row i {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 0 6px rgba(53,211,167,.10), 0 0 22px rgba(53,211,167,.55);
    }

.meter {
    height: 7px;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
}

    .meter span {
        display: block;
        width: 74%;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--accent-2), var(--accent));
    }

.tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.tile {
    min-height: 105px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    background: rgba(255,255,255,.045);
}

    .tile b {
        display: block;
        margin-top: 21px;
        color: #d8e2f0;
        font-size: 12px;
    }

    .tile span {
        display: block;
        margin-top: 6px;
        color: #7789a4;
        font-size: 10px;
        line-height: 1.35;
    }

.bottom-pill {
    width: 35%;
    height: 5px;
    margin: auto auto 0;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
}

.float-tag {
    position: absolute;
    right: -16px;
    bottom: 88px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 15px;
    color: #dfe8f5;
    background: rgba(11,23,40,.74);
    box-shadow: 0 18px 42px rgba(0,0,0,.28);
    font-size: 12px;
    font-weight: 720;
    backdrop-filter: blur(18px);
    transform: rotate(-4deg);
}

    .float-tag::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent);
        box-shadow: 0 0 16px rgba(53,211,167,.7);
    }

.release-panel {
    margin-bottom: 76px;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--surface-border);
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.release-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.release-panel h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -.045em;
}

.release-date {
    color: var(--muted-2);
    font-size: 13px;
    white-space: nowrap;
}

.release-notes {
    padding-top: 26px;
    color: #cbd6e6;
    font-size: 16px;
    line-height: 1.7;
}

    .release-notes h2, .release-notes h3, .release-notes h4 {
        color: var(--text);
        line-height: 1.25;
    }

    .release-notes ul, .release-notes ol {
        padding-left: 24px;
    }

    .release-notes li + li {
        margin-top: 9px;
    }

    .release-notes a {
        color: #6fcbff;
    }

    .release-notes code {
        padding: 2px 6px;
        border-radius: 6px;
        background: rgba(255,255,255,.07);
    }

    .release-notes pre {
        overflow: auto;
        padding: 16px;
        border-radius: 14px;
        background: #060d18;
    }

.checksum {
    margin-top: 26px;
    color: var(--muted-2);
    font-size: 12px;
}

    .checksum summary {
        cursor: pointer;
    }

    .checksum code {
        display: block;
        margin-top: 10px;
        overflow-wrap: anywhere;
        color: #94a4bb;
    }

.footer {
    color: #718097;
    font-size: 12px;
}

    .footer strong {
        color: #93a1b6;
        font-weight: 650;
    }

.notice {
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    color: #c8d5e7;
    background: rgba(255,255,255,.05);
    line-height: 1.45;
}

.notice-error {
    border-color: rgba(255,112,133,.24);
    color: #ffc2cb;
    background: rgba(255,112,133,.08);
}

.notice-success {
    border-color: rgba(53,211,167,.24);
    color: #9bf0d8;
    background: rgba(53,211,167,.08);
}

.admin-body {
    min-height: 100svh;
}

.admin-shell {
    position: relative;
    isolation: isolate;
    width: min(1320px, 100%);
    margin: 0 auto;
    padding: 22px clamp(18px, 4vw, 52px) 52px;
}

.admin-topbar {
    padding-bottom: 42px;
}

.admin-main {
    display: grid;
    gap: 26px;
}

.admin-heading h1 {
    margin: 10px 0 0;
    font-size: clamp(40px, 7vw, 72px);
    letter-spacing: -.055em;
    line-height: 1;
}

.admin-heading p {
    max-width: 700px;
    margin: 18px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(360px, .85fr) minmax(420px, 1.15fr);
    gap: 24px;
    align-items: start;
}

.admin-card, .auth-card {
    border: 1px solid var(--surface-border);
    border-radius: 26px;
    background: rgba(12,24,43,.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.admin-card {
    padding: clamp(22px, 3vw, 32px);
}

    .admin-card h2 {
        margin: 0 0 24px;
        font-size: 24px;
        letter-spacing: -.03em;
    }

.form-stack {
    display: grid;
    gap: 18px;
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
    color: #cbd6e6;
    font-size: 13px;
    font-weight: 680;
}

    .field input, .field textarea {
        width: 100%;
        border: 1px solid rgba(255,255,255,.11);
        border-radius: 13px;
        color: var(--text);
        background: rgba(4,11,22,.72);
        outline: none;
    }

    .field input {
        min-height: 48px;
        padding: 0 14px;
    }

    .field textarea {
        padding: 14px;
        resize: vertical;
        line-height: 1.5;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
        font-size: 13px;
    }

        .field input:focus, .field textarea:focus {
            border-color: rgba(53,211,167,.65);
            box-shadow: 0 0 0 3px rgba(53,211,167,.11);
        }

    .field small {
        color: var(--muted-2);
        font-weight: 500;
        line-height: 1.4;
    }

        .field small.field-validation-error, .validation-summary {
            color: #ff9eac;
        }

            .validation-summary:empty {
                display: none;
            }

            .validation-summary ul {
                margin: 0;
                padding-left: 18px;
            }

.file-drop {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 132px;
    padding: 22px;
    border: 1px dashed rgba(25,191,241,.35);
    border-radius: 18px;
    text-align: center;
    background: rgba(25,191,241,.045);
    cursor: pointer;
}

    .file-drop:hover {
        border-color: rgba(53,211,167,.48);
        background: rgba(53,211,167,.05);
    }

    .file-drop input {
        position: absolute;
        inset: 0;
        width: 100%;
        opacity: 0;
        cursor: pointer;
    }

.file-drop-title {
    font-weight: 760;
}

.file-drop small {
    margin-top: 7px;
    color: var(--muted-2);
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #cbd6e6;
    font-size: 14px;
    cursor: pointer;
}

    .checkbox-field input {
        width: 18px;
        height: 18px;
        accent-color: var(--accent);
    }

.card-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.counter {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.version-list {
    display: grid;
    gap: 12px;
}

.version-card {
    padding: 17px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: rgba(255,255,255,.035);
}

    .version-card.is-disabled {
        opacity: .62;
    }

.version-card-main {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.version-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

    .version-title-row strong {
        font-size: 18px;
    }

    .version-title-row > span:not(.recommended-badge):not(.disabled-badge) {
        color: var(--muted-2);
        font-size: 11px;
    }

.version-card p {
    margin: 10px 0 7px;
    color: #bac7d9;
    font-size: 13px;
    line-height: 1.45;
}

.version-card small {
    color: #6f8099;
}

.icon-link {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    color: #7de4c6;
    background: rgba(53,211,167,.07);
    text-decoration: none;
    font-size: 20px;
}

.version-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.small-button, .ghost-button, .secondary-button {
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 11px;
    color: #c7d3e4;
    background: rgba(255,255,255,.04);
    font-weight: 680;
}

.small-button {
    min-height: 34px;
    padding: 0 11px;
    font-size: 11px;
}

.ghost-button {
    min-height: 40px;
    padding: 0 14px;
}

.secondary-button {
    min-height: 46px;
    padding: 0 14px;
}

    .small-button:hover, .ghost-button:hover, .secondary-button:hover {
        background: rgba(255,255,255,.08);
    }

.danger-button {
    color: #ffc2cb;
    border-color: rgba(255,112,133,.28);
    background: rgba(255,112,133,.08);
}

    .danger-button:hover {
        background: rgba(255,112,133,.14);
    }

.muted {
    color: var(--muted-2);
}


.version-edit {
    margin-top: 12px;
    padding-top: 13px;
    border-top: 1px solid rgba(255,255,255,.06);
}

    .version-edit summary {
        width: fit-content;
        min-height: 34px;
        display: inline-flex;
        align-items: center;
        padding: 0 11px;
        border: 1px solid rgba(255,255,255,.11);
        border-radius: 11px;
        color: #c7d3e4;
        background: rgba(255,255,255,.04);
        font-size: 11px;
        font-weight: 680;
        list-style: none;
        cursor: pointer;
        user-select: none;
    }

        .version-edit summary::-webkit-details-marker {
            display: none;
        }

        .version-edit summary:hover {
            background: rgba(255,255,255,.08);
        }

    .version-edit[open] summary {
        color: #8af1d4;
        border-color: rgba(53,211,167,.24);
        background: rgba(53,211,167,.08);
    }

.compact-form {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    background: rgba(4,11,22,.34);
}

    .compact-form .field input {
        min-height: 42px;
    }

    .compact-form .field textarea {
        min-height: 160px;
    }

.edit-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.edit-submit-row {
    display: flex;
    justify-content: flex-end;
}

    .edit-submit-row .download-button {
        min-height: 46px;
        padding-inline: 18px;
        font-size: 13px;
    }

.auth-shell {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    width: min(560px, 100%);
    margin: 0 auto;
    display: grid;
    align-content: center;
    gap: 24px;
    padding: 32px 20px;
}

.auth-brand {
    justify-self: center;
}

.auth-card {
    padding: clamp(26px, 6vw, 42px);
}

    .auth-card h1 {
        margin: 10px 0 0;
        font-size: clamp(32px, 7vw, 48px);
        line-height: 1;
        letter-spacing: -.045em;
    }

    .auth-card > p {
        margin: 16px 0 26px;
        color: var(--muted);
        line-height: 1.5;
    }

@keyframes pulse {
    0%,100% {
        transform: scale(.96);
        opacity: .75;
    }

    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@media (max-width: 960px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 60px;
        padding-top: 76px;
        text-align: center;
    }

    .eyebrow, .hero-actions, .version-row, .version-picker {
        justify-content: center;
    }

    .lead, .release-message {
        margin-left: auto;
        margin-right: auto;
    }

    .visual {
        min-height: 400px;
    }

    .phone {
        width: min(270px, 72vw);
    }

    .float-tag {
        right: max(0px, calc(50% - 168px));
    }

    .release-panel-head {
        align-items: start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .site-shell {
        padding-inline: 18px;
    }

    .platform-chip {
        padding: 9px;
    }

        .platform-chip span {
            display: none;
        }

    .hero-grid {
        padding-top: 62px;
    }

    .hero-copy h1 {
        font-size: clamp(46px, 16vw, 68px);
    }

    .hero-actions, .version-row, .version-picker {
        flex-direction: column;
        align-items: stretch;
    }

        .version-picker select, .download-button {
            width: 100%;
        }

    .visual {
        min-height: 370px;
    }

    .phone {
        width: min(250px, 70vw);
    }

    .float-tag {
        right: 2px;
        bottom: 56px;
    }

    .footer {
        justify-content: center;
    }

        .footer span:last-child {
            display: none;
        }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .admin-topbar .brand > span:last-child {
        display: none;
    }

    .version-actions {
        flex-direction: column;
    }

        .version-actions form, .small-button, .version-edit summary {
            width: 100%;
        }

    .edit-submit-row .download-button {
        width: 100%;
    }

    .edit-flags {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

button:disabled,
button.is-loading {
    cursor: wait;
    opacity: .78;
}

.button-spinner {
    width: 1.05em;
    height: 1.05em;
    flex: 0 0 auto;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: button-spinner-rotate .7s linear infinite;
}

.download-button .button-spinner {
    color: #04130f;
}

@keyframes button-spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

.theme-switcher {
    position: fixed;
    z-index: 20;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    border: 1px solid var(--surface-border);
    border-radius: 999px;
    background: var(--surface-solid);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px);
}

    .theme-switcher button {
        min-height: 30px;
        padding: 0 10px;
        border: 0;
        border-radius: 999px;
        color: var(--muted);
        background: transparent;
        font-size: 11px;
        font-weight: 760;
    }

        .theme-switcher button[aria-pressed="true"] {
            color: #04130f;
            background: linear-gradient(120deg, #77eed0, var(--accent));
        }

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        color-scheme: light;
        --bg: #f4f8ff;
        --surface: rgba(255, 255, 255, .82);
        --surface-solid: rgba(255, 255, 255, .92);
        --surface-border: rgba(13, 35, 67, .12);
        --text: #102033;
        --muted: #52657e;
        --muted-2: #718198;
        --shadow: 0 30px 80px rgba(28, 58, 98, .14);
    }
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f8ff;
    --surface: rgba(255, 255, 255, .82);
    --surface-solid: rgba(255, 255, 255, .92);
    --surface-border: rgba(13, 35, 67, .12);
    --text: #102033;
    --muted: #52657e;
    --muted-2: #718198;
    --shadow: 0 30px 80px rgba(28, 58, 98, .14);
}

    :root[data-theme="light"] body {
        background: radial-gradient(circle at 15% 10%, rgba(25, 191, 241, .18), transparent 34%), radial-gradient(circle at 90% 80%, rgba(53, 211, 167, .18), transparent 32%), linear-gradient(145deg, #fbfdff 0%, #eef6ff 52%, #f4f8ff 100%);
    }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) body {
        background: radial-gradient(circle at 15% 10%, rgba(25, 191, 241, .17), transparent 35%), radial-gradient(circle at 90% 80%, rgba(53, 211, 167, .15), transparent 32%), linear-gradient(145deg, #050b16 0%, #09172a 52%, #07101f 100%);
    }
}

:root[data-theme="light"] body::before {
    opacity: .36;
    background-image: linear-gradient(rgba(13,35,67,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(13,35,67,.06) 1px, transparent 1px);
}

:root[data-theme="light"] .admin-card,
:root[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, .82);
}

:root[data-theme="light"] .release-panel {
    background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.55));
}

:root[data-theme="light"] .version-picker select,
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field textarea {
    color: var(--text);
    background: rgba(255,255,255,.78);
    border-color: rgba(13,35,67,.14);
}

:root[data-theme="light"] .release-message,
:root[data-theme="light"] .release-notes,
:root[data-theme="light"] .field,
:root[data-theme="light"] .checkbox-field,
:root[data-theme="light"] .version-card p {
    color: #324863;
}

:root[data-theme="light"] .version-card,
:root[data-theme="light"] .compact-form {
    background: rgba(255,255,255,.58);
    border-color: rgba(13,35,67,.10);
}


@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) body {
        background: radial-gradient(circle at 15% 10%, rgba(25, 191, 241, .18), transparent 34%), radial-gradient(circle at 90% 80%, rgba(53, 211, 167, .18), transparent 32%), linear-gradient(145deg, #fbfdff 0%, #eef6ff 52%, #f4f8ff 100%);
    }

        :root:not([data-theme="dark"]) body::before {
            opacity: .36;
            background-image: linear-gradient(rgba(13,35,67,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(13,35,67,.06) 1px, transparent 1px);
        }

    :root:not([data-theme="dark"]) .admin-card,
    :root:not([data-theme="dark"]) .auth-card {
        background: rgba(255, 255, 255, .82);
    }

    :root:not([data-theme="dark"]) .release-panel {
        background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(255,255,255,.55));
    }

    :root:not([data-theme="dark"]) .version-picker select,
    :root:not([data-theme="dark"]) .field input,
    :root:not([data-theme="dark"]) .field textarea {
        color: var(--text);
        background: rgba(255,255,255,.78);
        border-color: rgba(13,35,67,.14);
    }

    :root:not([data-theme="dark"]) .release-message,
    :root:not([data-theme="dark"]) .release-notes,
    :root:not([data-theme="dark"]) .field,
    :root:not([data-theme="dark"]) .checkbox-field,
    :root:not([data-theme="dark"]) .version-card p {
        color: #324863;
    }

    :root:not([data-theme="dark"]) .version-card,
    :root:not([data-theme="dark"]) .compact-form {
        background: rgba(255,255,255,.58);
        border-color: rgba(13,35,67,.10);
    }
}

/* Светлая тема интерфейса приложения внутри телефона */
:root[data-theme="light"] .phone {
    border-color: rgba(13, 35, 67, .14);
    background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(220,232,245,.78));
    box-shadow: 0 38px 90px rgba(28, 58, 98, .20), inset 0 1px 0 rgba(255,255,255,.95);
}

:root[data-theme="light"] .phone-screen {
    background: radial-gradient(circle at 82% 18%, rgba(25,191,241,.20), transparent 31%), radial-gradient(circle at 15% 86%, rgba(53,211,167,.15), transparent 34%), linear-gradient(155deg, #ffffff 0%, #f3f8fe 58%, #eaf4fb 100%);
    box-shadow: inset 0 0 0 1px rgba(13,35,67,.06);
}

    :root[data-theme="light"] .phone-screen::before {
        opacity: .42;
        background-image: linear-gradient(rgba(13,35,67,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(13,35,67,.045) 1px, transparent 1px);
    }

:root[data-theme="light"] .app-label {
    color: #64778f;
}

:root[data-theme="light"] .app-title {
    color: #14283f;
}

:root[data-theme="light"] .status-card {
    border-color: rgba(13,35,67,.10);
    background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(236,244,251,.78));
    box-shadow: 0 14px 34px rgba(28,58,98,.09), inset 0 1px 0 rgba(255,255,255,.95);
}

:root[data-theme="light"] .status-row {
    color: #2b415a;
}

:root[data-theme="light"] .meter {
    background: rgba(13,35,67,.09);
}

:root[data-theme="light"] .tile {
    border-color: rgba(13,35,67,.09);
    background: rgba(255,255,255,.72);
    box-shadow: 0 10px 26px rgba(28,58,98,.07);
}

    :root[data-theme="light"] .tile b {
        color: #213750;
    }

    :root[data-theme="light"] .tile span {
        color: #6c7f96;
    }

:root[data-theme="light"] .bottom-pill {
    background: rgba(16,32,51,.56);
}

:root[data-theme="light"] .float-tag {
    color: #29415b;
    border-color: rgba(13,35,67,.11);
    background: rgba(255,255,255,.82);
    box-shadow: 0 18px 42px rgba(28,58,98,.14);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .phone {
        border-color: rgba(13, 35, 67, .14);
        background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(220,232,245,.78));
        box-shadow: 0 38px 90px rgba(28, 58, 98, .20), inset 0 1px 0 rgba(255,255,255,.95);
    }

    :root:not([data-theme="dark"]) .phone-screen {
        background: radial-gradient(circle at 82% 18%, rgba(25,191,241,.20), transparent 31%), radial-gradient(circle at 15% 86%, rgba(53,211,167,.15), transparent 34%), linear-gradient(155deg, #ffffff 0%, #f3f8fe 58%, #eaf4fb 100%);
        box-shadow: inset 0 0 0 1px rgba(13,35,67,.06);
    }

        :root:not([data-theme="dark"]) .phone-screen::before {
            opacity: .42;
            background-image: linear-gradient(rgba(13,35,67,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(13,35,67,.045) 1px, transparent 1px);
        }

    :root:not([data-theme="dark"]) .app-label {
        color: #64778f;
    }

    :root:not([data-theme="dark"]) .app-title {
        color: #14283f;
    }

    :root:not([data-theme="dark"]) .status-card {
        border-color: rgba(13,35,67,.10);
        background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(236,244,251,.78));
        box-shadow: 0 14px 34px rgba(28,58,98,.09), inset 0 1px 0 rgba(255,255,255,.95);
    }

    :root:not([data-theme="dark"]) .status-row {
        color: #2b415a;
    }

    :root:not([data-theme="dark"]) .meter {
        background: rgba(13,35,67,.09);
    }

    :root:not([data-theme="dark"]) .tile {
        border-color: rgba(13,35,67,.09);
        background: rgba(255,255,255,.72);
        box-shadow: 0 10px 26px rgba(28,58,98,.07);
    }

        :root:not([data-theme="dark"]) .tile b {
            color: #213750;
        }

        :root:not([data-theme="dark"]) .tile span {
            color: #6c7f96;
        }

    :root:not([data-theme="dark"]) .bottom-pill {
        background: rgba(16,32,51,.56);
    }

    :root:not([data-theme="dark"]) .float-tag {
        color: #29415b;
        border-color: rgba(13,35,67,.11);
        background: rgba(255,255,255,.82);
        box-shadow: 0 18px 42px rgba(28,58,98,.14);
    }
}
