@import '/kTVCSSBlazor.Server.styles.css';

/* Rocket.Chat-style: баннер сверху в потоке, layout занимает оставшуюся высоту */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

.app-shell > .rz-layout.app-shell-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
}

.api-offline-banner {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0;
    padding: 0.45rem 1rem;
    box-sizing: border-box;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    background: var(--rz-warning, #e8e971);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.api-offline-banner .api-offline-spinner,
.api-offline-banner .rz-progressbar-circular {
    width: 1.1rem !important;
    height: 1.1rem !important;
    flex-shrink: 0;
}

.api-offline-banner .rz-progressbar-circular-value {
    stroke: #1a1a1a !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

:root {
    font-size: var(--rz-root-font-size);
}

body {
    font-family: var(--rz-text-font-family);
    color: var(--rz-text-color);
    font-size: var(--rz-body-font-size);
    line-height: var(--rz-body-line-height);
    background-color: var(--rz-body-background-color);
}

.rz-body {
    --rz-body-padding: 0;
}

a {
    color: var(--rz-link-color);
}

a:hover,
a:focus {
    color: var(--rz-link-hover-color);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.chat-container {
    display: flex;
    height: 71svh;
}

.sidebar {
    width: 350px;
    background-color: var(--rz-base-700);
    border-right: 1px solid var(--rz-base);
    display: flex;
    flex-direction: column;
    border-top-left-radius: var(--rz-border-radius-2);
    border-bottom-left-radius: var(--rz-border-radius-2);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--rz-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .sidebar-header h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

.dialogs-list {
    flex: 1;
    overflow-y: auto;
}

.dialog-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--rz-base);
    position: relative;
    transition: background-color 0.2s;
}

    .dialog-item:hover {
        background-color: var(--rz-base-400);
    }

    .dialog-item.active {
        background-color: var(--rz-base-500);
        color: white;
    }

.dialog-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    font-size: 20px;
    position: relative;
}

    .dialog-avatar .avatar {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

.dialog-info {
    flex: 1;
    min-width: 0;
}

.dialog-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: space-between;
    display: flex;
    align-items: center;
}

.dialog-last-message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0.7;
}

.last-message-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.last-message-time {
    font-size: 12px;
    margin-left: 10px;
}

.unread-badge {
    background-color: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid #393939;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--rz-base-700);
    border-top-right-radius: var(--rz-border-radius-2);
    border-bottom-right-radius: var(--rz-border-radius-2);
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--rz-base);
    background-color: var(--rz-base-700);
    border-top-right-radius: var(--rz-border-radius-2);
}

.chat-info {
    display: flex;
    align-items: center;
}

    .chat-info .avatar-small {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        margin-right: 15px;
        object-fit: cover;
    }

.user-name {
    font-weight: 600;
    font-size: 16px;
}

.user-status {
    font-size: 14px;
    color: #6c757d;
}

    .user-status .online {
        color: #28a745;
    }

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: linear-gradient(180deg, #081225 0%, #090012 100%);
    background-attachment: fixed;
}

.message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-out;
}

.message-own {
    justify-content: flex-end;
}

.message-other {
    justify-content: flex-start;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.message-content {
    max-width: 70%;
    background-color: var(--rz-base);
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.message-own .message-content {
    background-color: #007bff;
    color: white;
}

.reply-message {
    background-color: rgba(0, 0, 0, 0.05);
    border-left: 3px solid #007bff;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
}

.reply-author {
    font-weight: 600;
    color: #007bff;
    margin-bottom: 2px;
}

.reply-text {
    opacity: 0.8;
}

.message-text {
    font-size: 16px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.7;
}

.edited-indicator {
    font-style: italic;
}

.typing-indicator {
    padding: 10px 20px;
    font-style: italic;
    color: #6c757d;
    animation: pulse 1.5s infinite;
}

.message-input-container {
    border-top: 1px solid var(--rz-base-700);
    background-color: var(--rz-base-700);
    border-bottom-right-radius: var(--rz-border-radius-2);
}

.reply-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.reply-content {
    flex: 1;
    font-size: 14px;
}

.btn-close-reply {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
}

.input-area {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.message-input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 16px;
    outline: none;
    resize: none;
    margin-right: 10px;
}

    .message-input:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

.send-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

    .send-button:hover:not(:disabled) {
        background-color: #0056b3;
    }

    .send-button:disabled {
        background-color: #6c757d;
        cursor: not-allowed;
    }

.no-chat-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
}

/* ��������� ���� */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
}

    .modal-header h4 {
        margin: 0;
        font-size: 18px;
        font-weight: 600;
    }

.btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 5px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
}

.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        margin-bottom: 5px;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

    .form-control:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* ������ */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

    .btn-primary:hover {
        background-color: #0056b3;
    }

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

    .btn-secondary:hover {
        background-color: #545b62;
    }

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* �������� */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Mobile layout safeguards */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 40%;
    }

    .chat-area {
        height: 60%;
    }

    .message-content {
        max-width: 85%;
    }

    /* Prevent wide children (brackets/grids) from shifting the whole page via mx-auto centering */
    .rz-body > .rz-row {
        max-width: 100% !important;
        width: 100%;
        box-sizing: border-box;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .page-content {
        min-width: 0;
        max-width: 100%;
    }

    .rz-data-grid {
        max-width: 100%;
    }

    .rz-tabview-nav {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
    }
}

.rz-markdown {
    word-break: break-word;
}

.nav-menu-item-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/*
 * Счётчик непрочитанных. Цвет фона не зависит от темы: в Zen (zen-dark) --rz-primary почти белый (#f2f2f2),
 * поэтому белая цифра на нём была невидима и счётчик выглядел как пустая белая «таблетка».
 */
.messenger-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-sizing: border-box;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-inline-start: auto;
    border-radius: 10px;
    background: var(--rz-danger, #dc3545);
    color: var(--rz-on-danger, #fff);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    box-shadow: 0 0 0 2px var(--rz-sidebar-background-color, transparent);
}

/* Desktop icon rail. Radzen collapsed sidebar is width 0; there is no built-in mini mode. */
@media (min-width: 769px) {
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail {
        width: 4.5rem !important;
        min-width: 4.5rem;
        opacity: 1 !important;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .sidebar-brand {
        justify-content: center;
        padding-inline: 0.5rem;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .sidebar-brand-text {
        display: none;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .sidebar-brand-logo {
        width: 36px !important;
        height: 36px !important;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper {
        position: relative;
        z-index: 2;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-navigation-item-link {
        justify-content: center;
        padding-inline: 0;
        position: relative;
        z-index: 2;
        pointer-events: auto;
        min-height: 2.75rem;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-navigation-item-icon {
        margin-inline: 0;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-navigation-item-text,
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-navigation-item-icon-children {
        display: none;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .rz-stack {
        justify-content: center;
        gap: 0;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .nav-menu-item-with-badge {
        position: static;
        width: 0;
        min-width: 0;
        overflow: visible;
        gap: 0;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-navigation-item-wrapper .messenger-unread-badge {
        position: absolute;
        top: 0.45rem;
        inset-inline-end: 0.7rem;
        min-width: 0.55rem;
        width: 0.55rem;
        height: 0.55rem;
        padding: 0;
        font-size: 0;
        color: transparent;
        border-radius: 50%;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:not(:has(> .rz-expander)):hover > .rz-navigation-item-wrapper .rz-navigation-item-text,
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:not(:has(> .rz-expander)):focus-within > .rz-navigation-item-wrapper .rz-navigation-item-text {
        display: block;
        position: fixed;
        z-index: 30;
        width: auto;
        margin: 0;
        padding: 0.45rem 0.75rem;
        background: var(--rz-sidebar-background-color, #1c1c1c);
        color: var(--rz-sidebar-color, #fff);
        border-radius: 6px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
        white-space: nowrap;
        pointer-events: none;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-expander {
        display: none;
        position: fixed;
        left: 4.5rem;
        z-index: 30;
        width: max-content;
        min-width: 15rem;
        max-width: min(22rem, 70vw);
        max-height: min(70vh, 32rem);
        overflow: auto;
        background: var(--rz-sidebar-background-color, #1c1c1c);
        color: var(--rz-sidebar-color, #fff);
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:hover > .rz-expander,
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:focus-within > .rz-expander {
        display: grid;
        grid-template-rows: 1fr;
        pointer-events: auto;
        visibility: visible;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:hover > .rz-expander > .rz-expander-content,
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item:focus-within > .rz-expander > .rz-expander-content {
        visibility: visible;
        overflow: visible;
    }

    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-expander .rz-navigation-item-text,
    .app-shell-layout > .rz-sidebar.sidebar-icon-rail .rz-panel-menu > .rz-navigation-item > .rz-expander .rz-navigation-item-icon-children {
        display: revert;
        position: static;
        padding: 0;
        background: transparent;
        box-shadow: none;
        pointer-events: auto;
        white-space: normal;
    }
}

/* ===== Edit profile / edit team pages ===== */
.edit-page {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 0 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.edit-hero {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}

.edit-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--rz-primary-darker, #1e3a5f) 0%, var(--rz-primary, #3b82f6) 100%);
    background-size: cover;
    background-position: center;
}

.edit-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .15));
}

.edit-hero-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.25rem 1.5rem;
    width: 100%;
}

.edit-hero-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, .85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .45);
    background: #111;
    flex: none;
}

.edit-hero-text {
    min-width: 0;
}

.edit-hero-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}

.edit-hero-subtitle {
    color: rgba(255, 255, 255, .8);
    font-size: .95rem;
    margin-top: .2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Без картинки шапки: простой заголовок без градиентного баннера */
.edit-hero.edit-hero-plain {
    min-height: 0;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
    padding-bottom: .25rem;
}

.edit-hero-plain .edit-hero-bg,
.edit-hero-plain .edit-hero-overlay {
    display: none;
}

.edit-hero-plain .edit-hero-content {
    padding: .25rem 0 1rem;
}

.edit-hero-plain .edit-hero-avatar {
    width: 64px;
    height: 64px;
    border: 2px solid var(--rz-primary);
    box-shadow: none;
}

.edit-hero-plain .edit-hero-title {
    color: var(--rz-text-color);
    text-shadow: none;
    font-size: 1.4rem;
}

.edit-hero-plain .edit-hero-subtitle {
    color: var(--rz-text-secondary-color, var(--rz-text-color));
    opacity: .7;
}

.edit-card.rz-card {
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .08));
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.edit-card-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--rz-base-300, rgba(255, 255, 255, .08));
}

.edit-card-title .rzi {
    color: var(--rz-primary);
}

.edit-media-label {
    font-size: .85rem;
    font-weight: 600;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .6rem;
}

.edit-avatar-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.edit-avatar-preview img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--rz-primary);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    background: #111;
}

.edit-header-preview {
    height: 140px;
    border-radius: 12px;
    margin-bottom: 1rem;
    background-color: var(--rz-base-200, rgba(255, 255, 255, .05));
    background-size: cover;
    background-position: center;
    border: 2px dashed var(--rz-base-400, rgba(255, 255, 255, .2));
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-header-placeholder {
    font-size: 3rem !important;
    opacity: .35;
}

.edit-switch-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.edit-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.edit-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--rz-base-400, rgba(255, 255, 255, .2));
    cursor: pointer;
    user-select: none;
    transition: background-color .15s, border-color .15s;
}

.edit-chip:hover {
    border-color: var(--rz-primary);
}

.edit-chip.active {
    border-color: var(--rz-primary);
    background-color: color-mix(in srgb, var(--rz-primary) 18%, transparent);
}

.edit-chip .rzi {
    font-size: 1.15rem;
}

/* Фон строки оставляем прозрачным: у outlined-полей подпись «врезана» в рамку и красится цветом карточки,
   на сером фоне строки вокруг подписи получались тёмные «заплатки». */
.edit-achievement {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem .75rem .6rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
}

.edit-achievement .rz-form-field {
    background: transparent;
}

.edit-achievement .rz-form-field-content,
.edit-achievement .rz-textbox,
.edit-achievement .rz-numeric,
.edit-achievement .rz-numeric input {
    background-color: transparent !important;
}

.edit-achievement .rz-form-field-label {
    background: var(--rz-card-background-color, var(--rz-base-background-color, #1b1b1b));
    padding: 0 .35rem;
}

.edit-achievement .rz-button {
    flex: none;
}

.edit-actions {
    position: sticky;
    bottom: .75rem;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--rz-base-background-color, #1b1b1b) 85%, transparent);
    backdrop-filter: blur(10px);
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .08));
    box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}

@media (max-width: 640px) {
    .edit-hero-avatar {
        width: 64px;
        height: 64px;
    }

    .edit-hero-title {
        font-size: 1.2rem;
    }

    .edit-card.rz-card {
        padding: 1rem;
    }

    .edit-achievement {
        flex-wrap: wrap;
    }

    .edit-actions > * {
        flex: 1;
    }
}


/* ===== Compare players dialog ===== */
.cmp-dialog .rz-dialog-content {
    padding: 0 !important;
    overflow: hidden !important; /* скроллится только .cmp-root, чтобы не было двойного скролла */
}

.cmp-root {
    --cmp-me: #3b82f6;
    --cmp-op: #f97316;
    --cmp-border: var(--rz-base-300, rgba(255, 255, 255, .1));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    max-height: 78vh;
    overflow-y: auto;
}

.cmp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 3rem 1rem;
    opacity: .85;
}

/* Hero */
.cmp-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--cmp-border);
    background:
        radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--cmp-me) 28%, transparent), transparent 55%),
        radial-gradient(circle at 100% 50%, color-mix(in srgb, var(--cmp-op) 28%, transparent), transparent 55%),
        var(--rz-base-background-color, rgba(255, 255, 255, .03));
}

.cmp-hero-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    text-align: center;
    min-width: 0;
    position: relative;
}

.cmp-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    border: 3px solid var(--cmp-me);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cmp-me) 25%, transparent), 0 8px 22px rgba(0, 0, 0, .4);
}

.cmp-op .cmp-avatar {
    border-color: var(--cmp-op);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--cmp-op) 25%, transparent), 0 8px 22px rgba(0, 0, 0, .4);
}

.cmp-hero-name {
    font-size: 1.15rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cmp-hero-sub {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    opacity: .8;
}

.cmp-rank {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.cmp-hero-team {
    font-size: .8rem;
    opacity: .6;
}

.cmp-tag {
    position: absolute;
    top: -.6rem;
    left: 0;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--cmp-me);
    color: #fff;
}

.cmp-vs {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmp-vs-badge {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    letter-spacing: .05em;
    color: #fff;
    background: linear-gradient(135deg, var(--cmp-me), var(--cmp-op));
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
}

/* Summary */
.cmp-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .9rem 1rem;
    border-radius: 14px;
    font-weight: 600;
    border: 1px solid var(--cmp-border);
}

.cmp-summary.cmp-sum-me { border-color: color-mix(in srgb, var(--cmp-me) 60%, transparent); }
.cmp-summary.cmp-sum-op { border-color: color-mix(in srgb, var(--cmp-op) 60%, transparent); }

.cmp-score-bar {
    flex-basis: 100%;
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--rz-base-300, rgba(255, 255, 255, .1));
}

.cmp-score-me { background: var(--cmp-me); transition: width .6s ease; }
.cmp-score-op { background: var(--cmp-op); transition: width .6s ease; }
.cmp-score-tie { background: rgba(255, 255, 255, .25); transition: width .6s ease; }

/* Sections */
.cmp-section {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--cmp-border);
    background: var(--rz-base-background-color, rgba(255, 255, 255, .02));
}

.cmp-section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--cmp-border);
}

.cmp-section-title .rzi { color: var(--cmp-me); }

/* Radar */
.cmp-radar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.cmp-radar-box {
    position: relative;
    width: 100%;
    max-width: 360px;
}

.cmp-radar { width: 100%; height: auto; display: block; }

.cmp-radar-grid { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
.cmp-radar-axis { stroke: rgba(255, 255, 255, .12); stroke-width: 1; }

.cmp-radar-poly { stroke-width: 2.5; stroke-linejoin: round; transform-origin: 160px 150px; animation: cmp-pop .7s ease both; }
.cmp-radar-me { fill: color-mix(in srgb, var(--cmp-me) 35%, transparent); stroke: var(--cmp-me); }
.cmp-radar-op { fill: color-mix(in srgb, var(--cmp-op) 30%, transparent); stroke: var(--cmp-op); }

.cmp-radar-label {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: .75rem;
    font-weight: 600;
    opacity: .85;
    pointer-events: none;
}

.cmp-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; font-size: .85rem; }
.cmp-legend-item { display: inline-flex; align-items: center; gap: .4rem; }
.cmp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.cmp-dot-me { background: var(--cmp-me); }
.cmp-dot-op { background: var(--cmp-op); }

/* Metric rows */
.cmp-row {
    display: grid;
    grid-template-columns: 1fr minmax(110px, 150px) 1fr;
    align-items: center;
    gap: .75rem;
    padding: .4rem 0;
}

.cmp-row + .cmp-row { border-top: 1px dashed var(--cmp-border); }

.cmp-label {
    text-align: center;
    font-size: .8rem;
    opacity: .75;
    line-height: 1.2;
}

.cmp-side {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
}

.cmp-left { justify-content: flex-end; }
.cmp-right { justify-content: flex-start; }

.cmp-val {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    min-width: 3.2em;
    white-space: nowrap;
}

.cmp-left .cmp-val { text-align: right; }
.cmp-right .cmp-val { text-align: left; }

.cmp-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: var(--rz-base-300, rgba(255, 255, 255, .08));
    display: flex;
    overflow: hidden;
}

.cmp-track-left { justify-content: flex-end; }
.cmp-track-right { justify-content: flex-start; }

.cmp-bar {
    height: 100%;
    border-radius: 999px;
    animation: cmp-grow .7s ease both;
}

.cmp-bar-me { background: linear-gradient(90deg, color-mix(in srgb, var(--cmp-me) 55%, transparent), var(--cmp-me)); transform-origin: right center; }
.cmp-bar-op { background: linear-gradient(90deg, var(--cmp-op), color-mix(in srgb, var(--cmp-op) 55%, transparent)); transform-origin: left center; }

.cmp-win .cmp-val { font-weight: 800; }
.cmp-left.cmp-win .cmp-val { color: var(--cmp-me); text-shadow: 0 0 12px color-mix(in srgb, var(--cmp-me) 60%, transparent); }
.cmp-right.cmp-win .cmp-val { color: var(--cmp-op); text-shadow: 0 0 12px color-mix(in srgb, var(--cmp-op) 60%, transparent); }

/* Form */
.cmp-form { display: flex; gap: .3rem; }
.cmp-form-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 800;
    color: #fff;
}
.cmp-form-w { background: #22c55e; }
.cmp-form-l { background: #ef4444; }

@keyframes cmp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cmp-pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 640px) {
    .cmp-root { padding: .75rem; }
    .cmp-avatar { width: 68px; height: 68px; }
    .cmp-hero-name { font-size: 1rem; }
    .cmp-vs-badge { width: 40px; height: 40px; font-size: .85rem; }
    .cmp-row { grid-template-columns: 1fr 1fr; gap: .35rem .75rem; }
    .cmp-label { grid-column: 1 / -1; order: -1; }
}


/* ===== Config page ===== */
.cfg-page {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.cfg-comments { margin-top: 1.25rem; }

.cfg-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 18px;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, .22), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(249, 115, 22, .16), transparent 55%),
        var(--rz-base-background-color, rgba(255, 255, 255, .03));
    box-shadow: 0 8px 28px rgba(0, 0, 0, .25);
}

.cfg-hero-main { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }

.cfg-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.01em;
    overflow-wrap: anywhere;
}

.cfg-author {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    color: inherit !important;
    text-decoration: none !important;
}

.cfg-author-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
    border: 2px solid rgba(255, 255, 255, .25);
}

.cfg-author:hover .cfg-author-avatar { border-color: #3b82f6; }

.cfg-author-name { font-weight: 700; font-size: 1.05rem; }

.cfg-pills { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }

.cfg-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .12rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}

.cfg-pill .rzi { font-size: 1rem; }

.cfg-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

.cfg-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .8rem;
}

.cfg-stat {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
    background: var(--rz-base-background-color, rgba(255, 255, 255, .03));
}

.cfg-stat > .rzi {
    font-size: 1.5rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, .14);
    border-radius: 10px;
    padding: .5rem;
}

.cfg-stat-value { font-weight: 700; font-size: 1.05rem; }
.cfg-stat-label { font-size: .75rem; opacity: .6; text-transform: uppercase; letter-spacing: .05em; }

.cfg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.1rem;
}

.cfg-card.rz-card {
    border-radius: 16px;
    padding: 1.2rem 1.4rem;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
}

.cfg-card-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: .8rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
}

.cfg-card-title .rzi { color: #3b82f6; }

.cfg-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }

.cfg-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .45rem 0;
}

.cfg-info-row + .cfg-info-row { border-top: 1px dashed var(--rz-base-300, rgba(255, 255, 255, .1)); }

.cfg-info-label { opacity: .65; font-size: .9rem; }
.cfg-info-value { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

@media (max-width: 640px) {
    .cfg-hero { padding: 1rem; }
    .cfg-actions { width: 100%; }
    .cfg-actions > * { flex: 1; }
}

/* ===== Team roster weapon ===== */
.team-weapon { display: block; height: 26px; max-width: 120px; object-fit: contain; }
.team-weapon-empty { display: none; opacity: .4; }
.team-weapon-none { opacity: .4; }


/* ===== Edit pages: icon hero, upload zones, poster preview ===== */
.edit-hero-icon {
    width: 64px;
    height: 64px;
    flex: none;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    box-shadow: 0 6px 18px rgba(59, 130, 246, .35);
}

.edit-hero-icon .rzi { font-size: 2rem; }

.edit-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    border: 2px dashed var(--rz-base-400, rgba(255, 255, 255, .2));
    transition: border-color .15s, background-color .15s;
}

.edit-upload:hover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, .06);
}

.edit-upload-icon { font-size: 2rem !important; opacity: .6; }

.edit-upload-done {
    border-style: solid;
    border-color: rgba(34, 197, 94, .55);
    background-color: rgba(34, 197, 94, .08);
    font-weight: 600;
}

.edit-upload-done .edit-upload-icon { color: #22c55e; opacity: 1; }

.edit-poster-preview {
    height: 180px;
    border-radius: 12px;
    margin-bottom: 1rem;
    background-color: var(--rz-base-200, rgba(255, 255, 255, .05));
    background-size: cover;
    background-position: center;
    border: 1px solid var(--rz-base-300, rgba(255, 255, 255, .1));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== Wall video ===== */
.wall-video {
    display: block;
    margin: .5rem auto 0;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(620px, 78vh);
    border-radius: 12px;
}

/* Диалог "Найти игрока": список совпадений */
.find-player-list { display: flex; flex-direction: column; gap: .4rem; max-height: 60vh; overflow-y: auto; padding-right: .25rem; }
.find-player-row { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; width: 100%; min-height: 52px; padding: .5rem .75rem; border: 0; border-radius: 8px; background: var(--rz-base-800, rgba(255,255,255,.06)); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.find-player-row:hover, .find-player-row:focus-visible { background: var(--rz-base-700, rgba(255,255,255,.12)); outline: none; }
.find-player-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.find-player-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.find-player-steam { font-size: .8rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ===================================================================
   Player profile (pf-*)
   =================================================================== */
.vip-frame-gold { box-shadow: 0 0 0 3px #d4af37, 0 0 12px rgba(212, 175, 55, .55); border-radius: 50%; }
.vip-frame-neon { box-shadow: 0 0 0 3px #39ff14, 0 0 14px rgba(57, 255, 20, .5); border-radius: 50%; }
.vip-frame-ice  { box-shadow: 0 0 0 3px #7ec8ff, 0 0 14px rgba(126, 200, 255, .5); border-radius: 50%; }

.pf-root {
    --cmp-me: #3b82f6;
    --cmp-op: #f97316;
    --cmp-border: var(--rz-base-300, rgba(255, 255, 255, .1));
    --pf-accent: #3b82f6;
    --pf-glass: rgba(255, 255, 255, .04);
    --pf-border: var(--rz-base-300, rgba(255, 255, 255, .1));
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.pf-root a { text-decoration: none; }

.pf-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: 0 .25rem;
    opacity: .8;
}

/* ---------- Hero ---------- */
.pf-hero {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--pf-border);
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, .35), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, .30), transparent 55%),
        var(--rz-base-background-color, #151922);
    padding: 1.5rem 1.5rem 0;
    animation: pf-rise .45s ease both;
}

.pf-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.05);
}

.pf-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 10, 16, .35) 0%, rgba(8, 10, 16, .82) 100%);
}

.pf-hero:not(.pf-hero-img) .pf-hero-overlay { background: linear-gradient(180deg, rgba(8, 10, 16, .1), rgba(8, 10, 16, .55)); }

.pf-hero > * { position: relative; }
.pf-hero > .pf-hero-bg, .pf-hero > .pf-hero-overlay { position: absolute; }

.pf-hero-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.pf-avatar {
    position: relative;
    flex: none;
    width: 134px;
    height: 134px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, .25), 0 10px 28px rgba(0, 0, 0, .5);
}

.pf-avatar > img, .pf-avatar > span:first-child { display: block; border-radius: 50%; background: #12161f; object-fit: cover; }

.pf-avatar-rank {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(12, 14, 20, .9);
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}

.pf-hero-info { display: flex; flex-direction: column; gap: .6rem; min-width: 0; flex: 1 1 280px; }

.pf-badges { display: flex; flex-wrap: wrap; gap: .4rem; }

.pf-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .12);
}

.pf-badge-role { background: linear-gradient(135deg, #ef4444, #f97316); border-color: transparent; color: #fff; }
.pf-badge-vip { background: linear-gradient(135deg, #f5d36a, #d4a017); border-color: transparent; color: #241a00; }

.pf-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; display: inline-block; }
.pf-status-online .pf-status-dot { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.pf-status-playing .pf-status-dot { background: #eab308; box-shadow: 0 0 8px #eab308; }
.pf-status-search .pf-status-dot { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.pf-status-offline .pf-status-dot { background: #ef4444; }

.pf-hero-name {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    line-height: 1.15;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
    word-break: break-word;
}

.pf-hero-team { color: inherit; opacity: .9; margin-right: .1em; }
.pf-hero-team:hover { text-decoration: underline; }

.pf-socials { display: flex; flex-wrap: wrap; gap: .5rem; }

.pf-social {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: inherit;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    transition: background-color .15s, transform .15s;
}

.pf-social:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.pf-social .rzi { font-size: 1.05rem; }

.pf-hero-actions { margin-top: 1.1rem; }

.pf-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }


/* Strip */
.pf-strip {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1px;
    margin: 1.4rem -1.5rem 0;
    background: rgba(255, 255, 255, .08);
    border-top: 1px solid rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
}

.pf-strip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .15rem;
    padding: .85rem .5rem;
    background: rgba(10, 12, 18, .55);
    animation: pf-rise .5s ease both;
}

.pf-strip-item:nth-child(2) { animation-delay: .05s; }
.pf-strip-item:nth-child(3) { animation-delay: .1s; }
.pf-strip-item:nth-child(4) { animation-delay: .15s; }
.pf-strip-item:nth-child(5) { animation-delay: .2s; }
.pf-strip-item:nth-child(6) { animation-delay: .25s; }

.pf-strip-val { font-size: 1.35rem; font-weight: 800; line-height: 1.1; }
.pf-strip-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }

/* ---------- Moderation ---------- */
.pf-admin { border-radius: 16px; border: 1px solid var(--pf-border); background: var(--pf-glass); overflow: hidden; }

.pf-admin-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pf-admin-toggle span { flex: 1; text-align: left; }
.pf-admin-toggle:hover { background: rgba(255, 255, 255, .05); }
.pf-admin-body { display: flex; flex-direction: column; gap: .75rem; padding: .75rem 1rem 1rem; }

/* ---------- Tabs ---------- */
.pf-tabs {
    display: flex;
    gap: .4rem;
    padding: .35rem;
    border-radius: 999px;
    border: 1px solid var(--pf-border);
    background: var(--pf-glass);
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
}

.pf-tabs::-webkit-scrollbar { display: none; }

.pf-tab {
    flex: 1 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .55rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    opacity: .75;
    cursor: pointer;
    transition: background-color .15s, opacity .15s;
}

.pf-tab:hover { opacity: 1; background: rgba(255, 255, 255, .06); }

.pf-tab.is-active {
    opacity: 1;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, .35);
}

.pf-tab .rzi { font-size: 1.15rem; }

.pf-tab-content { display: flex; flex-direction: column; gap: 1rem; animation: pf-rise .35s ease both; }

/* ---------- Sections / cards ---------- */
.pf-section {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--pf-border);
    background: var(--pf-glass);
    min-width: 0;
}

.pf-section-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    margin-bottom: .85rem;
    padding-bottom: .55rem;
    border-bottom: 1px solid var(--pf-border);
}

.pf-section-title .rzi { color: var(--pf-accent); }
.pf-title-chip { margin-left: auto; }

.pf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pf-two > * { min-width: 0; }

.pf-empty { opacity: .65; padding: .5rem 0; }

.pf-chip {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .1);
}

.pf-chip-w { color: #4ade80; background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .35); }
.pf-chip-l { color: #f87171; background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .35); }

/* ---------- Stat tiles ---------- */
.pf-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.pf-tiles-3 { grid-template-columns: repeat(3, 1fr); }
.pf-tiles-2 { grid-template-columns: repeat(2, 1fr); }

.pf-tile {
    --tile: #3b82f6;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .8rem .9rem;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--tile) 28%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--tile) 14%, transparent), transparent 70%);
    transition: transform .15s, border-color .15s;
    min-width: 0;
}

.pf-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tile) 55%, transparent); }

.pf-accent-blue { --tile: #3b82f6; }
.pf-accent-green { --tile: #22c55e; }
.pf-accent-orange { --tile: #f97316; }
.pf-accent-red { --tile: #ef4444; }
.pf-accent-violet { --tile: #8b5cf6; }
.pf-accent-cyan { --tile: #06b6d4; }

.pf-tile-icon {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tile);
    background: color-mix(in srgb, var(--tile) 18%, transparent);
}

.pf-tile-icon .rzi { font-size: 1.6rem; }

.pf-tile-body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.pf-tile-label { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.pf-tile-value { font-size: 1.35rem; font-weight: 800; line-height: 1.15; word-break: break-word; }
.pf-tile-hint { font-size: .78rem; opacity: .6; }

.pf-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: .35rem; }

.pf-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tile, #3b82f6), color-mix(in srgb, var(--tile, #3b82f6) 55%, #fff));
    transform-origin: left;
    animation: cmp-grow .7s ease both;
}

/* ---------- Form ---------- */
.pf-form { display: flex; flex-wrap: wrap; gap: .5rem; }

.pf-form-dot {
    width: 36px;
    height: 36px;
    font-size: .85rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff !important;
    transition: transform .15s;
}

.pf-form-dot:hover { transform: scale(1.1); }
.pf-form-w { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: 0 4px 12px rgba(34, 197, 94, .35); }
.pf-form-l { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 4px 12px rgba(239, 68, 68, .35); }

.pf-form-meta { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Favorites / weapons ---------- */
.pf-fav { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.pf-fav-card {
    min-height: 130px;
    border-radius: 14px;
    border: 1px solid var(--pf-border);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    background-color: rgba(255, 255, 255, .04);
}

.pf-fav-shade {
    height: 100%;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: .25rem;
    padding: .8rem .9rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .75));
}

.pf-fav-weapon .pf-fav-shade { align-items: flex-start; justify-content: space-between; }
.pf-fav-label { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.pf-fav-value { font-size: 1.2rem; font-weight: 800; word-break: break-word; }
.pf-weapon-img { height: 44px; max-width: 100%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }

.pf-weapons { display: flex; flex-direction: column; gap: .7rem; }
.pf-weapon-row { display: flex; align-items: center; gap: .75rem; }
.pf-weapon-icon { flex: none; width: 56px; height: 28px; object-fit: contain; opacity: .9; }
.pf-weapon-main { flex: 1; min-width: 0; }
.pf-weapon-head { display: flex; justify-content: space-between; font-size: .9rem; text-transform: uppercase; }
.pf-weapon-main .pf-track { margin-top: .25rem; }

/* ---------- Maps ---------- */
.pf-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }

.pf-map-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pf-border);
    background-size: cover;
    background-position: center;
    transition: transform .15s;
}

.pf-map-card:hover { transform: translateY(-2px); }

.pf-map-shade {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem .9rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, .78), rgba(0, 0, 0, .45));
    backdrop-filter: blur(2px);
}

.pf-ring {
    --ring: #22c55e;
    --p: 0;
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 800;
    background:
        radial-gradient(closest-side, rgba(12, 14, 20, .92) 78%, transparent 80%),
        conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(255, 255, 255, .15) 0);
}

.pf-ring-good { --ring: #22c55e; }
.pf-ring-mid { --ring: #eab308; }
.pf-ring-bad { --ring: #ef4444; }

.pf-map-info { display: flex; flex-direction: column; min-width: 0; }
.pf-map-name { font-weight: 700; word-break: break-word; }
.pf-map-games { font-size: .8rem; opacity: .7; }

/* ---------- Matches ---------- */
.pf-match-summary { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .85rem; }
.pf-match-list { display: flex; flex-direction: column; gap: .5rem; }

.pf-match {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pf-border);
    border-left: 5px solid #9ca3af;
    background-size: cover;
    background-position: center;
    color: inherit;
    transition: transform .15s;
}

.pf-match:hover { transform: translateX(3px); }
.pf-match-win { border-left-color: #22c55e; }
.pf-match-loss { border-left-color: #ef4444; }

.pf-match-shade {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    align-items: center;
    gap: 1rem;
    padding: .8rem 1rem;
    background: linear-gradient(90deg, rgba(0, 0, 0, .82), rgba(0, 0, 0, .55));
}

.pf-match-left, .pf-match-mid { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.pf-match-result { font-weight: 800; }
.pf-match-win .pf-match-result { color: #4ade80; }
.pf-match-loss .pf-match-result { color: #f87171; }
.pf-match-date, .pf-match-map { font-size: .8rem; opacity: .7; }
.pf-match-score { font-weight: 700; word-break: break-word; }

.pf-match-stats { display: flex; align-items: center; gap: 1rem; }
.pf-match-stat { display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 36px; }
.pf-match-stat b { font-size: 1.1rem; }
.pf-match-stat i { font-style: normal; font-size: .65rem; text-transform: uppercase; opacity: .6; }
.pf-match-best { color: #fbbf24; display: inline-flex; }

/* ---------- Achievements ---------- */
.pf-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; align-items: start; }

.pf-ach {
    border-radius: 14px;
    border: 1px solid var(--pf-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 70%);
    overflow: hidden;
}

.pf-ach-place-1 { border-color: color-mix(in srgb, gold 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, gold 16%, transparent), transparent 70%); }
.pf-ach-place-2 { border-color: color-mix(in srgb, silver 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, silver 14%, transparent), transparent 70%); }
.pf-ach-place-3 { border-color: color-mix(in srgb, #c87533 50%, transparent); background: linear-gradient(135deg, color-mix(in srgb, #c87533 16%, transparent), transparent 70%); }

.pf-ach-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .8rem .9rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pf-ach-static { cursor: default; }
.pf-ach-trophy { font-size: 40px !important; flex: none; }
.pf-ach-meta { display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; }
.pf-ach-title { font-weight: 700; }
.pf-ach .achievement-group__dates { padding: 0 .9rem .8rem; }

/* ---------- Animations / responsive ---------- */
@keyframes pf-rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

@media (max-width: 900px) {
    .pf-two { grid-template-columns: 1fr; }
    .pf-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .pf-hero { padding: 1rem 1rem 0; }
    .pf-hero-main { flex-direction: column; text-align: center; }
    .pf-hero-info { align-items: center; flex-basis: auto; }
    .pf-badges, .pf-socials { justify-content: center; }
    .pf-hero-actions { display: flex; justify-content: center; }
    .pf-actions { justify-content: center; }
    .pf-strip { margin: 1rem -1rem 0; }
    .pf-strip-val { font-size: 1.1rem; }
    .pf-tiles-3, .pf-tiles-2, .pf-fav { grid-template-columns: 1fr; }
    .pf-match-shade { grid-template-columns: 1fr; gap: .5rem; }
    .pf-match-stats { justify-content: flex-start; }
    .pf-tab { padding: .5rem .8rem; }
}


/* ---------- Profile: form row, empty state, friends ---------- */
.pf-form-row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.pf-timeline-wrap { flex: 1 1 240px; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.pf-timeline { display: flex; gap: 3px; }
.pf-seg { flex: 1; height: 12px; border-radius: 4px; min-width: 4px; }
.pf-seg-w { background: #22c55e; }
.pf-seg-l { background: #ef4444; }
.pf-timeline-caption { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }
.pf-form-meta { display: flex; flex-wrap: wrap; gap: .5rem; }

.pf-section-center { display: flex; flex-direction: column; }
.pf-section-center .cmp-radar-wrap { flex: 1; justify-content: center; }

.pf-subtitle {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1rem 0 .7rem;
    padding-top: .8rem;
    border-top: 1px solid var(--pf-border);
    font-weight: 700;
}

.pf-subtitle .rzi { color: var(--pf-accent); }

.pf-empty-state { display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; padding: 1.75rem 1rem; }
.pf-empty-state .rzi { font-size: 2.6rem; color: var(--pf-accent); opacity: .8; }
.pf-empty-title { font-size: 1.1rem; font-weight: 700; }
.pf-empty-sub { opacity: .65; }

.pf-friends { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }

.pf-friend {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .7rem;
    border-radius: 14px;
    border: 1px solid var(--pf-border);
    background: rgba(255, 255, 255, .03);
    color: inherit;
    transition: transform .15s, border-color .15s;
}

.pf-friend:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pf-accent) 55%, transparent); }
.pf-friend .ktv-avatar { flex: none; }
.pf-friend-info { display: flex; flex-direction: column; min-width: 0; }
.pf-friend-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-friend-mmr { font-size: .78rem; opacity: .65; }

/* ---------- Team profile ---------- */
.pf-badge .rzi { font-size: 1rem; }

.pf-hero-sub { display: flex; align-items: center; gap: .4rem; font-size: .95rem; opacity: .9; }
.pf-hero-sub .rzi { color: #fbbf24; font-size: 1.15rem; }
.pf-hero-sub a { color: inherit; font-weight: 700; }
.pf-hero-sub a:hover { text-decoration: underline; }

.pf-match-shade-2 { grid-template-columns: 1fr 1.4fr; }

.pf-description { max-height: 30vh; overflow: auto; line-height: 1.55; word-break: break-word; }

.pf-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .75rem; }

.pf-player {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: .85rem .95rem;
    border-radius: 14px;
    border: 1px solid var(--pf-border);
    background: linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 70%);
    transition: transform .15s, border-color .15s;
}

.pf-player:hover { transform: translateY(-2px); }
.pf-player-captain { border-color: color-mix(in srgb, #fbbf24 50%, transparent); background: linear-gradient(135deg, color-mix(in srgb, #fbbf24 12%, transparent), transparent 70%); }

.pf-player-head { display: flex; align-items: center; gap: .8rem; }
.pf-player-avatar { position: relative; flex: none; width: 56px; height: 56px; }
.pf-player-avatar .ktv-avatar { background: #12161f; }

.pf-player-rank {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(12, 14, 20, .9);
    padding: 2px;
}

.pf-player-id { display: flex; flex-direction: column; gap: .25rem; min-width: 0; flex: 1; }
.pf-player-name { font-weight: 800; font-size: 1.05rem; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-player-name:hover { text-decoration: underline; }
.pf-player-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .75rem; opacity: .85; }
.pf-player-weapon { flex: none; }

.pf-player-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .4rem;
    padding: .55rem .4rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, .04);
}

.pf-player-stats span { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
.pf-player-stats b { font-size: 1.05rem; }
.pf-player-stats i { font-style: normal; font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; opacity: .6; }

.pf-player-actions { display: flex; flex-wrap: wrap; gap: .4rem; }

@media (max-width: 640px) {
    .pf-roster { grid-template-columns: 1fr; }
    .pf-match-shade-2 { grid-template-columns: 1fr; }
}

/* Team roster: одинаковая разметка у всех карточек */

.pf-player-cap { display: inline-flex; flex: none; color: #fbbf24; }
.pf-player-cap .rzi { font-size: 1.15rem; }
.pf-player-stats { margin-top: auto; }
.pf-player-sub { min-height: 1.1rem; }
.pf-player-namerow { display: flex; align-items: center; gap: .35rem; min-width: 0; }

/* ===================================================================
   Match page (mt-*)
   =================================================================== */
.pf-root { --mt-a: #f43f5e; --mt-b: #3b82f6; }

.mt-a { color: var(--mt-a); }
.mt-b { color: var(--mt-b); }

/* Hero */
.mt-hero { padding-bottom: 0; }
.mt-hero .pf-hero-bg { filter: saturate(1.05) blur(1px); transform: scale(1.04); }
.mt-hero-badges { justify-content: center; margin-bottom: .75rem; }

.mt-live { background: rgba(239, 68, 68, .9); border-color: transparent; color: #fff; letter-spacing: .12em; }
.mt-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: mt-pulse 1.2s ease-in-out infinite; }
@keyframes mt-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.mt-versus {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: .5rem 0 0;
}

.mt-team { display: flex; flex-direction: column; align-items: center; gap: .45rem; min-width: 0; text-align: center; transition: opacity .2s; }
.mt-team.is-lose { opacity: .72; }

.mt-team-logo {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--mt-a), #fb923c);
    box-shadow: 0 0 0 4px rgba(244, 63, 94, .22), 0 10px 28px rgba(0, 0, 0, .5);
}

.mt-team-b .mt-team-logo { background: linear-gradient(135deg, var(--mt-b), #8b5cf6); box-shadow: 0 0 0 4px rgba(59, 130, 246, .22), 0 10px 28px rgba(0, 0, 0, .5); }
.mt-team.is-win .mt-team-logo { box-shadow: 0 0 0 4px rgba(34, 197, 94, .35), 0 0 28px rgba(34, 197, 94, .35); }
.mt-team-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #12161f; display: block; }

.mt-crown {
    position: absolute;
    right: -8px;
    top: -8px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5d36a, #d4a017);
    color: #241a00;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.mt-team-name { font-size: clamp(1.05rem, 2.4vw, 1.5rem); font-weight: 800; color: inherit; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); word-break: break-word; }
a.mt-team-name:hover { text-decoration: underline; }
.mt-team-mmr { font-size: .8rem; opacity: .75; }

.mt-score { display: flex; align-items: center; gap: .6rem; font-weight: 900; line-height: 1; text-shadow: 0 4px 18px rgba(0, 0, 0, .7); }
.mt-score-num { font-size: clamp(2.6rem, 7vw, 4.6rem); min-width: 1.1ch; text-align: center; }
.mt-score-sep { font-size: clamp(1.6rem, 4vw, 2.6rem); opacity: .5; }
.mt-score-num.is-win { color: #4ade80; }
.mt-score-num.is-lose { color: #f87171; }

.mt-hero-actions { display: flex; justify-content: center; margin-top: 1.1rem; }

/* MVP */
.mt-mvp {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding: 1.1rem 1.4rem;
    border-radius: 18px;
    border: 1px solid color-mix(in srgb, #fbbf24 45%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, #fbbf24 14%, transparent), var(--pf-glass) 70%);
}

.mt-mvp-glow { position: absolute; inset: auto -40px -60px auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(251, 191, 36, .28), transparent 65%); pointer-events: none; }
.mt-mvp-avatar { position: relative; flex: none; width: 88px; height: 88px; border-radius: 50%; box-shadow: 0 0 0 3px #fbbf24, 0 0 22px rgba(251, 191, 36, .5); }
.mt-mvp-avatar .ktv-avatar, .mt-mvp-avatar img { background: #12161f; }
.mt-mvp-crown { position: absolute; right: -8px; top: -8px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f5d36a, #d4a017); color: #241a00; }
.mt-mvp-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 180px; }
.mt-mvp-label { font-size: .75rem; font-weight: 800; letter-spacing: .2em; color: #fbbf24; }
.mt-mvp-name { font-size: 1.6rem; font-weight: 800; color: inherit; word-break: break-word; }
a.mt-mvp-name:hover { text-decoration: underline; }
.mt-mvp-team { font-size: .85rem; opacity: .7; }
.mt-mvp-stats { display: flex; flex-wrap: wrap; gap: .5rem; }
.mt-mvp-stats span { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: .5rem .7rem; border-radius: 12px; background: rgba(255, 255, 255, .06); line-height: 1.15; }
.mt-mvp-stats b { font-size: 1.15rem; }
.mt-mvp-stats i { font-style: normal; font-size: .65rem; letter-spacing: .06em; text-transform: uppercase; opacity: .65; }

/* Team comparison bars */
.mt-vs-head { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: .6rem; gap: 1rem; }
.mt-vs { display: flex; flex-direction: column; gap: .7rem; }
.mt-vs-row { display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: .8rem; }
.mt-vs-val { font-weight: 700; opacity: .75; font-variant-numeric: tabular-nums; }
.mt-vs-val.mt-b { text-align: right; }
.mt-vs-val.is-lead { opacity: 1; font-size: 1.08rem; }
.mt-vs-mid { display: flex; flex-direction: column; gap: .25rem; }
.mt-vs-label { text-align: center; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.mt-vs-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .06); gap: 2px; }
.mt-vs-fill-a, .mt-vs-fill-b { height: 100%; opacity: .45; transition: width .6s ease; }
.mt-vs-fill-a { background: var(--mt-a); border-radius: 999px 0 0 999px; }
.mt-vs-fill-b { background: var(--mt-b); border-radius: 0 999px 999px 0; }
.mt-vs-fill-a.is-lead, .mt-vs-fill-b.is-lead { opacity: 1; }

/* Rosters */
.mt-rosters { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.mt-roster { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.mt-roster-title { font-weight: 800; padding-left: .6rem; border-left: 4px solid var(--mt-a); }
.mt-roster-b .mt-roster-title { border-left-color: var(--mt-b); }
.mt-roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }

/* Multikills + clips */
.mt-multi { display: flex; flex-wrap: wrap; gap: .5rem; }
.mt-multi-item { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--pf-border); background: var(--pf-glass); color: inherit; }
.mt-multi-item.mt-a { border-color: color-mix(in srgb, var(--mt-a) 45%, transparent); color: inherit; }
.mt-multi-item.mt-b { border-color: color-mix(in srgb, var(--mt-b) 45%, transparent); color: inherit; }
.mt-multi-name { font-weight: 700; }
.mt-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: .8rem; }
.mt-clip { display: flex; flex-direction: column; gap: .4rem; padding: .5rem; border-radius: 14px; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.mt-clip video { width: 100%; height: auto; max-height: 70vh; border-radius: 8px; background: #000; }
.mt-clip-label { font-size: .85rem; opacity: .8; padding: 0 .25rem .2rem; }

/* Scoreboard */
.mt-boards { display: flex; flex-direction: column; gap: 1rem; }
.mt-board { border-radius: 16px; border: 1px solid var(--pf-border); background: var(--pf-glass); overflow: hidden; border-top: 3px solid var(--mt-a); }
.mt-board-b { border-top-color: var(--mt-b); }
.mt-board.is-win { box-shadow: 0 0 0 1px rgba(34, 197, 94, .25); }
.mt-board-head { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; background: rgba(255, 255, 255, .03); }
.mt-board-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #12161f; }
.mt-board-name { font-weight: 800; font-size: 1.1rem; color: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mt-board-name:hover { text-decoration: underline; }
.mt-board-score { margin-left: auto; font-size: 1.6rem; font-weight: 900; }

.mt-table { display: flex; flex-direction: column; overflow-x: auto; }
.mt-tr { display: grid; grid-template-columns: minmax(200px, 2.4fr) repeat(12, minmax(46px, 1fr)); align-items: center; gap: .15rem; padding: .45rem 1rem; }
.mt-th { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; opacity: .6; border-bottom: 1px solid var(--pf-border); }
.mt-th .mt-c { text-align: center; }
.mt-row { border-bottom: 1px solid rgba(255, 255, 255, .05); cursor: default; transition: background-color .15s; }
.mt-row:last-child { border-bottom: 0; }
.mt-row:hover { background: rgba(255, 255, 255, .04); }
.mt-row.is-mvp { background: linear-gradient(90deg, color-mix(in srgb, #fbbf24 12%, transparent), transparent 55%); }
.mt-c { text-align: center; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.mt-c-player { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.mt-rank { width: 26px; height: 26px; object-fit: contain; flex: none; }
.mt-nick { font-weight: 700; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-nick:hover { text-decoration: underline; }
.mt-mvp-mark { color: #fbbf24; display: inline-flex; }
.mt-c.is-top { color: #fbbf24; font-weight: 800; }
.mt-pos { color: #4ade80; }
.mt-neg { color: #f87171; }
.mt-mini { display: block; width: 100%; max-width: 54px; height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.mt-mini > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.mt-board-a .mt-mini > span { background: linear-gradient(90deg, #f43f5e, #fb923c); }
.mt-more { display: none; }

/* Events (rounds + log) */
.mt-events { display: flex; flex-direction: column; gap: 2px; }
.mt-log-scroll { max-height: 62vh; overflow: auto; padding-right: .3rem; }
.mt-ev { display: flex; align-items: center; gap: .75rem; padding: .35rem .6rem; border-radius: 8px; min-height: 36px; }
.mt-ev:hover { background: rgba(255, 255, 255, .04); }
.mt-ev-time { flex: none; min-width: 66px; font-size: .78rem; color: #ffb624; font-variant-numeric: tabular-nums; }
.mt-ev-body { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; min-width: 0; font-weight: 600; }
.mt-ev-icon { font-size: 1.15rem !important; opacity: .75; }
.mt-ev-warn { color: #ffb624; }
.mt-ev-round { color: #0dde9c; }
.mt-ev-text { font-weight: 400; opacity: .9; word-break: break-word; }
.mt-ev-multi { font-weight: 800; }
.mt-ev-multi-3 { color: #ffbf00; }
.mt-ev-multi-4 { color: #ff3a95; }
.mt-ev-multi-5 { color: #ff0018; }
.mt-ev-roundend, .mt-ev-matchend { background: rgba(255, 255, 255, .04); }
.mt-weapon-ico { height: 22px; width: auto; padding: 0 4px; background: transparent; vertical-align: middle; }
.mt-weapon-ico.mt-hs { padding: 0 2px; height: 20px; }
.mt-weapon-lg { height: 34px; min-width: 76px; object-fit: contain; }

/* Rounds */
.mt-flow-legend { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 700; margin-bottom: .3rem; }
.mt-flow { width: 100%; height: 150px; border-radius: 12px; background: rgba(255, 255, 255, .03); display: block; }
.mt-flow-zero { stroke: rgba(255, 255, 255, .2); stroke-width: 1; stroke-dasharray: 4 4; }
.mt-flow-line { fill: none; stroke: #8b5cf6; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }

.mt-rounds { display: flex; flex-wrap: wrap; gap: .4rem; }
.mt-rnd {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    width: 42px;
    padding: .3rem 0 .25rem;
    border-radius: 10px;
    border: 1px solid transparent;
    color: #fff;
    cursor: pointer;
    font: inherit;
    transition: transform .12s, box-shadow .12s;
}
.mt-rnd:hover { transform: translateY(-2px); }
.mt-rnd-a { background: color-mix(in srgb, var(--mt-a) 55%, #111); }
.mt-rnd-b { background: color-mix(in srgb, var(--mt-b) 55%, #111); }
.mt-rnd-n { background: rgba(255, 255, 255, .12); }
.mt-rnd.is-selected { border-color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .22); }
.mt-rnd-num { font-weight: 800; font-size: .85rem; }
.mt-rnd-ico { font-size: 1rem !important; opacity: .85; }
.mt-rounds-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; font-size: .78rem; opacity: .75; align-items: center; }
.mt-rounds-legend .rzi { font-size: 1rem; vertical-align: middle; }
.mt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; }
.mt-dot-a { background: var(--mt-a); }
.mt-dot-b { background: var(--mt-b); }

.mt-round-detail { margin-top: 1rem; padding: .85rem; border-radius: 14px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .02); }
.mt-round-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.mt-round-time { margin-left: auto; font-size: .78rem; opacity: .6; }
.mt-chip-a { color: var(--mt-a); border-color: color-mix(in srgb, var(--mt-a) 50%, transparent); }
.mt-chip-b { color: var(--mt-b); border-color: color-mix(in srgb, var(--mt-b) 50%, transparent); }

.mt-weapons { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.mt-weapon { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.mt-weapon-body { flex: 1; min-width: 0; }
.mt-weapon-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.mt-weapon-top span { opacity: .7; }
.mt-weapon-top i { font-style: normal; }

/* Log filters */
.mt-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.mt-filter { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--pf-border); background: var(--pf-glass); color: inherit; font: inherit; font-size: .82rem; cursor: pointer; opacity: .8; transition: all .15s; }
.mt-filter:hover { opacity: 1; }
.mt-filter em { font-style: normal; font-size: .72rem; opacity: .6; }
.mt-filter.is-active { opacity: 1; background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-color: transparent; color: #fff; }
.mt-filter .rzi { font-size: 1rem; }

/* H2H */
.mt-h2h-score { display: flex; align-items: center; justify-content: center; gap: 1rem; font-weight: 800; flex-wrap: wrap; }
.mt-h2h-team { font-size: 1.05rem; }
.mt-h2h-num { font-size: 2rem; opacity: .7; }
.mt-h2h-num.is-lead { opacity: 1; color: #4ade80; }
.mt-h2h-sep { font-size: 1.5rem; opacity: .4; }
.mt-h2h-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .9rem; }
.mt-h2h-game { display: grid; grid-template-columns: 100px 1fr auto; gap: .8rem; align-items: center; padding: .5rem .8rem; border-radius: 10px; color: inherit; border: 1px solid var(--pf-border); border-left: 4px solid var(--mt-a); background: var(--pf-glass); transition: transform .12s; }
.mt-h2h-game.is-b { border-left-color: var(--mt-b); }
.mt-h2h-game:hover { transform: translateX(3px); }
.mt-h2h-date, .mt-h2h-map { font-size: .8rem; opacity: .7; }
.mt-h2h-result { font-weight: 700; }
.mt-h2h-actions { margin-top: .9rem; display: flex; justify-content: center; }

/* Comments */
.mt-comments { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.mt-comment { display: flex; gap: .75rem; padding: .7rem .85rem; border-radius: 12px; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.mt-comment-ava { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; text-decoration: none; }
.mt-comment-body { min-width: 0; flex: 1; }
.mt-comment-head { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; }
.mt-comment-author { font-weight: 800; color: inherit; text-decoration: none; }
.mt-comment-author:hover { text-decoration: underline; }
.mt-comment-head span { font-size: .75rem; opacity: .55; }
.mt-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .15rem; }
.mt-comment-form { display: flex; flex-direction: column; gap: .6rem; margin-top: .5rem; }

/* Responsive */
@media (max-width: 900px) {
    .mt-rosters { grid-template-columns: 1fr; }
    .mt-versus { grid-template-columns: 1fr; gap: .6rem; }
    .mt-score { order: 0; justify-self: center; }
    .mt-team-a { order: -1; }
    .mt-team-logo { width: 84px; height: 84px; }

    .mt-tr { grid-template-columns: minmax(0, 1fr) repeat(3, 52px); padding: .45rem .6rem; }
    .mt-sec { display: none !important; }
    .mt-row { cursor: pointer; }
    .mt-row.is-open { background: rgba(255, 255, 255, .05); }
    .mt-more { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .3rem .6rem .7rem; }
    .mt-more span { display: flex; flex-direction: column; align-items: center; padding: .35rem; border-radius: 8px; background: rgba(255, 255, 255, .05); line-height: 1.2; }
    .mt-more b { font-size: .95rem; }
    .mt-more i { font-style: normal; font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; opacity: .6; }
    .mt-vs-row { grid-template-columns: 56px 1fr 56px; }
    .mt-h2h-game { grid-template-columns: 1fr; gap: .15rem; }
    .mt-ev { align-items: flex-start; }
}


/* ===================================================================
   List pages (ls-*): Матчи, Мои матчи, Игроки, Банлист, Сезон, Ищу команду, Друзья
   =================================================================== */
.ls-hero { --ls-a: #3b82f6; --ls-b: #8b5cf6; padding-bottom: 0;
    background:
        radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--ls-a) 38%, transparent), transparent 55%),
        radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--ls-b) 32%, transparent), transparent 55%),
        var(--rz-base-background-color, #151922);
}
.ls-hero-main { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ls-hero-icon {
    width: 60px; height: 60px; flex: none; border-radius: 18px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: linear-gradient(135deg, var(--ls-a), var(--ls-b));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--ls-a) 45%, transparent);
}
.ls-hero-icon .rzi { font-size: 2rem; }
.ls-hero-text { flex: 1 1 240px; min-width: 0; }
.ls-title { margin: 0; font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.15; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.ls-sub { opacity: .75; margin-top: .25rem; }
.ls-hero-actions { margin-left: auto; }
.ls-hero-pad { height: 1.4rem; }
.pf-strip.ls-strip { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ls-hero .pf-strip-val.ls-good { color: #4ade80; }
.ls-hero .pf-strip-val.ls-bad { color: #f87171; }
.ls-hero .pf-strip-val.ls-live-val { color: #ff5c5c; }

/* ---------- Toolbar, chips ---------- */
.ls-bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .9rem;
    padding: .6rem; border-radius: 16px; border: 1px solid var(--pf-border); background: var(--pf-glass);
}
.ls-search { position: relative; display: flex; align-items: center; flex: 0 1 300px; min-width: 190px; margin: 0; }
.ls-search .rzi { position: absolute; left: .65rem; opacity: .6; font-size: 1.2rem; pointer-events: none; }
.ls-search input {
    width: 100%; padding: .5rem .8rem .5rem 2.2rem; border-radius: 12px;
    border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; outline: none;
    transition: border-color .15s, background-color .15s;
}
.ls-search input:focus { border-color: var(--pf-accent); background: rgba(255, 255, 255, .09); }
.ls-chips { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1 1 auto; min-width: 0; }
.pf-title-chip.ls-chips { flex: 0 1 auto; justify-content: flex-end; }
.ls-bar-actions { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
.ls-chip {
    display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
    padding: .32rem .8rem; border-radius: 999px; font: inherit; font-size: .84rem; font-weight: 700; color: inherit;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    transition: background-color .15s, border-color .15s, transform .15s;
}
.ls-chip:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.ls-chip .rzi { font-size: 1.05rem; }
.ls-chip.is-active { background: color-mix(in srgb, var(--pf-accent) 28%, transparent); border-color: color-mix(in srgb, var(--pf-accent) 70%, transparent); }
.ls-chip-n { font-size: .72rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; }
.ls-chip-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- Match rows ---------- */
.ls-list { display: flex; flex-direction: column; gap: .5rem; }
.ls-day { display: flex; align-items: center; gap: .6rem; margin: .6rem .25rem .1rem; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.ls-day::after { content: ""; flex: 1; height: 1px; background: var(--pf-border); }
.ls-day.is-live { color: #ff5c5c; opacity: 1; }

a.ls-match {
    display: grid; grid-template-columns: 104px minmax(0, 1fr) auto minmax(0, 1fr) 170px; align-items: center; gap: .9rem;
    padding: .7rem 1rem; border-radius: 14px; color: #fff; text-decoration: none;
    border: 1px solid var(--pf-border); border-left: 4px solid rgba(255, 255, 255, .14);
    background:
        linear-gradient(90deg, rgba(10, 12, 18, .94) 0%, rgba(10, 12, 18, .6) 50%, rgba(10, 12, 18, .94) 100%),
        var(--map, none) center / cover no-repeat #12161f;
    transition: transform .15s, border-color .15s, box-shadow .15s;
    animation: pf-rise .35s ease both;
}
a.ls-match:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
a.ls-match.ls-win { border-left-color: #22c55e; }
a.ls-match.ls-loss { border-left-color: #ef4444; }
a.ls-match.ls-draw { border-left-color: #eab308; }
a.ls-match.is-live { border-left-color: #ff5c5c; box-shadow: 0 0 0 1px rgba(255, 92, 92, .35), 0 0 22px rgba(255, 92, 92, .18); }

.ls-m-meta { display: flex; flex-direction: column; gap: .1rem; line-height: 1.15; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.ls-m-date { font-weight: 700; font-size: .88rem; }
.ls-m-time { font-size: .78rem; opacity: .7; }
.ls-live { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; letter-spacing: .12em; color: #ff5c5c; }
.ls-live i { width: 9px; height: 9px; border-radius: 50%; background: #ff5c5c; box-shadow: 0 0 10px #ff5c5c; animation: ls-pulse 1.2s ease-in-out infinite; }
@keyframes ls-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

.ls-m-team { display: flex; align-items: center; gap: .6rem; min-width: 0; font-weight: 700; font-size: 1.05rem; opacity: .82; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.ls-m-team.is-win { opacity: 1; }
.ls-m-a { justify-content: flex-end; text-align: right; }
.ls-m-b { justify-content: flex-start; }
.ls-m-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ls-m-logo { width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, .08); display: inline-flex; align-items: center; justify-content: center; }
.ls-m-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ls-m-logo-ini { font-size: .85rem; font-weight: 800; background: linear-gradient(145deg, #3a4654, #1e2630); color: #e8edf2; }
.ls-m-score { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .55); font-size: 1.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ls-m-score b { opacity: .75; }
.ls-m-score b.is-win { opacity: 1; color: #4ade80; }
.ls-m-score i { opacity: .4; font-style: normal; }
.ls-m-info { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.ls-m-map { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.ls-m-res { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: .05rem .5rem; border-radius: 999px; }
.ls-win .ls-m-res { color: #4ade80; background: rgba(34, 197, 94, .18); }
.ls-loss .ls-m-res { color: #f87171; background: rgba(239, 68, 68, .18); }
.ls-draw .ls-m-res { color: #facc15; background: rgba(234, 179, 8, .18); }
.ls-m-kd { font-size: .78rem; opacity: .7; font-variant-numeric: tabular-nums; }

.ls-form { display: flex; gap: 4px; align-items: center; }
.ls-form i { width: 12px; height: 22px; border-radius: 4px; background: rgba(255, 255, 255, .2); }
.ls-form i.w { background: #22c55e; }
.ls-form i.l { background: #ef4444; }
.ls-form i.d { background: #eab308; }

/* ---------- Empty / more ---------- */
.ls-empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2.5rem 1rem; border-radius: 16px; border: 1px dashed var(--pf-border); opacity: .85; text-align: center; }
.ls-empty .rzi { font-size: 2.4rem; opacity: .55; }
.ls-more { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; padding: .5rem 0 1rem; font-size: .85rem; opacity: .9; }

/* ---------- Podium ---------- */
.ls-podium { display: grid; grid-template-columns: 1fr 1.18fr 1fr; align-items: end; gap: .9rem; }
a.ls-pod {
    --pod: #94a3b8; position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem;
    padding: 1rem .75rem 1.1rem; border-radius: 18px; color: inherit; text-decoration: none; min-width: 0;
    border: 1px solid color-mix(in srgb, var(--pod) 45%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--pod) 22%, transparent), rgba(255, 255, 255, .03));
    transition: transform .15s, box-shadow .15s; animation: pf-rise .45s ease both;
}
a.ls-pod:hover { transform: translateY(-3px); box-shadow: 0 10px 28px color-mix(in srgb, var(--pod) 30%, transparent); }
a.ls-pod-1 { --pod: #f5c542; order: 2; padding-top: 1.5rem; padding-bottom: 1.5rem; }
a.ls-pod-2 { --pod: #cbd5e1; order: 1; }
a.ls-pod-3 { --pod: #d98b4a; order: 3; }
a.ls-pod.is-me { box-shadow: 0 0 0 2px var(--pf-accent); }
.ls-pod-medal { display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; color: var(--pod); }
.ls-pod-medal .rzi { font-size: 1.4rem; }
.ls-pod-avatar { position: relative; display: inline-flex; border-radius: 50%; box-shadow: 0 0 0 3px var(--pod), 0 0 22px color-mix(in srgb, var(--pod) 55%, transparent); margin: .2rem 0; }
.ls-pod-avatar > * { border-radius: 50%; }
.ls-pod-rank { position: absolute !important; right: -8px; bottom: -4px; width: 30px; border-radius: 0 !important; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.ls-pod-name { font-weight: 800; font-size: 1.1rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-pod-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--pod); font-variant-numeric: tabular-nums; }
.ls-pod-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }
.ls-pod-sub { font-size: .78rem; opacity: .7; text-align: center; }

.ls-rank-list { display: flex; flex-direction: column; gap: .4rem; margin-top: .9rem; }
a.ls-rank-row {
    display: grid; grid-template-columns: 30px 34px 26px minmax(0, 1.1fr) minmax(0, 2fr) 84px; align-items: center; gap: .7rem;
    padding: .45rem .8rem; border-radius: 12px; color: inherit; text-decoration: none;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--pf-border); transition: background-color .15s, transform .15s;
}
a.ls-rank-row:hover { background: rgba(255, 255, 255, .09); transform: translateX(2px); }
.ls-rank-n { font-weight: 800; opacity: .6; text-align: center; font-variant-numeric: tabular-nums; }
.ls-rank-ico { width: 26px; display: block; }
.ls-rank-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-bar-track { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.ls-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--ls-a, #3b82f6), var(--ls-b, #8b5cf6)); }
.ls-rank-val { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.ls-note { font-size: .78rem; opacity: .55; margin-top: .5rem; }

/* ---------- Grids (RadzenDataGrid) ---------- */
.rz-data-grid.ls-grid { border: 1px solid var(--pf-border, rgba(255, 255, 255, .1)); border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .03); }
.rz-data-grid.ls-grid .rz-grid-table thead th { background: rgba(255, 255, 255, .06); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; }
.rz-data-grid.ls-grid .rz-grid-table tbody tr:hover td { background: rgba(255, 255, 255, .06); }
.rz-data-grid.ls-grid .rz-grid-table td { vertical-align: middle; }
.rz-data-grid.ls-grid tr.ls-me-row td { background: color-mix(in srgb, var(--pf-accent, #3b82f6) 18%, transparent) !important; }
.ls-grid-wrap { min-width: 0; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ls-cell-user { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.ls-cell-user a { color: inherit; font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-cell-user a:hover { text-decoration: underline; }
.ls-cell-user img.ls-rank-ico { width: 26px; flex: none; }
.ls-pos { font-weight: 800; opacity: .65; font-variant-numeric: tabular-nums; }
.ls-pos.top { color: #f5c542; opacity: 1; }
.ls-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #6b7280; display: inline-block; }
.ls-dot.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.ls-strong { font-weight: 800; font-variant-numeric: tabular-nums; }
.ls-wr { display: flex; align-items: center; gap: .5rem; min-width: 90px; }
.ls-wr .ls-bar-track { flex: 1; height: 6px; }
.ls-wr span { font-size: .8rem; font-variant-numeric: tabular-nums; min-width: 2.6rem; text-align: right; }
.ls-vip { font-size: .66rem; font-weight: 800; padding: .05rem .4rem; border-radius: 999px; color: #241a00; background: linear-gradient(135deg, #f5d36a, #d4a017); }

.ls-ban-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.ls-ban-perm { color: #f87171; background: rgba(239, 68, 68, .16); border: 1px solid rgba(239, 68, 68, .4); }
.ls-ban-soon { color: #4ade80; background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .35); }
.ls-ban-temp { color: #fbbf24; background: rgba(245, 158, 11, .14); border: 1px solid rgba(245, 158, 11, .35); }
.ls-ban-reason { display: inline-block; padding: .15rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .07); font-size: .86rem; white-space: normal; }
.ls-steam { font-size: .78rem; opacity: .6; font-family: ui-monospace, monospace; }

/* ---------- Players DB search ---------- */
.players-db-search { display: flex; flex-direction: column; gap: .4rem; padding: 1rem; width: 100%; max-width: 640px; margin: 0 auto; text-align: left; }
.players-db-muted { opacity: .7; text-align: center; }
.players-db-title { font-weight: 600; }
.players-db-hint { font-size: .85rem; opacity: .65; margin-bottom: .25rem; }
.players-db-row { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border-radius: 10px; background: rgba(255, 255, 255, .06); color: inherit; text-decoration: none; }
.players-db-row:hover { background: rgba(255, 255, 255, .12); }
.players-db-name { font-weight: 600; flex: 1 1 auto; overflow-wrap: anywhere; }
.players-db-steam { font-size: .8rem; opacity: .65; }

/* ---------- Season ---------- */
.ls-progress { margin: 1rem 0 .1rem; }
.ls-progress-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; opacity: .85; margin-bottom: .35rem; }
.ls-progress .ls-bar-track { height: 10px; }
.ls-me-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--pf-accent) 60%, transparent); background: color-mix(in srgb, var(--pf-accent) 14%, transparent); }
.ls-me-card .ls-me-pos { font-size: 1.8rem; font-weight: 800; color: var(--pf-accent); min-width: 3rem; text-align: center; }
.ls-me-stats { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-left: auto; }
.ls-me-stats div { display: flex; flex-direction: column; align-items: center; }
.ls-me-stats b { font-size: 1.15rem; }
.ls-me-stats span { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .65; }

/* ---------- Cards (LFT, friends) ---------- */
.ls-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .9rem; }
.ls-card {
    --st: #6b7280; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; border-radius: 16px; min-width: 0;
    border: 1px solid var(--pf-border); background: var(--pf-glass); animation: pf-rise .35s ease both; transition: transform .15s, border-color .15s;
}
.ls-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pf-accent) 55%, transparent); }
.ls-card-head { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.ls-card-title { display: flex; flex-direction: column; min-width: 0; gap: .15rem; flex: 1; }
.ls-card-name { font-weight: 800; font-size: 1.05rem; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-card-name:hover { text-decoration: underline; }
.ls-card-sub { font-size: .8rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-ring { position: relative; flex: none; padding: 3px; border-radius: 50%; background: var(--st); display: inline-flex; }
.ls-ring > * { border-radius: 50%; display: block; }
.ls-ring .ls-ring-rank { position: absolute; right: -8px; bottom: -4px; width: 24px; border-radius: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.ls-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.ls-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); }
.ls-tag .rzi { font-size: 1rem; opacity: .8; }
.ls-tag-role { background: color-mix(in srgb, var(--pf-accent) 25%, transparent); border-color: color-mix(in srgb, var(--pf-accent) 55%, transparent); }
.ls-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, .08); }
.ls-mini div { display: flex; flex-direction: column; align-items: center; padding: .45rem .2rem; background: rgba(10, 12, 18, .35); }
.ls-mini b { font-size: .98rem; font-variant-numeric: tabular-nums; }
.ls-mini span { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.ls-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }
.ls-card-actions > * { flex: 1 1 auto; }
.ls-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 700; color: var(--st); }
.ls-avatar-wrap { position: relative; flex: none; display: inline-flex; }
.ls-avatar-wrap .ls-ring-rank { position: absolute; right: -8px; bottom: -4px; width: 24px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .6)); }
.ls-team-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: rgba(255, 255, 255, .06); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    a.ls-match { grid-template-columns: 96px minmax(0, 1fr) auto minmax(0, 1fr) 120px; gap: .6rem; }
    .ls-m-kd { display: none; }
    a.ls-rank-row { grid-template-columns: 28px 32px minmax(0, 1fr) 80px; }
    a.ls-rank-row .ls-rank-ico, a.ls-rank-row .ls-bar-track { display: none; }
}

@media (max-width: 700px) {
    a.ls-match { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "meta meta meta" "a score b" "info info info"; row-gap: .45rem; padding: .65rem .75rem; }
    .ls-m-meta { grid-area: meta; flex-direction: row; align-items: center; justify-content: center; gap: .6rem; }
    .ls-m-a { grid-area: a; }
    .ls-m-score { grid-area: score; font-size: 1.25rem; padding: .2rem .55rem; }
    .ls-m-b { grid-area: b; }
    .ls-m-info { grid-area: info; flex-direction: row; justify-content: center; align-items: center; gap: .6rem; }
    .ls-m-team { font-size: .92rem; gap: .4rem; }
    .ls-m-logo { width: 24px; height: 24px; }
    .ls-m-kd { display: inline; }
    .ls-podium { grid-template-columns: 1fr; }
    a.ls-pod-1 { order: 1; } a.ls-pod-2 { order: 2; } a.ls-pod-3 { order: 3; }
    .ls-bar-actions { margin-left: 0; width: 100%; }
    .ls-search { flex: 1 1 100%; }
    .ls-hero-actions { margin-left: 0; width: 100%; }
    .ls-cards { grid-template-columns: 1fr; }
    .ls-me-stats { margin-left: 0; width: 100%; justify-content: space-around; }
}

/* ===================================================================
   Shared helpers (StatusChip, PageSkeleton, SectionCard)
   =================================================================== */
.ls-schip {
    --st: #6b7280; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .18rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 800;
    color: var(--st); background: color-mix(in srgb, var(--st) 16%, transparent); border: 1px solid color-mix(in srgb, var(--st) 45%, transparent);
}
.ls-schip .rzi { font-size: 1rem; }
.ls-schip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st); flex: none; box-shadow: 0 0 8px var(--st); }
.ls-schip .ls-schip-dot + .rzi { margin-left: -.1rem; }

.ls-sk-hero { display: flex; align-items: center; gap: 1.1rem; padding: 1.2rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.ls-sk-hero-text { display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.ls-sk-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-radius: 14px; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.ls-sk-row-text { display: flex; flex-direction: column; gap: .45rem; flex: 1; min-width: 0; }

.sc-card .sc-more { margin-left: auto; font-size: .82rem; font-weight: 700; color: var(--pf-accent); text-decoration: none; }
.sc-card .sc-more:hover { text-decoration: underline; }

/* ===================================================================
   Tickets (tk-*)
   =================================================================== */
.tk-root .ls-hero-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tk-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
a.tk-card { color: inherit; text-decoration: none; border-left: 4px solid var(--st); cursor: pointer; }
.tk-card-top { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tk-card-id { font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tk-card-cat { display: flex; align-items: center; gap: .4rem; font-weight: 700; }
.tk-card-cat .rzi { color: var(--st); font-size: 1.2rem; }
.tk-card-dates { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; opacity: .7; }
.tk-card-dates .rzi { font-size: 1rem; vertical-align: -3px; }
.tk-card-go { margin-top: auto; display: flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .85rem; color: var(--pf-accent); }
.tk-card-go .rzi { font-size: 1.1rem; transition: transform .15s; }
a.tk-card:hover .tk-card-go .rzi { transform: translateX(3px); }

.tk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.tk-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.tk-main { display: flex; flex-direction: column; gap: .9rem; }

.tk-thread { display: flex; flex-direction: column; gap: .8rem; max-height: 62vh; overflow-y: auto; padding: .2rem .3rem .2rem 0; scrollbar-width: thin; }
.tk-msg { display: flex; align-items: flex-start; gap: .65rem; max-width: 88%; animation: pf-rise .3s ease both; }
.tk-msg.is-mine { align-self: flex-end; flex-direction: row-reverse; }
.tk-msg-avatar { flex: none; }
.tk-msg-mod { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: rgba(255, 255, 255, .08); }
.tk-bubble {
    min-width: 0; padding: .65rem .9rem; border-radius: 16px; border-top-left-radius: 4px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--pf-border); overflow-wrap: anywhere;
}
.tk-msg.is-mine .tk-bubble { border-top-left-radius: 16px; border-top-right-radius: 4px; background: color-mix(in srgb, var(--pf-accent) 20%, transparent); border-color: color-mix(in srgb, var(--pf-accent) 45%, transparent); }
.tk-msg.is-first .tk-bubble { border-color: color-mix(in srgb, #f59e0b 55%, transparent); }
.tk-bubble-head { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .3rem; font-size: .8rem; }
.tk-bubble-name { font-weight: 800; }
.tk-bubble-head time, .tk-sys time { margin-left: auto; opacity: .55; font-size: .72rem; font-variant-numeric: tabular-nums; }
.tk-text { line-height: 1.45; }
.tk-text p, .tk-text .rz-text-body1 { margin: 0 0 .4rem; }
.tk-text > *:last-child, .tk-text p:last-child { margin-bottom: 0; }
.tk-attach { margin-top: .5rem; }
.tk-attach img, .tk-attach video { max-width: 100%; max-height: 340px; border-radius: 10px; display: block; }
.tk-attach img { cursor: zoom-in; }
.tk-sys { align-self: center; display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: center; max-width: 92%; padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; opacity: .8; background: rgba(255, 255, 255, .05); border: 1px dashed var(--pf-border); }
.tk-sys .rzi { font-size: 1rem; color: var(--pf-accent); }
.tk-sys time { margin-left: .2rem; }

.tk-composer { border-top: 1px solid var(--pf-border); padding-top: .8rem; }
.tk-composer .ticket-input-stack { display: flex; flex-direction: column; gap: .6rem; width: 100%; }
.tk-composer-bar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.tk-composer-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.tk-hint { font-size: .76rem; opacity: .6; }
.ticket-drop-zone { position: relative; display: flex; flex-direction: column; padding: 6px; border: 1px dashed transparent; border-radius: 12px; transition: border-color .2s, background-color .2s; }
.ticket-drop-zone.drag-over { border-color: var(--pf-accent); background-color: color-mix(in srgb, var(--pf-accent) 12%, transparent); }
.ticket-drop-zone .rz-textarea { width: 100%; min-height: 110px; }
.ticket-drop-zone .drag-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); border-radius: 12px; z-index: 1; pointer-events: none; font-weight: 800; }
.ticket-file-preview { margin-top: .5rem; font-size: .85rem; opacity: .85; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ticket-file-preview .rz-button { margin-left: auto; }

.tk-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem .9rem; margin: 0; font-size: .88rem; }
.tk-dl dt { opacity: .6; font-weight: 600; }
.tk-dl dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: .4rem; min-width: 0; overflow-wrap: anywhere; }
.tk-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--pf-accent); text-decoration: none; font-weight: 700; }
.tk-link:hover { text-decoration: underline; }
.tk-statusline { --st: #6b7280; margin-top: .8rem; padding: .5rem .75rem; border-radius: 10px; font-size: .84rem; border-left: 3px solid var(--st); background: color-mix(in srgb, var(--st) 12%, transparent); }
.tk-timeline { --rz-timeline-item-label-font-size: .76rem; font-size: .84rem; }
.tk-tl-date { opacity: .65; font-size: .76rem; font-variant-numeric: tabular-nums; }
.tk-tl-text { font-weight: 700; }
.tk-actions { display: flex; flex-direction: column; gap: .7rem; }
.tk-qa-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.tk-qa { display: flex; flex-wrap: wrap; gap: .35rem; }

.tk-detail.is-embedded { gap: .75rem; }
.tk-detail.is-embedded .tk-thread { max-height: 38vh; }

@media (max-width: 1000px) {
    .tk-layout { grid-template-columns: 1fr; }
    .tk-side { order: -1; }
    .tk-msg { max-width: 100%; }
    .tk-thread { max-height: none; }
}

/* ===================================================================
   Home (hm-*)
   =================================================================== */
.hm-root a { color: inherit; }
.hm-head { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.hm-head-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 6px 16px rgba(59, 130, 246, .3); }
.hm-head-ico .rzi { font-size: 1.6rem; }
.hm-head-text { flex: 1 1 200px; min-width: 0; }
.hm-head-title { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.15; }
.hm-head-sub { opacity: .65; font-size: .88rem; margin-top: .15rem; }
.hm-head-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-left: auto; }
.hm-tab { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.hm-adverts { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: center; }
.hm-advert { display: flex; flex-direction: column; align-items: center; gap: .25rem; max-width: 100%; }
.hm-advert img { max-width: 100%; height: auto; border-radius: 12px; }
.hm-adverts.is-mobile { flex-direction: column; }

.hm-live-strip { display: flex; align-items: center; gap: .9rem; padding: .55rem .9rem; border-radius: 14px; border: 1px solid rgba(255, 92, 92, .4); background: rgba(255, 92, 92, .08); min-width: 0; }
.hm-live-scroll { display: flex; gap: .6rem; overflow-x: auto; scrollbar-width: thin; min-width: 0; padding-bottom: 2px; }
a.hm-live-chip { display: inline-flex; align-items: center; gap: .55rem; flex: none; padding: .3rem .8rem; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .1); text-decoration: none; font-size: .88rem; font-weight: 700; color: inherit; transition: border-color .15s, transform .15s; }
a.hm-live-chip:hover { border-color: rgba(255, 92, 92, .7); transform: translateY(-1px); }
a.hm-live-chip b { font-variant-numeric: tabular-nums; padding: .05rem .5rem; border-radius: 8px; background: rgba(255, 255, 255, .1); }
a.hm-live-chip em { font-style: normal; opacity: .6; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }

.hm-tabs { position: sticky; top: .5rem; z-index: 5; backdrop-filter: blur(10px); }
.hm-overview { display: flex; flex-direction: column; gap: 1rem; }
.hm-tiles { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.hm-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.hm-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.hm-live { border-color: rgba(255, 92, 92, .45); }
.hm-live .pf-section-title .rzi { color: #ff5c5c; }

.hm-rows { display: flex; flex-direction: column; gap: .15rem; }
a.hm-row, .hm-row-static { display: flex; align-items: center; gap: .65rem; padding: .45rem .5rem; border-radius: 12px; text-decoration: none; color: inherit; min-width: 0; transition: background-color .15s; }
a.hm-row:hover { background: rgba(255, 255, 255, .07); }
.hm-row-n { width: 22px; text-align: center; font-weight: 800; opacity: .55; font-variant-numeric: tabular-nums; flex: none; }
.hm-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.hm-row-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-row-sub { font-size: .76rem; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-row-rank { width: 26px; flex: none; }
.hm-row-go { opacity: .5; font-size: 1.1rem !important; }
.hm-hl-ico { width: 32px; height: 32px; flex: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #f97316; background: rgba(249, 115, 22, .15); }
.hm-hl-ico.hm-gold { color: #f5c542; background: rgba(245, 197, 66, .15); }
.hm-period { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }

.hm-news { display: flex; flex-direction: column; gap: .5rem; }
a.hm-news-item { display: flex; flex-direction: column; gap: .2rem; padding: .65rem .8rem; border-radius: 12px; border: 1px solid var(--pf-border); text-decoration: none; color: inherit; transition: border-color .15s, background-color .15s; }
a.hm-news-item:hover { border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); background: color-mix(in srgb, var(--pf-accent) 8%, transparent); }
.hm-news-title { font-weight: 800; }
.hm-news-title-en { font-weight: 650; font-size: .92rem; line-height: 1.3; opacity: .72; }
.hm-news-text { font-size: .86rem; opacity: .7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-news-text-en { opacity: .55; }
.hm-news-date { font-size: .74rem; opacity: .55; }
.hm-news-date .rzi, .hm-news-foot .rzi { font-size: .95rem; vertical-align: -3px; }
.hm-news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
a.hm-news-card { display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: 16px; border: 1px solid var(--pf-border); background: var(--pf-glass); text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; animation: pf-rise .35s ease both; }
a.hm-news-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); }
a.hm-news-card.is-featured { grid-column: 1 / -1; background: linear-gradient(135deg, color-mix(in srgb, #3b82f6 18%, transparent), color-mix(in srgb, #8b5cf6 12%, transparent)); }
a.hm-news-card.is-featured .hm-news-title { font-size: 1.4rem; }
a.hm-news-card .hm-news-title { font-size: 1.05rem; line-height: 1.25; }
a.hm-news-card .hm-news-text { -webkit-line-clamp: 3; }
.hm-news-foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; font-size: .78rem; opacity: .75; }
.hm-news-go { display: inline-flex; align-items: center; gap: .25rem; font-weight: 700; color: var(--pf-accent); }

.hm-cup { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.hm-cup-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.hm-cup-name { font-size: 1.1rem; font-weight: 800; }
.hm-cup-meta { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .82rem; opacity: .75; }
.hm-cup-meta .rzi { font-size: 1rem; vertical-align: -3px; }
.hm-cup-desc { font-size: .86rem; opacity: .85; }

.hm-bars { display: flex; flex-direction: column; gap: .5rem; }
.hm-bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 48px; align-items: center; gap: .7rem; font-size: .86rem; }
.hm-bar-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-bar-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

.hm-streams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 640px), 1fr)); gap: 1rem; }
.hm-stream.playing { grid-column: 1 / -1; }
.hm-stream.playing .hm-stream-screen { width: min(100%, calc(78vh * 16 / 9)); margin: 0 auto; }
.hm-stream.playing .hm-stream-foot { width: min(100%, calc(78vh * 16 / 9)); margin: 0 auto; box-sizing: border-box; }
.hm-stream { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--pf-border); background: var(--pf-glass); }
.hm-stream-screen { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #1b1f2a, #2a1f3d); }
.hm-stream-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hm-stream-play { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hm-stream-play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-stream-btn { position: relative; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(145, 70, 255, .9); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); transition: transform .15s; }
.hm-stream-btn .rzi { font-size: 2.2rem; }
.hm-stream-play:hover .hm-stream-btn { transform: scale(1.08); }
.hm-stream-name { position: absolute; left: .8rem; bottom: .6rem; padding: .15rem .6rem; border-radius: 8px; background: rgba(0, 0, 0, .6); font-weight: 700; font-size: .86rem; }
.hm-stream-foot { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; flex-wrap: wrap; }
a.hm-stream-user { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; text-decoration: none; color: inherit; margin-right: auto; }

.hm-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
a.hm-video { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid var(--pf-border); background: var(--pf-glass); text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
a.hm-video:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); }
.hm-video-thumb { position: relative; aspect-ratio: 16 / 9; background: #11151d; display: block; overflow: hidden; }
.hm-video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
a.hm-video:hover .hm-video-thumb img { transform: scale(1.04); }
.hm-video-play { position: absolute; right: .6rem; bottom: .6rem; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .65); display: flex; align-items: center; justify-content: center; color: #fff; }
.hm-video-body { display: flex; gap: .7rem; padding: .7rem .8rem; align-items: flex-start; }
.hm-video-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.hm-video-title { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hm-video-meta { font-size: .76rem; opacity: .6; }

.hm-winners { display: flex; flex-direction: column; gap: .4rem; }
.hm-winner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; }
.hm-winner { display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--pf-border); background: var(--pf-glass); }

/* Wall */
.hm-wall .post-card-wrapper { position: relative; }
.hm-wall .post-card { position: relative; border-radius: 16px; transition: border-color .2s; }
.hm-wall .post-card-wrapper.drag-over .post-card { border: 2px dashed var(--rz-primary); background-color: rgba(var(--rz-primary-rgb), .1); }
.hm-wall .drag-overlay { position: absolute; inset: 0; background-color: rgba(var(--rz-primary-rgb), .1); border: 2px dashed var(--rz-primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; z-index: 10; pointer-events: none; }
.hm-wall .attachment-preview { border: 1px solid var(--pf-border); transition: border-color .2s; }
.hm-wall .attachment-preview:hover { border-color: var(--rz-primary); }
.hm-wall .rz-fileupload-files { display: none !important; }
.hm-wall .rz-fileupload-choose:not(.rz-state-disabled) { margin: auto; display: flex; width: 100%; justify-content: center; }
.hm-wall .hm-post, .hm-wall .post-card { background: var(--pf-glass) !important; border: 1px solid var(--pf-border) !important; border-radius: 16px !important; box-shadow: none !important; }
.hm-wall .post-card-item { position: relative; }
.hm-wall .post-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; z-index: 10; }
.hm-wall .post-content p { margin: .4rem 0 0; }
.hm-wall .post-comments { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--pf-border); }
.hm-wall .post-comments h4 { margin: 0 0 .5rem; font-size: .9rem; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.hm-wall .wall-video { width: auto; height: auto; max-width: 100%; max-height: min(620px, 78vh); border-radius: 12px; display: block; margin: .5rem auto 0; }

/* Accordions used on the home page and in the matchmaking side panel */
.hm-root .rz-accordion, [class*="rz-dialog"] .rz-accordion { box-sizing: border-box; background: none !important; border-radius: 0 !important; box-shadow: none !important; }
.hm-root .rz-accordion .rz-accordion-header, [class*="rz-dialog"] .rz-accordion .rz-accordion-header { background: none !important; margin: var(--rz-accordion-item-margin); }
.hm-root .rz-accordion-content, [class*="rz-dialog"] .rz-accordion-content { font-size: var(--rz-accordion-content-font-size); background: none !important; padding-block: var(--rz-accordion-content-padding-block); padding-inline: var(--rz-accordion-content-padding-inline); }
.hm-root .rz-accordion > .rz-expander, [class*="rz-dialog"] .rz-accordion > .rz-expander { background: none !important; }

/* Guest landing */
.hm-guest { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.hm-guest-hero { padding-top: 2.4rem; text-align: center; }
.hm-guest-body { display: flex; flex-direction: column; align-items: center; gap: .9rem; max-width: 820px; margin: 0 auto; }
.hm-guest-tag { font-size: .9rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--ls-a) 75%, #fff); }
.hm-guest-title { margin: 0; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 900; line-height: 1.1; text-shadow: 0 3px 16px rgba(0, 0, 0, .6); }
.hm-guest-text { margin: 0; font-size: 1.1rem; line-height: 1.5; opacity: .8; }
.hm-guest-cta { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; margin-top: .4rem; }
.hm-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.hm-step { display: flex; gap: .9rem; align-items: flex-start; }
.hm-step p { margin: .25rem 0 0; opacity: .7; font-size: .88rem; line-height: 1.4; }
.hm-step-n { flex: none; width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #fff; background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.hm-feats { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hm-feats .ls-card { gap: .4rem; }
.hm-feat-ico { font-size: 2rem !important; color: var(--pf-accent); }
.hm-feat-text { white-space: normal; }

@media (max-width: 1000px) {
    .hm-cols { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .hm-bar-row { grid-template-columns: 90px minmax(0, 1fr) 40px; }
    .hm-streams, .hm-videos { grid-template-columns: 1fr; }
    .hm-head-actions { margin-left: 0; width: 100%; }
    .hm-tabs { position: static; }
}

/* ===================================================================
   Messenger base layout (moved from Chat.razor inline styles)
   =================================================================== */
/* Мобильный чат на весь экран — убираем отступы MainLayout */
body:has([data-chat-mobile="true"]) .rz-body,
body:has([data-chat-mobile="true"]) .rz-body .rz-row,
body:has([data-chat-mobile="true"]) .rz-body .rz-row .rz-column,
body:has([data-chat-mobile="true"]) .rz-body .rz-row .rz-column .page-content {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
    }
/* Без transform fixed привязывается к viewport, а не к колонке — инпут виден внизу экрана */
body:has([data-chat-mobile="true"]) .rz-body .rz-row .rz-column.page-content {
        transform: none !important;
    }
.chat-mobile-fullscreen {
        width: 100%;
        min-width: 100%;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        display: block;
        transform: none; /* чтобы position:fixed у инпута был относительно viewport */
    }
.chat-mobile-fullscreen .rz-layout {
        transform: none !important;
    }
/* Чтобы поле ввода оставалось внизу: grid-область body сжимается, обёртка занимает 100% */
.chat-mobile-fullscreen .rz-layout .rz-body {
        min-height: 0 !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
.chat-mobile-fullscreen .rz-layout .rz-body .messages-container {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }
.chat-mobile-fullscreen .rz-layout .rz-body .message-input-container {
        flex-shrink: 0;
    }
/* Обёртка мобильного чата: жёсткий flex, инпут всегда внизу без position:fixed */
.mobile-chat-body-inner {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        height: 100% !important;
        overflow: hidden !important;
    }
.mobile-chat-body-inner .chat-header,
.mobile-chat-body-inner .chat-header-mobile-spacer {
        flex-shrink: 0 !important;
    }
.mobile-chat-body-inner .messages-container {
        flex: 1 1 0 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
    }
.mobile-chat-body-inner .message-input-container {
        flex-shrink: 0 !important;
    }
/* Телефоны и планшеты: инпут и отступ списка сообщений */
@media (max-width: 1024px) {
    [data-chat-mobile="true"] .message-input-container {
            padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
        }
    /* Чтобы последние сообщения не уходили под зону инпута и системную панель */
    [data-chat-mobile="true"] .messages-container {
            padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        }
}
body:has(.ch-root) .rz-body {
        overflow: hidden;
    }
@media (max-width: 768px) {
    body:has(.ch-root) .rz-header,
body:has(.ch-root) .rz-footer,
body:has(.ch-root) .rz-body {
            width: 100%;
        }
}
body:has(.ch-root) .rz-dialog-content {
        height: 100%;
    }
body:has(.ch-root) .rz-layout .rz-body {
        grid-area: rz-body;
        overflow: hidden !important;
    }
.chat-container {
        display: flex;
        height: calc(100vh - 240px);
        overflow: hidden !important;
    }
.ch-root .sidebar {
        display: flex;
        flex-direction: column;
        min-width: 320px !important;
        max-width: 320px !important;
        max-width: 100%;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
.ch-root .sidebar-header {
        padding: 12px 16px;
        flex-shrink: 0;
    }
.ch-root .dialogs-list {
        flex: 1 1 auto;
        overflow-y: auto;
    }
.ch-root .chat-area {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-width: 0;
        overflow: hidden;
    }
.ch-root .message-attachment {
        margin-top: 8px;
    }
.ch-root .attachment-indicator {
        margin-left: 8px;
        color: #777;
    }
.ch-root .chat-input-wrapper {
        position: relative;
    }
.ch-root .rz-chat-input {
        position: relative;
        transition: border-color 0.2s ease;
    }
.ch-root .rz-chat-input.drag-over {
        border: 2px dashed var(--rz-primary);
        background-color: rgba(var(--rz-primary-rgb), 0.1);
    }
.ch-root .drag-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(var(--rz-primary-rgb), 0.1);
        border: 2px dashed var(--rz-primary);
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        pointer-events: none;
    }
.ch-root .messages-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 12px;
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 0;
    }
.ch-root .chat-date-separator {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 10px 0 4px;
        width: 100%;
    }
.ch-root .chat-date-separator span {
        background: rgba(128, 128, 128, 0.25);
        color: var(--rz-text-secondary-color, #9aa4b2);
        font-size: 0.75rem;
        font-weight: 600;
        padding: 4px 12px;
        border-radius: 999px;
        letter-spacing: 0.02em;
    }
.ch-root .message {
        display: flex;
        width: 100%;
        margin: 4px 0;
    }
.ch-root .message-other {
        justify-content: flex-start;
    }
.ch-root .message-own {
        justify-content: flex-end;
    }
.ch-root .message-content {
        position: relative;
        max-width: 70%;
        width: fit-content;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 18px 18px 18px 6px;
        padding: 12px 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        color: var(--rz-text-primary-color);
        transition: transform 0.2s ease;
        overflow: hidden;
        word-break: break-word;
    }
.ch-root .message-own .message-content {
        background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
        border: none;
        color: #fff;
        border-radius: 18px 18px 6px 18px;
    }
.ch-root .message-content:hover {
        transform: translateY(-1px);
    }
.ch-root .message-content .rz-markdown,
.ch-root .message-content .rz-markdown > p {
        margin: 0;
        color: inherit;
        word-wrap: break-word;
        overflow-wrap: anywhere;
        white-space: pre-wrap;
    }
.ch-root .message-content .rz-markdown ul,
.ch-root .message-content .rz-markdown ol {
        padding-left: 18px;
    }
.ch-root .message-content code,
.ch-root .message-content pre {
        word-break: break-word;
        overflow-wrap: anywhere;
    }
.ch-root .message-attachment img,
.ch-root .message-attachment video {
        width: 100%;
        max-height: 280px;
        border-radius: 12px;
        object-fit: cover;
    }
.ch-root .message-attachment .rz-button {
        padding: 0;
        background: transparent;
        color: inherit;
    }
.ch-root .message-attachment .rz-button:hover {
        background: transparent;
    }
.ch-root .message-own .message-attachment span,
.ch-root .message-own .message-attachment .rz-button {
        color: rgba(255, 255, 255, 0.85);
    }
.ch-root .message-own .message-attachment span {
        color: rgba(255, 255, 255, 0.75);
    }
.ch-root .message-meta {
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: flex-end;
        font-size: 0.75rem;
        color: whitesmoke;
        margin-top: 8px;
    }
.ch-root .message-read {
        letter-spacing: -0.15em;
        opacity: 0.7;
        font-size: 0.7rem;
    }
.ch-root .message-read--done {
        opacity: 1;
        color: #7CFFB2;
    }
.ch-root .message-other .message-meta {
        color: rgba(255, 255, 255, 0.35);
    }
.ch-root .message-content a {
        color: inherit;
        text-decoration: underline;
    }
.ch-root .message-own .message-content a {
        color: rgba(255, 255, 255, 0.9);
    }
.ch-root .chat-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        flex-shrink: 0;
    }
.ch-root .chat-actions {
        display: flex;
        gap: 8px;
    }
.ch-root .chat-actions .rz-button {
        min-width: 36px;
    }
.ch-root .chat-header-mobile-spacer {
        height: 8px;
        flex-shrink: 0;
    }
.ch-root .message-input-container {
        flex-shrink: 0;
    }
.ch-root .message-input-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width:100%;
    }
.ch-root .message-input-attach,
.ch-root .message-input-send,
.ch-root .message-input-voice {
        flex-shrink: 0;
    }
.ch-root .message-input-voice.voice-recording {
        animation: pulse-record 1s infinite;
    }
@keyframes pulse-record {
        0% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.6);
        }
        70% {
            transform: scale(1.05);
            box-shadow: 0 0 0 8px rgba(255, 82, 82, 0);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
        }
    }
.ch-root .voice-message {
        margin-top: 8px;
        padding: 8px 10px;
        border-radius: 12px;
        background: rgba(0, 0, 0, 0.12);
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
.ch-root .voice-message audio {
        width: 100%;
        height: 38px;
    }
.ch-root .voice-meta {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.7);
    }
@media (max-width: 768px) {
    .chat-container {
            height: calc(100vh - 128px);
        }
    .ch-root .messages-container {
            padding: 0 8px;
        }
    .ch-root .message-content {
            max-width: 85vw;
            border-radius: 18px 18px 18px 6px;
            padding: 12px 14px;
            font-size: 0.95rem;
        }
    .ch-root .chat-header {
            padding: 10px 12px;
        }
    .ch-root .chat-actions .rz-button {
            min-width: 30px;
        }
    .ch-root .chat-header-mobile-spacer {
            height: 4px;
        }
}

/* ===================================================================
   Messenger (ch-*): визуальное оформление поверх базовой раскладки
   =================================================================== */
.ch-root { --pf-border: var(--rz-base-300, rgba(255, 255, 255, .1)); --pf-accent: #3b82f6; }
.ch-root.chat-container { border: 1px solid var(--pf-border); border-radius: 18px; background: rgba(255, 255, 255, .03); }
.ch-root .sidebar, .ch-root .chat-area { background: transparent; border-radius: 0; }
.ch-root .sidebar { border-right: 1px solid var(--pf-border); }
.ch-root .sidebar-header { padding: 14px 16px 6px; border-bottom: 0; }
.ch-root .sidebar-header h3 { font-size: 1.15rem; font-weight: 800; }
.ch-search { position: relative; display: flex; align-items: center; margin: .2rem .75rem .6rem; flex: none; }
.ch-search .rzi { position: absolute; left: .6rem; opacity: .55; font-size: 1.15rem; pointer-events: none; }
.ch-search input { width: 100%; padding: .5rem .8rem .5rem 2.1rem; border-radius: 12px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; outline: none; transition: border-color .15s, background-color .15s; }
.ch-search input:focus { border-color: var(--pf-accent); background: rgba(255, 255, 255, .09); }
.ch-root .dialogs-list { padding: .2rem 0 .6rem; }
.ch-root .dialog-item { margin: .15rem .6rem; padding: .6rem .7rem; border-radius: 14px; border-bottom: 0; border: 1px solid transparent; }
.ch-root .dialog-item:hover { background: rgba(255, 255, 255, .07); }
.ch-root .dialog-item.active { color: inherit; background: color-mix(in srgb, var(--pf-accent) 22%, transparent); border-color: color-mix(in srgb, var(--pf-accent) 55%, transparent); }
.ch-root .dialog-avatar { width: 46px; height: 46px; margin-right: .75rem; background: rgba(255, 255, 255, .1); flex: none; }
.ch-root .dialog-name { font-size: .95rem; font-weight: 800; margin-bottom: 2px; }
.ch-root .dialog-last-message { font-size: .82rem; gap: .5rem; }
.ch-root .last-message-text { max-width: 170px; }
.ch-root .last-message-time { font-size: .72rem; font-weight: 600; opacity: .6; }
.ch-root .unread-badge { background: linear-gradient(135deg, #3b82f6, #8b5cf6); border-radius: 999px; padding: 1px 8px; min-width: 22px; }
.ch-root .online-indicator { border-color: var(--rz-base-900, #151922); background-color: #22c55e; }
.ch-root .chat-header { padding: 12px 18px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--pf-border); border-radius: 0; }
.ch-root .user-name { font-weight: 800; }
.ch-root .user-status { font-size: .8rem; }
.ch-root .messages-container { padding: 14px 18px; background: radial-gradient(circle at 100% 0%, rgba(139, 92, 246, .10), transparent 50%), radial-gradient(circle at 0% 100%, rgba(59, 130, 246, .10), transparent 50%); background-attachment: scroll; }
.ch-root .chat-date-separator span { background: rgba(255, 255, 255, .08); border: 1px solid var(--pf-border); }
.ch-root .message-content { background: rgba(255, 255, 255, .07); border: 1px solid var(--pf-border); box-shadow: none; }
.ch-root .message-own .message-content { background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%); border: 0; }
.ch-root .message-content:hover { transform: none; }
.ch-root .message-input-container { border-top: 1px solid var(--pf-border); background: rgba(255, 255, 255, .03); }
.ch-root .rz-chat-textarea { border-radius: 14px; }
.ch-root .message-input-send, .ch-root .message-input-attach, .ch-root .message-input-voice { border-radius: 50% !important; width: 42px; height: 42px; padding: 0; }
.ch-root .no-chat-selected { flex-direction: column; gap: .5rem; opacity: .7; }
@media (max-width: 768px) {
    .ch-root .sidebar-header { padding-top: 8px; }
}

/* ===================================================================
   Tournaments (ct-*)
   =================================================================== */
.ct-root { --ct-line: rgba(255, 255, 255, .22); min-width: 0; max-width: 100%; overflow-x: clip; }
.ct-skel { display: flex; flex-direction: column; gap: 1rem; }
.ct-skel > .rz-skeleton { width: 100%; }

/* list cards */
.ct-card { border-top: 3px solid var(--ct-st, var(--pf-accent)); gap: .75rem; }
.ct-card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.ct-date { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700; opacity: .7; }
.ct-date .rzi { font-size: 1.05rem; }
.ct-card-name { font-size: 1.2rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ct-fill { display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 700; opacity: .85; --ls-a: var(--ct-st, #3b82f6); --ls-b: var(--ct-st, #3b82f6); }
.ct-fill .ls-bar-track { flex: 1; }

/* detail: registration */
.ct-reg-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.ct-reg-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ct-reg-side { display: flex; flex-direction: column; gap: .8rem; position: sticky; top: 1rem; }
.ct-timer { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.1rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); text-align: center; }
.ct-timer-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.ct-timer-val { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; background: linear-gradient(135deg, #22c55e, #3b82f6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ct-note { padding: .8rem 1rem; border-radius: 14px; border: 1px dashed var(--pf-border); text-align: center; font-size: .9rem; opacity: .85; }
.ct-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.ct-team { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 14px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .04); color: inherit; text-decoration: none; font-weight: 700; min-width: 0; transition: transform .15s, border-color .15s; }
.ct-team:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pf-accent) 55%, transparent); }
.ct-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* detail: my match */
.ct-mymatch { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.2rem; border-radius: 18px; border: 1px solid rgba(34, 197, 94, .5); background: linear-gradient(135deg, rgba(34, 197, 94, .16), rgba(59, 130, 246, .10)); }
.ct-mymatch-head { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: #4ade80; }
.ct-mymatch-teams { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: 1.25rem; font-weight: 900; }
.ct-mymatch-teams b { opacity: .5; font-size: .9rem; text-transform: uppercase; }
.ct-mymatch-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-weight: 600; }
.ct-mymatch-meta .rzi { font-size: 1.1rem; vertical-align: middle; opacity: .75; }
.ct-mymatch-meta code, .ct-srow-server { padding: .15rem .5rem; border-radius: 8px; background: rgba(0, 0, 0, .35); font-size: .85rem; }
.ct-mymatch-hint, .ct-hint { font-size: .82rem; opacity: .7; }
.ct-tab-content { min-width: 0; }

/* info */
.ct-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .9rem; }
.ct-info .ls-card h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.ct-info .ls-card p { margin: 0; opacity: .85; line-height: 1.55; }
.ct-info .ls-card ol { margin: 0; padding-left: 1.2rem; line-height: 1.6; opacity: .9; }

/* bracket */
.ct-bracket-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .5rem; }
.ct-bracket-format { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .85rem; opacity: .75; }
.ct-bracket-format .rzi { font-size: 1.1rem; }
.ct-bracket { display: flex; gap: 48px; width: max-content; padding-right: 4px; }
.ct-stage { display: flex; flex-direction: column; gap: .6rem; width: 290px; }
.ct-stage-title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--pf-accent); }
.ct-stage-body { display: grid; grid-template-rows: repeat(4, minmax(156px, 1fr)); flex: 1; }
.ct-cell { position: relative; display: flex; align-items: center; }
.ct-cell > .ct-match { width: 100%; }
.ct-sf .ct-cell { grid-row: span 2; }
.ct-final .ct-cell { grid-row: span 4; }
.ct-qf .ct-cell::after, .ct-sf .ct-cell::after { content: ""; position: absolute; right: -24px; width: 24px; border-right: 2px solid var(--ct-line); pointer-events: none; }
.ct-qf .ct-cell:nth-child(odd)::after, .ct-sf .ct-cell:nth-child(odd)::after { top: 50%; bottom: 0; border-top: 2px solid var(--ct-line); }
.ct-qf .ct-cell:nth-child(even)::after, .ct-sf .ct-cell:nth-child(even)::after { top: 0; bottom: 50%; border-bottom: 2px solid var(--ct-line); }
.ct-sf .ct-cell::before, .ct-final .ct-cell::before { content: ""; position: absolute; left: -24px; top: 50%; width: 24px; border-top: 2px solid var(--ct-line); pointer-events: none; }
.ct-match { display: flex; flex-direction: column; gap: .3rem; padding: .6rem; border-radius: 16px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); transition: border-color .2s, box-shadow .2s; }
.ct-match:hover { border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); }
.ct-match.is-live { border-color: rgba(239, 68, 68, .65); box-shadow: 0 0 0 3px rgba(239, 68, 68, .12); }
.ct-match.is-final { border-color: rgba(245, 158, 11, .6); background: linear-gradient(135deg, rgba(245, 158, 11, .14), rgba(255, 255, 255, .03)); }
.ct-match-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .2rem; font-size: .75rem; font-weight: 700; opacity: .8; }
.ct-match-status { padding: .05rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.ct-match-status.st-inprogress { background: rgba(239, 68, 68, .25); color: #fca5a5; }
.ct-match-status.st-completed { background: rgba(107, 114, 128, .3); }
.ct-team-row { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .3rem .55rem; border-radius: 12px; border: 1px solid transparent; }
.ct-team-row.winner { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .5); font-weight: 800; }
.ct-team-row.champion { background: linear-gradient(135deg, rgba(245, 158, 11, .25), rgba(245, 158, 11, .08)); border-color: #d4af37; }
.ct-team-row.tbd { opacity: .55; }
.ct-team-name { flex: 1; min-width: 0; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ct-team-name:hover { text-decoration: underline; }
.ct-score { min-width: 24px; text-align: center; font-weight: 900; font-variant-numeric: tabular-nums; }

/* schedule */
.ct-schedule { display: flex; flex-direction: column; gap: .5rem; }
.ct-srow { display: flex; flex-direction: column; gap: .4rem; padding: .65rem .9rem; border-radius: 14px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .04); }
.ct-srow.is-live { border-color: rgba(239, 68, 68, .6); }
.ct-srow-main { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.ct-srow-time { font-size: .8rem; font-weight: 800; opacity: .65; min-width: 84px; font-variant-numeric: tabular-nums; }
.ct-srow-team { font-weight: 800; }
.ct-srow-vs { font-size: .75rem; font-weight: 800; text-transform: uppercase; opacity: .5; }
.ct-srow-score { font-weight: 900; padding: .1rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .1); font-variant-numeric: tabular-nums; }
.ct-srow-bet { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ct-srow-bet .rz-stack { gap: .5rem; }

/* results */
.ct-results { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ct-r-results-summary, .ct-r-summary { display: flex; flex-direction: column; gap: .7rem; }
.ct-r-mvp { margin: 0; padding: .8rem 1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(245, 158, 11, .2), rgba(245, 158, 11, .06)); border: 1px solid rgba(245, 158, 11, .45); }
.ct-r-mvp .rzi { vertical-align: middle; color: #fbbf24; }
.ct-r-sub { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .7; margin-top: .3rem; }
.ct-r-series { display: flex; flex-direction: column; gap: .5rem; padding: .9rem 1rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }
.ct-r-series h4 { margin: 0; font-size: 1.05rem; font-weight: 800; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ct-r-score { padding: .05rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .1); font-weight: 900; font-variant-numeric: tabular-nums; }
.ct-r-maps { margin: 0; padding-left: 1.1rem; line-height: 1.6; opacity: .9; }
.ct-r-table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--pf-border); }
.ct-r-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.ct-r-table th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; opacity: .7; padding: .55rem .65rem; border-bottom: 1px solid var(--pf-border); white-space: nowrap; background: rgba(255, 255, 255, .04); }
.ct-r-table td { padding: .5rem .65rem; border-bottom: 1px solid rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
.ct-r-table tbody tr:last-child td { border-bottom: 0; }
.ct-r-table tbody tr:hover { background: rgba(120, 160, 255, .08); }
.ct-r-table td:first-child { font-weight: 700; }

/* pick'em */
.ct-pickem { display: flex; flex-direction: column; gap: 1rem; max-width: 760px; }
.ct-pick { display: flex; flex-direction: column; gap: .5rem; padding: .85rem 1rem; border-radius: 16px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .04); }
.ct-pick-title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--pf-accent); }

.ct-team-cards .ls-pos { flex: none; }

@media (max-width: 900px) {
    .ct-reg-grid { grid-template-columns: 1fr; }
    .ct-reg-side { position: static; order: -1; }
}
@media (max-width: 768px) {
    .ct-bracket-wrap { overflow-x: visible; }
    .ct-bracket { flex-direction: column; width: 100%; gap: 1.2rem; }
    .ct-stage { width: 100%; }
    .ct-stage-body { display: flex; flex-direction: column; gap: .6rem; }
    .ct-cell::before, .ct-cell::after { display: none !important; }
    .ct-timer-val { font-size: 1.6rem; }
}

/* ===================================================================
   Info pages (inf-*): About / Rules / FAQ / Contacts / VIP / Settings
   =================================================================== */
.inf-root { min-width: 0; }
.inf-layout { display: block; }
.inf-layout.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1rem; align-items: start; }
.inf-doc { padding: 1.4rem 1.6rem; border-radius: 20px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); min-width: 0; overflow-wrap: anywhere; }
.inf-toc { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); max-height: calc(100vh - 2rem); overflow-y: auto; }
.inf-toc-title { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.inf-toc .rz-toc { background: transparent; border: 0; padding: 0; }
.inf-toc .rz-toc-item { border-radius: 10px; }
.inf-toc .inf-toc-l2 { padding-left: .6rem; }
.inf-toc .inf-toc-l3 { padding-left: 1.2rem; font-size: .9em; }

/* Типографика HTML-контента из БД */
.inf-prose { line-height: 1.7; font-size: 1rem; margin: 0; }
.inf-prose > :first-child { margin-top: 0; }
.inf-prose > :last-child { margin-bottom: 0; }
.inf-prose h1, .inf-prose h2, .inf-prose h3, .inf-prose h4 { font-weight: 800; line-height: 1.25; margin: 1.6em 0 .6em; scroll-margin-top: 1rem; }
.inf-prose h1 { font-size: 1.7rem; }
.inf-prose h2 { font-size: 1.4rem; padding-bottom: .35rem; border-bottom: 1px solid var(--pf-border); }
.inf-prose h3 { font-size: 1.15rem; }
.inf-prose h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.inf-prose p { margin: .7em 0; }
.inf-prose ul, .inf-prose ol { margin: .7em 0; padding-left: 1.4rem; }
.inf-prose li { margin: .3em 0; }
.inf-prose a { color: var(--rz-primary, #60a5fa); text-decoration: underline; text-underline-offset: 2px; }
.inf-prose img { max-width: 100%; height: auto; border-radius: 12px; }
.inf-prose blockquote { margin: 1em 0; padding: .7rem 1rem; border-left: 4px solid var(--pf-accent); background: rgba(255, 255, 255, .05); border-radius: 0 12px 12px 0; }
.inf-prose code { padding: .1rem .4rem; border-radius: 6px; background: rgba(0, 0, 0, .35); font-size: .9em; }
.inf-prose pre { padding: .8rem 1rem; border-radius: 12px; background: rgba(0, 0, 0, .35); overflow-x: auto; }
.inf-prose table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.inf-prose th, .inf-prose td { padding: .5rem .7rem; border: 1px solid var(--pf-border); text-align: left; }
.inf-prose th { background: rgba(255, 255, 255, .06); }
.inf-prose hr { border: 0; border-top: 1px solid var(--pf-border); margin: 1.5em 0; }

/* FAQ */
.inf-faq { display: flex; flex-direction: column; gap: .6rem; }
.inf-q { border-radius: 16px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .04); transition: border-color .15s, background-color .15s; overflow: hidden; }
.inf-q:hover { border-color: color-mix(in srgb, var(--pf-accent) 45%, transparent); }
.inf-q[open] { background: var(--pf-glass, rgba(255, 255, 255, .06)); border-color: color-mix(in srgb, var(--pf-accent) 60%, transparent); }
.inf-q > summary { display: flex; align-items: center; gap: .7rem; padding: .85rem 1.1rem; cursor: pointer; list-style: none; font-weight: 700; }
.inf-q > summary::-webkit-details-marker { display: none; }
.inf-q > summary > .rzi:first-child { color: var(--pf-accent); }
.inf-q-text { flex: 1; min-width: 0; }
.inf-q-chev { transition: transform .2s; opacity: .6; }
.inf-q[open] .inf-q-chev { transform: rotate(180deg); }
.inf-q-body { display: flex; flex-direction: column; gap: .7rem; padding: 0 1.1rem 1rem 3.1rem; animation: pf-rise .25s ease both; }
.inf-q-answer { white-space: pre-wrap; line-height: 1.6; opacity: .9; }

/* Contacts */
.inf-contacts { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.inf-contact-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, #22c55e, #06b6d4); color: #fff; }
.inf-contact-desc { white-space: normal; }
.inf-link-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .4rem .9rem; border-radius: 10px; border: 1px solid var(--pf-border); color: inherit; font-weight: 700; font-size: .85rem; text-decoration: none; transition: background-color .15s, border-color .15s; }
.inf-link-btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--pf-accent); }
.inf-link-btn .rzi { font-size: 1.05rem; }

/* VIP */
.inf-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.inf-plan { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: 1.5rem; border-radius: 22px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }
.inf-plan.is-premium { border-color: rgba(245, 158, 11, .6); background: linear-gradient(160deg, rgba(245, 158, 11, .16), rgba(239, 68, 68, .06)); box-shadow: 0 10px 40px rgba(245, 158, 11, .12); }
.inf-plan-badge { position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 800; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.inf-plan-badge .rzi { font-size: .95rem; }
.inf-plan-name { margin: 0; font-size: 1.3rem; font-weight: 900; }
.inf-plan.is-premium .inf-plan-name { color: #fbbf24; }
.inf-plan-sub { font-size: .85rem; opacity: .65; }
.inf-plan-price { display: flex; align-items: baseline; gap: .5rem; margin: .6rem 0; }
.inf-plan-price b { font-size: 2.4rem; font-weight: 900; }
.inf-plan-price span { opacity: .65; }
.inf-plan-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.inf-plan-list li { display: flex; gap: .5rem; align-items: flex-start; font-size: .92rem; opacity: .9; }
.inf-plan-list .rzi { flex: none; color: #22c55e; font-size: 1.2rem; }
.inf-vip-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-top: .4rem; }
.inf-vip-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.inf-vip-reward { display: flex; align-items: center; gap: .4rem; font-weight: 600; opacity: .85; }
.inf-vip-sub { margin: -.4rem .25rem .2rem; opacity: .7; }
.inf-vip-faq .ls-card h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.inf-vip-faq .ls-card p { margin: 0; line-height: 1.55; opacity: .8; }

/* Settings */
.inf-set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.inf-set-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.inf-set-actions { display: flex; justify-content: flex-end; margin-top: .9rem; }
.inf-set-switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.inf-set-label { font-weight: 700; }
.inf-set-hint { font-size: .85rem; opacity: .65; margin-top: .15rem; }

@media (max-width: 900px) {
    .inf-layout.has-toc { grid-template-columns: 1fr; }
    .inf-toc { display: none; }
}
@media (max-width: 600px) {
    .inf-doc { padding: 1rem; border-radius: 16px; }
    .inf-q-body { padding-left: 1.1rem; }
}

/* ---------- Skeleton kinds ---------- */
.ls-skeleton .sk-block { display: flex; flex-direction: column; gap: .6rem; }
.ls-skeleton .sk-doc { padding: 1.2rem 1.4rem; border-radius: 20px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }
.ls-skeleton .sk-fields { gap: 1rem; padding: 1.2rem; border-radius: 20px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }
.ls-skeleton .sk-field { display: flex; flex-direction: column; gap: .4rem; }
.ls-skeleton .sk-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.ls-skeleton .sk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.ls-skeleton .rz-skeleton { max-width: 100%; }
.ls-skeleton .sk-tiles > .rz-skeleton,
.ls-skeleton .sk-cols > .rz-skeleton,
.ls-skeleton .ls-sk-hero-text > .rz-skeleton { width: 100%; min-width: 0; }
.ls-skeleton .sk-tiles > .rz-skeleton { height: 74px; }
.ls-skeleton .sk-cols > .rz-skeleton { height: 240px; }
.ls-skeleton .ls-sk-hero-text > .rz-skeleton:first-child { max-width: 40%; }
.ls-skeleton .ls-sk-hero-text > .rz-skeleton:last-child { max-width: 65%; }
.ch-sk { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.2rem; }
.ch-sk-msg { display: flex; }
.ch-sk-msg.own { justify-content: flex-end; }
.ch-sk-msg .rz-skeleton { max-width: 100%; }

/* ===================================================================
   News / Video pages (nw-*)
   =================================================================== */
.nw-root { min-width: 0; max-width: 1000px; margin-inline: auto; width: 100%; }
.nw-hero { display: flex; flex-direction: column; gap: .7rem; padding: 1.2rem 1.4rem; border-radius: 22px; border: 1px solid var(--pf-border); background: linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(139, 92, 246, .10)); }
.nw-title { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 900; line-height: 1.2; overflow-wrap: anywhere; }
.nw-title-sm { font-size: clamp(1.2rem, 2.4vw, 1.6rem); }
.nw-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.nw-meta-actions { display: inline-flex; gap: .5rem; flex-wrap: wrap; margin-left: auto; }
.nw-article { padding: 1.6rem 2rem; font-size: 1.05rem; }
.nw-translation { display: flex; flex-direction: column; gap: .8rem; margin-top: .4rem; padding-top: 1.2rem; border-top: 1px solid var(--pf-border); }
.nw-translation-label { font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
.nw-translation-title { margin: 0; font-size: 1.35rem; font-weight: 800; line-height: 1.25; }
.nw-article-en { opacity: .92; }
.nw-player { border-radius: 22px; overflow: hidden; border: 1px solid var(--pf-border); background: #000; aspect-ratio: 16 / 9; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); }
.nw-player video { width: 100%; height: 100%; display: block; background: #000; }
.nw-author { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .8rem 1rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }
.nw-author-main { display: inline-flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; min-width: 0; }
.nw-author-name { font-weight: 800; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-author-main:hover .nw-author-name { text-decoration: underline; }
.nw-desc { padding: 1rem 1.3rem; border-radius: 18px; border: 1px solid var(--pf-border); background: var(--pf-glass, rgba(255, 255, 255, .05)); }

/* comments */
.nw-comments { display: flex; flex-direction: column; gap: .7rem; }
.nw-comment { padding: .8rem 1rem; border-radius: 16px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .04); }
.nw-c { display: flex; gap: .8rem; align-items: flex-start; }
.nw-c-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.nw-c-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nw-c-name { font-weight: 800; color: inherit; text-decoration: none; }
.nw-c-name:hover { text-decoration: underline; }
.nw-c-time { font-size: .78rem; opacity: .55; }
.nw-c-del { margin-left: auto; }
.nw-c-body { overflow-wrap: anywhere; white-space: normal; line-height: 1.55; }
.nw-c-body p { margin: .2em 0; }
.nw-composer { display: flex; flex-direction: column; gap: .6rem; padding: .9rem 1rem; border-radius: 16px; border: 1px dashed var(--pf-border); }
.nw-composer-title { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.nw-textarea { width: 100%; resize: vertical; min-height: 96px; padding: .7rem .9rem; border-radius: 14px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .06); color: inherit; font: inherit; outline: none; transition: border-color .15s, background-color .15s; }
.nw-textarea:focus { border-color: var(--pf-accent); background: rgba(255, 255, 255, .09); }
.nw-composer-actions { display: flex; justify-content: flex-end; }

@media (max-width: 600px) {
    .nw-article { padding: 1rem; }
    .nw-hero { padding: 1rem; }
    .nw-meta-actions { margin-left: 0; }
}

/* ===================================================================
   Matchmaking side panel (mm-*)
   =================================================================== */
.mm-root { display: flex; flex-direction: column; gap: .9rem; min-height: 100%; }
.mm-status { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; border-radius: 20px; border: 1px solid var(--pf-border); background: linear-gradient(135deg, rgba(59, 130, 246, .16), rgba(139, 92, 246, .10)); }
.mm-status.is-searching { border-color: rgba(34, 197, 94, .55); background: linear-gradient(135deg, rgba(34, 197, 94, .20), rgba(6, 182, 212, .10)); }
.mm-orb { position: relative; width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }
.mm-orb .rzi { font-size: 1.7rem; }
.mm-status.is-searching .mm-orb { background: linear-gradient(135deg, #22c55e, #06b6d4); }
.mm-status.is-searching .mm-orb::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(34, 197, 94, .6); animation: mm-pulse 1.6s ease-out infinite; }
@keyframes mm-pulse { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }
.mm-status-title { font-size: 1.1rem; font-weight: 900; }
.mm-status-sub { font-size: .9rem; opacity: .75; }
.mm-queue { margin-top: -.3rem; }
.mm-warn { display: flex; align-items: flex-start; gap: .5rem; padding: .7rem .9rem; border-radius: 14px; border: 1px solid rgba(255, 123, 0, .5); background: rgba(255, 123, 0, .10); color: #ffb066; font-size: .9rem; }
.mm-cta.rz-button { width: 100%; height: 52px; border-radius: 16px; font-weight: 800; font-size: 1.05rem; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.mm-cta-text { font-weight: 800; }
.mm-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.mm-action { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem .9rem; border-radius: 14px; border: 1px solid var(--pf-border); background: rgba(255, 255, 255, .05); color: inherit; font: inherit; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.mm-action:hover { background: rgba(255, 255, 255, .09); border-color: var(--pf-accent); transform: translateY(-1px); }
.mm-info { display: flex; flex-direction: column; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.mm-info-body { padding-left: 1.1rem; line-height: 1.55; font-size: .92rem; opacity: .9; }
.mm-info-body p { margin: .35em 0; }
.mm-info-body ul { margin: .35em 0; padding-left: 1.2rem; }
.mm-info-body a { display: block; padding: .2rem 0; }

/* ===================================================================
   Notifications drawer (nf-*)
   =================================================================== */
.nf-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); backdrop-filter: blur(3px); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .25s; }
.nf-overlay.open { opacity: 1; pointer-events: auto; }
.nf-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 100%; max-width: 460px; z-index: 1001; display: flex; flex-direction: column; background: rgba(19, 20, 23, .96); backdrop-filter: blur(14px); border-left: 1px solid var(--pf-border, rgba(255, 255, 255, .1)); box-shadow: -10px 0 40px rgba(0, 0, 0, .5); transform: translateX(100%); visibility: hidden; transition: transform .3s cubic-bezier(.65, .05, .36, 1), visibility 0s linear .3s; }
.nf-drawer.open { transform: translateX(0); visibility: visible; transition: transform .3s cubic-bezier(.65, .05, .36, 1); }
.nf-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-bottom: 1px solid var(--pf-border, rgba(255, 255, 255, .1)); }
.nf-icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .07); color: inherit; cursor: pointer; transition: background-color .15s; }
.nf-icon-btn:hover { background: rgba(255, 255, 255, .14); }
.nf-title { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 900; }
.nf-count { padding: .05rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 800; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; }
.nf-hide-all { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .8rem; border-radius: 12px; border: 1px solid var(--pf-border, rgba(255, 255, 255, .15)); background: transparent; color: inherit; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; transition: background-color .15s; }
.nf-hide-all:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.nf-hide-all:disabled { opacity: .4; cursor: default; }
.nf-hide-all .rzi { font-size: 1.1rem; }
.nf-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .5rem; padding: .8rem; }
.nf-item { position: relative; display: flex; align-items: flex-start; gap: .8rem; width: 100%; padding: .8rem .9rem; border-radius: 16px; border: 1px solid var(--pf-border, rgba(255, 255, 255, .1)); background: rgba(255, 255, 255, .03); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: background-color .15s, border-color .15s, transform .15s; }
.nf-item:hover { background: rgba(255, 255, 255, .07); transform: translateX(-2px); }
.nf-item.unread { background: color-mix(in srgb, var(--pf-accent, #3b82f6) 14%, transparent); border-color: color-mix(in srgb, var(--pf-accent, #3b82f6) 45%, transparent); }
.nf-item-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.nf-item.unread .nf-item-ico { background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; }
.nf-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.nf-item-title { font-weight: 800; overflow-wrap: anywhere; }
.nf-item-text { font-size: .88rem; opacity: .75; overflow-wrap: anywhere; line-height: 1.4; }
.nf-item-time { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; opacity: .5; }
.nf-item-time .rzi { font-size: .95rem; }
.nf-dot { width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; flex: none; margin-top: .3rem; }
.blinking-button { animation: nf-blink 2.5s infinite; }
@keyframes nf-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
