/* Компактная вёрстка для телефонов.
   Подключается только на узких экранах: main, /download/, /account/. */

@media (max-width: 720px) {

    /* ---------- Общее ---------- */

    body {
        font-size: 15px;
        line-height: 1.5;
    }

    h1 { font-size: 30px; }
    h2 { font-size: 23px; }
    h3 { font-size: 16px; }

    .eyebrow {
        margin-bottom: 10px;
        font-size: 10.5px;
        letter-spacing: .07em;
    }

    main { padding: 0 14px; }

    .btn {
        min-height: 40px;
        padding: 9px 15px;
        border-radius: 10px;
        font-size: 13.5px;
    }

    .btn-small {
        min-height: 32px;
        padding: 7px 11px;
        font-size: 12px;
    }

    .btn-lg {
        min-height: 46px;
        padding: 12px 20px;
        font-size: 14px;
    }

    .pill {
        padding: 4px 9px;
        font-size: 11px;
    }

    /* ---------- Шапка ---------- */

    .header-inner {
        padding: 10px 14px;
        gap: 8px 12px;
    }

    .brand-mark {
        width: 26px;
        height: 26px;
    }

    .brand-name {
        font-size: 17px;
    }

    .nav {
        gap: 4px 12px;
        font-size: 12.5px;
    }

    .header-actions {
        gap: 6px;
    }

    .user-chip {
        padding: 6px 10px;
        font-size: 12px;
    }

    .user-chip #userChipName {
        max-width: 92px;
    }

    /* ---------- Главная ---------- */

    .hero {
        gap: 22px;
        padding: 28px 0 32px;
    }

    .lead {
        max-width: none;
        margin-top: 12px;
        font-size: 14.5px;
    }

    .hero-actions {
        margin-top: 18px;
    }

    .hero-meta {
        margin-top: 14px;
        gap: 10px;
        font-size: 12px;
    }

    .server-card {
        padding: 14px;
        border-radius: 12px;
    }

    .server-top {
        font-size: 12px;
    }

    .server-name {
        margin-top: 8px;
        font-size: 22px;
    }

    .server-address {
        gap: 8px;
        padding: 8px;
    }

    .server-address code {
        font-size: 12px;
    }

    .copy-btn {
        padding: 6px 9px;
        font-size: 11.5px;
    }

    .server-stats {
        gap: 6px;
        margin-top: 10px;
    }

    .stat {
        padding: 8px 4px;
        border-radius: 9px;
    }

    .stat-value {
        font-size: 15px;
    }

    .stat-label {
        font-size: 9.5px;
        letter-spacing: .05em;
    }

    .section {
        padding: 30px 0;
    }

    .section-head {
        margin-bottom: 18px;
    }

    .section-head p {
        margin-top: 8px;
        font-size: 14px;
    }

    .download-grid,
    .steps,
    .community-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .feature-grid {
        display: flex;
        gap: 10px;
        margin: 0 -14px;
        padding: 2px 14px 4px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .feature-grid::-webkit-scrollbar {
        display: none;
    }

    .feature-grid > .card {
        flex: 0 0 84%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
        opacity: .72;
        transition: opacity .2s ease, border-color .2s ease, background .2s ease;
    }

    .feature-grid > .card {
        -webkit-tap-highlight-color: transparent;
    }

    /* На телефоне карточка не должна «залипать» после нажатия:
       подсветку задаёт только позиция по центру. */
    .feature-grid > .card:hover,
    .feature-grid > .card:active {
        transform: none;
        border-color: var(--border);
        background: var(--card);
    }

    .feature-grid > .card.is-center,
    .feature-grid > .card.is-center:hover,
    .feature-grid > .card.is-center:active {
        opacity: 1;
        border-color: rgba(108, 143, 214, .45);
        background: var(--card);
    }

    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 7px;
        margin-top: 12px;
    }

    .carousel-dot {
        cursor: default;
    }

    .card {
        padding: 14px;
        border-radius: 12px;
    }

    .card-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 10px;
        border-radius: 8px;
    }

    .card-icon svg {
        width: 19px;
        height: 19px;
    }

    .card p {
        margin-top: 6px;
        font-size: 13px;
    }

    .mobile-stub {
        display: block;
        padding: 20px 18px;
        border: 1px solid var(--border);
        border-radius: 14px;
        background: var(--card);
        text-align: center;
    }

    .mobile-stub-icon {
        display: inline-grid;
        place-items: center;
        width: 46px;
        height: 46px;
        border-radius: 12px;
        background: var(--bg-soft);
        color: var(--accent-hi);
    }

    .mobile-stub-icon svg {
        width: 26px;
        height: 26px;
    }

    .mobile-stub h2 {
        margin-top: 12px;
        font-size: 21px;
    }

    .mobile-stub p {
        max-width: 300px;
        margin: 8px auto 0;
        color: var(--subtext);
        font-size: 13.5px;
    }

    .mobile-stub .btn {
        width: 100%;
        margin-top: 16px;
    }

    .mobile-stub-note {
        font-size: 12px;
    }

    .download-grid {
        display: none;
    }

    body.downloads-open .download-grid {
        display: grid;
    }

    body.downloads-open .mobile-stub {
        display: none;
    }

    .download-card {
        padding: 14px;
        border-radius: 12px;
    }

    .download-head {
        gap: 10px;
    }

    .download-head h3 {
        font-size: 16px;
    }

    .download-head p {
        font-size: 12.5px;
    }

    .os-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .os-icon svg {
        width: 19px;
        height: 19px;
    }

    .download-alt {
        font-size: 12px;
    }

    .steps li {
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
    }

    .step-number {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
        font-size: 12.5px;
    }

    .steps p {
        margin-top: 3px;
        font-size: 13px;
    }

    .community-card {
        gap: 10px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    .community-icon {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .community-icon svg {
        width: 20px;
        height: 20px;
    }

    .community-text strong {
        font-size: 15px;
    }

    .community-text span {
        font-size: 12px;
    }

    .footer {
        padding: 26px 14px 34px;
        font-size: 12.5px;
    }

    .footer-brand {
        margin-bottom: 8px;
    }

    /* ---------- Страница загрузки ---------- */

    .download-page {
        padding: 22px 14px 44px;
    }

    .download-hero {
        margin-bottom: 20px;
    }

    .download-hero p {
        margin-top: 8px;
        font-size: 14px;
    }

    .download-hero .pill {
        margin-top: 12px;
    }

    .download-next {
        margin-top: 30px;
        padding-top: 20px;
    }

    .download-next h2 {
        font-size: 21px;
    }

    .download-next .steps {
        margin-top: 14px;
    }

    .download-back {
        margin-top: 16px;
        font-size: 12px;
    }

    /* ---------- Личный кабинет ---------- */

    .account-main {
        padding: 22px 14px 46px;
    }

    .account-intro {
        margin-bottom: 18px;
    }

    .account-intro h1,
    .dash-head h1 {
        font-size: 28px;
    }

    .account-intro p {
        margin-top: 8px;
        font-size: 14px;
    }

    .panel {
        padding: 14px;
        border-radius: 12px;
    }

    .panel h2 {
        font-size: 19px;
    }

    .panel > .muted {
        font-size: 12.5px;
    }

    .form-row input {
        min-height: 40px;
        padding: 9px 11px;
        font-size: 14px;
    }

    .form-row label {
        font-size: 11px;
    }

    .form-hint {
        font-size: 11.5px;
    }

    .auth-switch {
        font-size: 12.5px;
    }

    .dash-head {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .dash-grid,
    .dash-column {
        gap: 10px;
    }

    .profile-top {
        gap: 10px;
    }

    .avatar-box {
        width: 72px;
        height: 72px;
        border-radius: 10px;
        background-size: 12px 12px;
        background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    }

    .avatar-box canvas {
        width: 64px;
        height: 64px;
    }

    .profile-name {
        font-size: 20px;
    }

    .profile-uuid {
        font-size: 10px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 14px 0 12px;
    }

    .profile-stats div {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        padding: 7px 0;
        border: 0;
        border-top: 1px solid var(--border);
        border-radius: 0;
        background: none;
    }

    .profile-stats div:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .profile-stats dt {
        font-size: 9.5px;
    }

    .profile-stats dd {
        margin: 0;
        font-size: 13px;
        font-weight: 600;
        text-align: right;
    }

    .skin-stage {
        min-height: 250px;
        padding: 8px;
        background-size: 14px 14px;
        background-position: 0 0, 0 7px, 7px -7px, -7px 0;
    }

    .skin-stage canvas {
        max-width: 200px;
    }

    .skin-actions {
        margin-top: 10px;
    }

    .skin-note {
        margin-top: 8px;
        font-size: 11.5px;
    }
}

/* Совсем узкие телефоны. */
@media (max-width: 400px) {
    h1 { font-size: 27px; }

    .nav {
        font-size: 12px;
        gap: 4px 10px;
    }

    .hero-meta {
        gap: 8px;
        font-size: 11.5px;
    }

    .account-intro h1,
    .dash-head h1 {
        font-size: 25px;
    }

    .user-chip #userChipName {
        max-width: 76px;
    }
}
