/**
 * GunCult - Profile Widgets
 * Surface/Secondary cards without chrome border
 */

@import url('progress.css');

/* ─── Базовый виджет ─────────────────────────────────────────────────────── */

.profile-widget {
    background: var(--surface-secondary);
    border: none;
    border-radius: var(--radius-16);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    isolation: isolate;
}

/* Контейнер стека виджетов — шаг между секциями как /events (month-gap) */
.profile-widgets-stack {
    display: flex;
    flex-direction: column;
    gap: var(--gc-events-index-v2-month-gap, var(--space-8));
    min-width: 0;
}

/* Profile Show: зоны A/B/C — gap main колонки в catalog.css (.profile-show-main).
 * Внутри зоны — space/6; био → плитки: .profile-show-above-fold. */
.profile-show-zone {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-width: 0;
}

.profile-show-main .profile-widgets-stack {
    gap: var(--gc-events-index-v2-month-gap, var(--space-8));
}

/*
 * <1280: rail-fallback в main — шире внутри секций (не desktop compact-rail).
 * Gap самой main-колонки — catalog.css.
 */
@media (max-width: 1279.98px) {
    .profile-show-zone {
        gap: var(--space-8);
    }

    .profile-show-main .profile-program-section {
        gap: var(--space-4);
    }
}

@media (max-width: 991.98px) {
    .profile-show-adaptive-cluster,
    .profile-show-adaptive-cluster.gc-until-layout-rail {
        display: flex;
        flex-direction: column;
        gap: var(--space-3);
        min-width: 0;
        width: 100%;
    }

    .profile-show-adaptive-cluster.profile-show-adaptive-cluster--lead {
        gap: var(--space-3);
    }

    /* Товарищи ↔ оружие: как header→карточки (space/4), не как плитки внутри lead */
    .profile-show-adaptive-cluster.profile-show-adaptive-cluster--gear {
        gap: var(--space-4);
    }
}

@media (min-width: 992px) {
    .profile-show-adaptive-cluster {
        display: contents;
    }
}

/* Figma programm (1589:23938): canvas-заголовок + контент без gc-panel; шаг header→body space/3 */
.profile-program-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.profile-program-section > .gc-section-header-trigger,
.profile-program-section > a.gc-section-header-trigger {
    align-self: flex-start;
    text-decoration: none;
    color: inherit;
}

.profile-program-section > .gc-section-header-trigger--static,
.profile-program-section__community-intro .gc-section-header-trigger--static {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.profile-program-section .gc-section-header-trigger .gc-panel-title {
    font-weight: var(--font-weight-semibold);
}

.profile-program-section.collapsed > .profile-program-section__body {
    display: none;
}

.profile-program-section__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.profile-program-section__cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.profile-program-section__more {
    display: flex;
    justify-content: flex-start;
    padding-top: var(--space-2);
}

.profile-program-section__community-intro {
    min-width: 0;
}

.profile-program-section__community-intro .gc-events-index-community-header {
    padding: 0;
    margin: 0;
}

.profile-program-section__community-intro .gc-events-index-community-header .gc-section-header-trigger--static .gc-panel-title {
    font-weight: var(--font-weight-semibold);
}

.profile-program-section .profile-event-feed-shell {
    padding: 0;
    background: transparent;
    border: none;
    gap: var(--space-2);
}

.profile-widget-history .gc-event-feed-months,
.profile-widget-community .gc-event-feed-months {
    gap: var(--gc-events-index-v2-month-gap, var(--space-8));
}

.profile-widget-community:has(.profile-program-section__community-intro) {
    gap: var(--space-3);
}

.profile-upcoming-chip--static {
    cursor: default;
}

.profile-widget-events-stack .profile-events-stack-shell {
    min-width: 0;
}

.profile-widget-events-stack .profile-upcoming-preview {
    align-items: flex-start;
}

.profile-upcoming-stack .gc-event-index-card-v2-1__participants-rail,
.profile-upcoming-stack-deck .gc-event-index-card-v2-1__participants-rail,
.event-request-organizer-stack .gc-event-index-card-v2-1__participants-rail {
    display: none;
}

/* Предстоящие / стопка заявок — без shell ring (inner depth из catalog event-index hover) */
.profile-upcoming-stack .gc-event-index-card-v2-1__card-shell,
.profile-upcoming-stack .gc-card-glow-shell--event-index,
.event-request-organizer-stack .gc-event-index-card-v2-1__card-shell,
.event-request-organizer-stack .gc-card-glow-shell--event-index {
    overflow: visible;
}

.profile-upcoming-stack .gc-card-glow-shell--event-index,
.event-request-organizer-stack .gc-card-glow-shell--event-index {
    box-shadow: none;
}

.profile-upcoming-stack .gc-event-index-card-v2-1__weapon-chips--media,
.profile-upcoming-stack .gc-event-index-card-v2-1__weapon-chips--corner,
.event-request-organizer-stack .gc-event-index-card-v2-1__weapon-chips--media,
.event-request-organizer-stack .gc-event-index-card-v2-1__weapon-chips--corner {
    position: absolute;
    z-index: 2;
}

.profile-show-rail-fallback--people {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.profile-program-section.profile-widget-weapons > .gc-panel-header.gc-panel-header--section-trigger,
.profile-program-section.profile-widget-stages > .gc-panel-header.gc-panel-header--section-trigger {
    padding: 0;
    margin: 0;
    background: transparent;
    align-self: stretch;
    width: 100%;
    min-width: 0;
}

.profile-program-section.profile-widget-weapons .profile-program-section__body > .gc-info-block {
    padding-inline: 0;
    box-sizing: border-box;
}

/* /@slug/weapons: подпись «Оружие» + аватар справа (не H1 weapon show) */
.app-weapons-page .profile-program-section.profile-widget-weapons {
    gap: var(--space-3);
}

/* Превью «Предстоящие» на /profile — стопка + pill-ссылка (Figma 1805:7360) */
.profile-upcoming-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    width: 100%;
    min-width: 0;
}

.profile-upcoming-preview .profile-upcoming-stack {
    align-self: stretch;
}

.profile-upcoming-preview > .subscriptions-profile-benefit-tile,
.profile-upcoming-preview > .subscriptions-profile-benefit-tile-cell {
    align-self: stretch;
}

.profile-upcoming-chip {
    display: inline-flex;
    align-items: baseline;
    align-self: flex-start;
    gap: var(--space-1-5);
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    max-width: 100%;
    box-sizing: border-box;
    transition: color var(--transition-fast) var(--ease-in-out);
}

@media (hover: hover) and (pointer: fine) {
    .profile-upcoming-chip:hover {
        color: var(--text-primary);
    }

    .profile-upcoming-chip:hover .profile-upcoming-chip__title {
        color: var(--accent-link);
    }
}

.profile-upcoming-chip:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
}

.profile-upcoming-chip__title {
    font-size: var(--type-heading-h4-size);
    font-weight: var(--font-weight-semibold);
    line-height: var(--type-heading-h4-line-height);
    white-space: nowrap;
    transition: color var(--transition-fast) var(--ease-in-out);
}

.profile-upcoming-chip__meta {
    font-size: var(--type-body-size);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-secondary);
    white-space: nowrap;
}

.profile-upcoming-stack {
    display: flex;
    flex-direction: column;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    overflow: visible;
    /* Псевдо-слои стопки — лёгкий tint на page, не surface-primary */
    --profile-upcoming-stack-layer-near: color-mix(in srgb, var(--fill-primary) 10%, var(--surface-page));
    --profile-upcoming-stack-layer-far: color-mix(in srgb, var(--fill-primary) 18%, var(--surface-page));
    --profile-upcoming-stack-layer-edge: color-mix(in srgb, var(--fill-primary) 12%, transparent);
}

.profile-upcoming-stack__card {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* Flush к линии контента (как .profile-benefit-stack__card). Слои стопки inset сами: padding-inline на __layers. */
    margin-bottom: calc(-1 * (var(--space-8) + var(--space-1)));
}

/* Слои стопки — только при 2+ предстоящих; без них отрицательный margin карточки схлопывает секцию */
.profile-upcoming-stack:not(:has(.profile-upcoming-stack__layers)) .profile-upcoming-stack__card {
    margin-bottom: 0;
}

.profile-upcoming-stack__card > .gc-event-index-card {
    width: 100%;
}

.profile-upcoming-stack a.gc-event-index-card {
    text-decoration: none;
    color: inherit;
}

.profile-upcoming-stack .profile-subscription-stack-progress {
    align-self: stretch;
    width: 100%;
    margin-top: var(--space-1);
}

.profile-upcoming-stack--clickable .profile-upcoming-stack__layer--clickable {
    cursor: pointer;
}

.profile-upcoming-stack--clickable .profile-upcoming-stack__layer--clickable:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
}

.profile-upcoming-stack__layers {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-inline: var(--space-3);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.profile-upcoming-stack__layer {
    flex-shrink: 0;
    height: var(--space-12);
    border-radius: 0 0 var(--radius-16) var(--radius-16);
    box-sizing: border-box;
    transition: transform var(--transition-slow) var(--ease-out);
}

.profile-upcoming-stack__layer--near {
    width: 100%;
    margin-bottom: calc(-1 * (var(--space-8) + var(--space-1)));
    background: var(--profile-upcoming-stack-layer-near);
    box-shadow: inset 0 1px 0 var(--profile-upcoming-stack-layer-edge);
    position: relative;
    z-index: 2;
}

/* Второй слой отсутствует — near не перекрывает far, margin только у карточки */
.profile-upcoming-stack:not(:has(.profile-upcoming-stack__layer--far)) .profile-upcoming-stack__layer--near {
    margin-bottom: 0;
}

.profile-upcoming-stack__layer--far {
    width: calc(100% - 2 * var(--space-6));
    background: var(--profile-upcoming-stack-layer-far);
    box-shadow: inset 0 1px 0 var(--profile-upcoming-stack-layer-edge);
    position: relative;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .profile-upcoming-stack:hover .profile-upcoming-stack__layer--near {
        transform: translateY(var(--space-1));
    }

    .profile-upcoming-stack:hover .profile-upcoming-stack__layer--far {
        transform: translateY(var(--space-2));
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-upcoming-stack__layer {
        transition: none;
    }

    .profile-upcoming-stack:hover .profile-upcoming-stack__layer--near,
    .profile-upcoming-stack:hover .profile-upcoming-stack__layer--far {
        transform: none;
    }
}

/* Context rail: стопка sm-билетов льгот (паттерн profile-upcoming-stack) */
.profile-benefit-stack {
    display: flex;
    flex-direction: column;
    isolation: isolate;
    width: 100%;
    min-width: 0;
    overflow: visible;
    --profile-benefit-stack-layer-near: color-mix(in srgb, var(--fill-primary) 10%, var(--surface-page));
    --profile-benefit-stack-layer-far: color-mix(in srgb, var(--fill-primary) 18%, var(--surface-page));
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-primary) 12%, transparent);
}

.profile-benefit-stack__card {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    margin-bottom: calc(-1 * (var(--space-8) + var(--space-1)));
}

.profile-benefit-stack:not(:has(.profile-benefit-stack__layers)) .profile-benefit-stack__card {
    margin-bottom: 0;
}

.profile-benefit-stack__card > .gc-card-glow-shell--benefit-ticket,
.profile-benefit-stack__card > .subscriptions-profile-benefit-tile-cell > .gc-card-glow-shell--benefit-ticket,
.profile-benefit-stack__card > .subscriptions-profile-benefit-tile {
    width: 100%;
}

.profile-benefit-stack__layers {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-inline: var(--space-3);
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.profile-benefit-stack__layer {
    flex-shrink: 0;
    height: var(--space-12);
    border-radius: 0 0 var(--radius-16) var(--radius-16);
    box-sizing: border-box;
    transition:
        transform var(--transition-slow) var(--ease-out),
        background var(--transition-base),
        box-shadow var(--transition-base);
}

.profile-benefit-stack__layer--near {
    width: 100%;
    margin-bottom: calc(-1 * (var(--space-8) + var(--space-1)));
    --profile-benefit-stack-layer-bg: var(--profile-benefit-stack-layer-near);
    background: var(--profile-benefit-stack-layer-bg);
    box-shadow:
        inset 0 1px 0 var(--profile-benefit-stack-layer-edge),
        0 2px 8px color-mix(
            in srgb,
            var(--fill-emphasis) 10%,
            transparent
        );
    position: relative;
    z-index: 2;
}

.profile-benefit-stack:not(:has(.profile-benefit-stack__layer--far)) .profile-benefit-stack__layer--near {
    margin-bottom: 0;
}

.profile-benefit-stack__layer--far {
    width: calc(100% - 2 * var(--space-6));
    --profile-benefit-stack-layer-bg: var(--profile-benefit-stack-layer-far);
    background: var(--profile-benefit-stack-layer-bg);
    box-shadow:
        inset 0 1px 0 var(--profile-benefit-stack-layer-edge),
        0 1px 4px color-mix(
            in srgb,
            var(--fill-emphasis) 8%,
            transparent
        );
    position: relative;
    z-index: 1;
}

.profile-benefit-stack__layer--near[data-kind='subscription'] {
    --profile-benefit-stack-layer-bg: var(--tint-tinted-earth-umber);
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 10%, transparent);
}

.profile-benefit-stack__layer--near[data-kind='voucher'] {
    --profile-benefit-stack-layer-bg: var(--tint-tinted-earth-moss);
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 10%, transparent);
}

.profile-benefit-stack__layer--near[data-kind='discount'] {
    --profile-benefit-stack-layer-bg: var(--tint-tinted-earth-terra);
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 10%, transparent);
}

.profile-benefit-stack__layer--far[data-kind='subscription'] {
    --profile-benefit-stack-layer-bg: color-mix(
        in srgb,
        var(--fill-emphasis) 8%,
        var(--tint-tinted-earth-umber)
    );
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 8%, transparent);
}

.profile-benefit-stack__layer--far[data-kind='voucher'] {
    --profile-benefit-stack-layer-bg: color-mix(
        in srgb,
        var(--fill-emphasis) 8%,
        var(--tint-tinted-earth-moss)
    );
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 8%, transparent);
}

.profile-benefit-stack__layer--far[data-kind='discount'] {
    --profile-benefit-stack-layer-bg: color-mix(
        in srgb,
        var(--fill-emphasis) 8%,
        var(--tint-tinted-earth-terra)
    );
    --profile-benefit-stack-layer-edge: color-mix(in srgb, var(--fill-emphasis-inverse) 8%, transparent);
}

@media (hover: hover) and (pointer: fine) {
    .profile-benefit-stack:hover .profile-benefit-stack__layer--near {
        transform: translateY(var(--space-1));
    }

    .profile-benefit-stack:hover .profile-benefit-stack__layer--far {
        transform: translateY(var(--space-2));
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-benefit-stack__layer {
        transition: none;
    }

    .profile-benefit-stack:hover .profile-benefit-stack__layer--near,
    .profile-benefit-stack:hover .profile-benefit-stack__layer--far {
        transform: none;
    }

    .profile-benefit-stack-deck__layer-card,
    .profile-benefit-stack-deck__card--interactive,
    .profile-upcoming-stack-deck__layer-card,
    .profile-upcoming-stack-deck__card--interactive,
    .profile-upcoming-stack-deck__card--top {
        transition: none;
    }

    .profile-benefit-stack-deck__layer-card--underlay,
    .profile-benefit-stack-deck__layer-card--exit,
    .profile-upcoming-stack-deck__layer-card--underlay,
    .profile-upcoming-stack-deck__layer-card--exit {
        animation: none !important;
    }
}

/* Drag-deck: одна карточка + 2 псевдо-слоя, Tinder-свайп L/R (билеты + мероприятия) */
.profile-benefit-stack-deck,
.profile-upcoming-stack-deck {
    width: 100%;
    min-width: 0;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.profile-upcoming-stack-deck {
    --deck-motion-ms: 180ms;
}

.profile-benefit-stack-deck__stage,
.profile-upcoming-stack-deck__stage {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
}

.profile-benefit-stack-deck__card,
.profile-benefit-stack-deck__layer-card,
.profile-upcoming-stack-deck__card,
.profile-upcoming-stack-deck__layer-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.profile-benefit-stack-deck__card .subscriptions-profile-benefit-tile-cell,
.profile-benefit-stack-deck__layer-card .subscriptions-profile-benefit-tile-cell,
.profile-benefit-stack-deck__sizer .subscriptions-profile-benefit-tile-cell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.profile-benefit-stack-deck__card .subscriptions-profile-benefit-tile,
.profile-benefit-stack-deck__layer-card .subscriptions-profile-benefit-tile,
.profile-benefit-stack-deck__sizer .subscriptions-profile-benefit-tile {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-user-drag: none;
}

.profile-upcoming-stack-deck__card .gc-event-index-card,
.profile-upcoming-stack-deck__layer-card .gc-event-index-card,
.profile-upcoming-stack-deck__sizer .gc-event-index-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-user-drag: none;
}

.profile-benefit-stack-deck--animating .profile-benefit-stack-deck__stage,
.profile-upcoming-stack-deck--animating .profile-upcoming-stack-deck__stage {
    overflow: clip;
    isolation: isolate;
}

.profile-benefit-stack-deck--dragging .profile-benefit-stack__layer--near,
.profile-upcoming-stack-deck--dragging .profile-upcoming-stack__layer--near {
    transform: translateY(var(--space-1));
}

.profile-benefit-stack-deck--dragging .profile-benefit-stack__layer--far,
.profile-upcoming-stack-deck--dragging .profile-upcoming-stack__layer--far {
    transform: translateY(var(--space-2));
}

.profile-benefit-stack-deck__sizer,
.profile-upcoming-stack-deck__sizer {
    visibility: hidden;
    pointer-events: none;
    width: 100%;
}

.profile-benefit-stack-deck__card--interactive,
.profile-upcoming-stack-deck__card--interactive,
.profile-upcoming-stack-deck__card--top {
    position: absolute;
    inset-inline: 0;
    top: 0;
    z-index: 30;
    transform-origin: center top;
    will-change: transform;
}

.profile-benefit-stack-deck__card--interactive,
.profile-upcoming-stack-deck__card--interactive {
    cursor: grab;
    touch-action: pan-y;
    transform:
        translate3d(var(--deck-drag-x, 0px), 0, 0)
        rotate(var(--deck-rotate, 0deg));
    transition: transform var(--transition-slow) var(--ease-out);
}

.profile-upcoming-stack-deck__card--top {
    transform: translate3d(0, 0, 0);
}

.profile-benefit-stack-deck--dragging .profile-benefit-stack-deck__card--interactive,
.profile-upcoming-stack-deck--dragging .profile-upcoming-stack-deck__card--interactive {
    cursor: grabbing;
    transition: none;
}

.profile-benefit-stack-deck__layer-card,
.profile-upcoming-stack-deck__layer-card {
    position: absolute;
    inset-inline: 0;
    top: 0;
    z-index: 20;
    pointer-events: none;
    transform-origin: center top;
    will-change: transform, opacity;
}

.profile-benefit-stack-deck__layer-card--underlay,
.profile-upcoming-stack-deck__layer-card--underlay {
    z-index: 20;
    transform:
        translate3d(0, var(--space-1), 0)
        scale(var(--deck-stack-scale, 0.96));
    transition: transform var(--transition-slow) var(--ease-out);
}

.profile-benefit-stack-deck--dragging .profile-benefit-stack-deck__layer-card--underlay,
.profile-upcoming-stack-deck--dragging .profile-upcoming-stack-deck__layer-card--underlay {
    transition: none;
}

.profile-benefit-stack-deck--animating .profile-benefit-stack-deck__layer-card--underlay {
    animation: profile-benefit-deck-tinder-promote 280ms var(--ease-out) forwards;
}

.profile-upcoming-stack-deck--animating .profile-upcoming-stack-deck__layer-card--underlay {
    animation: profile-events-deck-tinder-promote var(--deck-motion-ms) var(--ease-out) forwards;
}

.profile-benefit-stack-deck__layer-card--exit,
.profile-upcoming-stack-deck__layer-card--exit {
    z-index: 30;
    transform:
        translate3d(var(--deck-drag-x, 0px), 0, 0)
        rotate(var(--deck-rotate, 0deg));
}

.profile-benefit-stack-deck--advance .profile-benefit-stack-deck__layer-card--exit {
    animation: profile-benefit-deck-tinder-exit-left 280ms var(--ease-out) forwards;
}

.profile-benefit-stack-deck--retreat .profile-benefit-stack-deck__layer-card--exit {
    animation: profile-benefit-deck-tinder-exit-right 280ms var(--ease-out) forwards;
}

.profile-upcoming-stack-deck--advance .profile-upcoming-stack-deck__layer-card--exit {
    animation: profile-events-deck-tinder-exit-left var(--deck-motion-ms) var(--ease-out) forwards;
}

.profile-upcoming-stack-deck--retreat .profile-upcoming-stack-deck__layer-card--exit {
    animation: profile-events-deck-tinder-exit-right var(--deck-motion-ms) var(--ease-out) forwards;
}

@keyframes profile-benefit-deck-tinder-promote {
    from {
        transform: translate3d(0, var(--space-1), 0) scale(0.96);
    }

    to {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes profile-benefit-deck-tinder-exit-left {
    from {
        transform:
            translate3d(var(--deck-drag-x, 0px), 0, 0)
            rotate(var(--deck-rotate, 0deg));
        opacity: 1;
    }

    to {
        transform: translate3d(-96%, 0, 0) rotate(-10deg);
        opacity: 0;
    }
}

@keyframes profile-benefit-deck-tinder-exit-right {
    from {
        transform:
            translate3d(var(--deck-drag-x, 0px), 0, 0)
            rotate(var(--deck-rotate, 0deg));
        opacity: 1;
    }

    to {
        transform: translate3d(96%, 0, 0) rotate(10deg);
        opacity: 0;
    }
}

@keyframes profile-events-deck-tinder-promote {
    from {
        transform: translate3d(0, var(--space-1), 0) scale(0.96);
    }

    to {
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes profile-events-deck-tinder-exit-left {
    from {
        transform:
            translate3d(var(--deck-drag-x, 0px), 0, 0)
            rotate(var(--deck-rotate, 0deg));
        opacity: 1;
    }

    55% {
        opacity: 0;
    }

    to {
        transform: translate3d(-68%, 0, 0) rotate(-8deg);
        opacity: 0;
    }
}

@keyframes profile-events-deck-tinder-exit-right {
    from {
        transform:
            translate3d(var(--deck-drag-x, 0px), 0, 0)
            rotate(var(--deck-rotate, 0deg));
        opacity: 1;
    }

    55% {
        opacity: 0;
    }

    to {
        transform: translate3d(68%, 0, 0) rotate(8deg);
        opacity: 0;
    }
}

/* Лента на главной профиля: порядок и отступы как на /profile/events */
.profile-events-feed-page-mirror {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-width: 0;
}

/* @deprecated — используй .profile-widgets-stack с gap */
.profile-widget-mb {
    margin-bottom: var(--space-2);
}

/* Invert тёмных empty SVG — empty-state.css (.gc-empty-illustration-strong) */


/* ─── Grid статистики ────────────────────────────────────────────────────── */

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    align-items: stretch;
}

@media (min-width: 768px) {
    .profile-stats-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    }
}

.profile-stats-grid > .gc-panel,
.profile-stats-grid > .profile-widget {
    height: 100%;
    min-height: 0;
}

/* ─── Заголовок виджета ──────────────────────────────────────────────────── */

.profile-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-widget-description {
    margin: var(--space-product-2) 0 0;
    font-size: var(--font-size-14);
    color: var(--text-secondary);
}

.profile-widget-title-group {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.profile-widget-form {
    margin: 0;
}

/* ─── Контент виджета ────────────────────────────────────────────────────── */

.profile-widget-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

/* ─── Стат-виджеты: Топ-3 + Попадания (макет Figma — сетка 1:3) ───────────── */

.profile-widget-stat {
    box-sizing: border-box;
}

.profile-widget-stat .profile-widget-header,
.profile-widget-stat .gc-panel-header--list-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--space-2);
    min-height: var(--space-6);
}

.profile-widget-stat-aside {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}

/* ─── Stat Card (shadcn dashboard pattern) ───────────────────────────────── */

.gc-stat-card {
    background: var(--surface-panel);
    border: none;
    border-radius: var(--radius-16);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.gc-stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-stat-card-label {
    font-size: var(--font-size-14);
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

.gc-stat-card-icon {
    color: var(--text-secondary);
    font-size: var(--font-size-18);
    flex-shrink: 0;
}

.gc-stat-card-value {
    margin: 0;
}

.gc-stat-card-sub {
    font-size: var(--font-size-13);
    color: var(--text-secondary);
    margin: 0;
}

.gc-stat-card-accent .gc-stat-card-value {
    color: var(--accent-link);
}

/* ─── Progress bar (Топ-3, Попадания, др.) ─────────────────────────────── */

.profile-progress {
    display: flex;
    gap: var(--space-1);
    height: 20px;
    background-color: var(--surface-control);
    border-radius: var(--radius-full);
    padding: var(--space-1);
}

/* Kit gc-progress на том же узле: не применять «толстую» подписочную дорожку */
.profile-progress.gc-progress--segmented,
.profile-progress.gc-progress--dots {
    height: var(--gc-progress-track-height);
    min-height: var(--gc-progress-track-height);
    padding: 0;
    background-color: transparent;
    gap: var(--gc-progress-segment-gap);
    align-items: stretch;
    box-sizing: border-box;
}

.profile-progress-bar {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow) var(--ease-out);
}

.profile-progress-bar--primary {
    background-color: var(--gc-progress-fill);
}

.profile-progress-bar-accent {
    background-color: var(--accent-link);
}

/* ─── Stat text ──────────────────────────────────────────────────────────── */

.profile-stat-text {
    color: var(--text-secondary);
    font-size: var(--font-size-14);
    line-height: 1.25;
    margin: 0;
}

/* ─── Update button ──────────────────────────────────────────────────────── */

.profile-update-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-link);
    cursor: pointer;
    font-size: var(--font-size-14);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    transition-property: color, transform;
    transition-duration: var(--transition-fast);
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
}

.profile-update-btn:hover {
    color: var(--accent-link-hover);
}

.profile-update-btn:active {
    transform: scale(0.96);
}

.profile-update-btn i {
    font-size: var(--font-size-14);
}

/* ─── Топ-3: макет Figma — пика + «N раз», кнопка обновления в шапке ─────── */

.profile-widget-top3.gc-panel,
.profile-widget-top3 {
    height: 100%;
}

.profile-stat-panel-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.profile-widget-top3 .profile-stat-panel-shell {
    justify-content: flex-end;
}

.profile-weapons-shell .weapon-cards-grid {
    margin: 0;
}

.profile-show-zone--archive > .profile-widget-history-divider {
    margin-block: 0;
}

@media (max-width: 991.98px) {
    .profile-widget-history-divider.gc-divider {
        margin-block: var(--space-2);
    }

    .profile-widget-history-divider.gc-divider span {
        font-size: var(--font-size-12);
        letter-spacing: 0.4px;
    }
}

/*
 * Между месяцами: space/6 (≥ 2× header→body space/3).
 * Не трогаем /events — только лента профиля / оружия.
 */
.events-index-months.profile-widget-history,
.events-index-months.weapon-show-history-months {
    --catalog-feed-marker-gap: var(--space-6);
}

.events-index-months.profile-widget-history > .gc-month-section,
.events-index-months.weapon-show-history-months > .gc-month-section {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/*
 * History feed — тот же шаг, что у карточек /events (.gc-events-index-cards--v2-1).
 * Заметка / мероприятие / день в месяце.
 */
.profile-history-month-content,
.weapon-show-history-month-content,
.history-feed-day {
    --gc-history-feed-item-gap: var(--space-6);
}

.profile-history-month-content.gc-events-index-cards--v2-1,
.weapon-show-history-month-content.gc-events-index-cards--v2-1 {
    gap: var(--gc-history-feed-item-gap);
}

/*
 * History feed day — группа заметка/ивент/настрел в один день (без внешней даты).
 */
.history-feed-day {
    --gc-history-feed-card-radius: var(--radius-16);
    --gc-history-feed-card-bg: var(--surface-secondary);
    --gc-history-feed-card-hover-bg: var(--gc-interactive-hover-bg);
    --gc-history-feed-shot-hover-bg: color-mix(in srgb, var(--fill-primary) 6%, var(--tint-tinted-neutral));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--gc-history-feed-item-gap);
    min-width: 0;
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
}

.history-feed-day__date {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-2-5);
    min-width: 0;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.history-feed-day__date-day {
    margin: 0;
    font-size: var(--type-heading-h4-size);
    font-weight: var(--font-weight-semibold);
    line-height: var(--type-heading-h4-line-height);
    color: var(--text-primary);
}

.history-feed-day__date-weekday {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-primary);
}

/* Layout-only: дата снаружи, карточки не в общем chrome */
.weapon-show-history-feed .history-feed-day__stack,
.profile-history-month-content .history-feed-day__stack,
.history-feed-day__stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--gc-history-feed-item-gap, var(--space-6));
    min-width: 0;
    width: 100%;
    padding: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    box-sizing: border-box;
}

/* Ивент сверху, настрел — язычок из-под карточки (overlap как --gc-card-strip-overlap).
 * Фон = Tint/Tinted/Neutral (серый тинт), как join-footer / chip light. */
.history-feed-day__event-shot {
    --gc-history-feed-shot-tab-bg: var(--tint-tinted-neutral);
    --gc-history-feed-shot-tab-hover-bg: color-mix(in srgb, var(--fill-primary) 6%, var(--tint-tinted-neutral));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    width: 100%;
    overflow: visible;
    isolation: isolate;
    background: transparent;
    border: none;
}

.history-feed-day__event-shot > .gc-event-index-card {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.weapon-show-hero-continuation .profile-history-feed-card--note,
.history-feed-day__stack .profile-history-feed-card--note {
    gap: var(--space-3);
}

.history-feed-day__stack .profile-history-feed-card--shot {
    position: relative;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    padding-inline-end: calc(var(--space-4) + var(--space-8) + var(--space-1));
    transition: background-color var(--transition-fast) var(--ease-in-out);
}

.history-feed-day__stack .profile-history-feed-card--shot:not(:has(.weapon-note-timeline-item__feed-actions)) {
    padding-inline-end: var(--space-4);
}

.history-feed-day__stack .profile-history-feed-card--shot .profile-history-feed-shot-row {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.history-feed-day__stack .profile-history-feed-card--shot .profile-history-feed-shot-row__line {
    flex-wrap: nowrap;
}

.history-feed-day__stack .profile-history-feed-card--shot .profile-history-feed-shot-row__weapon {
    min-width: 0;
    overflow: hidden;
}

.history-feed-day__stack .profile-history-feed-card--shot .profile-history-feed-shot-row__weapon .profile-history-feed-shot-row__strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-feed-day__stack .profile-history-feed-card--shot .weapon-note-timeline-item__feed-actions {
    position: absolute;
    top: 50%;
    inset-inline-end: var(--space-4);
    transform: translateY(-50%);
    margin: 0;
    padding: 0;
}

@media (hover: hover) and (pointer: fine) {
    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){
    .history-feed-day__stack a.profile-history-feed-card--shot:hover,

    .history-feed-day__stack .profile-history-feed-card--shot:has(a.profile-history-feed-shot-row:hover),

    .history-feed-day__stack .profile-history-feed-card--shot:has(.weapon-history-shot-badge-trigger:hover) {
        background: var(--gc-history-feed-shot-hover-bg);
    }
    }

    .history-feed-day__stack a.profile-history-feed-card--shot:focus-visible,

    .history-feed-day__stack .profile-history-feed-card--shot:has(a.profile-history-feed-shot-row:focus-visible),

    .history-feed-day__stack .profile-history-feed-card--shot:has(.weapon-history-shot-badge-trigger:focus-visible) {
        background: var(--gc-history-feed-shot-hover-bg);
    }
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed {
    --gc-event-card-surface: var(--surface-primary);
    --gc-event-index-card-v2-1-avatar-ring: var(--surface-primary);
    width: 100%;
    min-width: 0;
    height: auto;
    cursor: pointer;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__unit {
    gap: 0;
    width: 100%;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__surface {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-3);
    height: auto;
    min-height: 0;
    padding: var(--space-3);
    border-radius: var(--gc-history-feed-card-radius, var(--radius-16));
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: background var(--transition-fast) var(--ease-in-out);
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__surface--placeholder {
    background: var(--surface-primary);
}

@media (hover: hover) and (pointer: fine) {
    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){
    .history-feed-day__stack .gc-event-index-card--history-feed-embed.gc-event-index-card--interactive:hover .gc-event-index-card-v2-1__surface--placeholder {
        background: var(--gc-history-feed-card-hover-bg);
    }
    }

    .history-feed-day__stack .gc-event-index-card--history-feed-embed.gc-event-index-card--interactive:focus-within .gc-event-index-card-v2-1__surface--placeholder {
        background: var(--gc-history-feed-card-hover-bg);
    }

    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){

    .history-feed-day__stack .gc-event-index-card--history-feed-embed.gc-event-index-card--interactive:hover {
        --gc-event-index-card-v2-1-avatar-ring: var(--gc-history-feed-card-hover-bg);
    }
    }


    .history-feed-day__stack .gc-event-index-card--history-feed-embed.gc-event-index-card--interactive:focus-within {
        --gc-event-index-card-v2-1-avatar-ring: var(--gc-history-feed-card-hover-bg);
    }
}

.history-feed-day__stack .history-feed-day__event-shot > .profile-history-feed-card--shot {
    position: relative;
    z-index: 0;
    padding: var(--space-2) var(--space-4) var(--space-3);
    border: none;
    border-radius: 0;
    background: var(--gc-history-feed-shot-tab-bg);
}

.history-feed-day__event-shot > .gc-event-index-card + .profile-history-feed-card--shot {
    margin-top: calc(-1 * var(--gc-card-strip-overlap));
    padding-top: calc(var(--gc-card-strip-overlap) + var(--space-2));
}

.history-feed-day__event-shot > .profile-history-feed-card--shot:last-child {
    border-bottom-left-radius: var(--gc-history-feed-card-radius, var(--radius-16));
    border-bottom-right-radius: var(--gc-history-feed-card-radius, var(--radius-16));
}

.history-feed-day__event-shot a.profile-history-feed-shot-row,
.history-feed-day__event-shot .profile-history-feed-shot-row {
    margin: 0;
    padding: 0;
}

@media (hover: hover) and (pointer: fine) {
    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){
    .history-feed-day__stack .history-feed-day__event-shot > a.profile-history-feed-card--shot:hover,

    .history-feed-day__stack .history-feed-day__event-shot > .profile-history-feed-card--shot:has(a.profile-history-feed-shot-row:hover),

    .history-feed-day__stack .history-feed-day__event-shot > .profile-history-feed-card--shot:has(.weapon-history-shot-badge-trigger:hover) {
        background: var(--gc-history-feed-shot-tab-hover-bg);
    }
    }

    .history-feed-day__stack .history-feed-day__event-shot > a.profile-history-feed-card--shot:focus-visible,

    .history-feed-day__stack .history-feed-day__event-shot > .profile-history-feed-card--shot:has(a.profile-history-feed-shot-row:focus-visible),

    .history-feed-day__stack .history-feed-day__event-shot > .profile-history-feed-card--shot:has(.weapon-history-shot-badge-trigger:focus-visible) {
        background: var(--gc-history-feed-shot-tab-hover-bg);
    }
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-avatar-40 {
    flex: 0 0 auto;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__feed-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-product-2);
    flex: 1 1 auto;
    min-width: 0;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__feed-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-2);
    min-width: 0;
    width: 100%;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__context-icon {
    display: none;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__participants-rail--in-surface {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    margin-inline-start: auto;
    align-self: center;
    box-sizing: border-box;
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.history-feed-day a.gc-event-index-card-v2-1__context-group--interactive:hover {
    color: inherit;
}
}


.history-feed-day a.gc-event-index-card-v2-1__context-group--interactive:focus-visible {
    color: inherit;
}

.history-feed-day .profile-history-feed-meta-strong,
.history-feed-day .profile-history-feed-shot-row__strong {
    color: var(--text-primary);
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__context-muted,
.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__history-schedule {
    color: var(--text-secondary);
    opacity: 1;
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__context-strong,
.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__title {
    color: var(--text-primary);
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__title {
    margin: 0;
    font-size: var(--font-size-15);
    font-weight: 500;
    line-height: calc(22 / 15);
}

.history-feed-day__stack .gc-event-index-card--history-feed-embed .gc-event-index-card-v2-1__history-schedule {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-secondary);
}

.history-feed-day .profile-history-feed-meta-muted,
.history-feed-day .profile-history-feed-shot-row__muted,
.weapon-note-timeline-item--history-feed .profile-history-feed-shot-row__muted,
.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author-meta {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-secondary);
}

.profile-widget-history .gc-events-index-cards--v2-1 > .gc-event-index-card--v2-1:not(.gc-event-index-card--history-feed-embed),
.weapon-show-history-month-content.gc-events-index-cards--v2-1 > .gc-event-index-card--v2-1:not(.gc-event-index-card--history-feed-embed) {
    margin: 0;
}

/* Секции с gc-section-header-trigger (история, сообщества): тот же шаг header→body, что у profile-program-section */
.profile-widgets-stack .gc-events-index-section,
.profile-widgets-stack .gc-events-index-section--v2.gc-events-index-programm,
.profile-widgets-stack .gc-month-section.gc-events-index-programm,
.profile-show-zone .gc-events-index-section,
.profile-show-zone .gc-events-index-section--v2.gc-events-index-programm,
.profile-show-zone .gc-month-section.gc-events-index-programm {
    gap: var(--space-3);
}

.profile-widget-upcoming .events-index-feed-priority {
    gap: var(--gc-events-index-v2-month-gap, var(--space-8));
}

/* ─── Оружие на профиле (Figma card/weapon 1643:26965) ─────────────────────── */

.profile-weapon-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-4);
    row-gap: var(--space-6);
    width: 100%;
    min-width: 0;
}

.profile-weapon-card-link {
    display: block;
    min-width: 0;
    color: inherit;
}

.profile-weapon-card.weapon-card--strip > .weapon-card-body {
    margin-top: var(--space-2);
    padding: 0;
}

/* Обычный тип — amber (Figma). Любимое, продажа и серый статус («Травмат продан») — тоны каталога. */
.profile-weapon-card .weapon-card-strip-pill--muted:not(.weapon-card-strip-pill--favorite):not(.weapon-card-strip-pill--status) {
    --weapon-card-strip-bg: var(--tint-tinted-amber);
    --weapon-card-strip-bg-hover: color-mix(in srgb, var(--tint-tinted-amber) 88%, var(--text-primary));
    --weapon-card-strip-bg-active: color-mix(in srgb, var(--tint-tinted-amber) 80%, var(--text-primary));
    --weapon-card-strip-text: var(--text-primary);
}

/* Архив: серая полоса каталога, не янтарный тип. «Травмат продан» — тот же серый тон. */
.profile-show-zone--archive .profile-weapon-card .weapon-card-strip-pill--muted:not(.weapon-card-strip-pill--favorite) {
    --weapon-card-strip-bg: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 28%, var(--surface-secondary));
    --weapon-card-strip-bg-hover: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 36%, var(--surface-secondary));
    --weapon-card-strip-bg-active: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 44%, var(--surface-secondary));
    --weapon-card-strip-text: var(--text-primary);
    --weapon-card-strip-mark-border: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 12%, var(--weapon-card-strip-bg));
    --weapon-card-strip-mark-inset: color-mix(in srgb, var(--fill-emphasis-inverse) 4%, transparent);
}

html[data-theme="light"] .profile-show-zone--archive .profile-weapon-card .weapon-card-strip-pill--muted:not(.weapon-card-strip-pill--favorite) {
    --weapon-card-strip-bg: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 22%, var(--surface-primary));
    --weapon-card-strip-bg-hover: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 30%, var(--surface-primary));
    --weapon-card-strip-bg-active: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 38%, var(--surface-primary));
    --weapon-card-strip-mark-border: color-mix(in srgb, var(--weapon-card-strip-muted-chrome) 10%, var(--weapon-card-strip-bg));
    --weapon-card-strip-mark-inset: color-mix(in srgb, var(--fill-emphasis-inverse) 7%, transparent);
}

/* Тот же слот, что каталог оружия: --gc-media-cover-aspect (16:9) */
.profile-weapon-card .weapon-card-media {
    aspect-ratio: var(--gc-media-cover-aspect);
}

.profile-weapon-card .weapon-card-shots-badge.profile-weapon-card-shots-badge {
    top: var(--space-1-5);
    inset-inline-end: var(--space-1-5);
    background: color-mix(in srgb, var(--fill-emphasis) 60%, transparent);
    font-weight: 500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.profile-weapon-card .weapon-card-title {
    font-size: var(--font-size-14);
    line-height: calc(20 / 14);
}

/*
 * Узкая колонка (2 в ряд или нижний ряд при трёх): без слова «любимый» — остаётся сердце + тип.
 * Карусель (.profile-weapon-cards-carousel) — один широкий слайд, правила сетки не применяем.
 */
@media (max-width: 991.98px) {
    .profile-weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-favorite-adj,
    .profile-weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-favorite-adj {
        display: none;
    }

    .profile-weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-noun--with-adj,
    .profile-weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-noun--with-adj {
        display: none;
    }

    .profile-weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-noun--solo,
    .profile-weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-noun--solo {
        display: inline;
    }
}

@media (hover: hover) and (pointer: fine) {
    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){
    .profile-weapon-cards-grid .weapon-card-link:hover .weapon-card-media .weapon-card-image > img:not(.is-icon-placeholder),

    .profile-weapons-carousel-track .weapon-card-link:hover .weapon-card-media .weapon-card-image > img:not(.is-icon-placeholder) {
        transform: scale(1.02);
    }
    }
}

/* Карусель оружия на профиле — gc-carousel + scroll-snap (как community-section) */
.profile-weapons-carousel {
    position: relative;
    width: 100%;
    min-width: 0;
}

.profile-weapons-carousel-track {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block: var(--space-1);
    min-width: 0;
}

.profile-weapons-carousel-track::-webkit-scrollbar {
    display: none;
}

.profile-weapons-carousel-track > .weapon-card-link {
    scroll-snap-align: start;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .profile-weapons-carousel .carousel-nav {
        display: none;
    }
}

.profile-weapon-cards-carousel[data-weapon-count="3"] > .weapon-card-link:first-child {
    grid-column: unset;
}

.profile-event-feed-shell.gc-list-section-shell {
    gap: var(--space-4);
}

.profile-event-feed-shell .gc-event-feed-months {
    gap: var(--space-4);
}

.profile-event-feed-shell .gc-events-index-section {
    gap: var(--space-3);
}

.weapon-history-event-group {
    /* inner radius-12 + padding space/2 → outer radius-20 (concentric) */
    --gc-history-feed-card-radius: var(--radius-12);
    --gc-history-feed-card-hover-bg: var(--surface-control-hover);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-2);
    border-radius: var(--radius-20);
    background: var(--surface-secondary);
    border: none;
    box-sizing: border-box;
}

.profile-history-feed-card {
    min-width: 0;
    padding: var(--space-4);
    border-radius: var(--gc-history-feed-card-radius, var(--radius-16));
    background: var(--gc-history-feed-card-bg, var(--surface-primary));
    border: 1px solid var(--border-subtle);
    box-sizing: border-box;
}

.profile-history-feed-card--note {
    display: flex;
    flex-direction: column;
}

/* Profile notes share the channel post shell and edge-to-edge media. */
.history-feed-day__stack .profile-history-note {
    gap: 0;
}

.profile-history-note .gc-post-counters {
    margin-inline-start: auto;
}

.profile-history-note .gc-post-header {
    padding: var(--space-3) var(--space-4);
}

.profile-history-note .gc-post-header-link {
    gap: var(--space-3);
}

.profile-history-note .gc-post-title {
    font-size: var(--font-size-15);
    font-weight: 500;
    line-height: calc(22 / 15);
}

.profile-history-note :is(.gc-post-author-link, a.gc-post-subauthor) {
    align-self: flex-start;
    max-width: 100%;
}

.profile-history-note :is(.gc-post-author-link, a.gc-post-subauthor):is(:hover, :focus-visible),
.profile-widget-history .profile-history-feed-meta-link:is(:hover, :focus-visible) {
    color: var(--accent-link);
    text-decoration: none;
}

.profile-history-note .gc-post-author-link:is(:hover, :focus-visible) .gc-post-author {
    color: inherit;
}

.profile-history-note a.gc-post-avatar-link:is(:hover, :focus-visible) {
    filter: brightness(0.85);
}

.profile-history-note :is(.gc-post-author-link, a.gc-post-subauthor, a.gc-post-avatar-link):focus-visible,
.profile-widget-history .profile-history-feed-meta-link:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: var(--gc-focus-outline-offset);
}

.profile-widget-history .profile-history-feed-card--shot:not(a) .profile-history-feed-shot-row {
    cursor: default;
}

.profile-history-note .gc-post-footer-top {
    padding-bottom: var(--space-3);
}

.profile-history-feed-card--shot {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    background: var(--tint-tinted-neutral);
    border-color: transparent;
}

a.profile-history-feed-card--shot {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

a.profile-history-feed-card--shot:hover {
    color: inherit;
    text-decoration: none;
}
}


a.profile-history-feed-card--shot:focus-visible {
    color: inherit;
    text-decoration: none;
}

a.profile-history-feed-card--shot:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: var(--gc-focus-outline-offset);
}

.profile-history-feed-card--note .weapon-note-timeline-item--history-feed {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-history-feed-card--note .weapon-note-timeline-item--history-feed .weapon-note-entry {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 0;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--space-2-5);
    row-gap: var(--space-4);
    align-items: start;
    min-width: 0;
    width: 100%;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author > :first-child {
    grid-column: 1;
    grid-row: 1;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-main {
    display: contents;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author-copy {
    display: flex;
    flex-direction: column;
    gap: var(--space-product-2);
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-inline-end: calc(var(--space-8) + var(--space-1));
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author:not(:has(.weapon-note-timeline-item__feed-actions)) .weapon-note-timeline-item__feed-author-copy {
    padding-inline-end: 0;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-main > :not(.weapon-note-timeline-item__feed-author-copy) {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.profile-history-feed-card--note .weapon-note-timeline-item--history-feed .weapon-note-entry .gc-post-media {
    width: 100%;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}

.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-actions {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    flex: none;
    margin: 0;
    padding: 0;
}

.weapon-note-timeline-item--history-feed a.weapon-note-timeline-item__feed-author-name {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    text-decoration: none;
}

.weapon-note-timeline-item--history-feed p.weapon-note-timeline-item__feed-author-name {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
}

.weapon-note-timeline-item--history-feed .weapon-note-entry__body,
.weapon-note-timeline-item--history-feed .event-program-note-text,
.weapon-note-timeline-item--history-feed .gc-post-tiptap {
    font-size: var(--font-size-15);
    font-weight: 400;
    line-height: calc(22 / 15);
    color: var(--text-primary);
}

.weapon-note-timeline-item--history-feed .weapon-note-entry__body {
    gap: var(--space-2);
}

.profile-history-feed-shot-row {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    border-radius: inherit;
}

a.profile-history-feed-shot-row {
    margin: calc(var(--space-4) * -1);
    padding: var(--space-4);
}

a.profile-history-feed-shot-row:hover,
a.profile-history-feed-shot-row:focus-visible {
    text-decoration: none;
}

.profile-history-feed-meta-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.profile-history-feed-meta-link:hover,
.profile-history-feed-meta-link:focus-visible {
    color: var(--accent-link);
}

.profile-history-feed-meta-link:hover .profile-history-feed-shot-row__strong,
.profile-history-feed-meta-link:focus-visible .profile-history-feed-shot-row__strong,
.profile-history-feed-meta-link:hover .profile-history-feed-shot-row__muted,
.profile-history-feed-meta-link:focus-visible .profile-history-feed-shot-row__muted {
    color: inherit;
    opacity: inherit;
}

.profile-history-feed-shot-row__weapon.profile-history-feed-meta-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}

.profile-history-feed-shot-row__line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}

.profile-history-feed-shot-row__strong {
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: var(--type-ui-title-line-height);
    color: var(--text-primary);
}

.profile-history-feed-shot-row__weapon .profile-history-feed-shot-row__strong {
    font-weight: 400;
}

.profile-history-feed-shot-row__muted {
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-secondary);
}

.profile-history-feed-shot-row__weapon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    min-width: 0;
}

.profile-history-feed-inline-icon {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: calc(var(--space-4) + var(--space-1));
    height: calc(var(--space-4) + var(--space-1));
    overflow: hidden;
    border-radius: var(--radius-8);
    background: var(--surface-control);
}

.profile-history-feed-inline-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-history-feed-inline-icon__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--surface-control);
    color: var(--text-secondary);
    font-size: var(--font-size-12);
}

.weapon-history-shot-badge-trigger.profile-history-feed-shot-row {
    cursor: pointer;
    margin: calc(var(--space-4) * -1);
    padding: var(--space-4);
    width: 100%;
    box-sizing: border-box;
}

.weapon-history-shot-badge-trigger.profile-history-feed-shot-row:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
    border-radius: var(--gc-history-feed-card-radius, var(--radius-16));
}

/* Feed meta — единый контракт (Figma 1817:5895): muted = secondary, strong = primary; opacity только на photo-cover */
.profile-history-month-content .profile-history-feed-meta-muted,
.profile-history-month-content .profile-history-feed-shot-row__muted,
.weapon-note-timeline-item--history-feed .profile-history-feed-shot-row__muted,
.weapon-note-timeline-item--history-feed .weapon-note-timeline-item__feed-author-meta {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: var(--type-body-line-height);
    color: var(--text-secondary);
}

.profile-history-month-content .profile-history-feed-meta-strong,
.profile-history-month-content .profile-history-feed-shot-row__strong {
    color: var(--text-primary);
}

.profile-history-event-anchor {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.profile-event-feed-shell .gc-events-index-section .gc-section-header-trigger--static {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.profile-event-feed-shell .gc-events-index-section .gc-section-header-trigger .gc-panel-title {
    font-weight: var(--font-weight-semibold);
}

.profile-results-shell {
    overflow: hidden;
}

.profile-top3-body {
    margin-top: auto;
}

.profile-top3-figure {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.profile-top3-spade-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-top3-spade-icon {
    font-size: var(--font-size-20);
    line-height: 1;
    color: var(--text-primary);
}

.profile-top3-times {
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1.25;
    color: var(--text-secondary);
}

.profile-top3-empty {
    margin-top: auto;
}

/* ─── Настрел: полоса зон (Figma 1650:27780, gc-profile-card) ─────────────── */

.profile-nastr-strip {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    overflow: hidden;
}

.profile-nastr-strip > .gc-skeleton-profile-hit-zone-cell {
    flex: 1 1 0;
    min-width: 0;
    gap: var(--space-2);
    padding: var(--space-4);
    border-radius: 0;
    background: var(--surface-secondary);
}

.profile-nastr-strip .profile-hit-zone-cell {
    flex: 1 1 0;
    min-width: 0;
    border-radius: 0;
    background: var(--surface-secondary);
    gap: var(--space-2);
    padding: var(--space-4);
    box-sizing: border-box;
}

.profile-nastr-strip .profile-hit-zone-cell-row {
    gap: var(--space-1-5);
    overflow: visible;
}

.profile-nastr-strip .profile-hit-zone-cell--total {
    justify-content: space-between;
}

.profile-nastr-strip .profile-hit-zone-total-logo {
    display: flex;
    align-items: center;
    min-height: var(--font-size-16);
}

.profile-nastr-strip .profile-hit-zone-total-logo .weapon-card-shots-badge-icon-wrap,
.profile-nastr-strip .profile-hit-zone-total-logo .weapon-card-shots-badge-icon {
    display: block;
    height: var(--font-size-16);
    width: auto;
    max-width: 2.875rem;
}

.profile-nastr-strip .profile-hit-zone-skeleton-bar--logo {
    width: 2.875rem;
    height: var(--font-size-16);
}

.profile-nastr-strip .profile-hit-zone-pill--alpha {
    background: var(--tint-earth-moss);
    color: var(--text-on-solid);
}

.profile-nastr-strip .profile-hit-zone-pill--charlie {
    background: var(--tint-earth-umber);
    color: var(--text-on-solid);
}

.profile-nastr-strip .profile-hit-zone-pill--delta {
    background: var(--tint-earth-terra);
    color: var(--text-on-solid);
}

.profile-nastr-strip .profile-hit-zone-pill--miss {
    background: var(--fill-emphasis);
    color: var(--text-on-solid);
}

/*
 * Skeleton nastr: live miss pill is chromatic fill-emphasis (always black).
 * Light theme would show a black letter on gray bones. Same chrome as I7.87.
 */
.profile-nastr-strip .profile-hit-zone-pill.profile-hit-zone-pill--skeleton {
    background: linear-gradient(
        90deg,
        var(--surface-subtle) 0%,
        var(--surface-control) 50%,
        var(--surface-subtle) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    color: transparent;
    -webkit-text-fill-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .profile-nastr-strip .profile-hit-zone-pill.profile-hit-zone-pill--skeleton {
        animation: none;
        background: var(--surface-subtle);
    }
}

@media (max-width: 639px) {
    .profile-nastr-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-1);
        overflow: visible;
        border: none;
        border-radius: 0;
    }

    .profile-nastr-strip > .gc-skeleton-profile-hit-zone-cell,
    .profile-nastr-strip .profile-hit-zone-cell {
        flex: unset;
        border-radius: var(--radius-12);
        border: 1px solid var(--border-subtle);
    }

    .profile-nastr-strip .profile-hit-zone-cell--total {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
    }
}

/*
 * Правый rail / fallback профиля: total сверху, под ним мозаика 2×2.
 * Скругление снаружи — блок на page surface, не flush к chrome rail.
 * gap 1px + фон border = швы; overflow clip по radius-16.
 */
.profile-nastr-strip--rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: visible;
    border: none;
    border-radius: var(--radius-16);
    background: var(--border-subtle);
}

.profile-nastr-strip--rail > .gc-skeleton-profile-hit-zone-cell,
.profile-nastr-strip--rail .profile-hit-zone-cell {
    flex: unset;
    border-radius: 0;
    border: none;
    padding: var(--space-2) calc(var(--gc-list-zone-padding) + var(--gc-list-row-padding));
    gap: var(--space-1-5);
    background: var(--surface-secondary);
    transition: background var(--transition-fast);
    overflow: visible;
}

@media (hover: hover) {
    @media (min-width: 1280px) and (hover: hover) and (pointer: fine){
    .profile-nastr-strip--rail .profile-hit-zone-cell.profile-progress--hoverable:hover {
        background: var(--gc-interactive-hover-bg);
    }
    }

    .profile-nastr-strip--rail .profile-hit-zone-cell.profile-progress--hoverable:focus-within {
        background: var(--gc-interactive-hover-bg);
    }
}

.profile-nastr-strip--rail .profile-hit-zone-cell--total {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.profile-nastr-strip--rail .profile-hit-zone-cell--total:last-child {
    border-bottom: none;
}

.profile-show-sidebar-stack > .profile-widget-nastr,
.profile-show-sidebar-stack__lead > .profile-widget-nastr {
    padding: 0;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
}

/* ─── Попадания: сетка зон (legacy / вложенные контексты) ─────────────────── */

.profile-hit-zones-nastr {
    color: var(--text-secondary);
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: 1.25;
    margin: 0;
    text-align: right;
}

.profile-hit-zones-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    width: 100%;
    min-width: 0;
}

@media (max-width: 639px) {
    .profile-hit-zones-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.profile-hit-zone-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    min-width: 0;
    padding: var(--space-4);
    border-radius: var(--radius-12);
    background: var(--surface-control);
    box-sizing: border-box;
}

.profile-hit-zone-cell-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    min-width: 0;
}

.profile-hit-zone-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 2px var(--space-2);
    border-radius: var(--radius-full);
    font-size: var(--font-size-13);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-on-solid-inverse);
}

.profile-hit-zone-pill--alpha {
    background: var(--tint-earth-moss);
    color: var(--text-on-solid);
}

.profile-hit-zone-pill--charlie {
    background: var(--tint-earth-umber);
    color: var(--text-on-solid);
}

.profile-hit-zone-pill--delta {
    background: var(--tint-earth-terra);
    color: var(--text-on-solid);
}

.profile-hit-zone-pill--miss {
    background: var(--fill-emphasis);
    color: var(--text-on-solid);
}

/* Light — kind-mark edge на цветной pill (без conic overrides) */
html[data-theme='light'] .profile-hit-zone-pill.gc-card-glow-shell--pill {
    --gc-pill-mark-border: color-mix(in srgb, var(--fill-emphasis-inverse) 28%, transparent);
    --gc-pill-mark-inset: color-mix(in srgb, var(--fill-emphasis-inverse) 20%, transparent);
}

html[data-theme='light'] .profile-hit-zone-pill.gc-card-glow-shell--pill[data-glow-tone='alpha'] {
    --gc-card-glow-chroma: var(--tint-earth-moss-bright);
}

html[data-theme='light'] .profile-hit-zone-pill.gc-card-glow-shell--pill[data-glow-tone='charlie'] {
    --gc-card-glow-chroma: var(--tint-earth-umber-bright);
}

html[data-theme='light'] .profile-hit-zone-pill.gc-card-glow-shell--pill[data-glow-tone='delta'] {
    --gc-card-glow-chroma: var(--tint-earth-terra-bright);
}

html[data-theme='light'] .profile-hit-zone-pill.gc-card-glow-shell--pill[data-glow-tone='miss'] {
    --gc-card-glow-chroma: var(--fill-emphasis-inverse);
}

.profile-hit-zone-pct {
    font-size: var(--font-size-14);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    min-width: 0;
}

.profile-hit-zone-count {
    font-size: var(--type-ui-caption-size);
    font-weight: 500;
    line-height: var(--type-ui-caption-line-height);
    color: var(--text-secondary);
}

/* Figma 1650:27780 (gc-profile-card) — типографика полосы настрела /profile
   После base .profile-hit-zone-*: pill UI/Micro · % Body/Semi · count UI/Caption */
.profile-widget-nastr .profile-nastr-strip .profile-hit-zone-pill {
    padding: var(--space-1) var(--space-3);
    font-size: var(--type-ui-micro-size);
    font-weight: 500;
    line-height: var(--type-ui-micro-line-height);
    color: var(--text-on-solid);
}

.profile-widget-nastr .profile-nastr-strip .profile-hit-zone-pct {
    margin: 0;
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: calc(22 / 14);
    color: var(--text-primary);
}

.profile-widget-nastr .profile-nastr-strip .profile-hit-zone-count {
    margin: 0;
    font-size: var(--type-ui-caption-size);
    font-weight: 400;
    line-height: var(--type-ui-caption-line-height);
    color: var(--text-secondary);
}

.profile-widget-nastr .profile-nastr-strip .profile-hit-zone-cell--total .profile-hit-zone-count {
    font-weight: 500;
}

/* Пустое состояние (Figma GcProfileCard empty): пилюля зоны + скруглённые полоски вместо % и счёта */
.profile-hit-zone-cell--placeholder {
    pointer-events: none;
}

.profile-hit-zone-cell-row--placeholder {
    gap: var(--space-1);
}

.profile-hit-zone-skeleton-bar {
    display: block;
    flex-shrink: 0;
    height: var(--space-4);
    border-radius: var(--radius-full);
    background-color: var(--border-subtle);
}

/* Ширины как в макете: ~29px / ~53px */
.profile-hit-zone-skeleton-bar--pct {
    width: 1.8125rem;
}

.profile-hit-zone-skeleton-bar--count {
    width: 3.3125rem;
}

/*
 * Попап результата упражнения (#stageBestResultPopup): те же ячейки и пилюли, что виджет «Попадания»,
 * сетка 2×2 как в макете Figma; в строке — число попаданий (в профиле там проценты).
 */
.profile-hit-zones-grid--stage-popup {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-1);
}

.profile-hit-zones-grid--stage-popup .profile-hit-zone-cell {
    gap: 0;
    padding: var(--space-2) var(--space-2);
}

.profile-hit-zones-grid--stage-popup .profile-hit-zone-cell-row {
    width: 100%;
}

.profile-hit-zones-grid--stage-popup .profile-hit-zone-pct {
    font-weight: 500;
}

.profile-top3-refresh-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-14);
    font-weight: 400;
    line-height: 1;
    color: var(--text-secondary);
    transition: color var(--transition-fast) var(--ease-out);
    white-space: nowrap;
}

.profile-top3-refresh-btn:hover {
    color: var(--text-primary);
}

.profile-top3-refresh-btn i {
    font-size: var(--font-size-base);
    line-height: 1;
}

/* ─── Help icon ──────────────────────────────────────────────────────────── */

.profile-help-icon {
    cursor: help;
    color: var(--text-secondary);
    margin-inline-start: var(--space-1);
    transition: color var(--transition-fast);
}

.profile-help-icon:hover {
    color: var(--text-secondary);
}

/* ─── Progress segments ──────────────────────────────────────────────────── */

.profile-progress-segment {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width var(--transition-slow) var(--ease-out);
}

.profile-progress--hoverable {
    cursor: help;
}

/* Сегменты вне профиля (напр. визиты подписки) — прежняя семантика */
.profile-progress-segment-success {
    background: linear-gradient(
        90deg,
        rgba(var(--success-color-rgb), 0.3) 0%,
        var(--success-color) 100%
    );
}

.profile-progress-segment-warning  { background-color: var(--warning-color); }
.profile-progress-segment-danger   { background-color: var(--danger-color); }
.profile-progress-segment-secondary { background-color: transparent; }
.profile-progress-segment-misses   { opacity: 1; }
.profile-progress-segment-empty    { width: 100%; }

/* ─── Widget header link ─────────────────────────────────────────────────── */

.profile-widget-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--font-size-14);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.profile-widget-link:hover {
    color: var(--text-primary);
}

.profile-widget-link i {
    font-size: var(--font-size-14);
}

/* ─── Weapon cards grid ──────────────────────────────────────────────────── */

.weapon-cards-grid {
    display: grid;
    gap: var(--space-4);
}

/* Одна карточка — на всю ширину; две — строго пополам (адаптив профиля). */
.weapon-cards-grid[data-weapon-count="1"] {
    grid-template-columns: 1fr;
}

.weapon-cards-grid[data-weapon-count="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weapon-cards-grid[data-weapon-count="3"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:first-child {
    grid-column: 1 / -1;
}

@media (min-width: 992px) {
    .weapon-cards-grid[data-weapon-count="1"],
    .weapon-cards-grid[data-weapon-count="2"],
    .weapon-cards-grid[data-weapon-count="3"] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:first-child {
        grid-column: auto;
    }
}

/*
 * Узкая колонка (две карточки в ряд или нижний ряд из двух при трёх единицах): без слова «любимый» — остаётся сердце + тип.
 */
@media (max-width: 991.98px) {
    .weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-favorite-adj,
    .weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-favorite-adj {
        display: none;
    }

    .weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-noun--with-adj,
    .weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-noun--with-adj {
        display: none;
    }

    .weapon-cards-grid[data-weapon-count="2"] .weapon-card-strip-type-label-noun--solo,
    .weapon-cards-grid[data-weapon-count="3"] > .weapon-card-link:nth-child(n + 2) .weapon-card-strip-type-label-noun--solo {
        display: inline;
    }
}

.weapon-card-link {
    text-decoration: none;
    display: block;
}

/* ─── Activity Feed ──────────────────────────────────────────────────────── */

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.activity-feed-month {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Мелкий uppercase-лейбл месяца */
.activity-feed-month-label {
    font-size: var(--font-size-13);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 var(--space-1);
}

.activity-feed-events {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* ─── Event card в контексте ленты — компактный list-item ─────────────────── */

.activity-feed .gc-event-card {
    padding: var(--space-2) var(--space-4);
    /* Reserve trailing edge for absolute badge (growth: wrap title, don't shrink badge) */
    padding-inline-end: max(7rem, calc(var(--space-4) + 5rem));
    min-height: 0;
    border-radius: var(--radius-16);
    border: none;
}

.activity-feed .gc-event-card h5 {
    margin: 0 0 2px 0 !important;
}

.activity-feed .gc-event-card .text-truncate {
    font-size: var(--font-size-14) !important;
    color: var(--text-secondary);
}

.activity-feed .gc-event-card .event-grid-bottom {
    margin-top: 0;
    gap: 0;
}

/* Badge позиционирование в компактной карточке */
.activity-feed .gc-event-card-badge {
    top: var(--space-2);
    inset-inline-end: var(--space-2);
}

.activity-feed-more {
    text-align: center;
}

/* ─── Event card: badge ──────────────────────────────────────────────────── */

.gc-event-card {
    position: relative;
}

.gc-event-card-badge {
    position: absolute;
    top: var(--space-4);
    inset-inline-end: var(--space-4);
}

/* ─── Debug panel ────────────────────────────────────────────────────────── */

.profile-debug {
    background: var(--surface-control);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    padding: var(--space-4);
    margin-bottom: var(--space-2);
    font-family: monospace;
    font-size: 12px;
}

.profile-debug-title {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--space-1);
    margin-bottom: var(--space-1);
    font-weight: 600;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */

/* gc-widget-tip + gc-widget-tip-bubble → см. public/css/tooltips.css */

/* ─── График результатов (столбцы по ивентам) — макет Figma: сетка gap 12px, padding 12px, h 200px; колонка gap 12px, p 9px → токены; % в пилюле; трек 8px flex-1 ─ */

.profile-results-bars-chart {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--space-4);
    box-sizing: border-box;
    min-height: 200px;
    height: 200px;
    padding: var(--space-1);
    margin-top: 0;
}

.profile-results-bar {
    flex: 1 1 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-4);
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.profile-results-bar:focus-visible {
    outline: var(--gc-focus-outline);
    outline-offset: 2px;
    border-radius: var(--radius-8);
}

.profile-results-bar:hover {
    opacity: 0.92;
}

.profile-results-bar-pct {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1;
    color: var(--text-primary);
    white-space: nowrap;
}

.profile-results-bar-track {
    flex: 1 1 0;
    width: var(--space-2);
    min-height: 0;
    background-color: var(--surface-control);
    border-radius: var(--radius-full);
    position: relative;
    overflow: hidden;
}

.profile-results-bar-fill {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    height: calc(var(--profile-results-fill, 50) * 1%);
    min-height: 0;
    background-color: var(--gc-progress-fill);
    border-radius: var(--radius-full);
    opacity: var(--profile-results-fill-opacity, 1);
    transition:
        height var(--transition-slow) var(--ease-out),
        opacity var(--transition-slow) var(--ease-out);
}

.profile-results-bar-date {
    flex-shrink: 0;
    font-size: var(--font-size-13);
    font-weight: 500;
    line-height: 1;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Статичные заглушки (Figma StatRow empty) — пилюля %, пустой трек 8px, пилюля даты */
.profile-results-bar--placeholder {
    pointer-events: none;
    cursor: default;
}

.profile-results-bar--placeholder:hover {
    opacity: 1;
}

.profile-results-bar-pct-placeholder {
    width: var(--space-12);
    height: var(--space-6);
    border-radius: var(--radius-full);
    background-color: var(--surface-control);
    flex-shrink: 0;
}

.profile-results-bar-track--placeholder {
    flex: 1 1 0;
    width: var(--space-2);
    min-height: 0;
    background-color: var(--surface-control);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.profile-results-bar-date-placeholder {
    width: var(--space-8);
    height: var(--space-4);
    border-radius: var(--radius-full);
    background-color: var(--surface-control);
    flex-shrink: 0;
}

@media (max-width: 767px) {
    .profile-results-bars-chart {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        scrollbar-gutter: stable;
    }

    .profile-results-bars-chart .profile-results-bar {
        flex: 0 0 var(--space-product-56);
        min-width: var(--space-product-56);
    }
}

.bar-chart-tooltip {
    position: fixed;
    display: none;
    background: var(--surface-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    padding: var(--space-4);
    box-shadow: var(--shadow-md);
    z-index: var(--z-tooltip);
    min-width: 200px;
    max-width: 280px;
    pointer-events: none;
}

.bar-stat-meta {
    font-size: var(--font-size-13);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.bar-stat-event-name {
    font-size: var(--font-size-14);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: 1.3;
}

.bar-stat-label {
    font-size: var(--font-size-13);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.bar-stat-zones {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.bar-stat-zone {
    flex: 1;
    min-width: 64px;
    border-radius: var(--radius-8);
    padding: var(--space-2);
    text-align: center;
}

.bar-stat-zone--alpha {
    background: rgba(var(--success-color-rgb), 0.15);
}

.bar-stat-zone--charlie {
    background: rgba(var(--warning-color-rgb), 0.15);
}

.bar-stat-zone--delta {
    background: rgba(var(--danger-color-rgb), 0.15);
}

.bar-stat-zone--miss {
    background: rgba(128, 128, 128, 0.12);
}

.bar-stat-zone-count {
    font-size: var(--font-size-20);
    font-weight: 700;
    line-height: 1;
}

.bar-stat-zone--alpha .bar-stat-zone-count {
    color: var(--success-color);
}

.bar-stat-zone--charlie .bar-stat-zone-count {
    color: var(--warning-color);
}

.bar-stat-zone--delta .bar-stat-zone-count {
    color: var(--danger-color);
}

.bar-stat-zone--miss .bar-stat-zone-count {
    color: var(--text-secondary);
}

.bar-stat-zone-label {
    font-size: var(--font-size-13);
    color: var(--text-secondary);
    margin-top: var(--space-product-2);
}

.bar-stat-empty {
    font-size: var(--font-size-13);
    color: var(--text-secondary);
    text-align: center;
    padding: var(--space-4) 0;
}

/* Виджет мероприятий сообществ / история на профиле: родитель без «карточки» */
.profile-widget.gc-event-feed-widget {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    isolation: auto;
    gap: var(--space-2);
}

/* Один виджет: «Мероприятия сообществ» + «История» — крупный gap между секциями, внутри секции как раньше */
.profile-widget.gc-event-feed-widget.profile-events-feed {
    gap: var(--space-4);
}

.profile-events-feed-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
}

.gc-event-feed-months {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gc-event-feed-months > .gc-month-section + .gc-month-section {
    margin-top: var(--space-4);
}

/* Внутри list shell: месячные заголовки на canvas (section-header-trigger), без лишнего инсета */
.profile-event-feed-shell .gc-month-toggle-wrap {
    padding-inline: 0;
}

/* Месяц: список как у участников на странице мероприятия — gc-stack-sm между строками, без общей обводки */
.gc-event-feed-month-shell {
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.gc-event-feed-month-shell .gc-event-feed-list {
    gap: var(--space-2);
}

/* Список мероприятий канала: колонка действий — под меню «⋯», не под широкую CTA профиля */
.channel-linked-events-months .gc-event-feed-card-action-cell {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
}

.gc-event-feed-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.gc-event-feed-card {
    border: none;
    border-radius: var(--radius-12);
    background: transparent;
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: relative;
    transition: background var(--transition-fast);
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.gc-event-feed-card:hover {
    background-color: var(--gc-interactive-hover-bg);
    cursor: pointer;
}
}

/* История имён на профиле — те же карточки, без перехода по клику */
@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.gc-event-feed-card--name-history:hover {
    cursor: default;
}
}
.gc-event-feed-card--name-history {
    cursor: default;
}

.gc-event-feed-card-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
    min-width: 0;
}

.gc-event-feed-card-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
    gap: var(--space-product-2);
    display: flex;
    flex-direction: column;
}

.gc-event-feed-card-date {
    margin: 0;
    font-size: var(--gc-list-title-font-size);
    font-weight: 500;
    line-height: var(--gc-list-title-line-height);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gc-event-feed-card-title,
.gc-event-feed-card-subtitle {
    margin: 0;
    font-size: var(--gc-list-meta-font-size);
    line-height: var(--gc-list-meta-line-height);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

.gc-event-feed-card-avatars {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

.gc-event-feed-organizer-wrap {
    display: inline-flex;
    border-radius: var(--radius-full);
}

/* Наложение: leading организатор, trailing поверх — сообщество (как в Figma) */
.gc-event-feed-organizer-wrap--overlap .gc-event-feed-avatar--organizer {
    margin-inline-end: calc(-1 * var(--space-3));
}

.gc-event-feed-avatar-stack {
    position: relative;
    z-index: 1;
}

.gc-event-feed-avatar {
    width: var(--gc-list-media-size);
    height: var(--gc-list-media-size);
    border-radius: var(--radius-full);
    border: 3px solid var(--surface-panel);
    flex-shrink: 0;
    object-fit: cover;
    box-sizing: border-box;
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.gc-event-feed-card:hover .gc-event-feed-avatar {
    border-color: var(--gc-interactive-hover-bg);
}
}

.gc-event-feed-community-link {
    display: inline-flex;
    border-radius: var(--radius-full);
}

/* Действие справа в одной строке с текстом (десктоп и адаптив) */
.gc-event-feed-card-action-cell {
    flex: 0 1 46%;
    min-width: 0;
    max-width: 46%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.gc-event-feed-card-action-cell .gc-event-feed-action {
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.gc-event-feed-card-action-cell .gc-event-feed-action-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gc-event-feed-card-action-cell .gc-event-feed-action-segmented .gc-event-feed-action-main {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

/* Участвую / заявка подана: segmented disabled — без глобального серого фона .gc-btn[disabled] */
.gc-event-feed-card .gc-event-feed-action-segmented.gc-event-feed-action--request-sent:disabled,
.gc-event-feed-card .gc-event-feed-action-segmented.gc-event-feed-action--request-sent[disabled] {
    opacity: 1;
    cursor: default;
}

.gc-event-feed-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--gc-list-media-size);
    height: var(--gc-list-media-size);
    border-radius: var(--radius-full);
    box-sizing: border-box;
    background: var(--surface-control);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--font-size-14);
    font-weight: 600;
    line-height: 1;
}

/* Segmented action — базовые стили в buttons.css (.gc-event-feed-action-segmented) */

/* ─── Логистика профиля: секция + card-rows (--list-cards) ─── */
/* Секция (как gc-panel-empty-placeholder__card): один chrome на блок, не на каждую строку */
.profile-logistics-section-panel {
    box-sizing: border-box;
    min-width: 0;
    background: var(--surface-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-16);
    overflow: hidden;
}

.profile-logistics-list > :is(.gc-list-stack-item, .profile-logistics-list-item) {
    min-width: 0;
    box-sizing: border-box;
    background: var(--surface-primary);
    transition: background var(--transition-fast);
}

.profile-logistics-list > .gc-list-stack-item {
    position: relative;
    padding: var(--gc-list-open-row-padding);
    gap: var(--gc-list-stack-item-gap);
}

.profile-logistics-list > .gc-list-stack-item:has(> .gc-interactive-row .gc-list-item-trigger) {
    cursor: pointer;
}

/* Hit на всю карточку-инсет (паддинг, номер, бейдж), не только title/media */
.profile-logistics-list > .gc-list-stack-item > .gc-interactive-row > .gc-list-item-trigger::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}


@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.profile-logistics-list > :is(.gc-list-stack-item, .profile-logistics-list-item):is(:hover, :focus-within) {
    background: var(--gc-interactive-hover-bg);
}
}

.profile-logistics-list > :is(.gc-list-stack-item, .profile-logistics-list-item):is( :focus-within) {
    background: var(--gc-interactive-hover-bg);
}

.profile-logistics-list > .gc-list-stack-item > .gc-interactive-row {
    padding: 0;
    border-radius: 0;
    min-width: 0;
}

@media (min-width: 1280px) and (hover: hover) and (pointer: fine){

.profile-logistics-list > .gc-list-stack-item > .gc-interactive-row.interactive:is(:hover, :focus-within) {
    background: transparent;
}
}

.profile-logistics-list > .gc-list-stack-item > .gc-interactive-row.interactive:is( :focus-within) {
    background: transparent;
}

.profile-logistics-list > .gc-list-stack-item .gc-interactive-row > .gc-list-actions {
    position: relative;
    z-index: 2;
    gap: var(--space-2);
}

.profile-logistics-list > .gc-list-stack-item .gc-list-meta-right .gc-badge-car-number {
    flex-shrink: 0;
}

.profile-logistics-list > .gc-list-stack-item:has(> .profile-logistics-list-item-foot) > .gc-interactive-row {
    padding-bottom: 0;
}

.profile-logistics-list > .gc-list-stack-item > .profile-logistics-list-item-foot {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-1) 0 0;
}

/* «Основной» / «Основное» — pill glow (CARD_GLOW --pill), асимметричный radius sidebar chip */
.profile-logistics-default-badge.gc-card-glow-shell--pill {
    --gc-card-glow-chroma: var(--accent-violet);
    border-radius: var(--radius-4) var(--radius-12) var(--radius-12) var(--radius-12);
}

html[data-theme='light'] .profile-logistics-default-badge.gc-card-glow-shell--pill {
    --gc-pill-mark-border: color-mix(
        in srgb,
        var(--fill-emphasis-inverse) 42%,
        var(--accent-violet)
    );
    --gc-pill-mark-inset: color-mix(in srgb, var(--fill-emphasis-inverse) 34%, transparent);
}

/* Фильтр-табы → месяцы: space/3 как header→body у profile-program-section */
.profile-history-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    min-width: 0;
}

.profile-logistics-list-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-logistics-list-item > .gc-interactive-row {
    flex: 1;
    min-width: 0;
}

.profile-logistics-list-item--with-foot > .gc-interactive-row {
    padding-bottom: 0;
}

.profile-logistics-list-item-foot {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-1) var(--space-2) var(--space-2);
}

.profile-logistics-list-item .gc-interactive-row > .gc-list-actions {
    gap: var(--space-2);
}
