/* Shared responsive enhancements - 2026-07-14 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 0;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    max-width: 100%;
}

img,
.uploaded-photo,
.uploaded-image,
.photo-preview img,
.image-preview img {
    height: auto;
}

.uploaded-photo,
.uploaded-image,
.photo-preview img,
.image-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(72vh, 860px);
    margin-inline: auto;
    object-fit: contain;
    border-radius: 12px;
}

input,
select,
textarea,
button {
    max-width: 100%;
    font-family: inherit;
}

button,
input[type="button"],
input[type="submit"],
.btn {
    min-height: 44px;
    touch-action: manipulation;
}

.tablewrap,
.table-container {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
}

@media (max-width: 900px) {
    .wrap,
    .container {
        width: 100%;
        max-width: none;
        padding-left: 14px;
        padding-right: 14px;
    }

    .card {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .wrap,
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card {
        padding: 15px;
        border-radius: 16px;
    }

    .title,
    .page-title {
        overflow-wrap: anywhere;
    }

    input,
    select,
    textarea,
    .form-control {
        font-size: 16px !important;
    }

    .actions,
    .btn-group,
    .toplinks {
        width: 100%;
    }

    .actions .btn,
    .btn-group .btn,
    .toplinks .btn {
        flex: 1 1 145px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .actions .btn,
    .btn-group .btn,
    .toplinks .btn {
        flex-basis: 100%;
        width: 100%;
    }
}
