

@media screen and (max-width: 768px) {

    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea {
        font-size: max(16px, 1rem);
    }
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}


@media screen and (max-width: 768px) {

    .bottom-nav-container {
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .feed-content-wrapper {
        margin-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .source-nav {
        padding-top: calc(15px + env(safe-area-inset-top));
        height: calc(70px + env(safe-area-inset-top));
    }
}


@media (hover: none) and (pointer: coarse) {

    .carousel-btn {
        display: none;
    }

    .action-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .remove-img-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .comment-menu-btn,
    .send-comment-btn {
        min-height: 40px;
    }

    a,
    button,
    .action-btn,
    .nav-icon {
        -webkit-tap-highlight-color: transparent;
    }
}


@media screen and (max-width: 480px) {

    .feed-content-wrapper {
        padding: 0 12px;
    }

    .post-card {
        border-radius: 6px;
    }

    .post-header,
    .post-content,
    .post-actions {
        padding-left: 14px;
        padding-right: 14px;
    }

    .action-btn {
        font-size: 0.82rem;
        gap: 5px;
    }

    .post-actions {
        gap: 10px;
        justify-content: space-between;
    }

    .comment-input-area {
        flex-wrap: wrap;
    }
}


@media screen and (max-width: 600px) {

    body .editor-container {
        padding: 20px 16px;
        margin: 16px auto;
        border-radius: 0;
        box-shadow: none;
    }

    body .form-row {
        flex-direction: column;
        gap: 0;
    }

    body .video-card {
        flex-wrap: wrap;
        position: relative;
    }

    body .video-card video {
        width: 100%;
    }

    body .video-card .remove-img-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.65);
        color: #fff;
    }

    body .poster-row {
        flex-wrap: wrap;
    }

    body .ratio-options,
    body .audience-options {
        grid-template-columns: 1fr;
    }

    body .image-upload-wrapper .custom-file-upload {
        flex: 1;
        justify-content: center;
    }

    body textarea.form-input {
        min-height: 180px;
    }

    body .preview-area {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    }
}


@media screen and (max-width: 480px) {

    .confirmation-modal {
        width: calc(100% - 32px);
        padding: 20px 18px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-btn {
        width: 100%;
        padding: 13px 20px;
    }

    .settings-title {
        font-size: 1em;
    }
}

@media screen and (max-width: 600px) {

    body .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 24px;
    }

    body .stat-card {
        padding: 14px 8px;
    }

    body .stat-card h3 {
        font-size: 1.7em;
        margin-bottom: 4px;
    }

    body .stat-card p {
        font-size: 0.62em;
        letter-spacing: 0.5px;
        line-height: 1.35;
    }
}

/* --------------------------------------------------------------------------
   8. Post header on narrow phones.

   The full date plus "Users only" needs about 385px. Below that the lock
   carries the meaning on its own and the meta line stays one row.
   -------------------------------------------------------------------------- */
@media screen and (max-width: 384px) {

    .audience-badge .audience-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .audience-badge svg {
        width: 11px;
        height: 11px;
        opacity: 0.9;
    }
}
