/* CatalogCoin — общая шапка и соц.профиль */
:root {
    --cc-bg: #f4f4f6;
    --cc-card: #fff;
    --cc-ink: #1d1d1f;
    --cc-muted: #6e6e73;
    --cc-line: #e8e8ed;
    --cc-blue: #0071e3;
    --cc-blue-soft: #e8f1fc;
    --cc-radius: 22px;
    --cc-shadow: 0 1px 2px rgba(28,28,30,.04), 0 12px 32px rgba(28,28,30,.06);
    --cc-max: 1120px;
}

.cc-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--cc-line);
    padding: 10px 16px;
}
.cc-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    max-width: var(--cc-max);
    margin: 0 auto;
}
.cc-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.cc-logo-img { height: 28px; width: auto; display: block; }
.cc-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.cc-nav-link {
    font-size: 13px;
    color: var(--cc-ink);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.cc-nav-link:hover { background: #f5f5f7; }
.cc-nav-link.is-active { color: var(--cc-blue); font-weight: 650; }

/* Mobile bottom bar */
.cc-mobile-bar {
    display: none;
}
@media (max-width: 860px) {
    .cc-nav-desktop { display: none !important; }
    .cc-header { padding: 10px 14px; }
    .cc-logo-img { height: 24px; }
    body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
    .cc-mobile-bar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid var(--cc-line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -8px 24px rgba(28,28,30,.06);
    }
    .cc-m-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--cc-muted);
        min-height: 52px;
        border-radius: 12px;
        padding: 4px 2px;
        -webkit-tap-highlight-color: transparent;
    }
    .cc-m-item.is-active { color: var(--cc-blue); }
    .cc-m-item.is-active .cc-m-label { font-weight: 700; }
    .cc-m-ico {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
    }
    .cc-m-ico svg { display: block; }
    .cc-m-avatar {
        display: inline-flex;
        width: 28px;
        height: 28px;
        align-items: center;
        justify-content: center;
    }
    .cc-m-avatar .avatar,
    .cc-m-avatar .avatar-xs { width: 26px; height: 26px; font-size: 10px; }
    .cc-m-label {
        font-size: 10px;
        line-height: 1.1;
        letter-spacing: -0.01em;
        white-space: nowrap;
    }
}
.cc-btn {
    background: var(--cc-blue);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.cc-btn:hover { filter: brightness(1.05); }
.cc-btn-secondary { background: #e8e8ed; color: var(--cc-ink); }
.cc-btn-ghost {
    background: transparent;
    border: 1px solid var(--cc-line);
    color: var(--cc-ink);
}
.cc-btn-follow.is-on {
    background: #e8f8ef;
    color: #1b7a3d;
    border-color: #b7e4c7;
}
.cc-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--cc-ink);
    padding: 2px 8px 2px 2px;
    border-radius: 999px;
    max-width: 160px;
}
.cc-user-chip:hover { background: #f5f5f7; }
.cc-user-chip-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Avatars */
.avatar {
    --av-hue: 210;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: hsl(var(--av-hue) 42% 46%);
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.02em;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.avatar-letters { line-height: 1; }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; }
.avatar-sm { width: 32px; height: 32px; font-size: 11px; }
.avatar-md { width: 44px; height: 44px; font-size: 14px; }
.avatar-lg { width: 72px; height: 72px; font-size: 22px; }
.avatar-xl { width: 96px; height: 96px; font-size: 28px; }

/* Profile hero */
.profile-hero {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px 22px;
    align-items: start;
    background: var(--cc-card);
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 22px 24px;
    margin-bottom: 18px;
}
.profile-hero-main { min-width: 0; }
.profile-name {
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 4px;
}
.profile-handle {
    color: var(--cc-muted);
    font-size: 14px;
    margin-bottom: 10px;
}
.profile-bio {
    font-size: 15px;
    line-height: 1.5;
    color: #3a3a3c;
    white-space: pre-wrap;
    max-width: 56ch;
}
.profile-bio.empty { color: var(--cc-muted); font-style: italic; }
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--cc-muted);
}
.profile-meta strong {
    color: var(--cc-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
.profile-actions .cc-btn { justify-content: center; }

.profile-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.profile-tab {
    text-decoration: none;
    color: var(--cc-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
}
.profile-tab:hover { background: #fff; border-color: var(--cc-line); color: var(--cc-ink); }
.profile-tab.is-active {
    background: #fff;
    border-color: var(--cc-line);
    color: var(--cc-ink);
    box-shadow: var(--cc-shadow);
}

/* Achievements */
.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.ach-card {
    background: #fff;
    border: 1px solid var(--cc-line);
    border-radius: 18px;
    padding: 16px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    opacity: .55;
}
.ach-card.is-on {
    opacity: 1;
    box-shadow: var(--cc-shadow);
    border-color: #d7e8fb;
    background: linear-gradient(180deg, #f7fbff 0%, #fff 60%);
}
.ach-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: #ececf0;
    color: #6e6e73;
}
.ach-card.is-on .ach-badge {
    background: linear-gradient(145deg, #0071e3, #5aa7f7);
    color: #fff;
}
.ach-title { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ach-desc { font-size: 12px; color: var(--cc-muted); line-height: 1.4; }
.ach-bar {
    margin-top: 8px;
    height: 5px;
    background: #ececf0;
    border-radius: 999px;
    overflow: hidden;
}
.ach-fill {
    height: 100%;
    background: linear-gradient(90deg, #0071e3, #5aa7f7);
    border-radius: 999px;
}

/* People list */
.people-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.people-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--cc-line);
    background: #fff;
    text-decoration: none;
    color: inherit;
}
.people-row:hover { border-color: #d2d2d7; background: #fafafa; }
.people-info { min-width: 0; flex: 1; }
.people-name { font-size: 14px; font-weight: 700; }
.people-sub { font-size: 12px; color: var(--cc-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-stack { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.form-label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.form-field {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--cc-line);
    background: #fafafa;
    font-size: 15px;
    font-family: inherit;
    color: var(--cc-ink);
}
.form-field:focus { outline: none; border-color: #b7d4f5; background: #fff; box-shadow: 0 0 0 3px rgba(0,113,227,.12); }
.form-help { font-size: 12px; color: var(--cc-muted); margin-top: 6px; }
.form-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.form-alert {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    margin-bottom: 14px;
}
.form-alert.ok { background: #e8f8ef; color: #1b7a3d; }
.form-alert.err { background: #fdecea; color: #c0392b; }

@media (max-width: 720px) {
    .profile-hero {
        grid-template-columns: auto 1fr;
    }
    .profile-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .cc-user-chip-name { display: none; }
    .cc-nav-link.hide-sm { display: none; }
}
