
:root {
    --bg: #f4f5f7;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #eef0f4;
    --red: #c8102e;
    --red-bright: #d4142f;
    --gold: #b8860b;
    --gold-dim: #8a6d12;
    --silver: #6b7280;
    --bronze: #a0622a;
    --elite: #2563eb;
    --text: #1a1a22;
    --text-muted: #5c5c6a;
    --border: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-lg: 16px;
    --font-display: 'Oswald', 'Arial Narrow', sans-serif;
    --font-body: 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(200, 16, 46, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(200, 16, 46, 0.04), transparent);
    color: var(--text);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
    min-height: 100vh;
    line-height: 1.5;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: 0.02em;
}

h3, h4, h5, h6 {
    text-transform: none;
}

h2 {
    color: var(--text);
    margin: 28px 0 12px;
    font-size: 1.35rem;
    text-transform: uppercase;
}

/* Header + logo */
.site-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 24px 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.site-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
    flex-shrink: 0;
}

.site-header-text h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.15;
    text-transform: uppercase;
    background: linear-gradient(135deg, #1a1a22 0%, var(--red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-tagline {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Club stats */
.club-stats {
    margin: 0 0 20px;
}

.club-stats-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover {
    border-color: rgba(200, 16, 46, 0.35);
    transform: translateY(-1px);
}

.stat-card-wide {
    grid-column: 1 / -1;
    text-align: left;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--red-bright);
    line-height: 1.1;
}

.stat-value-sm {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: var(--font-body);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-top: 4px;
}

.stat-leader {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--gold);
    margin-top: 2px;
}

/* Site navigation */
.legion-site-nav {
    margin: 0 0 16px;
}

.legion-site-nav--split {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.legion-site-nav__primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}

.legion-site-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-elevated);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    min-height: 42px;
}

.legion-site-nav__link:hover {
    background: var(--surface-hover);
}

.legion-site-nav__link.is-active {
    border-color: var(--red);
    color: var(--red-bright);
    font-weight: 600;
    background: rgba(200, 16, 46, 0.08);
}

.legion-site-nav__link.is-disabled {
    opacity: 0.62;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--bg);
    color: var(--text-muted);
}

.legion-site-nav__soon {
    margin-left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.legion-site-nav__beta {
    margin-left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(200, 16, 46, 0.12);
    color: var(--red-bright);
    border: 1px solid rgba(200, 16, 46, 0.28);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.legion-site-nav__coaches-label {
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.legion-site-nav__coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 8px;
}

.legion-site-nav__coach-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 78px;
    padding: 10px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.legion-site-nav__coach-tile:hover {
    background: var(--surface-hover);
    border-color: rgba(200, 16, 46, 0.35);
}

.legion-site-nav__coach-tile.is-active {
    border-color: var(--red);
    background: rgba(200, 16, 46, 0.08);
    color: var(--red-bright);
    box-shadow: inset 0 0 0 1px rgba(200, 16, 46, 0.15);
}

.legion-site-nav__coach-tile--training {
    border-style: dashed;
}

.legion-site-nav__coach-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.legion-site-nav__coach-name {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
}

.legion-site-nav__btn {
    margin: 0;
    cursor: pointer;
    font-family: var(--font-body);
}

.legion-site-nav__btn:hover {
    color: var(--red-bright);
}

.legion-site-nav .legion-site-nav__btn#admin-logout-btn {
    margin-left: auto;
}

.legion-site-nav:not(.legion-site-nav--split) .legion-site-nav__primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 600px) {
    .legion-site-nav--split {
        padding: 10px;
    }

    .legion-site-nav__primary .legion-site-nav__link {
        flex: 1 1 calc(50% - 4px);
        font-size: 0.82rem;
        padding: 9px 10px;
    }

    .legion-site-nav__coaches-grid {
        grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    }

    .legion-site-nav__coach-tile {
        min-height: 72px;
    }

    .legion-site-nav__coach-name {
        font-size: 0.76rem;
    }
}

/* Legacy navbar (deprecated — use .legion-site-nav) */
.navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    box-shadow: var(--shadow);
}

.nav-tab, .navbar a {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    user-select: none;
    text-decoration: none;
    background: transparent;
    transition: all 0.2s;
}

.nav-tab.active-tab, .navbar a.active {
    background: var(--red);
    color: #fff;
}

.nav-tab.clickable, .navbar a:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.dropbtn {
    background: var(--surface);
    color: var(--text);
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    font-family: var(--font-body);
}

.dropbtn:hover { background: var(--surface-hover); border-color: var(--red); }

.dropdown { position: relative; display: inline-block; }

.dropdown-content {
    display: none;
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    min-width: 220px;
    border-radius: var(--radius);
    padding: 6px;
    z-index: 10;
    right: 0;
    box-shadow: var(--shadow);
}

.dropdown-content a {
    display: block;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 6px;
}

.dropdown-content a:hover { background: var(--surface-hover); color: var(--red-bright); }

@media (hover: hover) and (pointer: fine) {
    .dropdown:hover .dropdown-content { display: block; }
}

.dropdown.open .dropdown-content { display: block; }

/* Search */
.search-bar {
    margin: 0 0 18px;
}

.search-bar-inner {
    display: flex;
    align-items: center;
    gap: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 8px 6px 0;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--red-bright) 0%, var(--gold) 100%);
    border-radius: var(--radius) 0 0 var(--radius);
}

.search-bar-inner:focus-within {
    border-color: rgba(200, 16, 46, 0.45);
    box-shadow: 0 4px 24px rgba(200, 16, 46, 0.12);
}

.search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    color: var(--red);
    opacity: 0.85;
    padding-left: 4px;
}

.search-bar-inner:focus-within .search-icon {
    opacity: 1;
}

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 12px 8px 12px 0;
    font-size: 1rem;
    font-family: var(--font-body);
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.search-input:focus {
    outline: none;
}

.search-input::-webkit-search-cancel-button {
    display: none;
}

.search-clear {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 4px;
    border: none;
    border-radius: 10px;
    background: var(--surface-hover);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.search-clear:hover {
    background: rgba(200, 16, 46, 0.1);
    color: var(--red-bright);
}

.search-clear:active {
    transform: scale(0.94);
}

.search-status {
    margin: 8px 0 0 12px;
    font-size: 0.82rem;
    color: var(--text-muted);
    min-height: 1.25em;
    letter-spacing: 0.02em;
}

.search-status.has-results {
    color: var(--text);
}

.search-status.has-results strong {
    font-family: var(--font-display);
    color: var(--red-bright);
    font-weight: 600;
}

.search-status.no-results {
    color: var(--red-bright);
    font-weight: 500;
}

/* Progress charts */
.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.progress-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--red);
}

.progress-card-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.progress-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.progress-sparkline {
    width: 100%;
    height: 40px;
    display: block;
    color: var(--red);
}

.progress-trend-up .progress-card-value { color: #15803d; }
.progress-trend-up .progress-sparkline { color: #15803d; }
.progress-trend-down .progress-card-value { color: #b91c1c; }
.progress-trend-down .progress-sparkline { color: #b91c1c; }
.progress-card-empty { opacity: 0.6; }

#modal-progress { margin-top: 12px; }

.modal-progress-block {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.progress-hint {
    margin: 0 0 12px;
}

.progress-subtitle {
    margin: 16px 0 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.modal-history-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.modal-history-block .history-list {
    margin-top: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.history-count {
    font-size: 0.85em;
    font-weight: 500;
    color: var(--text-muted);
}

/* Welcome */
.welcome {
    background: var(--surface);
    border-left: 4px solid var(--red);
    padding: 16px 18px;
    margin: 16px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left-width: 4px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.welcome strong { color: var(--text); }

/* Tabs */
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 16px 0;
    align-items: center;
}

.tab {
    padding: 8px 12px;
    min-width: 4.25rem;
    text-align: center;
    white-space: nowrap;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.active {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 600;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin: 12px 0 20px;
    box-shadow: var(--shadow);
    max-width: 100%;
}

table.rating-table {
    width: 100%;
    min-width: 300px;
    border-collapse: collapse;
    margin: 0;
}

.rating-table th,
.rating-table td {
    padding: 11px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.rating-table td:nth-child(2) {
    text-align: left;
    word-break: break-word;
    hyphens: auto;
}

.rating-table .col-points,
.rating-table th.col-points,
.rating-table td.col-points,
.rating-table td.col-result {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
}

.rating-table td.col-points,
.rating-table td.col-points strong {
    font-size: 1.2rem;
    line-height: 1.15;
    letter-spacing: 0.02em;
}

.rating-table td.col-result {
    font-size: 1.05rem;
}

.rating-table td:first-child,
.rating-table td:first-child strong {
    font-family: var(--font-display);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.rating-table-overall { min-width: 320px; }
.rating-table-exercise { min-width: 400px; }

.rating-table th {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    font-weight: 600;
}

.rating-table tr:last-child td { border-bottom: none; }

.rating-table tbody tr {
    background: var(--surface);
    transition: background 0.15s;
}

.rating-table tbody tr:nth-child(even) { background: var(--bg-elevated); }
.rating-table tbody tr:hover { background: var(--surface-hover); }

.rank-1-cell {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.45), rgba(255, 215, 0, 0.2)) !important;
    color: var(--gold-dim);
    font-weight: 700;
}

.rank-2-cell {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.45), rgba(192, 192, 192, 0.2)) !important;
    color: #4b5563;
    font-weight: 700;
}

.rank-3-cell {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.4), rgba(205, 127, 50, 0.15)) !important;
    color: var(--bronze);
    font-weight: 700;
}

/* Legacy tables without wrap */
table:not(.rating-table) {
    width: 100%;
    border-collapse: collapse;
}

.modal table.rating-table { margin-top: 8px; }

.note { color: var(--text-muted); font-size: 0.9rem; margin: 12px 0; text-align: center; }
.error { color: #c8102e; }

.rotation-log {
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.92rem;
    line-height: 1.55;
}

.rotation-log[hidden] {
    display: none !important;
}

.rotation-log-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.rotation-log-header svg {
    flex-shrink: 0;
    color: var(--red);
}

.rotation-log-section {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
}

.rotation-log-section strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.rotation-log-section--out strong { color: #b45309; }
.rotation-log-section--up strong { color: #047857; }
.rotation-log-section--elite strong { color: var(--red-bright); }

.rotation-log-names {
    color: var(--text);
}

/* Rotation panel */
.rotation-panel {
    margin: 28px 0 8px;
}

.rotation-panel-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.rotation-panel-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--red-bright) 0%, var(--gold) 100%);
}

.rotation-panel-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px 18px 24px;
}

.rotation-panel-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.12) 0%, rgba(184, 134, 11, 0.1) 100%);
    color: var(--red);
    border: 1px solid rgba(200, 16, 46, 0.15);
}

.rotation-panel-text {
    flex: 1;
    min-width: 0;
}

.rotation-panel-title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.rotation-panel-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.rotation-status {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(200, 16, 46, 0.04);
    border: 1px solid rgba(200, 16, 46, 0.1);
}

.rotation-status-line {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text);
}

.rotation-status-line + .rotation-status-line {
    margin-top: 6px;
}

.rotation-panel-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 200px;
}

.rotation-password-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rotation-password-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

.rotation-password-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.rotation-password-input:focus {
    outline: none;
    border-color: rgba(200, 16, 46, 0.45);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.rotation-btn {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--red) 0%, #a00d24 100%);
    box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}

.rotation-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.45);
}

.rotation-btn:active:not(:disabled) {
    transform: translateY(0);
}

.rotation-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.rotation-btn.is-loading .rotation-btn-icon,
.rotation-btn.is-loading .rotation-btn-label {
    opacity: 0;
}

.rotation-btn-spinner {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rotation-spin 0.7s linear infinite;
}

.rotation-btn.is-loading .rotation-btn-spinner {
    display: block;
}

@keyframes rotation-spin {
    to { transform: rotate(360deg); }
}

.countdown { font-weight: 700; color: var(--red-bright); }

.athlete-name {
    color: var(--red-bright);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.15s;
}

.athlete-name:hover { color: var(--red); text-decoration: underline; }

.print-btn, button.no-print:not(.dropbtn):not(.modal-close):not(.rotation-btn) {
    margin: 12px 0;
    padding: 10px 20px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-body);
    transition: background 0.2s, transform 0.15s;
}

.print-btn:hover, button.no-print:not(.dropbtn):not(.modal-close):not(.rotation-btn):hover {
    background: var(--red-bright);
    transform: translateY(-1px);
}

.print-footer {
    margin-top: 28px;
    margin-bottom: 40px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* Только для печати рейтинга тренера */
.print-rating-meta,
.print-rating-sheet-footer {
    display: none;
}

.coach-label {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8em;
    color: var(--text-muted);
}

.rank-clickable {
    color: var(--gold);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.4);
}

.rank-clickable:hover { color: var(--gold-dim); }

.elite-icon {
    font-weight: bold;
    filter: drop-shadow(0 1px 2px rgba(200, 16, 46, 0.2));
}

.top25-badge {
    display: inline-block;
    margin-left: 0.4em;
    padding: 0.12em 0.45em;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    vertical-align: middle;
    color: #8b6914;
    background: linear-gradient(180deg, #fff9e6 0%, #f5e6b8 100%);
    border: 1px solid rgba(184, 134, 11, 0.55);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(184, 134, 11, 0.2);
    white-space: nowrap;
}

/* Club elite (TOP-25) */
.club-elite-section {
    margin: 8px 0 32px;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.06) 0%, rgba(184, 134, 11, 0.08) 50%, #ffffff 100%);
    border: 1px solid rgba(200, 16, 46, 0.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(200, 16, 46, 0.08);
    position: relative;
    overflow: visible;
}

.club-elite-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--red-bright) 0%, var(--gold) 100%);
}

.club-elite-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 8px;
    padding-left: 4px;
}

.club-elite-header-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.12), rgba(184, 134, 11, 0.15));
    border: 1px solid rgba(200, 16, 46, 0.2);
    border-radius: 14px;
}

.club-elite-title {
    margin: 0 0 4px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    color: var(--text);
}

.club-elite-subtitle {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.club-elite-subtitle strong {
    color: var(--red-bright);
    font-weight: 600;
}

.club-elite-table-wrap {
    border-color: rgba(200, 16, 46, 0.12);
}

.rating-table-elite tbody tr.row-club-elite {
    background: linear-gradient(90deg, rgba(200, 16, 46, 0.04), transparent);
}

.rating-table-elite tbody tr.row-club-elite-top3 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.14), rgba(255, 255, 255, 0));
}

.rating-table-elite tbody tr.row-club-elite-mid {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.12), rgba(255, 255, 255, 0));
}

.rating-table-elite tbody tr.row-club-elite-base {
    background: linear-gradient(90deg, rgba(61, 125, 214, 0.06), rgba(255, 255, 255, 0));
}

.rating-table-elite tbody tr.row-club-elite:hover {
    background: linear-gradient(90deg, rgba(200, 16, 46, 0.1), var(--surface-hover));
}

.rank-crown {
    display: block;
    font-size: 0.75rem;
    line-height: 1;
    margin-top: 2px;
}

.points-rank-hint {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

.legioners-section {
    margin-top: 8px;
}

.legioners-title {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.club-elite-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(200, 16, 46, 0.12), rgba(184, 134, 11, 0.15));
    border: 1px solid rgba(200, 16, 46, 0.25);
    color: var(--red-bright);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.modal-name-elite {
    color: var(--text);
}

.photo-frame.league-club-elite {
    background: linear-gradient(135deg, var(--red-bright), var(--gold));
    box-shadow: 0 0 22px rgba(200, 16, 46, 0.35);
}

/* Photo frame by league */
.photo-frame {
    display: inline-block;
    padding: 4px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: var(--surface);
}

.photo-frame .athlete-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0;
    border: none;
}

.photo-frame.league-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.photo-frame.league-silver {
    background: linear-gradient(135deg, #e8e8ec, #888);
    box-shadow: 0 0 16px rgba(184, 188, 196, 0.3);
}

.photo-frame.league-bronze {
    background: linear-gradient(135deg, #e8a050, #8b4513);
    box-shadow: 0 0 16px rgba(205, 127, 50, 0.3);
}

.photo-frame.league-elite {
    background: linear-gradient(135deg, #5a9fd4, #1a4d8c);
    box-shadow: 0 0 16px rgba(61, 125, 214, 0.35);
}

.photo-frame.league-none {
    background: var(--surface);
    border: 2px solid var(--border-strong);
}

/* Achievements grid */
.achievements { margin-top: 20px; }

.section-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ach-count {
    font-size: 0.75rem;
    background: var(--bg-elevated);
    padding: 2px 10px;
    border-radius: 20px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 500;
}

.ach-empty {
    margin: 0 0 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px dashed var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 520px) {
    .ach-grid { grid-template-columns: repeat(2, 1fr); }
}

.ach-card {
    position: relative;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.95), transparent 48%),
        linear-gradient(180deg, #ffffff, var(--bg));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 12px 12px;
    text-align: center;
    min-height: 196px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
    color: var(--text);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 20px rgba(0, 0, 0, 0.06);
}

.ach-card-texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0.55;
    z-index: 0;
    background-image:
        radial-gradient(circle at 20% 15%, rgba(26, 26, 34, 0.04) 0 1px, transparent 1.5px),
        radial-gradient(circle at 80% 70%, rgba(26, 26, 34, 0.035) 0 1px, transparent 1.5px);
    background-size: 14px 14px, 18px 18px;
}

.ach-card > *:not(.ach-card-texture):not(.ach-card-ribbon):not(.ach-card-new) {
    position: relative;
    z-index: 1;
}

.ach-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(200,16,46,0), rgba(200,16,46,0.18), rgba(200,16,46,0));
    opacity: 0.8;
    z-index: 2;
}

.ach-card::after {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 14px;
    border: 1px solid rgba(26, 26, 34, 0.04);
    pointer-events: none;
    z-index: 2;
}

.ach-card--earned,
.ach-card.active {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.ach-card--earned:hover,
.ach-card.active:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 14px 28px rgba(0, 0, 0, 0.1);
}

/* —— Узоры по редкости —— */
.ach-card.ach-common .ach-card-texture {
    background-image:
        linear-gradient(135deg, rgba(26, 26, 34, 0.035) 1px, transparent 1px),
        linear-gradient(45deg, rgba(26, 26, 34, 0.03) 1px, transparent 1px);
    background-size: 12px 12px;
    opacity: 0.45;
}

.ach-card.ach-rare .ach-card-texture,
.ach-card--earned.ach-rare .ach-card-texture {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(59, 130, 246, 0.18) 1px, transparent 1.5px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 10px 10px, 20px 20px;
    opacity: 0.7;
}

.ach-card.ach-epic .ach-card-texture,
.ach-card--earned.ach-epic .ach-card-texture {
    background-image:
        repeating-linear-gradient(
            -28deg,
            rgba(227, 24, 55, 0.07) 0 2px,
            transparent 2px 10px
        ),
        radial-gradient(circle at 80% 20%, rgba(227, 24, 55, 0.08), transparent 45%);
    opacity: 0.75;
}

.ach-card.ach-legendary .ach-card-texture,
.ach-card--earned.ach-legendary .ach-card-texture {
    background-image:
        radial-gradient(circle at 50% 0%, rgba(202, 138, 4, 0.16), transparent 50%),
        repeating-linear-gradient(
            90deg,
            rgba(202, 138, 4, 0.08) 0 1px,
            transparent 1px 8px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(202, 138, 4, 0.06) 0 1px,
            transparent 1px 8px
        );
    opacity: 0.85;
}

.ach-card--earned.ach-legendary,
.ach-card.active.ach-legendary {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 224, 116, 0.35), transparent 42%),
        linear-gradient(180deg, #fffdf5, #ffffff 58%);
    border-color: rgba(202, 138, 4, 0.45);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 10px 24px rgba(202, 138, 4, 0.14);
}

.ach-card--earned.ach-epic,
.ach-card.active.ach-epic {
    background:
        radial-gradient(circle at 50% 0%, rgba(227, 24, 55, 0.14), transparent 42%),
        linear-gradient(180deg, #fff8fa, #ffffff 58%);
    border-color: rgba(227, 24, 55, 0.35);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 10px 24px rgba(227, 24, 55, 0.1);
}

.ach-card--earned.ach-rare,
.ach-card.active.ach-rare {
    background:
        radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.14), transparent 42%),
        linear-gradient(180deg, #f7fbff, #ffffff 58%);
    border-color: rgba(59, 130, 246, 0.35);
}

.ach-card--earned.ach-common,
.ach-card.active.ach-common {
    border-color: var(--border-strong);
}

/* —— Статусные: Император (ТОП-1) и Зал славы —— */
.ach-card--status-top1,
.ach-card--status-record {
    padding-top: 28px;
    border-width: 2px;
}

.ach-card--status-top1.ach-card--earned,
.ach-card--status-top1.active {
    background:
        radial-gradient(circle at 50% 8%, rgba(255, 214, 80, 0.45), transparent 42%),
        linear-gradient(180deg, #fff8df, #ffffff 55%);
    border-color: #c9971a;
    box-shadow:
        inset 0 0 0 1px rgba(255, 224, 120, 0.55),
        0 12px 30px rgba(184, 134, 11, 0.22);
}

.ach-card--status-top1 .ach-card-texture {
    background-image:
        radial-gradient(circle at 50% 18%, rgba(255, 215, 0, 0.22), transparent 40%),
        repeating-conic-gradient(from 0deg at 50% 50%, rgba(202, 138, 4, 0.08) 0deg 8deg, transparent 8deg 16deg);
    opacity: 0.55;
}

.ach-card--status-top1 .ach-card-medal {
    width: 88px;
    height: 88px;
    box-shadow:
        inset 0 2px 12px rgba(255, 255, 255, 0.35),
        0 0 0 4px rgba(255, 224, 120, 0.35),
        0 10px 22px rgba(184, 134, 11, 0.28);
}

.ach-card--status-top1 .ach-card-icon img,
.ach-card--status-top1 .ach-icon-img {
    width: 66px;
    height: 66px;
}

.ach-card--status-record.ach-card--earned,
.ach-card--status-record.active {
    background:
        radial-gradient(circle at 50% 8%, rgba(227, 24, 55, 0.16), transparent 42%),
        radial-gradient(circle at 80% 90%, rgba(202, 138, 4, 0.12), transparent 40%),
        linear-gradient(180deg, #fff6f8, #ffffff 55%);
    border-color: #c41e3a;
    box-shadow:
        inset 0 0 0 1px rgba(255, 190, 205, 0.55),
        0 12px 30px rgba(180, 24, 55, 0.16);
}

.ach-card--status-record .ach-card-texture {
    background-image:
        radial-gradient(circle at 20% 20%, rgba(227, 24, 55, 0.1), transparent 35%),
        repeating-linear-gradient(
            45deg,
            rgba(202, 138, 4, 0.08) 0 2px,
            transparent 2px 12px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(227, 24, 55, 0.06) 0 2px,
            transparent 2px 12px
        );
    opacity: 0.7;
}

.ach-card--status-record .ach-card-medal {
    width: 88px;
    height: 88px;
    box-shadow:
        inset 0 2px 12px rgba(255, 255, 255, 0.3),
        0 0 0 4px rgba(227, 24, 55, 0.18),
        0 10px 22px rgba(180, 24, 55, 0.2);
}

.ach-card--status-record .ach-card-icon img,
.ach-card--status-record .ach-icon-img {
    width: 66px;
    height: 66px;
}

.ach-card-ribbon {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    box-sizing: border-box;
}

.ach-card-ribbon--top1 {
    background: #e0ac28;
    background-image: linear-gradient(135deg, #ffe08a 0%, #e0ac28 48%, #c48912 100%);
    color: #3a2800;
    border-color: #a8740f;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.35);
}

.ach-card-ribbon--record {
    background: #c41e3a;
    background-image: linear-gradient(135deg, #ef6b88 0%, #c41e3a 48%, #8f1028 100%);
    color: #ffffff;
    border-color: #8f1028;
    box-shadow: 0 2px 8px rgba(180, 24, 55, 0.35);
}

.ach-card--locked.ach-card--status-top1 .ach-card-ribbon,
.ach-card--locked.ach-card--status-record .ach-card-ribbon {
    opacity: 0.7;
    filter: grayscale(0.25);
}

.ach-card--locked,
.ach-card.locked {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.7), transparent 42%),
        linear-gradient(180deg, #f7f8fa, var(--bg));
    border-color: var(--border);
}

.ach-card--locked .ach-card-medal,
.ach-card.locked .ach-card-medal {
    opacity: 0.55;
    filter: grayscale(0.85) saturate(0.35);
}

.ach-card--locked .ach-card-title,
.ach-card.locked .ach-card-title,
.ach-card--locked .ach-card-desc,
.ach-card.locked .ach-card-desc,
.ach-card--locked .ach-card-detail,
.ach-card.locked .ach-card-detail,
.ach-card--locked .ach-card-date,
.ach-card.locked .ach-card-date,
.ach-card--locked .ach-card-meta,
.ach-card.locked .ach-card-meta {
    opacity: 1;
    filter: none;
    color: var(--text-muted);
}

.ach-card--locked .ach-card-title,
.ach-card.locked .ach-card-title {
    color: var(--text);
}

.ach-card--showcase {
    min-height: 228px;
    padding: 18px 14px 14px;
}

.ach-card--showcase .ach-card-medal {
    width: 92px;
    height: 92px;
}

.ach-card--showcase .ach-card-icon img,
.ach-card--showcase .ach-icon-img {
    width: 70px;
    height: 70px;
}

.ach-card--showcase .ach-card-title {
    font-size: 0.94rem;
}

.ach-card--showcase .ach-emoji {
    font-size: 2.35rem;
}

.ach-grid--showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .ach-grid--showcase {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ach-card--new {
    box-shadow: 0 0 0 1px rgba(227, 24, 55, 0.35), 0 6px 18px rgba(227, 24, 55, 0.12);
}

.ach-card-new {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: lowercase;
}

.ach-card--status-top1 .ach-card-new,
.ach-card--status-record .ach-card-new {
    top: 10px;
    right: 10px;
}

@keyframes ach-shine-pulse {
    0%, 100% { box-shadow: 0 4px 18px rgba(202, 138, 4, 0.25); }
    50% { box-shadow: 0 6px 28px rgba(253, 224, 71, 0.55); }
}

.ach-card--shine.ach-legendary,
.ach-card--shine.active.ach-legendary {
    animation: ach-shine-pulse 1.6s ease-in-out 2;
}

.ach-category {
    margin-bottom: 18px;
}

.ach-category-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ach-card-medal {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.46), transparent 36%),
        radial-gradient(circle at 60% 70%, rgba(0, 0, 0, 0.18), transparent 58%),
        linear-gradient(180deg, #f2f5f9, #8c97a8);
    border: 3px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        inset 0 2px 12px rgba(255, 255, 255, 0.22),
        inset 0 -4px 10px rgba(0, 0, 0, 0.16),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.ach-card-medal--legendary {
    border-color: rgba(255, 231, 133, 0.58);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 251, 210, 0.58), transparent 38%),
        radial-gradient(circle at 60% 70%, rgba(143, 86, 10, 0.24), transparent 58%),
        linear-gradient(180deg, #ffe9a4, #cc8b1a);
}
.ach-card-medal--epic {
    border-color: rgba(255, 198, 214, 0.36);
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 232, 239, 0.5), transparent 38%),
        radial-gradient(circle at 60% 70%, rgba(98, 11, 32, 0.24), transparent 58%),
        linear-gradient(180deg, #ff8ca5, #991c39);
}
.ach-card-medal--rare {
    border-color: rgba(183, 219, 255, 0.4);
    background:
        radial-gradient(circle at 35% 28%, rgba(236, 247, 255, 0.52), transparent 38%),
        radial-gradient(circle at 60% 70%, rgba(19, 54, 124, 0.22), transparent 58%),
        linear-gradient(180deg, #9ac8ff, #2d5ea7);
}

.ach-card-desc {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-muted);
    margin-top: 4px;
    flex: 1;
}

.ach-card-icon {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ach-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
}

.ach-card-icon img,
.ach-icon-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.28));
}

.ach-card--locked .ach-icon-img,
.ach-card.locked .ach-icon-img {
    filter: grayscale(1) contrast(0.85) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    opacity: 0.55;
}

.ach-emoji { font-size: 2rem; line-height: 1; }

.ach-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.28;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0.01em;
}

.ach-card-meta {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    color: var(--text);
}

.ach-card-detail {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text);
}

.ach-card-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ach-card-meta--locked {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
}

.ach-legend {
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

.ach-more-earned {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.ach-more-earned-summary {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ach-more-earned-summary::-webkit-details-marker { display: none; }
.ach-more-earned-summary::before { content: '▸ '; color: var(--text-muted); }
.ach-more-earned[open] .ach-more-earned-summary::before { content: '▾ '; }

.ach-more-earned .ach-grid {
    padding: 0 12px 12px;
}

.ach-locked-teaser {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
    overflow: hidden;
}

.ach-locked-teaser-summary {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ach-locked-teaser-summary::-webkit-details-marker { display: none; }
.ach-locked-teaser-summary::before { content: '▸ '; color: var(--text-muted); }
.ach-locked-teaser[open] .ach-locked-teaser-summary::before { content: '▾ '; }

.ach-locked-teaser-list {
    padding: 0 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.ach-locked-teaser-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px dashed var(--border);
    opacity: 0.9;
}

.ach-locked-teaser-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(0.95) brightness(0.85);
    opacity: 0.55;
}

.ach-locked-teaser-icon--fog {
    position: relative;
}

.ach-locked-teaser-icon--fog::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 30%, rgba(255, 255, 255, 0.35) 100%);
    pointer-events: none;
}

.ach-locked-teaser-icon .ach-icon-img { width: 28px; height: 28px; }
.ach-locked-teaser-icon .ach-emoji { font-size: 1.25rem; }

.ach-toast-host {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.ach-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    transform: translateY(12px);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.ach-toast--show {
    transform: translateY(0);
    opacity: 1;
}

.ach-toast-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

.ach-toast-emoji {
    font-size: 1.75rem;
    line-height: 1;
}

.ach-toast-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ach-toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 2px;
}

.hall-feed--achievements {
    margin-top: 28px;
}

.hall-feed-item--ach {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hall-ach-icon-wrap {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hall-ach-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.hall-ach-emoji { font-size: 1.15rem; line-height: 1; }

.hall-ach-text {
    flex: 1;
    min-width: 0;
}

.hall-ach-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.ach-locked-teaser-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ach-locked-teaser-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.ach-locked-teaser-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.athlete-profile-section .ach-legend { margin-top: 4px; }

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.history-item {
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.history-item-date {
    color: var(--text-muted);
    font-weight: 600;
    margin-right: 4px;
}

.history-item-change {
    font-weight: 700;
}

.history-item-change--up { color: #15803d; }
.history-item-change--down { color: #dc2626; }

/* League boxes */
.league-box {
    border-radius: var(--radius-lg);
    padding: 18px;
    margin: 16px 0;
    border: 1px solid var(--border);
}

.elite-box {
    background: linear-gradient(135deg, rgba(61, 125, 214, 0.12), var(--surface));
    border-left: 4px solid var(--elite);
}

.amateurs-box {
    background: var(--surface);
    border-left: 4px solid var(--text-muted);
}

.league-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.league-list li {
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.modal-overlay.active { display: flex; }

#rankModal.modal-overlay { z-index: 1100; }

.modal {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text);
}

.modal-close {
    position: absolute;
    top: 12px; right: 14px;
    font-size: 22px;
    cursor: pointer;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover { color: var(--text); border-color: var(--red); }

.modal h2 { margin: 0 0 8px; font-size: 1.4rem; }
.modal-header { text-align: center; margin-bottom: 16px; }

.modal-athlete-age {
    margin: 10px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.modal-rank-row {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.modal--rank {
    max-width: 760px;
}

.rank-modal-title {
    text-align: center;
    margin-bottom: 4px;
}

.rank-modal-body {
    margin-top: 8px;
}

/* Rank summary card in athlete modal */
.modal-rank-info {
    margin-top: 14px;
}

.rank-summary-empty {
    margin: 0;
    padding: 12px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rank-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    text-align: left;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.rank-summary-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.rank-summary-card--bronze { border-left: 4px solid #cd7f32; }
.rank-summary-card--silver { border-left: 4px solid #94a3b8; }
.rank-summary-card--gold { border-left: 4px solid #eab308; }

.rank-summary-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }

.rank-summary-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.rank-summary-rank {
    font-weight: 700;
    font-size: 1rem;
}

.rank-summary-league {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rank-summary-bar {
    display: block;
    height: 5px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 2px;
}

.rank-summary-bar span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
}

.rank-summary-card--bronze .rank-summary-bar span { background: linear-gradient(90deg, #cd7f32, #e8a86b); }
.rank-summary-card--silver .rank-summary-bar span { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.rank-summary-card--gold .rank-summary-bar span { background: linear-gradient(90deg, #ca8a04, #fde047); }

.rank-summary-action {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    flex-shrink: 0;
}

/* Rank modal */
.rank-modal-hero {
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.rank-modal-hero--bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.14), var(--surface));
    border-color: rgba(205, 127, 50, 0.35);
}

.rank-modal-hero--silver {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.16), var(--surface));
    border-color: rgba(148, 163, 184, 0.35);
}

.rank-modal-hero--gold {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.16), var(--surface));
    border-color: rgba(234, 179, 8, 0.35);
}

.rank-modal-hero-main {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.rank-modal-hero-icon { font-size: 2.4rem; line-height: 1; }

.rank-modal-hero-league {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    font-weight: 600;
}

.rank-modal-hero-rank {
    font-size: 1.35rem;
    font-weight: 800;
    margin-top: 2px;
}

.rank-modal-progress-track {
    height: 10px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.rank-modal-progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    transition: width 0.3s ease;
}

.rank-modal-hero--bronze .rank-modal-progress-fill { background: linear-gradient(90deg, #b87333, #e8a86b); }
.rank-modal-hero--silver .rank-modal-progress-fill { background: linear-gradient(90deg, #64748b, #cbd5e1); }
.rank-modal-hero--gold .rank-modal-progress-fill { background: linear-gradient(90deg, #ca8a04, #fde047); }

.rank-modal-progress-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.rank-modal-hint { color: var(--text); font-weight: 500; }
.rank-modal-hint--max { color: #15803d; font-weight: 600; }

/* League ladder */
.rank-ladder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 22px;
    padding: 0 8px;
}

.rank-ladder-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 72px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: opacity 0.2s, transform 0.2s;
}

.rank-ladder-step--active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(61, 125, 214, 0.15);
    transform: scale(1.05);
}

.rank-ladder-step--done {
    border-color: #15803d;
    background: rgba(21, 128, 61, 0.08);
}

.rank-ladder-step--locked {
    opacity: 0.45;
}

.rank-ladder-icon { font-size: 1.4rem; line-height: 1; }

.rank-ladder-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.rank-ladder-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.rank-ladder-connector {
    flex: 1;
    height: 3px;
    max-width: 48px;
    background: var(--border);
    border-radius: 99px;
    margin: 0 4px;
}

.rank-ladder-connector--done {
    background: linear-gradient(90deg, #15803d, #22c55e);
}

.rank-section-title {
    margin: 0 0 6px;
    font-size: 1rem;
}

.rank-section-note {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.rank-exercise-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.rank-exercise-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.rank-exercise-item--done {
    border-color: rgba(21, 128, 61, 0.35);
    background: rgba(21, 128, 61, 0.06);
}

.rank-exercise-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #15803d;
    flex-shrink: 0;
    margin-top: 1px;
}

.rank-exercise-item--done .rank-exercise-check {
    border-color: #15803d;
    background: #15803d;
    color: #fff;
}

.rank-exercise-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rank-exercise-name {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
}

.rank-exercise-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.rank-exercise-item--done .rank-exercise-desc { color: #166534; }

.rank-exercise-item--done .rank-exercise-name { color: #15803d; }

.rank-names-section {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.rank-names-track {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 160px;
    overflow-y: auto;
    padding: 2px;
}

.rank-name-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    white-space: nowrap;
}

.rank-name-pill-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--border);
    font-size: 0.65rem;
}

.rank-name-pill--done {
    border-color: rgba(21, 128, 61, 0.3);
    color: #15803d;
    background: rgba(21, 128, 61, 0.08);
}

.rank-name-pill--done .rank-name-pill-num {
    background: #15803d;
    color: #fff;
}

.rank-name-pill--current {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(61, 125, 214, 0.12);
    box-shadow: 0 0 0 2px rgba(61, 125, 214, 0.12);
}

.rank-name-pill--current .rank-name-pill-num {
    background: var(--accent);
    color: #fff;
}

.rank-exercises-section { margin-bottom: 4px; }

@media (max-width: 560px) {
    .rank-ladder { padding: 0; }
    .rank-ladder-step { min-width: 60px; padding: 8px 4px; }
    .rank-ladder-connector { max-width: 24px; }
    .rank-exercise-grid { grid-template-columns: 1fr; }
    .rank-summary-action { display: none; }
}

/* Hall of Fame */
.hall-hero {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
    padding: 20px 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hall-hero::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--red-bright) 100%);
}

.hall-hero-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.15), rgba(200, 16, 46, 0.1));
    border-radius: 14px;
    border: 1px solid rgba(184, 134, 11, 0.25);
}

.hall-title {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.hall-intro {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.hall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hall-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.hall-card-title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.hall-card-columns {
    display: none;
}

.hall-record-main {
    padding: 14px 12px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-top: 3px solid var(--gold);
    min-height: 100px;
}

.hall-record-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 20px 0;
}

.hall-record-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.hall-record-note {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.hall-record-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 6px;
}

.hall-record-value strong {
    color: var(--red-bright);
}

.hall-record-name {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.hall-record-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hall-date-now {
    color: var(--red);
    font-weight: 500;
}

.hall-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    text-transform: none;
    letter-spacing: 0;
    vertical-align: middle;
    font-weight: 600;
}

.hall-badge--active {
    background: rgba(200, 16, 46, 0.1);
    color: var(--red-bright);
}

.hall-badge--legacy {
    background: rgba(184, 134, 11, 0.12);
    color: var(--gold-dim);
}

.hall-feed {
    margin: 28px 0 20px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hall-feed-title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}

.hall-feed-empty {
    margin: 0;
    text-align: left;
}

.hall-feed-list {
    max-height: 420px;
    overflow-y: auto;
    margin-top: 0;
}

.hall-feed-item strong {
    color: var(--red-bright);
}

/* --- Микроанимации: появление строк рейтинга --- */

@media (prefers-reduced-motion: no-preference) {
    .legion-micro-row {
        animation: legion-micro-row-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
        animation-delay: var(--legion-micro-delay, 0ms);
    }

    @keyframes legion-micro-row-in {
        from {
            opacity: 0;
            transform: translateY(8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Print — полностью ч/б (только #000 / #fff) */
@media print {
    @page {
        margin: 12mm 10mm;
    }

    html, body, #content, #content * {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
        background: #fff !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        margin: 0;
        padding: 0;
        font-size: 11pt;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .navbar, .legion-site-nav, .tabs, button, .note, .error, .rotation-log, .rotation-panel, .countdown,
    .modal-overlay, .site-header, .club-stats, .welcome, .search-bar,
    .coach-benchmark-section, .no-print { display: none !important; }

    img,
    svg,
    .elite-icon,
    .top25-icon,
    .print-rating-logo {
        filter: grayscale(1) contrast(1.4) !important;
    }

    .table-wrap {
        border: 1px solid #000;
        border-radius: 0;
        margin: 0 0 0.65rem;
        overflow: visible;
    }

    .rating-table {
        min-width: 0 !important;
        width: 100%;
        font-size: 0.78rem;
        border-collapse: collapse;
    }

    .rating-table th,
    .rating-table td {
        padding: 3px 5px !important;
        line-height: 1.25;
        border: 1px solid #000 !important;
        position: static !important;
        background: #fff !important;
        color: #000 !important;
    }

    .rating-table thead th,
    .rating-table th {
        font-weight: 700;
        border-bottom: 2px solid #000 !important;
    }

    .rating-table tbody tr,
    .rating-table tbody tr:nth-child(even),
    .rating-table tbody tr:hover,
    .rank-1-cell,
    .rank-2-cell,
    .rank-3-cell {
        background: #fff !important;
        color: #000 !important;
    }

    .rank-clickable {
        color: #000 !important;
        border-bottom: none !important;
        text-decoration: none !important;
        font-weight: 600;
    }

    h1, h2 {
        margin-top: 0;
        page-break-after: avoid;
        color: #000 !important;
    }

    h2 {
        font-size: 1.05rem;
        margin: 0.7rem 0 0.35rem;
        font-weight: 700;
    }

    #content br {
        display: none;
    }

    .print-rating-meta {
        display: block !important;
        margin: 0 0 0.85rem;
        padding-bottom: 0.65rem;
        border-bottom: 2px solid #000;
        background: #fff !important;
    }

    .print-rating-meta-top {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .print-rating-logo {
        display: block;
        width: 48px;
        height: 48px;
        object-fit: contain;
        flex: 0 0 auto;
    }

    .print-rating-meta-text {
        min-width: 0;
        flex: 1 1 auto;
        background: #fff !important;
    }

    .print-rating-title {
        margin: 0 0 0.2rem;
        font-size: 1.45rem;
        font-weight: 800;
        line-height: 1.2;
    }

    .print-rating-brand {
        margin: 0 0 0.12rem;
        font-size: 0.82rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }

    .print-rating-date {
        margin: 0;
        font-size: 0.78rem;
    }

    .print-rating-sheet-footer {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 0.55rem;
        border-top: 2px solid #000;
        font-size: 0.78rem;
        page-break-inside: avoid;
        background: #fff !important;
    }

    .print-rating-sheet-footer-brand {
        font-weight: 700;
    }

    .print-footer {
        display: none !important;
    }
}

@media (max-width: 600px) {
    body { padding: 0 10px 32px; }

    .site-header { flex-direction: column; text-align: center; }
    .site-logo { width: 72px; height: 72px; }
    .site-header-text h1 { font-size: 1.35rem; }
    .club-stats-inner { grid-template-columns: repeat(2, 1fr); }
    .search-bar-inner { padding: 4px 6px 4px 0; }
    .search-icon { width: 42px; }
    .search-input { font-size: 0.95rem; padding: 11px 6px 11px 0; }
    .rotation-panel-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 16px;
    }
    .rotation-panel-icon { margin: 0 auto; }
    .rotation-panel-actions { min-width: 0; width: 100%; }
    .rotation-btn { width: 100%; }
    .hall-hero { flex-direction: column; text-align: center; padding: 16px; }
    .hall-hero-icon { margin: 0 auto; }
    .club-elite-header { flex-direction: column; text-align: center; }
    .club-elite-header-icon { margin: 0 auto; }
    .club-elite-section { padding: 14px 8px 12px; }

    h2 { font-size: 1.1rem; margin: 20px 0 10px; }

    .table-wrap {
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--radius);
    }

    table.rating-table { min-width: 280px; }

    .rating-table-overall {
        table-layout: fixed;
        min-width: 100%;
    }

    .rating-table-exercise {
        table-layout: fixed;
        min-width: 100%;
    }

    .rating-table-overall th:nth-child(1),
    .rating-table-overall td:nth-child(1) { width: 11%; }
    .rating-table-overall th:nth-child(2),
    .rating-table-overall td:nth-child(2) { width: 30%; max-width: none; }
    .rating-table-overall th:nth-child(3),
    .rating-table-overall td:nth-child(3) { width: 39%; }
    .rating-table-overall th.col-points,
    .rating-table-overall td.col-points { width: 20%; }

    .rating-table-exercise th:nth-child(1),
    .rating-table-exercise td:nth-child(1) { width: 10%; }
    .rating-table-exercise th:nth-child(2),
    .rating-table-exercise td:nth-child(2) { width: 26%; max-width: none; }
    .rating-table-exercise th:nth-child(3),
    .rating-table-exercise td:nth-child(3) { width: 30%; }
    .rating-table-exercise th:nth-child(4),
    .rating-table-exercise td:nth-child(4) { width: 17%; }
    .rating-table-exercise th.col-points,
    .rating-table-exercise td.col-points { width: 17%; }

    .rating-table-overall td:nth-child(3),
    .rating-table-exercise td:nth-child(3) {
        font-size: 0.74rem;
        line-height: 1.2;
        word-break: break-word;
        hyphens: auto;
    }

    .rating-table th.col-points,
    .rating-table td.col-points {
        position: sticky;
        right: 0;
        z-index: 1;
        min-width: 46px;
        padding-left: 8px;
        box-shadow: -5px 0 10px -6px rgba(0, 0, 0, 0.15);
    }

    .rating-table th.col-points {
        background: var(--bg-elevated);
        z-index: 2;
    }

    .rating-table tbody tr td.col-points {
        background: var(--surface);
    }

    .rating-table tbody tr:nth-child(even) td.col-points {
        background: var(--bg-elevated);
    }

    .rating-table tbody tr:hover td.col-points {
        background: var(--surface-hover);
    }

    .rating-table-elite tbody tr.row-club-elite td.col-points {
        background: #fff;
    }

    .rating-table-elite tbody tr.row-club-elite-top3 td.col-points {
        background: #fffef8;
    }

    .rating-table-elite tbody tr.row-club-elite-mid td.col-points {
        background: #fafafa;
    }

    .rating-table-elite tbody tr.row-club-elite-base td.col-points {
        background: #fff;
    }

    .rating-table td.col-points,
    .rating-table td.col-points strong {
        font-size: 1.05rem;
    }

    .rating-table td.col-result {
        font-size: 0.95rem;
    }

    .rating-table th,
    .rating-table td {
        padding: 8px 6px;
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .rating-table th {
        font-size: 0.65rem;
        white-space: nowrap;
    }

    .rating-table td:first-child {
        min-width: 36px;
        white-space: nowrap;
    }

    .rating-table td:nth-child(2) {
        min-width: 72px;
        max-width: 130px;
    }

    .rank-clickable {
        font-size: 0.78rem;
        line-height: 1.25;
        display: inline-block;
    }

    .elite-icon { font-size: 0.9em; }

    .tabs { gap: 4px; margin: 12px 0; }
    .tab { padding: 7px 10px; font-size: 0.78rem; }

    .modal .rating-table th,
    .modal .rating-table td {
        padding: 7px 5px;
        font-size: 0.8rem;
    }

    .modal-overlay { padding: 8px; }
    .modal { padding: 18px 12px; max-height: 92vh; }
}

/* Guide: О системе рейтинга */
.guide-page {
    padding-bottom: 48px;
}

.guide-nav .nav-tab {
    text-decoration: none;
}

.guide-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 4px;
}

.guide-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 24px 0 36px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.guide-hero-img {
    flex-shrink: 0;
    width: min(100%, 280px);
}

.guide-hero-img .guide-illus,
.guide-hero-img .guide-illus svg {
    width: 100%;
    max-width: 280px;
}

.guide-illus svg {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.guide-section-media .guide-illus {
    width: 100%;
}

.guide-section-media--center .guide-illus svg {
    max-width: 100%;
}

.guide-hero-text p {
    margin: 0 0 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-hero-text p:last-child {
    margin-bottom: 0;
}

.guide-note {
    font-size: 0.9rem;
    color: var(--text);
    padding: 10px 14px;
    background: rgba(200, 16, 46, 0.06);
    border-left: 3px solid var(--red);
    border-radius: 0 8px 8px 0;
}

.guide-section {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}

.guide-section:last-of-type {
    border-bottom: none;
}

.guide-section--reverse .guide-section-media {
    order: 2;
}

.guide-section--reverse .guide-section-body {
    order: 1;
}

.guide-section--full {
    grid-template-columns: 1fr;
    text-align: center;
}

.guide-section-media img {
    width: 100%;
    max-width: 360px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.guide-section-media--center img {
    max-width: 100%;
}

.guide-section-body h2 {
    margin: 0 0 14px;
    font-size: 1.25rem;
}

.guide-section-body p,
.guide-section-body li {
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-section-body ul,
.guide-section-body ol {
    margin: 0 0 14px;
    padding-left: 1.25rem;
}

.guide-exercise-list {
    columns: 2;
    column-gap: 24px;
}

.guide-tiebreak {
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--red-bright);
    letter-spacing: 0.02em;
    margin: 12px 0 0;
}

.guide-footer {
    text-align: center;
    margin: 32px 0 16px;
}

.guide-back-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
}

.guide-back-btn:hover {
    background: var(--red-bright);
    transform: translateY(-1px);
}

/* Страница «О нас» */
.about-hero-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 200px);
    aspect-ratio: 1;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(200, 16, 46, 0.08) 0%, rgba(200, 16, 46, 0.02) 100%);
    border-radius: 50%;
    border: 2px solid rgba(200, 16, 46, 0.15);
}

.about-hero-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.about-section-title {
    margin: 0 0 20px;
    font-size: 1.35rem;
    text-align: center;
}

.about-values {
    margin-bottom: 40px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.about-values-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.about-value-card {
    padding: 20px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.about-value-icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 10px;
}

.about-value-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.about-value-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.about-illus-block {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    background: linear-gradient(135deg, #f8f9fb 0%, #fff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.about-illus-emoji {
    font-size: 4rem;
    line-height: 1;
}

.about-inline-link {
    color: var(--red);
    font-weight: 600;
    text-decoration: none;
}

.about-inline-link:hover {
    text-decoration: underline;
}

.about-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 20px 0 12px;
}

.about-contact-btn--ghost {
    display: inline-block;
    padding: 12px 28px;
    border: 2px solid var(--red);
    color: var(--red);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.about-contact-btn--ghost:hover {
    background: rgba(200, 16, 46, 0.06);
}

.about-contact-phone {
    margin: 0;
    color: var(--text-muted);
}

.about-contact-phone a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.about-contact-phone a:hover {
    color: var(--red);
}

@media (max-width: 720px) {
    .guide-hero {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }

    .guide-section,
    .guide-section--reverse {
        grid-template-columns: 1fr;
    }

    .guide-section--reverse .guide-section-media,
    .guide-section--reverse .guide-section-body {
        order: unset;
    }

    .guide-exercise-list {
        columns: 1;
    }

    .about-values-grid {
        grid-template-columns: 1fr;
    }
}

/* Предупреждения при частичной загрузке */
.legion-warnings {
    margin: 0 0 16px;
}

.legion-warnings-inner {
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
}

.legion-warnings-title {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.legion-warnings-list {
    margin: 0 0 8px;
    padding-left: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.45;
}

.legion-warnings-hint {
    margin: 0;
    font-size: 0.82rem;
}

.legion-warnings-hint a {
    color: #b45309;
    font-weight: 600;
}

/* Диагностика */
.diag-page .diag-main {
    max-width: 960px;
    margin: 0 auto;
}

.diag-summary {
    margin-bottom: 28px;
}

.diag-meta {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.diag-summary-cards {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.diag-summary-card {
    flex: 1;
    min-width: 100px;
    padding: 14px 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border);
    background: #fff;
}

.diag-summary-num {
    display: block;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.diag-summary-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.diag-summary-card.diag-ok .diag-summary-num { color: #047857; }
.diag-summary-card.diag-warn .diag-summary-num { color: #b45309; }
.diag-summary-card.diag-error .diag-summary-num { color: #b91c1c; }

.diag-hint {
    margin: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
}

.diag-hint--ok { background: #ecfdf5; color: #047857; }
.diag-hint--warn { background: #fffbeb; color: #b45309; }
.diag-hint--error { background: #fef2f2; color: #b91c1c; }

.diag-section {
    margin-bottom: 28px;
}

.diag-section h2 {
    margin-top: 0;
}

.diag-table td:last-child {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.diag-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.diag-badge.diag-ok {
    background: #d1fae5;
    color: #047857;
}

.diag-badge.diag-warn {
    background: #fef3c7;
    color: #b45309;
}

.diag-badge.diag-error {
    background: #fee2e2;
    color: #b91c1c;
}

.diag-notes ul {
    margin: 0;
    padding-left: 1.2rem;
    line-height: 1.55;
}

.diag-notes code {
    font-size: 0.85em;
    background: var(--bg-elevated);
    padding: 1px 6px;
    border-radius: 4px;
}

/* Строка результата тренера (вне зачёта) */
.coach-benchmark-section {
    margin: 1.25rem 0 1.5rem;
}

.coach-benchmark-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0 0 0.65rem;
    color: var(--text);
}

.coach-benchmark-note {
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.rating-table-coach-benchmark {
    border: 1px dashed var(--border-strong);
}

.row-coach-benchmark {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.07), rgba(37, 99, 235, 0.02));
}

.row-coach-benchmark td {
    border-top: 1px dashed var(--border-strong);
}

.coach-profile-row {
    cursor: pointer;
}

.coach-profile-row:hover td,
.coach-profile-row:focus td {
    background: rgba(37, 99, 235, 0.06);
}

.coach-profile-row:focus {
    outline: none;
}

.coach-benchmark-place {
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
}

/* —— Модальное окно: ссылки на карточку —— */
.modal-profile-actions {
    margin-top: 12px;
}

.athlete-modal-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    min-height: 40px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.athlete-modal-card-btn--top {
    border: 1px solid var(--red);
    background: transparent;
    color: var(--red);
}

.athlete-modal-card-btn--top:hover {
    background: rgba(196, 30, 58, 0.08);
    color: var(--red);
    text-decoration: none;
}

.athlete-modal-card-btn--top:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

.modal-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.athlete-modal-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 28px;
    border-radius: var(--radius-md);
    background: var(--red);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.athlete-modal-more-btn:hover {
    background: var(--red-hover, #c62828);
    color: #fff;
    text-decoration: none;
}

.athlete-modal-more-btn:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
}

/* —— Страница карточки спортсмена —— */
.athlete-profile-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 16px 56px;
}

.athlete-profile-back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.athlete-profile-back:hover {
    color: var(--red);
}

.athlete-profile-card {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.athlete-profile-hero {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.athlete-profile-photo-frame {
    margin: 0 auto 16px;
    width: 140px;
    height: 140px;
}

.athlete-profile-photo {
    width: 120px;
    height: 120px;
}

.athlete-profile-age {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.athlete-profile-name {
    margin: 0 0 8px;
    font-size: 1.6rem;
}

.athlete-profile-league {
    margin: 0 0 8px;
}

.athlete-profile-coach {
    margin: 0 0 8px;
}

.athlete-profile-coach-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.athlete-profile-coach-link:hover {
    color: var(--red);
}

.athlete-profile-ranks {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.athlete-profile-goal {
    margin: 10px 0 0;
    padding: 10px 12px;
    background: rgba(196, 30, 58, 0.08);
    border-left: 3px solid var(--red);
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.35;
}

.athlete-profile-goal strong {
    color: var(--red);
    font-weight: 700;
}

.athlete-profile-goal-sub {
    color: var(--text-muted);
    font-size: 0.85em;
}

.athlete-profile-goal--leader {
    background: rgba(46, 125, 50, 0.1);
    border-left-color: #2e7d32;
}

.athlete-profile-goal--coach {
    margin-top: 6px;
    background: transparent;
    border-left-color: var(--text-muted);
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 6px 12px;
}

.athlete-profile-goal--coach strong {
    color: var(--text);
}

.athlete-profile-section {
    margin-bottom: 28px;
}

.athlete-profile-section:last-child {
    margin-bottom: 0;
}

/* —— Карта легионера —— */
.athlete-profile-path-section .section-title {
    margin-bottom: 12px;
}

.legion-path {
    padding: 16px 14px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        radial-gradient(circle at 50% 0%, rgba(200, 16, 46, 0.05), transparent 45%),
        linear-gradient(180deg, #ffffff, var(--bg));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.legion-path-track {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0;
    overflow-x: auto;
    padding: 4px 2px 8px;
}

.legion-path-station {
    flex: 1 1 0;
    min-width: 72px;
    max-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}

.legion-path-node {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef1f5;
    border: 3px solid #d5dae3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.legion-path-icon-img,
.legion-path-icon-svg {
    width: 40px;
    height: 40px;
    display: block;
    object-fit: contain;
}

.legion-path-emoji {
    font-size: 1.45rem;
    line-height: 1;
}

.legion-path-title {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
}

.legion-path-status {
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--text-muted);
}

.legion-path-connector {
    flex: 0 0 18px;
    height: 4px;
    margin-top: 26px;
    border-radius: 999px;
    background: #d8dde6;
    align-self: flex-start;
}

.legion-path-connector--done {
    background: linear-gradient(90deg, #cd7f32, #94a3b8);
}

.legion-path-connector--active {
    background: linear-gradient(90deg, #c8102e, #eab308);
}

.legion-path-station--done .legion-path-node {
    border-color: #16a34a;
    background: linear-gradient(180deg, #f0fdf4, #dcfce7);
}

.legion-path-station--done .legion-path-status {
    color: #15803d;
}

.legion-path-station--current .legion-path-node {
    border-color: #c8102e;
    background: linear-gradient(180deg, #fff, #ffe8ec);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.12), 0 8px 18px rgba(200, 16, 46, 0.12);
    transform: scale(1.08);
}

.legion-path-station--current .legion-path-icon-img,
.legion-path-station--current .legion-path-icon-svg,
.legion-path-station--current .legion-path-emoji {
    filter: drop-shadow(0 2px 6px rgba(200, 16, 46, 0.35));
}

.legion-path-station--done .legion-path-icon-img,
.legion-path-station--done .legion-path-icon-svg {
    filter: drop-shadow(0 1px 3px rgba(22, 163, 74, 0.25));
}

.legion-path-station--current .legion-path-title {
    color: #c8102e;
}

.legion-path-station--current .legion-path-status {
    color: #c8102e;
    font-weight: 800;
}

.legion-path-station--locked .legion-path-node {
    filter: grayscale(0.85);
    opacity: 0.55;
}

.legion-path-station--locked .legion-path-icon-img {
    filter: none;
}

.legion-path-station--locked .legion-path-title,
.legion-path-station--locked .legion-path-status {
    color: var(--text-muted);
}

.legion-path-hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}

@media (max-width: 560px) {
    .legion-path-station {
        min-width: 64px;
    }
    .legion-path-node {
        width: 48px;
        height: 48px;
    }
    .legion-path-icon-img,
    .legion-path-icon-svg {
        width: 34px;
        height: 34px;
    }
    .legion-path-title {
        font-size: 0.64rem;
    }
    .legion-path-connector {
        flex-basis: 12px;
        margin-top: 22px;
    }
}

.athlete-profile-rank-section .rank-summary-card {
    width: 100%;
}

/* —— Блок рангов на карточке спортсмена —— */
.athlete-profile-ranks-section .section-title {
    margin-bottom: 12px;
}

.athlete-rank-profile {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.athlete-rank-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.athlete-rank-head--bronze { border-left: 4px solid #cd7f32; }
.athlete-rank-head--silver { border-left: 4px solid #94a3b8; }
.athlete-rank-head--gold { border-left: 4px solid #eab308; }

.athlete-rank-head-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.athlete-rank-head-league {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.athlete-rank-head-rank {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 2px;
}

.athlete-rank-head-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.athlete-rank-leagues-done {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.athlete-rank-league-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--surface);
}

.athlete-rank-league-badge--bronze {
    border-color: rgba(205, 127, 50, 0.45);
    color: #9a5b1f;
}

.athlete-rank-league-badge--silver {
    border-color: rgba(148, 163, 184, 0.55);
    color: #475569;
}

.athlete-rank-all-done {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(21, 128, 61, 0.08);
    border: 1px solid rgba(21, 128, 61, 0.25);
    color: #15803d;
    font-size: 0.9rem;
    font-weight: 600;
}

.athlete-rank-todo-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}

.athlete-rank-todo-heading {
    margin: 0;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.athlete-rank-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    vertical-align: middle;
}

.athlete-rank-todo-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.athlete-rank-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.athlete-rank-todo-item:last-child {
    border-bottom: none;
}

.athlete-rank-todo-item--next {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.07), transparent);
    border-left: 3px solid var(--red);
    padding-left: 11px;
}

.athlete-rank-todo-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.athlete-rank-todo-item--next .athlete-rank-todo-num {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
}

.athlete-rank-todo-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1;
}

.athlete-rank-todo-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.athlete-rank-todo-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.athlete-rank-todo-badge {
    align-self: flex-start;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.12);
    color: var(--red);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.athlete-rank-done-details {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
}

.athlete-rank-done-summary {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.athlete-rank-done-summary::-webkit-details-marker {
    display: none;
}

.athlete-rank-done-summary::before {
    content: '▸ ';
    color: var(--text-muted);
}

.athlete-rank-done-details[open] .athlete-rank-done-summary::before {
    content: '▾ ';
}

.athlete-rank-done-list {
    list-style: none;
    margin: 0;
    padding: 0 14px 10px;
    max-height: 200px;
    overflow-y: auto;
}

.athlete-rank-done-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.85rem;
}

.athlete-rank-done-item:last-child {
    border-bottom: none;
}

.athlete-rank-done-check {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: #15803d;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    margin-top: 1px;
}

.athlete-rank-done-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.athlete-rank-done-name {
    font-weight: 600;
    color: #15803d;
}

.athlete-rank-done-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .athlete-profile-card {
        padding: 18px 14px;
    }

    .athlete-profile-name {
        font-size: 1.35rem;
    }

    .athlete-rank-todo-list {
        max-height: 260px;
    }
}

/* —— История на карточке спортсмена —— */
.athlete-profile-log-section .section-title {
    margin-bottom: 14px;
}

.athlete-log-block {
    margin-bottom: 18px;
}

.athlete-log-block:last-child {
    margin-bottom: 0;
}

.athlete-log-title {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.athlete-log-empty,
.athlete-log-hint {
    margin: 0;
    font-size: 0.88rem;
}

.athlete-history-list {
    max-height: 280px;
    overflow-y: auto;
}

.history-item--rank {
    border-left: 3px solid var(--gold);
}

.history-item-rank-icon {
    margin: 0 2px;
}

.athlete-rank-norms-log {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
}

.athlete-rank-norms-log-summary {
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.athlete-rank-norms-log-summary::-webkit-details-marker {
    display: none;
}

.athlete-rank-norms-log-summary::before {
    content: '▸ ';
    color: var(--text-muted);
}

.athlete-rank-norms-log[open] .athlete-rank-norms-log-summary::before {
    content: '▾ ';
}

.athlete-rank-norms-log-list {
    list-style: none;
    margin: 0;
    padding: 0 12px 10px;
    max-height: 240px;
    overflow-y: auto;
}

.athlete-rank-norm-log-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.85rem;
}

.athlete-rank-norm-log-item:last-child {
    border-bottom: none;
}

.athlete-rank-norm-log-league {
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1.2;
}

.athlete-rank-norm-log-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.athlete-rank-norm-log-name {
    font-weight: 600;
    color: #15803d;
}

.athlete-rank-norm-log-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}
