.account-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 52px 24px 80px;
}

.hidden {
    display: none !important;
}

.account-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
}

.account-intro {
    max-width: 620px;
    margin-bottom: 28px;
}

.account-intro h1,
.dash-head h1 {
    margin-top: 2px;
}

.account-intro p {
    margin-top: 10px;
    color: var(--subtext);
}

.auth-view {
    max-width: 520px;
    margin: 0 auto;
}

.auth-wrap {
    width: 100%;
}

.auth-card {
    width: 100%;
}

.panel {
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

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

.panel > .muted {
    margin-top: 6px;
    font-size: 13px;
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.form-row {
    margin-top: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    color: var(--subtext);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.form-row input {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-soft);
    color: var(--text);
    font: 400 14px/1.3 var(--font);
    outline: none;
}

.form-row input:focus {
    border-color: var(--accent);
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--subtext);
    font-size: 12px;
}

.form-error {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(206, 123, 123, .12);
    color: var(--red);
    font-size: 13px;
}

.auth-switch {
    margin-top: 18px;
    color: var(--subtext);
    font-size: 13px;
    text-align: center;
}

.link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-hi);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.link-button:hover {
    color: var(--text);
}

.btn-block {
    width: 100%;
    margin-top: 18px;
}


/* ---------- Мини-меню сообщества ---------- */

.nav-community {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-community-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--subtext);
    font: inherit;
    cursor: pointer;
}

.nav-community-btn:hover,
.nav-community.open .nav-community-btn {
    color: var(--text);
}

.community-pop {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 40;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.nav-community.open .community-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.community-pop a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
}

.community-pop a:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.social-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: var(--bg-soft);
}

.social-icon.telegram {
    color: #4ea7e8;
}

.social-icon.discord {
    color: #8b9cff;
}

/* ---------- Кабинет ---------- */

.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.dash-head p {
    margin-top: 6px;
}

.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 16px;
    align-items: start;
}

.dash-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-box {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 104px;
    height: 104px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background-color: #2b2f39;
    background-image:
        linear-gradient(45deg, #23262e 25%, transparent 25%),
        linear-gradient(-45deg, #23262e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #23262e 75%),
        linear-gradient(-45deg, transparent 75%, #23262e 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    overflow: hidden;
}

.avatar-box canvas {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
}

.profile-name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}

.profile-uuid {
    display: block;
    margin-top: 6px;
    color: var(--subtext);
    font-size: 11px;
    word-break: break-all;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 20px 0 16px;
}

.profile-stats div {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
}

.profile-stats dt {
    color: var(--subtext);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.profile-stats dd {
    margin: 5px 0 0;
    font-size: 15px;
    font-weight: 700;
}

.skin-stage {
    display: grid;
    place-items: center;
    min-height: 390px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background-color: #2b2f39;
    background-image:
        linear-gradient(45deg, #23262e 25%, transparent 25%),
        linear-gradient(-45deg, #23262e 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #23262e 75%),
        linear-gradient(-45deg, transparent 75%, #23262e 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    overflow: hidden;
}

.skin-stage canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 260px;
    cursor: grab;
    touch-action: none;
}

.skin-stage canvas:active {
    cursor: grabbing;
}

.skin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

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

.password-card form {
    margin-top: 4px;
}

.password-card .btn {
    margin-top: 18px;
}






.toast-host {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--card-hi);
    box-shadow: var(--shadow);
    color: var(--text);
    font-size: 13px;
    animation: toast-in .18s ease;
}

.toast.ok {
    border-color: rgba(111, 174, 138, .5);
}

.toast.err {
    border-color: rgba(206, 123, 123, .55);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-grid {
        max-width: 620px;
    }
}

@media (max-width: 680px) {
    .community-pop {
        left: auto;
        right: 0;
        transform: translateY(4px);
    }

    .nav-community.open .community-pop {
        transform: translateY(0);
    }

    .account-main {
        padding: 34px 18px 60px;
    }

    .account-head-actions {
        margin-left: 0;
        justify-self: end;
    }

    .user-chip {
        display: none;
    }

    .panel {
        padding: 18px;
    }

    .dash-head {
        flex-direction: column;
        gap: 12px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    