body {
    padding-top: env(safe-area-inset-top);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
}

.install-button {
    margin-top: 24px;
}

.install-button[hidden] {
    display: none;
}

.push-settings {
    margin-top: 18px;
}

.push-settings button {
    width: 100%;
    font-size: 13px;
}

.push-settings button[hidden] {
    display: none;
}

.profile-home-link { display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 10px; color: #205d49; font-size: 13px; font-weight: 700; }
.profile-home-link img, .profile-home-link span { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.profile-home-link span { display: grid; place-items: center; background: #e9f1e9; }

.landing .hero-actions {
    flex-wrap: wrap;
    gap: 12px;
}

.landing .hero-actions a {
    flex: 1 1 160px;
    max-width: 200px;
    min-height: 54px;
    padding: 10px 16px;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    white-space: nowrap;
}

.landing .hero-actions .primary-link {
    box-shadow: 0 4px 0 #d8e2d3;
}

.landing .hero-actions .text-link {
    border: 1px solid #d9dfd1;
    border-radius: 14px;
    background: #fffefa;
    color: #174c3b;
}

.landing .hero-actions .play-icon {
    flex: none;
    width: 28px;
    height: 28px;
}

.landing .hero-actions .text-link:hover {
    background: #edf5ea;
}

.push-prompt {
    position: fixed;
    z-index: 95;
    bottom: 24px;
    left: 24px;
    display: flex;
    gap: 12px;
    width: min(350px, calc(100% - 32px));
    padding: 20px;
    border: 1px solid #dce9dd;
    border-radius: 20px;
    background: #fffefa;
    box-shadow: 0 12px 35px #193d3433;
    color: #193d34;
    box-sizing: border-box;
}

.push-prompt[hidden], .push-prompt button[hidden] { display: none; }
.push-prompt-icon { font-size: 26px; }
.push-prompt p { margin: 7px 0; font-size: 12px; line-height: 1.8; }
.push-prompt .push-prompt-message:empty { display: none; }
.push-prompt-enable { border: 0; border-radius: 10px; padding: 9px 15px; background: #205d49; color: white; cursor: pointer; font: inherit; font-size: 12px; }
.push-prompt-close { position: absolute; top: 6px; left: 10px; border: 0; background: transparent; color: #668077; cursor: pointer; font-size: 22px; }

.presence { position: fixed; z-index: 94; top: calc(12px + env(safe-area-inset-top)); left: 12px; width: min(290px, calc(100% - 24px)); pointer-events: none; }
.presence-toggle, .presence-panel, .presence-invitations > div { pointer-events: auto; }
.presence button { cursor: pointer; font: inherit; }
.presence-toggle { border: 1px solid #dce9dd; border-radius: 18px; padding: 7px 12px; background: #fffefa; color: #205d49; box-shadow: 0 4px 15px #193d341a; font-size: 12px !important; }
.presence-panel, .presence-invitations > div { margin-top: 8px; padding: 14px; border: 1px solid #dce9dd; border-radius: 16px; background: #fffefa; color: #193d34; box-shadow: 0 8px 25px #193d3426; font-size: 13px; }
.presence-panel[hidden] { display: none; }
.presence-hint, .presence-invitations p { margin: 8px 0; line-height: 1.7; }
.presence-users { max-height: 180px; overflow-y: auto; padding: 0; margin: 0; list-style: none; }
.presence-users li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.presence-users button, .presence-invitations button { margin-left: 5px; padding: 5px 10px; border: 0; border-radius: 8px; background: #205d49; color: white; font-size: 12px; }
.presence-status:empty { display: none; }

.mobile-nav {
    display: none;
}

@media (max-width: 750px) {
    .push-prompt { bottom: calc(76px + env(safe-area-inset-bottom)); left: 16px; }
    body.has-mobile-nav {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .mobile-nav {
        position: fixed;
        z-index: 90;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        padding: 5px max(8px, env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
        border-top: 1px solid #e2e9de;
        background: #fffefa;
        box-shadow: 0 -8px 24px #193d3410;
    }

    .mobile-nav a {
        min-height: 55px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        border-radius: 12px;
        color: #849589;
        font-size: 10px;
        font-weight: 700;
        line-height: 1.4;
        text-decoration: none;
    }

    .mobile-nav a[aria-current="page"] {
        color: #1f604b;
        background: #edf5ea;
    }

    .mobile-nav svg {
        width: 21px;
        height: 21px;
    }

    .mobile-nav a:focus-visible {
        outline: 2px solid #b9694b;
        outline-offset: -2px;
    }

    .has-mobile-nav .solo-message.toast-ready {
        bottom: calc(76px + env(safe-area-inset-bottom));
    }

    .landing main {
        display: flex;
        flex-direction: column;
    }

    .landing .landing-hero {
        order: 0;
        min-height: 0;
        padding-top: 30px;
        padding-bottom: 20px;
    }

    .landing .hero-art,
    .landing .hero-note,
    .landing .ticker,
    .landing .play-doodle {
        display: none;
    }

    .landing .hero-copy h1 {
        margin: 12px 0 6px;
        font-size: clamp(32px, 9vw, 42px);
        line-height: 1.45;
    }

    .landing .hero-copy > p {
        margin: 8px 0;
        font-size: 13px;
        line-height: 1.9;
    }

    .landing .hero-actions {
        margin-top: 17px;
    }

    .landing .hero-actions a {
        flex: 1 1 135px;
        max-width: none;
    }

    .landing #play {
        order: 1;
        gap: 14px;
        padding-top: 15px;
        padding-bottom: 35px;
    }

    .landing .play-intro h2,
    .landing .play-intro p {
        display: none;
    }

    .landing .play-card {
        padding: 21px;
    }

    .landing #how { order: 2; }
    .landing #categories { order: 3; }
    .landing #faq { order: 4; }

    .landing #how,
    .landing #categories,
    .landing #faq {
        padding-top: 35px;
        padding-bottom: 35px;
    }

    .landing .section-heading {
        margin-bottom: 18px;
    }

    .landing .section-heading h2,
    .landing .category-inner h2,
    .landing .faq-inner h2 {
        margin-top: 8px;
        font-size: 25px;
        line-height: 1.5;
    }

    .landing .section-heading > p,
    .landing .category-inner p {
        margin: 8px 0;
        font-size: 12px;
        line-height: 1.8;
    }

    .landing .steps {
        gap: 8px;
    }

    .landing .step {
        display: grid;
        grid-template-columns: 38px 1fr;
        column-gap: 12px;
        padding: 12px;
    }

    .landing .step-top { grid-row: span 2; }
    .landing .step-icon { width: 38px; height: 38px; font-size: 19px; }
    .landing .step-number { display: none; }
    .landing .step h3 { margin: 0 0 3px; font-size: 14px; }
    .landing .step p { font-size: 11px; line-height: 1.7; }
    .landing .category-inner, .landing .faq-inner { gap: 15px; }
    .landing .category-cloud { min-height: 0; gap: 7px; }
    .landing .category-cloud span { padding: 8px 10px; font-size: 11px; transform: none; }
    .landing .cloud-star { display: none; }
    .landing .faq-list details { padding: 12px 0; }
    .landing .landing-footer { padding-top: 30px; }
    .landing .footer-bottom { margin-top: 25px; }
}

