@media screen and (max-width: 820px) {
    * {
        box-sizing: border-box;
    }

    html {
        overflow-x: hidden;
    }

    body {
        background-image: none;
        margin: 0;
        padding: 4px;
        width: 100%;
        max-width: 100%;
    }

    .workspace-shell {
        padding: 0;
    }

    .header-bar {
        padding: 5px;
        border: 1px solid #d4dbe6;
        border-radius: 8px;
        background: #f8fbff;
        box-shadow: none;
        gap: 0.3rem;
        margin-bottom: 0.35rem;
        justify-content: flex-start;
        min-height: 0;
        height: auto;
    }

    .header-bar__main {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.35rem;
        width: 100%;
    }

    .header-bar__meta,
    .header-tools,
    .newsletter-form,
    .newsletter-feedback,
    .donation-box {
        display: none !important;
    }

    .brand-lockup {
        display: flex;
        align-items: center;
        gap: 0.35rem;
        min-width: 0;
    }

    .brand-logo {
        width: 26px;
        height: 22px;
        flex: 0 0 auto;
    }

    .eyebrow {
        margin: 0 0 0.2rem;
        font-size: 0.68rem;
        font-family: Arial, sans-serif;
    }

    h1,
    .title {
        font-size: 0.94rem;
        line-height: 1.15;
        margin: 0;
        padding: 0;
        overflow-wrap: anywhere;
        border: 0;
    }

    .header-copy {
        margin: 0;
        color: #28435f;
        font-family: Arial, sans-serif;
        font-size: 0.82rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 0.96rem;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    p,
    details,
    .litext {
        font-size: 0.92rem;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .header-bar,
    .inline-elements,
    .quickcheck-form,
    .container,
    .workspace-intro,
    .workspace-intro__stats {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.35rem;
    }

    .inline-elements a {
        display: inline-block;
        width: fit-content;
    }

    .inline-elements {
        gap: 0;
        justify-content: flex-start;
        min-height: 0;
        height: auto;
    }

    .quickcheck-form {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 0.35rem;
        margin: 0;
        justify-content: flex-start;
        width: 100%;
        max-width: none;
        min-height: 0;
        height: auto;
    }

    .quickcheck-form input {
        flex: 1 1 auto;
        width: auto;
    }

    .quickcheck-form button {
        flex: 0 0 104px;
        width: auto;
    }

    .quickcheck-form input,
    .quickcheck-form button,
    input,
    select,
    textarea,
    button {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 36px;
        font-size: 0.9rem;
    }

    .quickcheck-form input {
        width: auto;
    }

    .quickcheck-form button {
        width: auto;
        min-height: 36px;
    }

    .workspace-intro {
        padding: 0.55rem;
        margin-bottom: 0.5rem;
        border: 1px solid #d4dbe6;
        border-radius: 8px;
        background: #f9fbfd;
    }

    .workspace-intro h2 {
        margin: 0 0 0.35rem;
    }

    .workspace-stat {
        padding: 0.5rem;
        border: 1px solid #d7e0eb;
        border-radius: 8px;
        background: #fff;
    }

    .workspace-stat__label {
        display: block;
        margin-bottom: 0.3rem;
        font-size: 0.72rem;
        font-family: Arial, sans-serif;
        text-transform: uppercase;
    }

    .workspace-stat__value {
        font-size: 0.92rem;
        font-family: Arial, sans-serif;
    }

    input[type="checkbox"],
    input[type="radio"] {
        width: auto;
        min-height: 0;
    }

    textarea {
        min-height: 110px;
    }

    #maintabpabel {
        display: block;
        width: 100%;
    }

    #tablist {
        display: flex;
        flex-direction: row;
        gap: 0.25rem;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #bbb;
        padding-bottom: 0.4rem;
        -webkit-overflow-scrolling: touch;
    }

    #tablist li {
        flex: 0 0 auto;
        min-width: 9.5rem;
        border: 1px solid #c8d5e3;
        border-radius: 6px;
        padding: 0.45rem;
        min-height: 36px;
        line-height: 1.2;
        font-size: 0.82rem;
        white-space: normal;
        background: #f5f8fb;
    }

    #tablist li[aria-selected="true"] {
        border-color: #2b6cb0;
        background: #fff;
    }

    #tabcontent {
        width: 100%;
        margin-top: 0.5rem;
        padding: 0.5rem;
        overflow-x: hidden;
        border: 1px solid #d6deea;
        border-radius: 8px;
        box-shadow: none;
    }

    #tabcontent [role="tabpanel"] {
        display: grid;
        gap: 0.5rem;
    }

    #tabcontent [role="tabpanel"][aria-hidden="true"] {
        display: none;
    }

    #tabcontent [role="tabpanel"][aria-hidden="false"] {
        display: grid;
    }

    #tabcontent [role="tabpanel"] > h2 {
        margin: 0;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid #e3e9f0;
    }

    #tabcontent form,
    #tabcontent details,
    #tabcontent .container {
        padding: 0.5rem;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #fbfdff;
    }

    #tabcontent form {
        margin: 0;
    }

    #tabcontent form p {
        margin: 0 0 0.45rem;
        font-family: Arial, sans-serif;
        line-height: 1.3;
    }

    #tabcontent form p:last-child {
        margin-bottom: 0;
    }

    #tabcontent form input[type="text"],
    #tabcontent form input[type="email"],
    #tabcontent form input[type="password"],
    #tabcontent form input[type="date"],
    #tabcontent form input[type="file"],
    #tabcontent form select,
    #tabcontent form textarea {
        margin-top: 0.2rem;
    }

    #tabcontent form input[type="checkbox"],
    #tabcontent form input[type="radio"] {
        margin-right: 0.5rem;
    }

    #tabcontent .mailbox-save-form {
        max-width: 100%;
    }

    .mailbox-save-grid {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 0.35rem;
        width: 100%;
    }

    .mailbox-save-grid label {
        text-align: left;
        font-weight: bold;
    }

    #tabcontent .mailbox-save-grid input[type="text"],
    #tabcontent .mailbox-save-grid input[type="password"],
    #tabcontent .mailbox-save-grid input[type="date"] {
        width: min(100%, 360px);
        margin-top: 0;
    }

    .mailbox-save-section {
        margin-top: 0.35rem;
        padding-top: 0.45rem;
        border-top: 1px solid #dce5ef;
        font-weight: bold;
    }

    #tabcontent form .mailbox-save-actions {
        padding-left: 0;
        margin-top: 0.65rem;
    }

    #tabcontent ul {
        margin: 0;
        padding-left: 1.1rem;
    }

    #tabcontent li.litext {
        margin-bottom: 0.4rem;
        padding: 0.45rem 0.5rem;
        border-left: 3px solid #d3dfed;
        background: #f8fbff;
        list-style: none;
    }

    #tabcontent li.litext a,
    .donation-box a,
    .site-footer a,
    .action-link {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        line-height: 1.25;
    }

    #tabcontent li.litext a::before,
    .donation-box a::before,
    .action-link:not(:has(i))::before {
        width: 1rem;
        height: 1rem;
        flex-basis: 1rem;
        font-size: 0.7rem;
    }

    .site-footer a::before {
        width: 0.95rem;
        height: 0.95rem;
        flex-basis: 0.95rem;
    }

    #tabcontent .container img {
        max-width: 150px;
        align-self: center;
    }

    .iplist,
    .iplist2,
    .sortable,
    table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th,
    td {
        min-width: 7rem;
        padding: 0.3rem;
        vertical-align: top;
        font-size: 0.82rem;
    }

    #map {
        width: 100%;
        height: 320px;
        margin-left: 0;
    }

    .donation-box {
        padding: 0.45rem;
        border-radius: 6px;
    }

    .crypto-grid {
        flex-direction: column;
        gap: 0.45rem;
    }

    .crypto-grid img {
        max-width: 150px;
    }

    #cookie-popup,
    #info-popup {
        font-size: 0.86rem;
        line-height: 1.3;
        padding: 0.55rem;
        max-height: 70vh;
        overflow-y: auto;
    }

    .action-link {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
        font-size: 0.88rem;
    }

    .site-footer {
        margin-top: 0.6rem;
        padding-top: 0.55rem;
        border-top: 1px solid #d6deea;
        font-size: 0.85rem;
        font-family: Arial, sans-serif;
    }

    .request-overlay {
        padding: 0.75rem;
    }

    .request-overlay__panel {
        width: min(94vw, 320px);
        padding: 0.9rem;
    }

    .request-overlay__title {
        font-size: 0.98rem;
    }

    .request-overlay__text {
        font-size: 0.86rem;
    }

    body > h1,
    body > h2 {
        margin: 0.45rem 0 0.3rem;
        padding: 0 0.5rem;
        border: 0;
        box-sizing: border-box;
        font-family: Arial, Helvetica, sans-serif;
    }

    body > h1 {
        font-size: 1rem;
        line-height: 1.25;
    }

    body > h2 {
        font-size: 0.92rem;
        line-height: 1.25;
    }

    body > p,
    body > details,
    body > form,
    body > ul,
    body > ol,
    body > table,
    body > div:not(.header-bar):not(.workspace-shell):not(#cookie-popup):not(#info-popup) {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    body > p {
        padding: 0.45rem 0.5rem;
        border: 1px solid #e1e8f0;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    body > .noprint,
    body > .noprintpersistent {
        padding: 0.45rem 0.5rem;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #fbfdff;
        box-sizing: border-box;
    }

    body > .noprint p,
    body > .noprintpersistent p {
        margin: 0;
    }

    body > form {
        padding: 0.5rem;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #fbfdff;
        box-sizing: border-box;
    }

    body > ul,
    body > ol {
        padding: 0.45rem 0.5rem 0.45rem 1.55rem;
        border: 1px solid #e1e8f0;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    body > form p {
        margin: 0 0 0.45rem;
        font-family: Arial, Helvetica, sans-serif;
    }

    body > form input[type="text"],
    body > form input[type="email"],
    body > form input[type="password"],
    body > form input[type="date"],
    body > form input[type="file"],
    body > form textarea,
    body > form select {
        width: 100%;
        padding: 0.45rem 0.5rem;
        border: 1px solid #b8c8db;
        border-radius: 8px;
        box-sizing: border-box;
    }

    body > form input[type="submit"],
    body > form button {
        width: 100%;
        min-height: 36px;
        border: 1px solid #1359a5;
        border-radius: 8px;
        background: #1359a5;
        color: #fff;
        font-weight: bold;
    }

    details {
        padding: 0.45rem 0.5rem;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #fbfdff;
    }

    .telegram-report {
        width: 100%;
        max-width: 100%;
        gap: 0.5rem;
        margin: 0.35rem 0;
    }

    .telegram-summary,
    .telegram-fields {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .telegram-section,
    .telegram-list-item,
    .telegram-metric,
    .telegram-field {
        border-radius: 8px;
    }

    .telegram-section {
        padding: 0.5rem;
    }

    .telegram-section-nested {
        margin-top: 0.45rem;
        border-left-width: 2px;
    }

    .telegram-list-item,
    .telegram-metric,
    .telegram-field {
        padding: 0.45rem 0.5rem;
    }

    .telegram-section h2 {
        font-size: 0.95rem;
    }

    .telegram-list-item h3 {
        font-size: 0.88rem;
    }

    .telegram-pre {
        max-height: 220px;
        font-size: 0.8rem;
    }

    body.crypto-scan-page > div:not(.noprint):not(.noprintpersistent) {
        display: grid;
        gap: 0.55rem;
        width: 100%;
        max-width: 100%;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent;
        box-sizing: border-box;
    }

    body.crypto-scan-page > div h2 {
        margin: 0.35rem 0 0;
        padding: 0.5rem;
        border: 0;
        border-left: 3px solid #1359a5;
        border-radius: 8px;
        background: #edf3f9;
        color: #17324d;
        font-size: 0.92rem;
        line-height: 1.3;
    }

    body.crypto-scan-page > div p,
    body.crypto-scan-page > div details {
        margin: 0;
        padding: 0.1rem 0.5rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #294660;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 0.86rem;
        line-height: 1.42;
        box-sizing: border-box;
        overflow-wrap: anywhere;
    }

    body.crypto-scan-page > div form {
        margin: 0;
        padding: 0.6rem;
        border: 1px solid #dce5ef;
        border-radius: 8px;
        background: #fff;
        box-sizing: border-box;
    }

    body.crypto-scan-page > div form p {
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.crypto-scan-page > div label {
        display: block;
        margin: 0.35rem 0 0.2rem;
        font-weight: 600;
    }

    body.crypto-scan-page > div input[type="text"],
    body.crypto-scan-page > div input[type="number"],
    body.crypto-scan-page > div input[type="date"],
    body.crypto-scan-page > div select {
        width: 100%;
        margin: 0.2rem 0;
        padding: 0.45rem 0.5rem;
        border: 1px solid #b8c8db;
        border-radius: 8px;
        box-sizing: border-box;
    }

    body.crypto-scan-page > div button,
    body.crypto-scan-page > div input[type="submit"] {
        width: 100%;
        min-height: 36px;
        margin: 0.3rem 0 0;
        border: 1px solid #1359a5;
        border-radius: 8px;
        background: #1359a5;
        color: #fff;
        font-weight: bold;
    }

    body.crypto-scan-page > div button:disabled,
    body.crypto-scan-page > div input[type="submit"]:disabled {
        border-color: #b8c8db;
        background: #e8eef5;
        color: #6c7f91;
    }
}
