        .lk-page { padding: 8px 0 36px; }
        .lk-page[hidden],
        #ratingListWrap[hidden] { display: none !important; }
        .cf-profile { display: flex; flex-direction: column; gap: 12px; }
        .cf-back {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            align-self: flex-start;
            margin-bottom: 4px;
            padding: 9px 14px;
            border: 1px solid #93c5fd;
            border-radius: 8px;
            background: #eff6ff;
            color: #1d4ed8;
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
        }
        .cf-back:hover {
            background: #dbeafe;
            border-color: #60a5fa;
            text-decoration: none;
        }
        .cf-layout {
            display: grid;
            grid-template-columns: minmax(12.5rem, 22%) minmax(0, 1fr);
            gap: 1.25rem 1.5rem;
            align-items: start;
        }
        .cf-layout--stats { column-gap: 2.5rem; }
        .cf-side {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            padding: 12px 14px;
            border: 1px solid #d0d7de;
            background: #fff;
        }
        .cf-main {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .cf-user {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .cf-user-head {
            display: flex;
            gap: 1rem;
            align-items: center;
        }
        .cf-photo {
            width: clamp(4.75rem, 32%, 7.5rem);
            height: auto;
            aspect-ratio: 1;
            object-fit: cover; flex-shrink: 0;
            border: 1px solid #d0d7de; background: #e8edf5;
            border-radius: 2px !important;
        }
        .cf-photo--letter {
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-weight: 800; font-size: clamp(1.35rem, 4vw, 2.25rem);
        }
        .cf-user-meta { min-width: 0; flex: 1; }
        .cf-stats { display: block; }
        .cf-handle {
            margin: 0 0 0.25em; font-size: clamp(1.2rem, 1.6vw, 1.65rem); font-weight: 800; line-height: 1.15;
            word-break: break-word;
        }
        .cf-rank { font-size: 0.9rem; font-weight: 600; font-style: italic; margin-bottom: 0; }
        .cf-table { width: 100%; height: auto; border-collapse: collapse; font-size: 0.9rem; }
        .cf-table tr { height: auto; }
        .cf-table th, .cf-table td {
            padding: 0.45em 0; text-align: left; font-weight: 400;
            border-bottom: 1px solid #e8edf5; vertical-align: middle;
        }
        .cf-table th { color: #64748b; width: 46%; font-weight: 500; }
        .cf-table td { color: #0f172a; text-align: right; }
        .cf-day-stats {
            min-width: 0;
            padding: 16px 18px 18px;
            border: 1px solid #d0d7de;
            background: #fff;
        }
        .cf-day-stats-title {
            margin: 0;
            font-size: 16px;
            font-weight: 700;
            color: #0f172a;
        }
        .lk-bars--col {
            flex-direction: column;
            flex-wrap: nowrap;
            gap: 10px;
            margin-top: 14px;
        }
        .lk-bars--col .lk-bar { flex: none; min-width: 0; width: 100%; }
        .cf-day-range { font-weight: 650; }
        .stats-table-scroll {
            max-height: 300px;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
        }
        .results-table.stats-table--train { min-width: 500px; }
        .results-table.achievements-table { min-width: 600px; }
        .results-table.contests-table { min-width: 700px; }
        .col-rating.rating-delta--up { color: #4CAF50; font-weight: bold; font-size: 12px; }
        .col-rating.rating-delta--down { color: #f44336; font-weight: bold; font-size: 12px; }
        .stats-empty { text-align: center; color: #999; padding: 20px; }
        .cf-graph { min-width: 0; border: 1px solid #d0d7de; background: #fff; }
        .cf-graph img { display: block; width: 100%; height: auto; }
        .cf-graph--empty { padding: 24px; }
        .cf-block { margin-top: 0; }
        .cf-more { display: flex; flex-direction: column; gap: 10px; }
        .lk-panel { background: transparent; border: 1px solid #d0d7de; padding: 8px 12px; }
        .lk-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
        .lk-panel-title { margin: 0; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
        .lk-panel-foot { margin: 0; font-size: 12px; color: #64748b; }
        .lk-bars {
            display: flex;
            flex-wrap: wrap;
            gap: 6px 16px;
        }
        .lk-bar { flex: 1 1 140px; min-width: 140px; margin-bottom: 0; }
        .lk-bar-meta { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 2px; color: #64748b; }
        .lk-bar-track { background: #e2e8f0; height: 5px; overflow: hidden; }
        .lk-bar-fill { height: 100%; }
        .cf-side .lk-actions { margin-top: 0; }
        .lk-actions { display: flex; flex-wrap: wrap; gap: 8px; }
        .lk-profile .lk-actions .contest-link,
        .cf-profile .lk-actions .contest-link {
            padding: 8px 12px; font-size: 13px; flex: 1 1 auto; justify-content: center;
        }
        .lk-btn-info { background: #7c3aed !important; color: #fff !important; border: none !important; }
        .lk-btn-ok { background: #16a34a !important; color: #fff !important; border: none !important; }
        .lk-btn-out { background: #dc2626 !important; color: #fff !important; border: none !important; }
        .lk-btn-info,
        .lk-btn-ok,
        .lk-btn-out {
            transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
        }
        .lk-btn-info:hover {
            background: #6d28d9 !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(109, 40, 217, 0.4);
        }
        .lk-btn-ok:hover {
            background: #15803d !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
        }
        .lk-btn-out:hover {
            background: #b91c1c !important;
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
        }
        .lk-btn-info:active,
        .lk-btn-ok:active,
        .lk-btn-out:active {
            transform: translateY(0);
            box-shadow: none;
            filter: brightness(0.92);
        }
        .lk-loading, .lk-muted { margin: 8px 0; color: #64748b; text-align: center; }
        .lk-error { color: #dc2626; }
        .cf-profile .activity-calendar { margin: 0 !important; padding: 0 !important; background: transparent !important; }
        .activity-calendar-head { margin: 0 0 10px; }
        .activity-calendar-title {
            margin: 0 0 6px;
            color: #0f172a;
            font-size: 16px;
            font-weight: 700;
        }
        body.dark-mode .activity-calendar-title { color: #e8eef8; }
        .activity-calendar-toolbar {
            display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 10px 16px;
            margin-bottom: 6px; font-size: 13px;
        }
        .activity-calendar-toolbar label { display: inline-flex; align-items: center; gap: 8px; }
        .activity-calendar-toolbar select { padding: 4px 10px; }
        .activity-shift {
            width: 32px; height: 32px; border: 1px solid #d0d7de; background: transparent;
            color: #64748b; cursor: pointer;
        }
        .activity-shift:hover { background: #f1f5f9; color: #0f172a; }
        .activity-calendar:not(.is-scrollable) .activity-shift { display: none; }
        .calendar-inner { width: 100%; }
        body.dark-mode .activity-shift { border-color: #243044; color: #94a3b8; }
        body.dark-mode .activity-shift:hover { background: #243044; color: #e8eef8; }
        body.dark-mode .cf-photo { border-color: #243044; background: #1a2233; }
        body.dark-mode .cf-table th, body.dark-mode .cf-table td { border-bottom-color: #243044; }
        body.dark-mode .cf-table td { color: #e8eef8; }
        body.dark-mode .cf-graph,
        body.dark-mode .cf-side,
        body.dark-mode .cf-day-stats { border-color: #243044; background: #121826; }
        body.dark-mode .cf-day-stats-title { color: #e8eef8; }
        body.dark-mode .lk-panel { border-color: #243044; }
        body.dark-mode .lk-bar-track { background: #243044; }
        html.dark-mode .lk-bar-fill--expert,
        body.dark-mode .lk-bar-fill--expert { background: #7B9CFF !important; }
        body.dark-mode .cf-back {
            background: #1e3a5f;
            border-color: #3b82f6;
            color: #bfdbfe;
        }
        body.dark-mode .cf-back:hover {
            background: #1e40af;
            color: #fff;
        }
        body.dark-mode .lk-panel-foot,
        body.dark-mode .lk-bar-meta,
        body.dark-mode .lk-loading,
        body.dark-mode .lk-muted,
        body.dark-mode .cf-table th { color: #94a3b8; }
        @media (max-width: 900px) {
            .cf-layout { grid-template-columns: 1fr; }
            .cf-photo { width: 5.5rem; }
        }

        .activity-calendar {
            --activity-cell-size: 14px;
            --activity-cell-gap: 4px;
        }

        .activity-calendar .calendar-grid {
            display: inline-flex;
            flex-direction: row;
            align-items: flex-start;
            gap: var(--activity-cell-gap);
            background: inherit;
            padding: 2px;
        }

        .activity-calendar .weekdays-column {
            display: flex;
            flex-direction: column;
            width: 24px;
            min-width: 24px;
            margin-right: 4px;
            font-size: 10px;
            flex-shrink: 0;
        }

        .activity-calendar .weekdays-column div {
            width: 24px;
            height: var(--activity-cell-size);
            line-height: var(--activity-cell-size);
            margin-bottom: var(--activity-cell-gap);
        }

        .activity-calendar .day-cell {
            width: var(--activity-cell-size);
            height: var(--activity-cell-size);
            line-height: var(--activity-cell-size);
        }

        .activity-calendar .weeks-container {
            display: flex;
            gap: var(--activity-cell-gap);
            background: inherit;
            padding: 2px;
            flex-wrap: nowrap;
        }

        .activity-calendar .week-column {
            display: flex;
            flex-direction: column;
            gap: var(--activity-cell-gap);
        }

        .activity-calendar .day-cell {
            background: #ffffff;
            border: 1px solid #d0d0d0;
            border-radius: 2px;
            box-sizing: border-box;
            margin-bottom: 0;
        }

        .profile-badges {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
            gap: 10px;
            margin: 12px 0 20px;
        }

        .profile-badge {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 12px;
            background: #f8f9fa;
            border: 1px solid #e8e8e8;
        }

        .profile-badge i {
            font-size: 20px;
            color: #3b5998;
        }

        .profile-badge strong {
            display: block;
            font-size: 14px;
            color: #333;
        }

        .profile-badge span {
            display: block;
            margin-top: 2px;
            font-size: 12px;
            color: #777;
        }

        .profile-badge.badge-winner { background: #fff8e1; border-color: #ffd54f; }
        .profile-badge.badge-winner i { color: #f9a825; }
        .profile-badge.badge-prize { background: #f5f5f5; border-color: #cfcfcf; }
        .profile-badge.badge-prize i { color: #757575; }
        .profile-badge.badge-participant { background: #fff3e0; border-color: #ffcc80; }
        .profile-badge.badge-participant i { color: #ef6c00; }
        .profile-badge.month { background: #e8f5e9; border-color: #a5d6a7; }
        .profile-badge.month i { color: #2e7d32; }
        body.dark-mode .profile-badge { background: #242424; border-color: #444; }
        body.dark-mode .profile-badge strong { color: #e0e0e0; }
        body.dark-mode .profile-badge span { color: #aaa; }

        @media (max-width: 768px) {
            #modalContent { padding: 10px !important; }
            #modalContent h2 { font-size: 18px !important; margin-bottom: 15px !important; }
            .lk-stats { grid-template-columns: repeat(2, 1fr); }
            .lk-name { font-size: 16px; }
            .lk-stat-val { font-size: 16px; }
            .lk-chart-wrap img { max-height: 180px; }
            #modalContent > div[style*="display:grid"] { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; margin: 15px 0 !important; }
            #modalContent .stat-box { padding: 8px !important; }
            #modalContent .stat-box .stat-value { font-size: 18px !important; }
            #modalContent .stat-box .stat-label { font-size: 11px !important; }
            #modalContent h3 { font-size: 15px !important; margin-top: 15px !important; margin-bottom: 10px !important; }
            #modalContent .contest-link { padding: 8px 12px !important; font-size: 12px !important; }
            #modalContent > div[style*="display:flex"][style*="gap:10px"] { flex-wrap: wrap !important; gap: 8px !important; }
            #modalContent > div[style*="display:flex"] .contest-link { flex: 1 1 calc(50% - 4px) !important; justify-content: center !important; }
            .activity-calendar { padding: 0 !important; margin: 0 !important; }
            .activity-calendar h3 { font-size: 14px !important; margin-bottom: 10px !important; }
            .activity-calendar { --activity-cell-size: 12px; --activity-cell-gap: 4px; }
            .activity-calendar .weekdays-column { font-size: 9px !important; margin-right: 5px !important; }
            #modalContent .stats-table-scroll { max-height: 250px !important; margin: 0 -10px !important; padding: 0 10px !important; overflow-x: auto !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; }
            #modalContent .results-table { font-size: 11px !important; min-width: 600px !important; }
            #modalContent .results-table th, #modalContent .results-table td { padding: 6px 3px !important; }
            .swipe-hint { display: block !important; text-align: center; font-size: 11px; color: #999; margin-top: 5px; padding: 5px; }
            body.dark-mode .swipe-hint { color: #888; }
        }
        @media (max-width: 480px) {
            .lk-profile .lk-actions .contest-link { flex: 1 1 calc(50% - 4px); justify-content: center; }
            #modalContent .stat-box .stat-value { font-size: 16px !important; }
            #modalContent .stat-box .stat-label { font-size: 10px !important; }
            .activity-calendar { --activity-cell-size: 11px; --activity-cell-gap: 4px; }
            #modalContent .contest-link { flex: 1 1 100% !important; }
        }
        .swipe-hint { display: none; }
        .swipe-hint i { margin-right: 5px; }
        .activity-calendar .calendar-scroll-wrapper { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 auto; padding-bottom: 10px; display: flex; justify-content: flex-start !important; cursor: grab; scrollbar-width: auto; }
        .activity-calendar .calendar-scroll-wrapper.is-dragging,
        .activity-calendar .calendar-scroll-wrapper:active { cursor: grabbing; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar { height: 10px; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-track { background: #e8edf5; }
        .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-thumb { background: #94a3b8; }
        body.dark-mode .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-track { background: #1a2233; }
        body.dark-mode .activity-calendar .calendar-scroll-wrapper::-webkit-scrollbar-thumb { background: #64748b; }
        body.dark-mode .selected-tags-header { color: #ffffff !important; }
        body.dark-mode .selected-tags-header span { color: #ffffff !important; }
        body.dark-mode .contest-item[data-type="calendar"] { background: #1e1e1e !important; }
        .close-btn { padding: 10px 20px; background: #3b5998; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin-top: 20px; }
        .close-btn:hover { background: #2d4373; }
        body.dark-mode .close-btn { background: #5a7ab8; }
        body.dark-mode .close-btn:hover { background: #4a6a9a; }
        .division-card { padding: 15px 10px; border-radius: 8px; text-align: center; color: white; }
