/*
 * Responsive layout for public/template/default.
 * Loaded after public.css and home.css.
 */

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

body {
    overflow-x: hidden;
    min-width: 320px;
}

.wrapper,
main,
.header,
.footer,
#main,
#content,
#social-network,
.news_block,
#server-status,
.server-block,
.swiper-container,
.swiper-main,
.footer_all,
.banners_rating,
.subs-all {
    min-width: 0;
}

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

.wrap {
    width: min(1320px, 100%);
    max-width: 1320px;
    box-sizing: border-box;
    padding-left: clamp(14px, 2.2vw, 30px);
    padding-right: clamp(14px, 2.2vw, 30px);
}

.top_line {
    gap: clamp(10px, 2vw, 25px);
    min-width: 0;
}

.top_menu,
.top_right,
.top--right-menu,
.acp-panel-top,
.nav__langs {
    min-width: 0;
}

.nav-link,
.btn-red,
.btn-golden,
.nav__langs-item {
    white-space: nowrap;
}

.nav__langs-stroke {
    z-index: 10020;
}

.main_content_all {
    align-items: stretch;
    min-width: 0;
}

.news_block,
#server-status {
    min-width: 0;
}

#server-status {
    display: block;
}

.server-block {
    width: 100%;
    overflow: hidden;
}

.server_item,
.server-i-top,
.server_t {
    min-width: 0;
}

.server_title,
.server_t a {
    overflow-wrap: anywhere;
}

.swiper-main {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

.swiper-slide img {
    object-fit: cover;
}

.news_all {
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.news_img {
    height: clamp(170px, 22vw, 220px);
}

.text-block {
    max-width: 100%;
}

/* Hero mobile tuning */

:root {
    --faf-hero-bg-y-desktop: center;
    --faf-hero-bg-y-tablet: center;
    --faf-hero-bg-y-phone: center;

    /* Logo */
    --faf-hero-logo-height-tablet: clamp(160px, 31vw, 220px);
    --faf-hero-logo-height-phone: clamp(150px, 33vw, 160px);
    --faf-hero-logo-shift-tablet: 0px;
    --faf-hero-logo-shift-phone: 0px;

    /* Start button: independent movement */
    --faf-hero-button-shift-tablet: 0px;
    --faf-hero-button-shift-phone: 0px;

    /* Girl: independent movement and size */
    --faf-hero-girl-shift-tablet: 0px;
    --faf-hero-girl-shift-phone: 10px;
    --faf-hero-girl-height-tablet: 315px;
    --faf-hero-girl-height-phone: 305px;

    /* Server blocks: independent movement */
    --faf-hero-server-block-shift-tablet: 0px;
    --faf-hero-server-block-shift-phone: 0px;

    /* iPad Mini: independent movement */
    --faf-hero-girl-shift-ipad-mini: 125px;
    --faf-hero-button-shift-ipad-mini: 280px;
    --faf-hero-server-block-shift-ipad-mini: 200px;

    /* Wide tablets: optional global fine tuning */
    --faf-hero-girl-shift-tablet-wide: 220px;
    --faf-hero-button-shift-tablet-wide: -90px;
    --faf-hero-server-block-shift-tablet-wide: -150px;
}

/* iPhone XR / 390-520px tuning */
@media only screen and (min-width: 381px) and (max-width: 520px) {
    :root {
        --faf-hero-logo-shift-phone: 0px;
        --faf-hero-logo-height-phone: 155px;

    /* Start button: independent movement */
    --faf-hero-button-shift-tablet: 0px;
    --faf-hero-button-shift-phone: 200px;

        --faf-hero-girl-shift-phone: 90px;
        --faf-hero-girl-height-phone: 305px;

        --faf-hero-server-block-shift-phone: -125px;
    }
}

.main-bg {
    background-position: center var(--faf-hero-bg-y-desktop);
}

/* Desktop geometry: keep the old full-size layout. */
@media only screen and (min-width: 1025px) {
    .wrap {
        width: 1320px;
        max-width: 1320px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .logo img {
        height: 300px;
        margin-top: 30px;
    }

    .main-start {
        margin-top: -45px;
    }

    .main_content_all {
        gap: 20px;
        align-items: stretch;
    }

    .news_block,
    #server-status {
        width: calc(50% - 10px);
    }
}

@media only screen and (max-width: 1350px) and (min-width: 1025px) {
    .wrap {
        width: 100%;
        max-width: 1320px;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media only screen and (max-width: 1360px) {
    .top_menu {
        gap: 16px;
    }

    .nav-link {
        font-size: 16px;
    }

    .nav-link svg {
        width: 19px;
        height: 19px;
        flex: 0 0 auto;
    }

    .top_right,
    .top--right-menu {
        gap: 14px;
    }
}

@media only screen and (max-width: 1180px) {
    .top_menu {
        gap: 12px;
    }

    .nav-link {
        font-size: 14px;
        gap: 5px;
    }

    .nav-link svg {
        width: 17px;
        height: 17px;
    }

    .btn-red,
    .btn-golden,
    .dropdown-toggle,
    .nav__langs-item {
        height: 32px;
        font-size: 12px;
    }

    .btn-red,
    .btn-golden,
    .dropdown-toggle {
        padding-left: 14px;
        padding-right: 14px;
    }

    .nav__langs-item {
        gap: 6px;
    }

    .nav__langs-item img {
        width: 20px;
    }

    .logo img {
        height: 235px;
    }

    .main_content_all {
        gap: 16px;
    }

    .server_title {
        font-size: 13px;
    }

    .server_t a {
        font-size: 12px;
    }

    .server_brand {
        left: 8px;
        right: 8px;
        gap: 6px;
    }
}

@media only screen and (max-width: 1024px) {
    header.header {
        position: sticky;
        top: 0;
        z-index: 10000;
    }

    .top_line {
        min-height: 52px;
    }

    .gw-burger,
    .navigation__burger {
        display: block;
        flex: 0 0 40px;
    }

    .top_menu {
        max-width: calc(100vw - 34px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding-bottom: 28px;
    }

    .top_menu .nav-item {
        width: 100%;
    }

    .top_menu .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 10px 0;
        font-size: 17px;
    }

    .top_menu .nav-link svg {
        width: 20px;
        height: 20px;
    }

    .top_right {
        margin-left: auto;
        gap: 12px;
    }

    .main_content_all {
        flex-direction: column;
        gap: 20px;
        margin-top: 0;
    }

    #server-status {
        order: 1;
    }

    .news_block {
        order: 2;
    }

    .news_block,
    #server-status {
        width: 100%;
    }

    .swiper-main {
        height: clamp(230px, 38vw, 340px);
    }

    .server-block {
        height: auto;
        min-height: 0;
    }

    .server_item {
        width: 50%;
        min-height: 140px;
    }

    .server-i-top {
        padding-top: 50px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-text p {
        margin-top: 0;
    }

    .footer_all {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px 30px;
    }

    .menu-footer {
        width: auto;
        margin-bottom: 0;
    }
}

@media only screen and (max-width: 820px) {
    .wrap {
        padding-left: 18px;
        padding-right: 18px;
    }

    .top--right-menu .nav-item {
        display: none;
    }

    .btn-red {
        height: 32px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 12px;
    }

    .nav__langs-item {
        height: 32px;
    }

    .main-bg {
        background-position: center var(--faf-hero-bg-y-tablet);
    }

    .logo img {
        height: var(--faf-hero-logo-height-tablet);
        position: relative;
        top: var(--faf-hero-logo-shift-tablet);
    }

    .btn-main {
        padding: 18px 34px;
    }


    .swiper-info {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .subscribers {
        margin: 34px 0;
    }

    .sub_item {
        height: 154px;
        padding-left: 20px;
    }

    .sub_item > img {
        max-width: 46px;
    }

    .sub-title p {
        font-size: 15px;
    }

    .video-panel {
        width: 82%;
        max-width: none;
        top: 58px;
        padding: 14px;
    }
}

@media only screen and (max-width: 675px) {
    .wrap {
        padding-left: 14px;
        padding-right: 14px;
    }

    .top_line {
        gap: 8px;
    }

    .top_right {
        gap: 8px;
    }

    .btn-red {
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
    }

    .server_item {
        width: 100%;
        min-height: 126px;
        border-right: 0;
        border-bottom: 1px solid rgb(255 255 255 / 20%);
    }

    .server_item:last-child {
        border-bottom: 0;
    }

    .server-i-top {
        padding-top: 48px;
        padding-left: 12px;
        padding-right: 12px;
        gap: 8px;
    }

    .server_img {
        width: 72px;
        height: 72px;
        flex: 0 0 72px;
    }

    .server_img img {
        max-width: 44px;
    }

    .server_brand {
        align-items: flex-start;
    }

    .server-status-switch {
        right: 12px;
    }

    .swiper-main {
        height: auto;
        aspect-ratio: 16 / 10;
        min-height: 230px;
        max-height: 310px;
    }

    .swiper-info {
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 0;
        text-align: left;
        align-items: flex-start;
    }

    .swiper-pagination {
        bottom: 12px;
        right: 12px;
        left: auto;
        width: auto;
        text-align: right;
    }

    .swiper-pagination-bullet {
        width: 9px;
        height: 9px;
        margin: 0 4px;
    }

    .btn-golden {
        height: 32px;
        padding-left: 14px;
        padding-right: 14px;
        font-size: 12px;
    }

    #content {
        padding: 30px 0 46px;
    }

    .main-start {
        margin-top: 0;
    }

    .main-text p {
        font-size: 20px;
    }

    .subs-all {
        gap: 16px;
    }

    .sub_item {
        width: 100%;
        margin-bottom: 0;
    }

    .footer {
        padding-top: 24px;
    }
}

@media only screen and (max-width: 520px) {
    .top--right-menu {
        gap: 0;
    }

    .nav__langs-item {
        font-size: 11px;
        padding-left: 5px;
        padding-right: 5px;
    }

    .nav__langs-item img {
        width: 18px;
    }

    .nav__langs-stroke {
        right: 0;
    }

    .main-bg {
        background-position: center var(--faf-hero-bg-y-phone);
    }

    .logo img {
        height: var(--faf-hero-logo-height-phone);
        position: relative;
        top: var(--faf-hero-logo-shift-phone);
    }

    .btn-main {
        padding: 15px 25px;
        border-radius: 14px;
    }


    .btn-main .text {
        font-size: 14px;
    }

    .server_title {
        font-size: 12px;
    }

    .server_t a {
        font-size: 11px;
    }

    .server-brand-i {
        font-size: 9px;
    }

    .swiper-main {
        aspect-ratio: 4 / 3;
        min-height: 224px;
    }

    .sub_item {
        height: 142px;
        padding: 16px;
    }

    .footer_all {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .menu-footer {
        align-items: center;
    }

    .banners_rating {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: min(300px, 100%);
        justify-content: center;
    }

    .copyright {
        padding-bottom: 0;
    }

    .video-toggle-btn {
        left: 8px;
        transform: translateX(-30%);
    }

    .video-toggle-btn img {
        width: 48px;
    }

    .video-panel {
        width: 100%;
        top: 56px;
        padding: 12px;
    }
}

@media only screen and (max-width: 380px) {
    .wrap {
        padding-left: 10px;
        padding-right: 10px;
    }

    .top_line {
        gap: 6px;
    }

    .gw-burger {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .server_img {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .server_img img {
        max-width: 38px;
    }

    .server_online_count span {
        font-size: 13px;
    }

    .server_online_count p {
        font-size: 10px;
    }

    .btn-golden {
        height: 30px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .main-text p {
        font-size: 18px;
    }

    .banners_rating {
        width: min(288px, 100%);
    }
}

@media only screen and (orientation: landscape) and (max-height: 520px) {
    .top_menu {
        padding-top: 56px;
    }

    .logo img {
        height: 120px;
    }

    .main-start .hero-btn-wrapper {
        margin-top: 14px;
        margin-bottom: 22px;
    }

    .swiper-main {
        min-height: 210px;
        max-height: 260px;
    }

    .video-panel {
        top: 0;
        height: 100%;
    }
}

/* ==========================================================
   CONTROL: character + hero button + server block spacing
   These values are intentionally grouped here for manual tuning.
   ========================================================== */

@media only screen and (max-width: 1180px) and (min-width: 961px) {
    .servers-area .logo1 {
        top: -300px;
    }

    .servers-area .logo1 img {
        height: 380px;
    }
}

@media only screen and (min-width: 676px) and (max-width: 960px) {
    .servers-area {
        position: relative;
        padding-top: 0;
    }

    .servers-area .logo1 {
        position: absolute;
        left: 50%;
        top: calc(-515px + var(--faf-hero-girl-shift-tablet)); /* CONTROL: girl vertical position on tablets */
        z-index: 2;
        margin: 0;
        text-align: center;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .servers-area .logo1 img {
        display: block;
        height: var(--faf-hero-girl-height-tablet); /* CONTROL: girl size on tablets */
        width: auto;
        max-width: none;
        margin: 0;
        transform: none;
    }

    .main-start .hero-btn-wrapper {
        position: relative;
        z-index: 5;
        margin-top: calc(85px + var(--faf-hero-button-shift-tablet)); /* CONTROL: button vertical position on tablets */
        margin-bottom: 34px;
    }

    .servers-area .main_content_all {
        position: relative;
        z-index: 4;
        margin-top: calc(80px + var(--faf-hero-server-block-shift-tablet)); /* CONTROL: server block vertical position on tablets */
    }
}

/* Wide tablet tuning: Surface Pro, iPad Pro and similar widths. */
@media only screen and (min-width: 821px) and (max-width: 1024px) {
    .top_line {
        gap: clamp(8px, 1.1vw, 12px);
        min-height: 52px;
    }

    header.header .gw-burger,
    header.header .navigation__burger {
        display: none;
    }

    header.header ul.top_menu,
    header.header ul.top_menu:not(.active) {
        position: static;
        width: auto;
        height: auto;
        max-width: none;
        padding: 0;
        margin: 0;
        overflow: visible;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: clamp(8px, 1.1vw, 12px);
        background: transparent;
        box-shadow: none;
        z-index: auto;
    }

    header.header ul.top_menu .nav-item {
        display: flex;
        width: auto;
    }

    header.header ul.top_menu .nav-link {
        display: flex;
        width: auto;
        padding: 0;
        justify-content: center;
        gap: 4px;
        font-size: clamp(12px, 1.35vw, 14px);
        line-height: 1;
    }

    header.header ul.top_menu .nav-link svg {
        width: clamp(15px, 1.65vw, 17px);
        height: clamp(15px, 1.65vw, 17px);
        flex: 0 0 clamp(15px, 1.65vw, 17px);
    }

    header.header ul.top_menu .nav-link span {
        display: inline;
    }

    .top_right {
        margin-left: auto;
        gap: clamp(8px, 1vw, 10px);
    }

    .acp-panel-top,
    .top--right-menu {
        gap: clamp(8px, 1vw, 10px);
    }

    .servers-area .logo1 {
        top: calc(clamp(-610px, -58vw, -390px) + var(--faf-hero-girl-shift-tablet-wide));
    }

    .servers-area .logo1 img {
        height: clamp(320px, 37vw, 390px);
    }

    .main-start .hero-btn-wrapper {
        margin-top: clamp(70px, 9vw, 105px);
        margin-bottom: 34px;
        transform: translateY(calc(clamp(35px, 8vw, 85px) + var(--faf-hero-button-shift-tablet-wide)));
    }

    .servers-area .main_content_all {
        margin-top: calc(clamp(130px, 18vw, 210px) + var(--faf-hero-server-block-shift-tablet-wide));
    }
}

/* iPad Mini tuning: full top nav + calmer hero geometry. */
@media only screen and (min-width: 721px) and (max-width: 820px) {
    .top_line {
        gap: 10px;
        min-height: 46px;
    }

    header.header .gw-burger,
    header.header .navigation__burger {
        display: none;
    }

    header.header ul.top_menu,
    header.header ul.top_menu:not(.active) {
        position: static;
        width: auto;
        height: auto;
        max-width: none;
        padding: 0;
        margin: 0;
        overflow: visible;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 9px;
        background: transparent;
        box-shadow: none;
        z-index: auto;
    }

    header.header ul.top_menu .nav-item {
        display: flex;
        width: auto;
    }

    header.header ul.top_menu .nav-link {
        display: flex;
        width: auto;
        padding: 0;
        justify-content: center;
        gap: 4px;
        font-size: 12px;
        line-height: 1;
    }

    header.header ul.top_menu .nav-link svg {
        width: 15px;
        height: 15px;
        flex: 0 0 15px;
    }

    header.header ul.top_menu .nav-link span {
        display: inline;
    }

    .top_right {
        margin-left: auto;
        gap: 8px;
    }

    .acp-panel-top,
    .top--right-menu {
        gap: 8px;
    }

    .acp-panel-top-user,
    .btn-red,
    .btn-green,
    .nav__langs-item {
        height: 30px;
        min-height: 30px;
        padding-left: 9px;
        padding-right: 9px;
        font-size: 10px;
    }

    .nav__langs-item {
        gap: 5px;
    }

    .nav__langs-item img {
        width: 17px;
    }

    .servers-area .logo1 {
        top: calc(-548px + var(--faf-hero-girl-shift-ipad-mini));
    }

    .servers-area .logo1 img {
        height: 340px;
    }

    .main-start .hero-btn-wrapper {
        margin-top: 52px;
        margin-bottom: 42px;
        transform: translateY(var(--faf-hero-button-shift-ipad-mini));
    }

    .servers-area .main_content_all {
        margin-top: calc(108px + var(--faf-hero-server-block-shift-ipad-mini));
    }
}

@media only screen and (max-width: 675px) {
    .servers-area {
        position: relative;
        padding-top: 0;
    }

    .servers-area .logo1 {
        position: absolute;
        left: 50%;
        top: calc(-475px + var(--faf-hero-girl-shift-phone)); /* CONTROL: girl vertical position on phones */
        z-index: 2;
        margin: 0;
        text-align: center;
        transform: translateX(-50%);
        pointer-events: none;
    }

    .servers-area .logo1 img {
        display: block;
        height: var(--faf-hero-girl-height-phone); /* CONTROL: girl size on phones */
        width: auto;
        max-width: none;
        margin: 0;
        transform: none;
    }

    .main-start .hero-btn-wrapper {
        position: relative;
        z-index: 5;
        margin-top: calc(82px + var(--faf-hero-button-shift-phone)); /* CONTROL: button vertical position on phones */
        margin-bottom: 34px;
    }

    .servers-area .main_content_all {
        position: relative;
        z-index: 4;
        margin-top: calc(86px + var(--faf-hero-server-block-shift-phone)); /* CONTROL: server block vertical position on phones */
    }
}

@media only screen and (max-width: 520px) {
    .servers-area .logo1 {
        top: calc(-445px + var(--faf-hero-girl-shift-phone));
    }

    .servers-area .logo1 img {
        height: calc(var(--faf-hero-girl-height-phone) - 13px);
    }

    .main-start .hero-btn-wrapper {
        margin-top: calc(72px + var(--faf-hero-button-shift-phone));
        margin-bottom: 30px;
    }

    .servers-area .main_content_all {
        margin-top: calc(82px + var(--faf-hero-server-block-shift-phone));
    }
}

@media only screen and (max-width: 380px) {
    .servers-area .logo1 {
        top: calc(-350px + var(--faf-hero-girl-shift-phone));
    }

    .servers-area .logo1 img {
        height: calc(var(--faf-hero-girl-height-phone) - 31px);
    }

    .main-start .hero-btn-wrapper {
        margin-top: calc(250px + var(--faf-hero-button-shift-phone));
        margin-bottom: -10px;
    }

    .servers-area .main_content_all {
        margin-top: calc(0px + var(--faf-hero-server-block-shift-phone));
    }
}

/* Sticky header */
header.header {
    position: sticky;
    top: 0;
    z-index: 10000;
}

/* Header controls */
header.header .top_right,
header.header .acp-panel-top,
header.header .acp-panel-top--lk {
    align-items: center;
}

header.header .acp-panel-top--lk .fafurion-account-open,
header.header .nav__langs > .nav__langs-item--current {
    height: 36px;
    min-height: 36px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid #ebb686;
    border-radius: 8px;
    line-height: 1;
}

header.header .acp-panel-top--lk .fafurion-account-open {
    min-width: 0;
}

header.header .nav__langs > .nav__langs-item--current {
    min-width: 86px;
}

header.header .nav__langs-item img {
    flex: 0 0 auto;
}

header.header .nav__langs-item--current::after {
    flex: 0 0 12px;
}

header.header .arrow-down-acp {
    flex: 0 0 auto;
    margin-top: -2px;
}

@media only screen and (max-width: 820px) {
    header.header .acp-panel-top--lk .fafurion-account-open,
    header.header .nav__langs > .nav__langs-item--current {
        height: 34px;
        min-height: 34px;
        padding-left: 10px;
        padding-right: 10px;
        font-size: 11px;
    }

    header.header .nav__langs > .nav__langs-item--current {
        min-width: 82px;
    }
}

@media only screen and (max-width: 520px) {
    header.header .acp-panel-top--lk .fafurion-account-open,
    header.header .nav__langs > .nav__langs-item--current {
        height: 32px;
        min-height: 32px;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 10px;
    }

    header.header .nav__langs > .nav__langs-item--current {
        min-width: 74px;
    }
}
.nav-link,
.btn-red,
.btn-green,
.btn-golden,
.nav__langs-item {
    white-space: nowrap;
}

@media only screen and (max-width: 1180px) {
    .btn-green {
        height: 32px;
        font-size: 12px;
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media only screen and (max-width: 675px) {
    .btn-green {
        min-width: 0;
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media only screen and (max-width: 520px) {
    .top--right-menu .btn-green {
        display: none;
    }

    .top--right-menu .btn-red {
        display: flex;
    }
}
/* Auth modal */
@media only screen and (max-width: 675px) {
    header.header .top--right-menu {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    header.header .top--right-menu .btn-green,
    header.header .top--right-menu .btn-red {
        display: flex;
        height: 32px;
        padding: 0 9px;
        font-size: 11px;
        border-radius: 7px;
    }

    .auth-modal {
        padding: 12px;
    }

    .auth-modal__dialog {
        padding: 22px 16px 18px;
        border-radius: 14px;
    }

    .auth-modal__tabs {
        gap: 4px;
        margin-bottom: 18px;
    }

    .auth-modal__tab {
        min-height: 34px;
        font-size: 10px;
    }
}

@media only screen and (max-width: 380px) {
    header.header .top--right-menu .btn-green,
    header.header .top--right-menu .btn-red {
        height: 30px;
        padding: 0 6px;
        font-size: 9px;
    }

    .auth-modal__tabs {
        grid-template-columns: 1fr;
    }
}
@media only screen and (max-width: 675px) {
    .auth-modal .auth-modal__dialog {
        width: min(520px, calc(100vw - 24px));
        max-width: 520px;
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media only screen and (max-width: 420px) {
    .auth-modal .auth-modal__dialog {
        width: min(390px, calc(100vw - 18px));
        max-width: 390px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .auth-modal .auth-modal__tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-modal .auth-modal__tab {
        font-size: 10px;
        line-height: 1.1;
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media only screen and (max-width: 360px) {
    .auth-modal .auth-modal__dialog {
        width: calc(100vw - 12px);
        padding-left: 14px;
        padding-right: 14px;
    }

    .auth-modal .auth-modal__tabs {
        grid-template-columns: 1fr;
    }
}
@media only screen and (max-width: 675px) {
    /* Меньше воздуха перед блоком соцсетей */
    .subscribers {
        margin: -20px 0 26px;
    }

    .main-text p {
        margin-top: 0;
        margin-bottom: 8px;
        font-size: 18px;
    }

    .subs-all {
        margin-top: 6px;
        gap: 14px;
    }

    /* Карточки телеги */
    .sub_item {
        width: 100%;
        min-height: 138px;
        height: 138px;
        padding: 16px 18px;
        padding-right: 120px; /* оставляем место под кота справа */
        align-items: center;
        background-repeat: no-repeat;
        background-size: cover;
    }

    /* Смещаем фон так, чтобы справа были видны персонажи/коты */
    .sub_item:nth-child(1) {
        background-position: right center;
    }

    .sub_item:nth-child(2) {
        background-position: right center;
    }

    .sub_item > img {
        width: 52px;
        max-width: 52px;
        flex: 0 0 52px;
    }

    .sub-title {
        margin-left: 12px;
    }

    .sub-title p {
        font-size: 15px;
        line-height: 1.15;
        margin-bottom: 8px;
    }

    .link-border {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* Account modal summary */
@media only screen and (min-width: 676px) and (max-width: 920px) {
    .account-modal__head.account-modal__head--summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        padding-right: 0;
        margin-bottom: 12px;
    }

    .account-modal__head--summary .account-modal__head-profile {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 54px;
        padding-right: 46px;
        box-sizing: border-box;
        transform: none;
    }

    .account-modal__head--summary .account-modal__head-profile-main {
        min-width: 0;
        transform: none;
    }

    .account-modal__head--summary .account-modal__head-profile-main strong,
    .account-modal__head--summary .account-modal__head-profile-main small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-modal__head--summary .account-modal__summary-bar.account-modal__summary-bar--icon-nav {
        width: 100%;
        max-width: none;
        margin: 0;
        justify-self: stretch;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card {
        min-width: 0;
        min-height: 66px;
        height: auto;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        grid-template-rows: 1fr;
        gap: 9px;
        align-items: center;
        padding: 9px 10px;
        border-radius: 12px;
        text-align: left;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon {
        grid-column: 1;
        grid-row: 1;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon svg {
        width: 20px;
        height: 20px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        min-width: 0;
        padding-right: 0;
        justify-content: center;
        gap: 2px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main span {
        max-width: 100%;
        font-size: 11px;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-info {
        display: none;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--referrals .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--promo .account-modal__summary-main strong {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: 18px;
        line-height: 1.02;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-actions,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-actions--single {
        display: none;
    }

    .account-modal__tabs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 5px;
    }

    .account-modal__tab {
        min-height: 38px;
        padding-left: 5px;
        padding-right: 5px;
        font-size: 11px;
    }
}

@media only screen and (min-width: 676px) and (max-width: 760px) {
    .account-modal__head--summary .account-modal__summary-bar.account-modal__summary-bar--icon-nav {
        gap: 7px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card {
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 62px;
        gap: 7px;
        padding: 8px 7px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon {
        width: 34px;
        height: 34px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main span {
        font-size: 10px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--referrals .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--promo .account-modal__summary-main strong {
        font-size: 15px;
    }

    .account-modal__tabs {
        gap: 5px;
    }

    .account-modal__tab {
        font-size: 10px;
    }
}
@media only screen and (max-width: 675px) {
    .account-modal__head.account-modal__head--summary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding-right: 0;
        margin-bottom: 12px;
    }

    .account-modal__head--summary .account-modal__head-profile {
        width: 100%;
        min-width: 0;
        max-width: none;
        height: auto;
        min-height: 54px;
        padding-right: 46px;
        box-sizing: border-box;
        transform: none;
    }

    .account-modal__head--summary .account-modal__head-profile-main {
        min-width: 0;
        transform: none;
    }

    .account-modal__head--summary .account-modal__head-profile-main strong,
    .account-modal__head--summary .account-modal__head-profile-main small {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-modal__head--summary .account-modal__summary-bar.account-modal__summary-bar--icon-nav {
        width: 100%;
        max-width: none;
        margin: 2px 0 0;
        justify-self: stretch;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card {
        min-width: 0;
        min-height: 72px;
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 6px;
        align-items: center;
        justify-items: center;
        padding: 9px 7px;
        border-radius: 12px;
        text-align: center;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon {
        grid-column: auto;
        grid-row: auto;
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon svg {
        width: 18px;
        height: 18px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        min-width: 0;
        padding-right: 0;
        justify-content: flex-start;
        align-items: center;
        gap: 3px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main span {
        max-width: 100%;
        font-size: 10px;
        line-height: 1.05;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-info {
        display: none;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--referrals .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--promo .account-modal__summary-main strong {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        line-height: 1.05;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-actions,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-actions--single {
        display: none;
    }
}

@media only screen and (max-width: 430px) {
    .account-modal__head.account-modal__head--summary {
        gap: 10px;
    }

    .account-modal__head--summary .account-modal__summary-bar.account-modal__summary-bar--icon-nav {
        gap: 6px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card {
        min-height: 66px;
        padding: 8px 5px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon {
        width: 32px;
        height: 32px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main span {
        font-size: 9px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--referrals .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--promo .account-modal__summary-main strong {
        font-size: 13px;
    }
}

@media only screen and (max-width: 360px) {
    .account-modal__head--summary .account-modal__head-profile {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 9px;
        padding-right: 40px;
    }

    .account-modal__head--summary .account-modal__head-profile-avatar {
        width: 44px;
        height: 44px;
        border-radius: 11px;
    }

    .account-modal__head--summary .account-modal__summary-bar.account-modal__summary-bar--icon-nav {
        gap: 5px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card {
        min-height: 58px;
        padding: 7px 4px;
        gap: 4px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon {
        width: 29px;
        height: 29px;
        border-radius: 9px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-icon svg {
        width: 16px;
        height: 16px;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main span {
        display: none;
    }

    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--referrals .account-modal__summary-main strong,
    .account-modal__head--summary .account-modal__summary-bar--icon-nav .account-modal__summary-card--promo .account-modal__summary-main strong {
        font-size: 12px;
    }
}
