/* Roboto Condensed / PT Sans Narrow don't fully agree on visual weight at "bold" —
   this face covers only the Kazakh-specific letters missing from Roboto Condensed,
   and declares a wide weight range so the browser never synthesizes fake-bold for it
   (avoids the mismatched-thickness look on Ә/Ғ/Қ/Ң/Ө/Ұ/Ү/Һ). */
@font-face {
    font-family: 'KZHeadingFix';
    src: url("../fonts/pt-sans-narrow-kk.44f2fe8947d8.ttf") format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
    /* Keep this face available for every heading glyph when Roboto Condensed is skipped. */
}

:root {
    --bg-main: #eef2f7;
    --bg-header: #003f79;
    --bg-nav: #1b3f6b;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --accent-red: #ff7a00;
    --accent-red-hover: #d96200;
    --text-white: #ffffff;
    --text-color: #172033;
    --text-muted: #64748b;
    --text-highlight: #1769ff;
    --border-color: #dbe4ef;
    --font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-headings: 'Roboto Condensed', 'KZHeadingFix', 'Arial Narrow', sans-serif;
    --transition-speed: 0.25s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
.league-title,
.nav-link,
.dropdown-item,
.hero-subtitle,
.stat-val,
.stat-lbl,
.tab-btn,
.client-table th,
.admin-login-btn {
    font-family: var(--font-headings);
}

body {
    background: var(--bg-main);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    width: 100%;
}

.header-top-stripe {
    background-color: #003f79;
    width: 100%;
    display: block;
}

.header-bottom-stripe {
    background: linear-gradient(180deg, #003f79 0%, #002d5a 100%);
    width: 100%;
    display: block;
    border-top: none;
    border-bottom: 4px solid var(--accent-red);
}

.header-inner-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    width: 100%;
}

.header-logo-link {
    position: absolute;
    left: 15px;
    top: 0;
    bottom: -50px;
    width: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: transparent;
}

.logo-container-full {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.logo-container-full img {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
}

.header-top-row {
    padding: 15px 20px 15px 140px;
    display: flex;
    align-items: center;
    height: 75px;
}

.league-title {
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
}

.league-title span {
    color: var(--text-white);
}

/* Nav Menu */
.nav-bar {
    display: flex;
    padding-left: 120px;
    height: 50px;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    height: 100%;
}

.nav-item {
    position: relative;
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    color: #ffffff;
    height: 100%;
}

.nav-item:hover>.nav-link,
.nav-link.active {
    background-color: var(--accent-red);
    color: #ffffff !important;
}

/* Dropdown Menu */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background-color: var(--bg-nav);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 100%;
    width: max-content;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    list-style: none;
    padding: 0;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 5px;
    background-color: transparent;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-family: var(--font-headings);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    transition: background-color var(--transition-speed);
}

.dropdown-item:hover {
    background-color: #0f2c59;
    color: #ffffff;
}

.dropdown-item.active-item {
    background-color: var(--accent-red);
    color: #ffffff;
}

.nav-item:hover .dropdown-menu {
    display: block;
}

/* Admin Cabinet Button */
.admin-login-btn {
    background-color: var(--accent-red);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color var(--transition-speed);
}

.admin-login-btn:hover {
    background-color: var(--accent-red-hover);
}

/* Main Content Area */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    min-height: calc(100vh - 220px);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--accent-red);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color var(--transition-speed);
}

.breadcrumb a:hover {
    color: var(--accent-red-hover);
}

.breadcrumb-sep {
    color: var(--text-muted);
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    position: relative;
    padding-left: 12px;
    letter-spacing: 0.5px;
    border-left: 4px solid var(--accent-red);
    line-height: 1.15;
}

.page-title::after {
    content: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(120deg, #071524 0%, #0d2442 60%, #0a1c35 100%);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--accent-red);
    padding: 70px 60px;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 124, 30, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section::after {
    content: 'АЛХЛ';
    position: absolute;
    right: 40px;
    bottom: -20px;
    font-size: 180px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    letter-spacing: -5px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 5px 14px;
    margin-bottom: 24px;
}

.hero-accent-line {
    display: none;
}

.hero-title {
    font-size: 52px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.05;
    margin-bottom: 22px;
    color: #fff;
}

.hero-desc {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 35px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-btn-primary {
    background: var(--accent-red);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 13px 32px;
    border: 2px solid var(--accent-red);
    transition: background 0.2s, color 0.2s;
}

.hero-btn-primary:hover {
    background: transparent;
    color: var(--accent-red);
}

.hero-btn-secondary {
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 13px 32px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.2s, color 0.2s;
}

.hero-btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

/* Home page sections */
.home-section {
    margin-bottom: 40px;
}

.home-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 10px;
}

.home-empty {
    color: var(--text-muted);
    font-size: 14px;
    padding: 20px 0;
}

/* Match row cards */
.match-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.match-row-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s, background 0.2s;
}

.match-row-card:hover {
    border-color: var(--accent-red);
    background: var(--bg-card-hover);
}

.match-row-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-row-date span {
    color: var(--accent-red);
    font-size: 13px;
}

.match-row-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.match-row-team {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.match-row-team.match-winner {
    color: var(--text-color);
    font-weight: 800;
}

.match-row-vs {
    font-size: 11px;
    font-weight: 700;
    color: var(--border-color);
    text-transform: uppercase;
    flex-shrink: 0;
}

.match-row-score {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-color);
    flex-shrink: 0;
    min-width: 50px;
    text-align: center;
}

.match-row-meta {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
}

/* Stats */
.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--accent-red);
    padding: 28px 20px;
    text-align: center;
    transition: transform var(--transition-speed), background-color var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-4px);
    background-color: var(--bg-card-hover);
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-val {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-lbl {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* Matches Carousel / Horizontal List */
.matches-section-title {
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-red);
    padding-left: 12px;
}

.matches-list {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.matches-list::-webkit-scrollbar {
    height: 8px;
}

.matches-list::-webkit-scrollbar-track {
    background: var(--bg-main);
}

.matches-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 0;
}

.matches-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

.match-widget {
    flex: 0 0 300px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    border-top: 4px solid var(--text-highlight);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 12px 26px rgba(11, 30, 54, 0.08);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.match-widget:hover {
    transform: translateY(-2px);
    border-color: #c7d4e4;
    box-shadow: 0 18px 34px rgba(11, 30, 54, 0.13);
}

.match-widget-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.4px;
}

.match-widget-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.match-widget-score {
    font-size: 18px;
    font-weight: 800;
    background-color: var(--bg-header);
    color: var(--text-white);
    min-width: 34px;
    padding: 4px 8px;
    border-radius: 0;
    text-align: center;
    line-height: 1;
    box-shadow: inset 0 -2px 0 rgba(255, 122, 0, 0.75);
}

.match-widget-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Grids */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.yadisk-download-all {
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    background: var(--accent-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.yadisk-download-all:focus {
    outline: none;
}

.yadisk-download-all:hover {
    background: var(--accent-red-hover);
}

.yadisk-search-row {
    margin-bottom: 16px;
}

.yadisk-search-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.yadisk-search-group .search-input {
    flex: 1;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    box-sizing: border-box;
}

.yadisk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.yadisk-folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.yadisk-folder-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-2px);
}

.yadisk-folder-icon {
    width: 42px;
    height: 42px;
    color: var(--accent-red);
}

.yadisk-photo-card {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.yadisk-photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.yadisk-photo-card:hover img {
    transform: scale(1.05);
}

.yadisk-external-link {
    margin-top: 22px;
    text-align: right;
}

.yadisk-external-link a {
    color: var(--accent-red);
    font-weight: 700;
    text-decoration: none;
}

.yadisk-external-link a:hover {
    text-decoration: underline;
}

.yadisk-photo-card {
    cursor: pointer;
    border: 1px solid var(--border-color);
    padding: 0;
}

.yadisk-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(5, 10, 20, 0.92);
    align-items: center;
    justify-content: center;
}

.yadisk-lightbox.open {
    display: flex;
}

.yadisk-lightbox-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.yadisk-lightbox-image-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 78vh;
}

.yadisk-lightbox-body img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.yadisk-photo-heart {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 122, 0, 0.95);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.yadisk-photo-heart.show {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yadisk-photo-tags {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(5, 10, 20, 0), rgba(5, 10, 20, 0.86) 28%, rgba(5, 10, 20, 0.94));
    color: #ffffff;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    box-sizing: border-box;
}

.yadisk-photo-tags.show {
    display: block;
}

.yadisk-photo-tags span {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

.yadisk-photo-tags strong {
    font-weight: 900;
}

.yadisk-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 14px;
}

.yadisk-lightbox-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 700;
}

.yadisk-lightbox-title {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.yadisk-lightbox-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 22px;
    background: var(--accent-red);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.yadisk-lightbox-download:hover {
    background: var(--accent-red-hover);
}

.yadisk-photo-action {
    border: none;
    cursor: pointer;
    font-family: var(--font-headings);
}

.yadisk-player-picker {
    display: none;
    width: min(520px, 90vw);
    margin-top: 10px;
    padding: 10px;
    background: rgba(5, 10, 20, 0.92);
    box-sizing: border-box;
}

.yadisk-player-picker.open {
    display: block;
}

.yadisk-player-picker .search-input {
    width: 100%;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

.yadisk-player-results {
    display: flex;
    flex-direction: column;
    max-height: 220px;
    overflow: auto;
    margin-top: 6px;
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.yadisk-player-result {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
    font: inherit;
    line-height: 1.25;
    box-sizing: border-box;
}

.yadisk-player-result:hover {
    background: #eef5ff;
}

.yadisk-player-result.tagged {
    background: #ecfdf5;
}

.yadisk-player-name {
    font-weight: 800;
}

.yadisk-player-meta,
.yadisk-player-empty {
    color: var(--text-muted);
    font-size: 12px;
}

.yadisk-player-empty {
    padding: 12px;
}

.yadisk-player-check {
    width: 24px;
    flex: 0 0 24px;
    color: #059669;
    font-size: 18px;
    font-weight: 900;
    text-align: right;
}

.yadisk-photo-status {
    min-height: 18px;
    margin-top: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.yadisk-photo-status.error {
    color: #fecaca;
}

.pd-yadisk-photo-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 0 14px;
    margin-bottom: 28px;
}

.pd-yadisk-photo {
    flex: 0 0 auto;
    width: 138px;
    height: 92px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
}

.pd-yadisk-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .pd-yadisk-photo-strip {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        overflow-x: visible;
        padding: 0;
    }
    .pd-yadisk-photo {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 3 / 2 !important;
    }
}

.yadisk-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.yadisk-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.75);
}

.yadisk-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.yadisk-lightbox-arrow:hover {
    background: rgba(0, 0, 0, 0.75);
}

.yadisk-lightbox-prev {
    left: 16px;
}

.yadisk-lightbox-next {
    right: 16px;
}

@media (max-width: 640px) {
    .yadisk-lightbox-arrow {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }

    .yadisk-lightbox-close {
        width: 36px;
        height: 36px;
        font-size: 24px;
        top: 10px;
        right: 10px;
    }
}

.news-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.news-page-subtitle {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.55;
}

.news-instagram-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    color: var(--accent-red);
    background: #ffffff;
    border: 1px solid var(--border-color);
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
}

.news-instagram-link:hover {
    color: #ffffff;
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.instagram-feed-panel {
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-red);
}

.instagram-feed-frame {
    display: block;
    width: 100%;
    min-height: 720px;
    border: 0;
    overflow: hidden;
}

.instagram-feed-empty {
    padding: 34px 28px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-red);
}

.instagram-feed-empty-title {
    margin-bottom: 8px;
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
}

.instagram-feed-empty p {
    max-width: 620px;
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.yandex-photo-cta-btn {
    display: inline-flex;
    margin-top: 18px;
}

.team-card,
.player-card,
.news-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition-speed);
}

.team-card:hover,
.player-card:hover,
.news-card:hover {
    border-color: var(--accent-red);
}

.team-card-logo {
    width: 90px;
    height: 90px;
    background-color: var(--text-white);
    border-radius: 50%;
    border: 3px solid var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.team-card-info {
    padding: 14px 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.team-card-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.team-card-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.team-card-meta strong {
    color: var(--text-color);
}

.team-card-link {
    margin-top: auto;
    display: block;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
}

.team-card-link:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

/* ── Player card: full-bleed photo with overlay ── */
.tournament-list {
    display: grid;
    gap: 10px;
}

.tournament-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 86px;
    padding: 15px 22px 15px 18px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-red);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.tournament-row:hover {
    border-color: #c7d5e5;
    border-left-color: var(--accent-red);
    box-shadow: 0 10px 24px rgba(13, 37, 69, 0.08);
    transform: translateY(-1px);
}

.tournament-row-main {
    min-width: 0;
}

.tournament-season {
    margin-bottom: 6px;
    color: var(--accent-red);
    font-family: var(--font-headings);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tournament-row-title {
    margin: 0 0 10px;
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.tournament-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: #58708d;
    font-size: 13px;
    line-height: 1.35;
}

.tournament-row-meta span {
    min-width: 0;
}

.tournament-row-meta strong {
    color: #253a56;
    font-weight: 700;
}

.tournament-row-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 176px;
    height: 42px;
    padding: 0 18px;
    border: 1px solid #cfdbea;
    background: #f8fafc;
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
}

.tournament-row-link:hover {
    border-color: var(--accent-red);
    background: var(--accent-red);
    color: #ffffff;
}

.tournament-empty {
    padding: 34px 20px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
}

.player-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0;
    border: none !important;
    background: linear-gradient(160deg, #0b1e36, #091629);
    cursor: pointer;
}

.player-card:hover {
    outline: 3px solid #e87c1e;
}

.player-card-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}


.player-card-no-photo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.player-card-no-photo img {
    width: 55%;
    opacity: 0.25;
    filter: grayscale(1);
}

/* Jersey number badge top-right */
.player-card-number {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent-red);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 0;
    letter-spacing: 0.5px;
    z-index: 3;
}

.player-card-dots {
    position: absolute;
    right: 0;
    top: 16px;
    left: 0;
    bottom: auto;
    z-index: 4;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.player-card-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1px solid rgba(10, 20, 35, 0.65);
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75), 0 1px 3px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    pointer-events: auto;
}

.player-card-dot.active,
.player-card-dot:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

/* Gradient overlay at bottom */
.player-card-overlay {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom,
            rgba(27, 63, 107, 0) 0%,
            rgba(27, 63, 107, 0) 30%,
            rgba(27, 63, 107, 0.15) 42%,
            rgba(27, 63, 107, 0.40) 54%,
            rgba(27, 63, 107, 0.70) 65%,
            rgba(27, 63, 107, 0.90) 76%,
            rgba(27, 63, 107, 0.98) 87%,
            rgba(27, 63, 107, 1) 95%,
            rgba(27, 63, 107, 1) 100%);
    z-index: 2;
}

.team-card-overlay {
    position: absolute;
    inset: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to bottom,
            rgba(27, 63, 107, 0) 0%,
            rgba(27, 63, 107, 0) 50%,
            rgba(27, 63, 107, 0.15) 60%,
            rgba(27, 63, 107, 0.40) 70%,
            rgba(27, 63, 107, 0.70) 79%,
            rgba(27, 63, 107, 0.90) 87%,
            rgba(27, 63, 107, 0.98) 94%,
            rgba(27, 63, 107, 1) 98%,
            rgba(27, 63, 107, 1) 100%);
    z-index: 2;
}

.player-card-name,
.team-card-name {
    font-size: 13.5px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    letter-spacing: 0.3px;
    line-height: 1.25;
    margin: 0 0 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

a.team-card:hover .team-card-name {
    color: #e87c1e;
}

.player-card-meta,
.team-card-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    margin-bottom: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.player-card-meta strong,
.team-card-meta strong {
    color: #fff;
}

.player-card-team,
.team-card-city {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-left: 3px solid #e87c1e;
    padding-left: 7px;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.player-card-link {
    display: block;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 7px 10px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.18s, border-color 0.18s;
}

.player-card-link:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Detail Pages */
.profile-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-avatar {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    border: 4px solid var(--border-color);
    margin-bottom: 20px;
    background-color: var(--bg-header);
}

.profile-avatar-banner {
    background-color: var(--bg-nav) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

.profile-avatar-detail-wrap {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.profile-avatar-detail {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.profile-details {
    width: 100%;
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.profile-detail-row strong {
    color: var(--text-muted);
}

.team-profile {
    grid-template-columns: minmax(200px, 260px) 1fr;
    gap: 32px;
    align-items: stretch;
    padding: 24px;
    border-radius: 0;
    border-color: #cfdbe9;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 44, 89, 0.08);
}

.team-profile-sidebar {
    justify-content: center;
    padding: 6px 20px 6px 0;
    border-right: 1px solid var(--border-color);
}

.team-profile .profile-avatar-detail-wrap {
    width: 200px;
    height: 200px;
    padding: 0;
    margin-bottom: 12px;
    border-radius: 0;
    background: transparent;
}

.team-profile .profile-avatar-detail {
    filter: drop-shadow(0 16px 28px rgba(15, 44, 89, 0.16));
}

.team-profile-name,
.team-profile .profile-sidebar h2 {
    margin-bottom: 8px !important;
    color: #071832;
    font-family: var(--font-headings);
    font-size: 32px !important;
    font-weight: 700 !important;
    line-height: 1.05;
    text-transform: uppercase;
}

.team-profile-founded,
.team-profile .profile-sidebar p {
    margin-bottom: 0 !important;
    color: #52647d !important;
    font-size: 16px !important;
    font-weight: 600;
}

.team-profile-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.team-profile-details h3 {
    margin-bottom: 24px !important;
    padding-left: 14px !important;
    border-left: 4px solid var(--accent-red) !important;
    color: #071832;
    font-family: var(--font-headings);
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.1;
    text-transform: uppercase;
}

.team-profile .profile-detail-row {
    align-items: flex-start;
    gap: 24px;
    padding: 13px 0;
    border-bottom: 1px solid #e6edf5;
    font-size: 17px;
    line-height: 1.35;
}

.team-profile .profile-detail-row strong {
    min-width: 180px;
    color: #52647d;
    font-size: 16px;
    font-weight: 800;
}

.team-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.team-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.team-social-link:hover {
    transform: translateY(-2px);
}

.team-profile .profile-detail-row span {
    color: #071832;
    font-size: 17px;
    font-weight: 600;
    text-align: right;
}

.team-profile .profile-detail-row a {
    color: var(--accent-red) !important;
    font-weight: 800 !important;
}

.team-profile-description {
    margin-top: 26px !important;
    padding: 18px 20px;
    border: 1px solid #e6edf5;
    border-radius: 0;
    background-color: rgba(248, 250, 252, 0.75);
}

.team-profile-description strong {
    display: block;
    margin-bottom: 8px;
    color: #52647d !important;
    font-size: 16px !important;
    font-weight: 800;
}

.team-profile-description p {
    margin: 0;
    color: #172033 !important;
    font-size: 17px !important;
    line-height: 1.7 !important;
}

/* Standard Tables */
.client-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    font-size: 15px;
}

.client-table th {
    background-color: var(--bg-nav);
    color: var(--text-white);
    font-weight: 700;
    text-transform: uppercase;
    text-align: left;
    padding: 8px 6px;
    line-height: 1.15;
    border-bottom: 2px solid var(--border-color);
    /* Тот же размер шрифта, что у вкладок вида "Состав/Статистика/..." (.tab-btn),
       чтобы шапка таблицы визуально совпадала с вкладками над ней. */
    font-size: 14px;
}

@media (max-width: 640px) {
    .client-table th {
        font-size: 12px;
    }
}

.client-table td {
    padding: 4px 10px;
    border-bottom: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.01);
}

.client-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.03);
}

/* News & Media */
.news-card-photo {
    height: 180px;
    background-color: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-content {
    padding: 20px;
}

.news-card-date {
    font-size: 11px;
    color: var(--accent-red);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.news-card-desc {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 15px;
}

/* Tab Switching System */
.tabs {
    display: flex;
    gap: 2px;
    background-color: var(--border-color);
    padding: 2px;
    margin-bottom: 30px;
    border-radius: 0;
}

.tab-btn {
    flex: 1 1 0;
    min-width: 0;
    background-color: var(--bg-nav);
    border: none;
    color: var(--text-white);
    padding: 14px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-size: 14px;
    transition: background-color var(--transition-speed);
    text-align: center;
    text-decoration: none;
}

.tab-btn.active {
    background-color: var(--accent-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.media-card-visual {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-card-photo {
    background: linear-gradient(45deg, #162e4c, #0b1e36);
}

.media-card-awards {
    background: linear-gradient(45deg, #ff7a00, #12305a);
}

.media-card-video {
    background: linear-gradient(45deg, #ff7a00, #0b1e36);
}

.media-card-interview {
    background: linear-gradient(45deg, #0b1e36, #162e4c);
}

.media-card-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.media-card-icon-small {
    width: 50px;
    height: 50px;
    filter: none;
}

.youtube-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.youtube-card-photo {
    display: block;
    height: 160px;
    position: relative;
    background: #0b1e36;
    overflow: hidden;
}

.youtube-card-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.12);
    transition: transform 0.3s ease;
}

.youtube-card:hover .youtube-card-photo img {
    transform: scale(1.17);
}

.youtube-card .news-card-content {
    padding: 12px 14px;
}

.youtube-card .news-card-date {
    font-size: 10px;
    margin-bottom: 3px;
}

.youtube-card .news-card-title {
    font-size: 13.5px;
    line-height: 1.3;
    margin-bottom: 4px;
}

.youtube-card .news-card-desc {
    font-size: 12px;
    margin-bottom: 0;
    line-height: 1.4;
}

.youtube-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 44px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.youtube-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
    .youtube-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .youtube-grid {
        grid-template-columns: 1fr;
    }
}

/* Form and Search elements */
.search-bar-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-input {
    flex-grow: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 0;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-red);
}

.search-btn {
    background-color: var(--accent-red);
    border: none;
    color: var(--text-white);
    padding: 12px 25px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
}

.search-btn:hover {
    background-color: var(--accent-red-hover);
}

/* Documents layout */
.doc-row {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px;
    transition: border-color var(--transition-speed);
}

.doc-row:hover {
    border-color: var(--accent-red);
}

.doc-title {
    font-weight: 700;
    font-size: 16px;
}

.doc-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.doc-btn:hover {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
}

/* Footer style */
footer {
    background-color: #040a12;
    border-top: 1px solid var(--border-color);
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-info {
    text-align: left;
}

footer .footer-logo {
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: var(--text-white);
}

footer p {
    margin: 0;
}

.footer-online {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 600;
}

.footer-online__dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.footer-online strong {
    min-width: 14px;
    color: #ffffff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.footer-support {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.footer-support-text {
    font-size: 12px;
    color: var(--text-muted);
}

.footer-support-links {
    display: flex;
    gap: 8px;
}

.footer-support-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border-radius: 0;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.footer-support-btn.wa {
    background-color: #25D366;
}

.footer-support-btn.wa:hover {
    background-color: #20ba5a;
    color: #fff;
    transform: translateY(-1px);
}

.footer-support-btn.tg {
    background-color: #0088cc;
}

.footer-support-btn.tg:hover {
    background-color: #0077b3;
    color: #fff;
    transform: translateY(-1px);
}

/* Login dropdown ("Личный кабинет ...") — sharp edges, header gradient */
.footer-login-dropdown {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    bottom: 48px;
    right: 0;
    background: linear-gradient(180deg, #003f79 0%, #1b3f6b 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: hidden;
    text-align: left;
    white-space: nowrap;
}

.footer-login-link {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-headings);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, color 0.2s;
}

.footer-login-link:last-child {
    border-bottom: none;
}

.footer-login-link:hover {
    background: #16314f;
    color: #fff;
}

.footer-login-link:active {
    background: var(--accent-red-hover);
}

@media(max-width: 768px) {
    footer {
        padding: 20px 15px;
    }
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    .footer-info {
        text-align: center;
    }
    .footer-info p {
        font-size: 11px;
    }
    .footer-online {
        justify-content: center;
        margin-top: 8px;
        font-size: 11px;
    }
    footer .footer-logo {
        font-size: 14px;
        margin-bottom: 4px;
    }
    .footer-support {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
        gap: 12px;
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 12px;
        margin-top: 4px;
    }
    .footer-support-text {
        font-size: 11px;
        text-align: right;
        line-height: 1.4;
        max-width: none;
    }
    .footer-support-btn {
        width: 36px;
        height: 36px;
        border-radius: 0;
    }
}

@media(max-width: 768px) {
    .header-inner-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .header-logo-link {
        position: static;
        width: 100%;
        height: 90px;
        padding: 10px 0;
        justify-content: center;
    }

    .logo-container-full {
        width: 100px;
        height: 100px;
        padding: 5px;
    }

    .header-top-row {
        width: 100%;
        height: auto;
        justify-content: center;
        text-align: center;
        padding: 10px;
    }

    .nav-bar {
        width: 100%;
        height: auto;
        padding-left: 0;
        overflow-x: auto;
        justify-content: center;
    }

    .nav-menu {
        flex-direction: row;
        width: max-content;
    }

    .profile-container {
        grid-template-columns: 1fr;
    }

    .team-profile {
        gap: 28px;
        padding: 26px 20px;
    }

    .team-profile-sidebar {
        padding: 0 0 24px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .team-profile .profile-avatar-detail-wrap {
        width: 190px;
        height: 190px;
    }

    .team-profile-name,
    .team-profile .profile-sidebar h2 {
        font-size: 28px !important;
    }

    .team-profile-details h3 {
        font-size: 22px !important;
    }

    .team-profile .profile-detail-row {
        display: grid;
        gap: 6px;
        font-size: 16px;
    }

    .team-profile .profile-detail-row strong {
        min-width: 0;
    }

    .team-profile .profile-detail-row span {
        text-align: left;
    }
}

/* Goal difference highlights */
.diff-positive {
    color: #4ade80 !important;
}

.diff-negative {
    color: #f87171 !important;
}

/* Season filter dropdown styles */
.season-filter-container {
    display: flex;
    align-items: center;
}

.season-filter-label {
    display: inline-flex;
    align-items: center;
    height: 27px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: var(--font-headings);
    letter-spacing: 0.5px;
    margin-right: 10px;
}

.season-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0 13px 2px 13px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    height: 24px;
    line-height: 22px;
    cursor: pointer;
    outline: none;
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    transition: border-color var(--transition-speed);
    flex-shrink: 0;
}

.season-select:focus,
.season-select:hover {
    border-color: var(--accent-red);
}

/* "Моя команда" в боковом меню — кастомный дропдаун вместо обычного select,
   чтобы список не растягивался на весь экран, а был ограничен по высоте
   со своим скроллом (полезно, когда команд станет много). */
.my-team-dropdown-list {
    display: none;
    position: fixed;
    max-height: 260px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.my-team-dropdown-list.open {
    display: block;
}

.my-team-dropdown-item {
    padding: 9px 13px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    color: #1a1a1a;
}

.my-team-dropdown-item:hover {
    background: #f1f5f9;
    color: var(--accent-red);
}

.my-team-dropdown-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-team-dropdown-checkbox .my-team-checkbox-input {
    flex-shrink: 0;
    accent-color: var(--accent-red);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Звёздочка "Моя команда" — на странице команды, в карточках и списке команд.
   Логика (клик, cookie) в client.js; тут только вид + подсказка при наведении. */
.my-team-star-btn {
    position: relative;
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    color: #cbd5e1;
    transition: color 0.15s;
}
.my-team-star-btn:hover {
    color: #94a3b8;
}
.my-team-star-btn.is-active {
    color: #ffc107;
}
.my-team-star-btn.is-active svg {
    fill: #ffc107;
}

/* В списке команд неактивная звёздочка не мозолит глаза всем 24 строкам —
   показывается только при наведении на строку; активная (жёлтая) видна всегда. */
.my-team-star-btn--reveal-on-hover:not(.is-active) {
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
tr:hover .my-team-star-btn--reveal-on-hover:not(.is-active) {
    opacity: 1;
}

/* Значок "моя команда" на карточке в плитке — только отображение (не кликабельно,
   чтобы не повторять поломку с кнопкой внутри ссылки-карточки), показывается
   только на карточке уже выбранной команды. */
.my-team-star-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-team-star-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
    pointer-events: none;
    z-index: 20;
}
.my-team-star-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* View Switcher */
.view-switcher {
    display: flex;
    gap: 2px;
    background-color: var(--bg-nav);
    padding: 3px;
    border-radius: 0;
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-headings);
    color: var(--text-white);
    transition: all var(--transition-speed);
    letter-spacing: 0.2px;
}

.view-btn.active {
    background-color: var(--accent-red) !important;
    color: #ffffff !important;
}

.view-btn:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Pagination buttons */
.page-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-speed), border-color var(--transition-speed);
    white-space: nowrap;
}

.page-btn:hover:not(.active):not(.disabled) {
    background: var(--bg-nav);
    border-color: var(--accent-red);
    color: var(--text-white);
}

.page-btn.active {
    background: #1565c0;
    border-color: #1565c0;
    color: #fff;
    font-weight: 700;
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.45;
    cursor: default;
}

/* Table Logo Styles */
.client-table th:first-child,
.client-table td:first-child {
    padding-left: 6px;
    padding-right: 6px;
}

.client-table .td-team {
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 6px;
    padding-right: 6px;
    vertical-align: middle;
    text-align: left;
    min-width: 150px;
}

.client-table .team-link-wrapper {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    transition: color var(--transition-speed);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    /* На мобильном .client-table переключается в display:block (см. ниже) для
       горизонтального скролла — из-за этого vertical-align:middle у <td> может
       не срабатывать надёжно. Центрируем содержимое напрямую flex-ом, во всю
       высоту ячейки, независимо от vertical-align. */
    height: 100%;
}

.client-table .team-link-wrapper:hover {
    color: var(--accent-red);
}

.table-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    align-self: center;
    vertical-align: middle;
    display: inline-block;
}

/* Ячейка с фото игрока в списке "Игроки лиги" — тот же размер, что и у
   лого команды (.table-logo, 30×30), просто с cover-кропом сверху, чтобы
   портретное 3:4 фото вписывалось в квадрат без искажений. */
.pl-photo-square {
    display: block !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    object-fit: cover !important;
    object-position: center top !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.pl-photo-square--placeholder {
    object-fit: contain;
    opacity: 0.35;
    background: var(--bg-nav);
    padding: 4px;
    box-sizing: border-box;
}

/* Когда у игрока несколько команд — номер/фото/команда/позиция выводятся
   построчно, синхронно по всем колонкам, с разделительной линией между
   командами (вместо "33 / 10" через слэш или запятую). */
.pl-team-cell {
    display: flex;
    flex-direction: column;
}

.pl-team-row {
    display: flex;
    align-items: center;
    min-height: 38px;
    box-sizing: border-box;
}

#players-list-view .pl-split-cell .pl-team-row:not(:last-child),
#coaches-list-view .pl-split-cell .pl-team-row:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.pl-split-cell {
    padding: 0 !important;
}

#players-list-view .pl-split-cell .pl-team-row,
#coaches-list-view .pl-split-cell .pl-team-row {
    margin: 0 !important;
    padding-right: 10px !important;
    padding-left: 10px !important;
}

.player-photo-thumb {
    position: relative;
    z-index: 1;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.table-logo-placeholder-initial {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background: var(--bg-nav);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.table-logo-placeholder {
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    opacity: 0.6;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px;
    flex-shrink: 0;
}

/* Compact Match Widget (Schedule/Calendar Tab) - Horizontal Layout */
.schedule-tab-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.schedule-match-widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 3px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 15px;
}

/* Left Column: Stage & Date */
.schedule-match-info-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    flex: 0 0 240px;
}

.schedule-match-stage,
.schedule-match-arena {
    font-size: 12px;
    color: var(--text-color);
    font-weight: 700;
}

.schedule-match-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Center Column: Teams and Logos */
.schedule-match-teams-col {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.schedule-match-team-home,
.schedule-match-team-away {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color);
    transition: color var(--transition-speed);
}

.schedule-match-team-home {
    justify-content: flex-end;
    text-align: right;
}

.schedule-match-team-away {
    justify-content: flex-start;
    text-align: left;
}

.schedule-match-team-home:hover,
.schedule-match-team-away:hover {
    color: var(--accent-red);
}

.schedule-match-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.schedule-match-logo-placeholder {
    width: 34px;
    height: 34px;
    color: var(--text-muted);
    opacity: 0.6;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px;
    flex-shrink: 0;
}

.schedule-match-score-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    flex-shrink: 0;
    padding: 0;
}

.schedule-match-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-color);
    background-color: var(--border-color);
    border-radius: 0;
    min-width: 58px;
    width: auto;
    height: 28px;
    box-sizing: border-box;
    letter-spacing: 1px;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 6px;
}

/* Right Column: Arena & Status */
.schedule-match-meta-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 240px;
    text-align: right;
}



.schedule-match-status-text {
    font-size: 12px;
    font-weight: 600;
}

/* Schedule Filters */
.schedule-filters {
    display: flex;
    gap: 15px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 12px 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.filter-select {
    background-color: var(--bg-card);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0 13px 2px 13px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 24px;
    line-height: 22px;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    width: auto;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
}

.filter-select:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.15);
}

.filter-reset-btn {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.filter-reset-btn:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
}

.filter-select--locked,
.filter-select:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

#pd-season-form .filter-group,
#ref-season-form .filter-group {
    flex: 0 0 auto;
    width: auto;
}

#pd-season-select,
#ref-season-select {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    max-width: none;
    padding-right: 34px;
}

@media (max-width: 640px) {
    #pd-season-form .filter-group,
    #ref-season-form .filter-group {
        width: 100%;
    }

    #pd-season-select,
    #ref-season-select {
        width: 100%;
        min-width: 0;
    }
}

@media(max-width: 992px) {
    .schedule-match-widget {
        position: relative;
        height: 110px;
        padding: 0;
        display: block;
    }

    .schedule-match-info-col {
        position: absolute;
        left: 16px;
        top: 12px;
        bottom: 12px;
        width: 190px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .schedule-match-stage,
    .schedule-match-arena {
        white-space: nowrap;
    }

    .schedule-match-teams-col {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 200px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    .schedule-match-logo,
    .schedule-match-logo-placeholder {
        width: 36px;
        height: 36px;
    }

    .schedule-match-team-home,
    .schedule-match-team-away {
        font-size: 14px;
    }

    .schedule-match-score {
        width: 50px;
        height: 26px;
        font-size: 13px;
    }

    .schedule-match-meta-col {
        position: absolute;
        right: 16px;
        top: 12px;
        bottom: 12px;
        width: 140px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        text-align: right;
    }

    .schedule-match-date,
    .schedule-match-stage,
    .schedule-match-arena {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #555555 !important;
        opacity: 1 !important;
    }

    .team-schedule-status-completed {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #15803d !important;
        opacity: 1 !important;
    }

    .team-schedule-status-planned {
        font-size: 14px !important;
        font-weight: 700 !important;
        color: #1b3f6b !important;
        opacity: 1 !important;
    }

    .team-schedule-status-live {
        font-size: 14px !important;
        font-weight: 800 !important;
        color: var(--accent-red) !important;
        opacity: 1 !important;
    }
}

/* Стили вкладок и статистики для детальной страницы турнира */
@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.tabs {
    margin-bottom: 15px !important;
}

/* Скрытие вкладок и подвкладок по умолчанию */
.tab-content {
    display: none !important;
}

.sub-tab-content {
    display: none !important;
}

/* Отображение активных вкладок на основе атрибутов html */
html[data-active-tab="standings-tab"] #standings-tab {
    display: block !important;
}

html[data-active-tab="stats-tab"] #stats-tab {
    display: block !important;
}

html[data-active-tab="schedule-tab"] #schedule-tab {
    display: block !important;
}

html[data-active-tab="playoff-tab"] #playoff-tab {
    display: block !important;
}

html[data-active-subtab="scorers-subtab"] #scorers-subtab {
    display: block !important;
}

html[data-active-subtab="snipers-subtab"] #snipers-subtab {
    display: block !important;
}

html[data-active-subtab="assistants-subtab"] #assistants-subtab {
    display: block !important;
}

html[data-active-subtab="defenders-subtab"] #defenders-subtab {
    display: block !important;
}

html[data-active-subtab="goalies-subtab"] #goalies-subtab {
    display: block !important;
}

#skater-stats-glossary,
#goalie-stats-glossary {
    display: none !important;
}

html[data-active-subtab="scorers-subtab"] #skater-stats-glossary,
html[data-active-subtab="snipers-subtab"] #skater-stats-glossary,
html[data-active-subtab="assistants-subtab"] #skater-stats-glossary,
html[data-active-subtab="defenders-subtab"] #skater-stats-glossary {
    display: block !important;
}

html[data-active-subtab="goalies-subtab"] #goalie-stats-glossary {
    display: block !important;
}

.sub-tabs {
    display: flex !important;
    width: 100%;
    flex-wrap: nowrap !important;
}

.sub-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    background-color: var(--bg-nav) !important;
    border: 1px solid var(--bg-nav) !important;
    border-radius: 0 !important;
    color: var(--text-white) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.sub-tab-btn.active {
    background-color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: #ffffff !important;
}

.sub-tab-btn:hover:not(.active) {
    background-color: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
}

/* Сетка плей-офф */
.playoff-grid-container {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-red) var(--bg-nav);
}

.playoff-round-col {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
}

.playoff-round-title {
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-red);
}

.playoff-pairs-list {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
    gap: 20px;
}

.playoff-pair-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.playoff-pair-card:hover {
    border-color: var(--accent-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.playoff-pair-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-color);
}

.playoff-pair-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.playoff-series-score {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-red);
    background-color: rgba(239, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.playoff-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playoff-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.playoff-team-row.winner {
    background-color: rgba(22, 163, 74, 0.05);
    color: var(--text-white);
    font-weight: 700;
}

.playoff-team-row.loser {
    opacity: 0.6;
}

.playoff-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.playoff-logo-placeholder {
    width: 24px;
    height: 24px;
    background-color: var(--border-color);
    border-radius: 50%;
    display: inline-block;
}

.playoff-team-name {
    font-size: 13px;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-white);
}

.playoff-score-bubble {
    font-size: 13px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    color: var(--text-white);
}

/* Список матчей внутри серии */
.playoff-pair-matches-list {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.playoff-pair-card:hover .playoff-pair-matches-list {
    max-height: 200px;
}

.playoff-match-mini-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    padding: 2px 4px;
    border-radius: 2px;
}

.playoff-match-mini-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.playoff-match-score {
    font-weight: 700;
    color: var(--text-white);
}

/* ============================================================
   PLAYOFF – Visual Bracket
   ============================================================ */
/* ============================================================
   PLAYOFF – Visual bracket (bkt-*)
   ============================================================ */
.bkt-predicted-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 5px 12px;
    background: rgba(255, 122, 0, 0.12);
    border: 1px solid rgba(255, 122, 0, 0.35);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-red);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.bkt-predicted-note::before {
    content: '●';
    font-size: 8px;
    animation: bkt-pulse 1.6s ease-in-out infinite;
}

@keyframes bkt-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.bkt-wrap {
    display: flex;
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    margin-bottom: 30px;
    min-height: 550px;
    padding: 20px;
    box-shadow: none;
    gap: 0;
}

/* --- Column --- */
.bkt-col {
    flex: 0 0 230px;
    display: flex;
    flex-direction: column;
}

.bkt-col-title {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    height: 42px;
    background: var(--bg-nav);
}

.bkt-col-title--third {
    background: var(--bg-nav);
    border-left: 2px solid var(--bg-main);
}


.bkt-title-n {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #ffffff;
}

.bkt-title-n--third {
    color: #ffffff;
}

.bkt-title-w {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--accent-red);
}

.bkt-col-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    height: 481px;
}

.bkt-col-body--center {
    justify-content: center;
    padding: 20px 8px;
    height: 481px;
}


/* --- Half (top vs bottom bracket half) --- */
.bkt-half {
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px 0;
    position: relative;
}

.bkt-half--center {
    justify-content: center;
    padding: 0;
}

/* Vertical separator between halves */
.bkt-sep {
    height: 1px;
    background: var(--border-color);
    flex-shrink: 0;
    margin: 0 -8px;
}

.bkt-sep--third {
    height: auto;
    background: none;
    border-top: 1px solid var(--border-color);
    margin: 0 -8px;
    padding: 5px 8px 4px;
}

.bkt-third-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bg-nav);
    display: block;
}

/* --- Pair card --- */
.bkt-pair {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    position: relative;
    height: 74px;
    box-shadow: none;
    transition: all 0.2s ease-in-out;
}

.bkt-pair:hover {
    border-color: var(--accent-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bkt-pair--gap {
    margin-bottom: 10px;
}

/* --- Team row --- */
.bkt-team {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    height: 36px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 12px;
    color: var(--text-color);
}

.bkt-team:last-child {
    border-bottom: none;
}

.bkt-win {
    background: rgba(22, 163, 74, 0.07);
    font-weight: 700;
    color: #15803d;
}

.bkt-win .bkt-name {
    color: #15803d;
}

.bkt-win .bkt-wins {
    color: #15803d;
}

.bkt-lose {
    opacity: .5;
}

.bkt-team--adv {
    height: 36px;
    background: var(--bg-main);
    color: var(--text-muted);
}

.bkt-seed {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0;
    padding: 1px 4px;
}

.bkt-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.bkt-logo-ph {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0;
    flex-shrink: 0;
}

.bkt-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
}

.bkt-wins {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 18px;
    text-align: right;
    flex-shrink: 0;
}

.bkt-wins-hi {
    color: var(--accent-red);
}

.bkt-tbd {
    flex: 1;
    font-size: 11px;
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    padding: 0 4px;
}

.bkt-pair--bye {
    border: 1px dashed rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.03);
    border-radius: 0;
    height: 74px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bkt-pair--bye .bkt-team {
    border-bottom: none;
    background: transparent;
    height: 72px;
    width: 100%;
}

.bkt-bye-label {
    margin-left: auto;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #15803d;
    background: rgba(22, 163, 74, 0.1);
    padding: 2px 6px;
    border-radius: 0;
    white-space: nowrap;
}

/* --- Connector column (QF→SF, SF→Final) --- */
.bkt-conn {
    flex: 0 0 28px;
    display: flex;
    flex-direction: column;
}

/* Spacer matching bkt-col-title height so body aligns */
.bkt-conn-hdr {
    flex-shrink: 0;
    height: 42px;
    background: var(--bg-nav);
    border-right: 2px solid var(--bg-main);
}

.bkt-conn-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    height: 481px;
}

.bkt-conn-h {
    flex: 1;
    position: relative;
    height: 240px;
}

/* Bracket shape ] connecting two QF pairs to one SF pair */
.bkt-conn-h::before {
    content: '';
    position: absolute;
    left: 0;
    right: 8px;
    top: 62px;
    bottom: 62px;
    border-top: 2px solid var(--bg-nav);
    border-bottom: 2px solid var(--bg-nav);
    border-right: 2px solid var(--bg-nav);
}

/* Horizontal line from bracket corner to SF column */
.bkt-conn-h::after {
    content: '';
    position: absolute;
    right: 0;
    left: 20px;
    top: 120px;
    height: 2px;
    background: var(--bg-nav);
    transform: translateY(-50%);
}

/* Separator between top and bottom halves in connector */
.bkt-conn-mid {
    height: 1px;
    flex-shrink: 0;
    background: var(--border-color);
}

/* Funnel connector: SF top + SF bot → Final center */
.bkt-conn--funnel {
    height: 523px;
    /* 42px header + 481px body */
}

.bkt-conn--funnel .bkt-conn-fn {
    flex: 1;
    position: relative;
    height: 481px;
}

.bkt-conn--funnel .bkt-conn-fn::before {
    content: '';
    position: absolute;
    left: 0;
    right: 8px;
    top: 120px;
    bottom: 120px;
    border-top: 2px solid var(--bg-nav);
    border-bottom: 2px solid var(--bg-nav);
    border-right: 2px solid var(--bg-nav);
}

.bkt-conn--funnel .bkt-conn-fn::after {
    content: '';
    position: absolute;
    right: 0;
    left: 8px;
    top: 240.5px;
    height: 2px;
    background: var(--bg-nav);
    transform: translateY(-50%);
}

/* ============================================================
   PLAYOFF – KHL-style per-round tables
   ============================================================ */
.po-round-section {
    margin-bottom: 36px;
}

.po-round-heading {
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 8px;
    padding: 0 0 0 10px;
    display: block;
    background: none;
    border-left: 4px solid var(--accent-red);
}

.po-round-heading .po-round-name {
    color: var(--bg-nav);
}

.po-round-heading .po-round-wins {
    color: var(--accent-red);
    font-weight: 600;
    font-size: 13px;
}

.po-series-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0;
    overflow: hidden;
    font-size: 13px;
    min-width: 600px;
}

.po-series-table thead tr {
    background: var(--bg-nav);
    color: var(--text-white);
}

.po-series-table thead th {
    padding: 8px 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.po-th-seed {
    width: 55px;
}

.po-th-team {
    text-align: left !important;
    min-width: 150px;
}

.po-th-game {
    width: 75px;
}

.po-th-series {
    width: 100px;
}

.po-series-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.po-series-table tbody tr:last-child {
    border-bottom: none;
}

.po-team-row td {
    padding: 4px 10px;
    vertical-align: middle;
}

.po-row-winner {
    background: rgba(22, 163, 74, 0.05);
}

.po-row-loser {
    opacity: 0.75;
    background: rgba(0, 0, 0, 0.01);
}

.po-td-seed {
    text-align: center;
}

.po-seed-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--bg-nav);
    background: var(--bg-card-hover);
    border-radius: 0;
    padding: 2px 6px;
    min-width: 28px;
    text-align: center;
}

.po-seed-badge::before {
    content: '#';
    font-weight: 400;
    opacity: 0.6;
}

.po-td-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.po-team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

.po-team-logo-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 3px;
    background: var(--bg-nav);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.po-team-link {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.po-team-link:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.po-td-game {
    text-align: center;
    padding: 4px 4px;
    vertical-align: middle;
}

.po-score {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
}

.po-score-win {
    color: inherit;
}

.po-score-lose {
    color: var(--text-muted);
    font-weight: 500;
}

.po-score-future {
    color: var(--text-muted);
    font-size: 12px;
}

.po-td-series {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap;
}

/* ── Match Carousel ─────────────────────────────────── */
.mc-outer-wrap {
    background: #fff;
    border-bottom: 2px solid #e2eaf4;
    width: 100%;
}

.mc-inner {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
}

.mc-scroll {
    flex: 1;
    overflow: hidden;
}

.mc-track {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

/* Card */
.mc-card {
    width: 190px;
    min-height: 92px;
    background: #fff;
    border: 1px solid #dce7f3;
    border-top: 3px solid #1769ff;
    border-radius: 0;
    padding: 2px 8px 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    color: #172033;
    display: flex;
    flex-direction: column;
}

.mc-card.mc-done {
    border-top-color: #19a463;
}

.mc-card.mc-live {
    border-top-color: #ff3b30;
}

.mc-card.mc-upcoming {
    border-top-color: #1769ff;
}

@keyframes live-blink {
    0% { background-color: #e62215; box-shadow: none; }
    50% { background-color: #ff453a; box-shadow: 0 0 6px rgba(255, 69, 58, 0.9); }
    100% { background-color: #e62215; box-shadow: none; }
}

.mc-live-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: 3px;
    background: #ff3b30;
    color: #fff;
    font-size: 7.5px;
    font-weight: 800;
    padding: 2px 5px;
    letter-spacing: .7px;
    line-height: 1.1;
    min-width: 27px;
    width: min-content;
    text-align: center;
    animation: live-blink 2s infinite ease-in-out;
}

.mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 6px;
}

.mc-date {
    font-size: 13px;
    font-weight: 700;
    color: #172033;
    letter-spacing: .2px;
    text-transform: uppercase;
    white-space: nowrap;
}

.mc-time {
    font-size: 11px;
    font-weight: 700;
    color: #172033;
    letter-spacing: .2px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mc-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    align-items: center;
    gap: 2px;
    width: 100%;
}

.mc-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.mc-side-r {
    align-items: center;
}

.mc-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

.mc-logo-ph {
    width: 38px;
    height: 38px;
    background: #1b3f6b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.mc-abbr {
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 700;
    color: #172033;
    letter-spacing: .2px;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
    max-width: 44px;
    overflow: hidden;
    text-overflow: clip;
}

.mc-mid {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-align: center;
    width: 70px;
    min-width: 70px;
}

.mc-sc {
    font-family: var(--font-headings);
    font-size: 27px;
    font-weight: 700;
    color: var(--accent-red);
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.mc-dash {
    font-family: var(--font-headings);
    font-size: 20px;
    font-weight: 700;
    color: #a0b4c8;
    line-height: 1;
}

.mc-so {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-red);
    vertical-align: baseline;
    margin-left: 1px;
}

.mc-footer {
    margin-top: auto;
    text-align: center;
    padding-top: 4px;
}

.mc-struct {
    font-size: 12px;
    color: #172033;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 700;
    opacity: 1;
    display: block;
}

.mc-arrow {
    background: none;
    border: none;
    color: #8aaac8;
    font-size: 36px;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    transition: color .2s;
    flex-shrink: 0;
}

.mc-arrow:hover {
    color: #1769ff;
}

a.mc-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

a.mc-card:hover {
    border-color: var(--accent-red);
    box-shadow: 0 2px 8px rgba(255, 122, 0, .15);
}

.schedule-match-score-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: background .2s, color .2s;
    border-radius: 0;
    padding: 2px 4px;
}

/* Player jersey number badge */
.mp-jersey {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background: #1b3f6b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border-radius: 0;
    margin-right: 5px;
    line-height: 1;
    vertical-align: middle;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-touch-callout: none !important;
    user-select: none !important;
    outline: none !important;
}

.mp-player-link,
.mp-goalie-link,
.team-roster-player,
.team-roster-player-inner,
.mp-player-cell,
.mp-player-cell a,
.mp-player-cell span {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    -webkit-touch-callout: none !important;
    outline: none !important;
}

.mp-jersey-sm {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.schedule-match-score-link:hover {
    background: var(--accent-red);
    color: #fff;
}

/* Redesigned Large Team Cards */
a.team-card {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0;
    border: none !important;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: outline var(--transition-speed);
}

a.team-card:hover {
    outline: 3px solid #e87c1e;
}

.team-card-photo-area {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 20px 20px 80px;
}

.team-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
    transition: transform 0.35s ease;
}

a.team-card:hover .team-card-logo-img {
    transform: scale(1.04);
}

/* ─── LANGUAGE SWITCHER (desktop: text button + dropdown) ─── */
.lang-switcher {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
}

.lang-switcher-current {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    box-sizing: border-box;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.lang-switcher-current:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lang-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 52px;
    box-sizing: border-box;
    flex-direction: column;
    gap: 2px;
    background-color: #0a4272;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 4px;
    box-shadow: 0 10px 24px rgba(1, 12, 28, 0.35);
}

.lang-switcher.open .lang-switcher-dropdown {
    display: flex;
}

.lang-switcher-option {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.lang-switcher-option:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ─── LANGUAGE SWITCHER (mobile: flags row inside the drawer) ─── */
.lang-switcher-mobile {
    display: none;
}

.lang-switcher-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    border-radius: 0;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-switcher-item:hover {
    color: #fff;
}

.lang-switcher-item.active {
    color: var(--accent-red);
    background-color: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .lang-switcher {
        display: none;
    }

    .lang-switcher-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        position: absolute;
        top: 0;
        left: 0;
        height: 64px;
        padding: 0 16px;
    }

    .lang-switcher-mobile .lang-switcher-item {
        background-color: rgba(255, 255, 255, 0.08);
    }

    .lang-switcher-mobile .lang-switcher-item.active {
        color: var(--accent-red);
        background-color: rgba(255, 255, 255, 0.08);
    }
}

/* ============================================================
   MOBILE RESPONSIVE — Client (public) site
   ============================================================ */

/* ─── HAMBURGER BUTTON ────────────────────────────────────── */
.mob-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    z-index: 10002;
}

.mob-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.mob-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mob-burger.open span:nth-child(2) {
    opacity: 0;
}

.mob-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── MOBILE DRAWER ───────────────────────────────────────── */
.mob-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: min(84vw, 320px);
    height: 100vh;
    background: #0a4272;
    z-index: 10001;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 64px 10px 18px;
    box-shadow: -14px 0 32px rgba(1, 12, 28, 0.42);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-drawer.open {
    right: 0;
}

.mob-drawer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #ff7a00;
}

.mob-drawer::after {
    display: none;
}

.mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 12, 24, 0.58);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mob-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Toggle switch inside the drawer that enables the quick-access bar */
.mob-quickbar-toggle-row {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mob-quickbar-toggle-label {
    font-family: var(--font-headings);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.85);
}

/* Галочки отдельных типов push-уведомлений (гол, конец периода и т.д.) —
   подстрока под общим тумблером "Уведомления о начале матчей". */
.push-pref-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}
.push-pref-input {
    width: 15px;
    height: 15px;
    accent-color: var(--accent-red);
    cursor: pointer;
    flex-shrink: 0;
}

/* Строка галочки + кнопка-глоссарий ("что это значит") рядом с ней. */
.push-pref-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.push-pref-item .push-pref-checkbox {
    flex: 1;
    min-width: 0;
}
.pref-info-btn {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-size: 10px;
    font-style: italic;
    font-family: Georgia, serif;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pref-info-btn:hover,
.pref-info-btn.active {
    border-color: var(--accent-red);
    color: var(--accent-red);
}
.pref-info-text {
    display: none;
    font-size: 11px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
    margin: -4px 0 0 23px;
}
.pref-info-text.open {
    display: block;
}

.mob-quickbar-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.mob-quickbar-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mob-quickbar-slider {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mob-quickbar-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.mob-quickbar-switch input:checked+.mob-quickbar-slider {
    background-color: var(--accent-red);
}

.mob-quickbar-switch input:checked+.mob-quickbar-slider::before {
    transform: translateX(18px);
}

/* Quick-access bar under the header (mobile only, opt-in via the drawer switch) —
   визуально повторяет десктопный .nav-menu: тот же тёмно-синий фон, те же
   прозрачные ссылки без индивидуального фона, только активная — сплошной оранжевый блок */
.mob-quickbar {
    display: none;
    align-items: center;
    gap: 0;
    padding: 0 0 0 6px;
    height: 34px;
    background: linear-gradient(180deg, #003f79 0%, #002d5a 100%);
    border-bottom: 4px solid var(--accent-red);
    overflow-x: auto;
    /* Скроллится свайпом как и раньше, просто без видимой полосы прокрутки */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mob-quickbar::-webkit-scrollbar {
    display: none;
}

.mob-quickbar.show {
    display: flex;
}

.mob-quickbar-item {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    height: 100%;
}

.mob-quickbar-link {
    position: relative;
    z-index: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 8px;
    font-family: var(--font-headings);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mob-quickbar-link.active {
    background: var(--accent-red);
    color: #fff;
}

/* Выпадающий список подпунктов (Турниры/Участники/Медиа) — как dropdown-menu
   в браузерной версии, но открывается тапом, а не наведением */
.mob-quickbar-dropdown {
    display: none;
    position: fixed;
    min-width: auto;
    max-width: 80vw;
    background-color: #0a4272;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    z-index: 10050;
    box-shadow: 0 10px 24px rgba(1, 12, 28, 0.35);
}

.mob-quickbar-dropdown.open {
    display: block;
}

.mob-quickbar-dropdown-item {
    display: block;
    padding: 12px 16px;
    font-family: var(--font-headings);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-quickbar-dropdown-item:last-child {
    border-bottom: none;
}

.mob-quickbar-dropdown-item:active {
    background-color: rgba(255, 255, 255, 0.12);
}

.mob-quickbar-dropdown-item.active {
    background-color: var(--accent-red);
    color: #fff;
}

@media (min-width: 769px) {
    .mob-quickbar {
        display: none !important;
    }
}

/* Nav links inside drawer */
.mob-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mob-nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 60px;
    padding: 17px 14px 17px 18px;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-headings);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.mob-nav-link::before {
    display: none;
}

.mob-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 122, 0, 0.75);
    color: #fff;
}

.mob-nav-link.mob-active {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: #ff7a00;
    color: #fff;
}

.mob-nav-link:focus {
    outline: none;
}

.mob-nav-link:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.35);
    outline-offset: -2px;
}

.mob-arrow {
    margin-left: auto;
    font-size: 15px;
    line-height: 1;
    opacity: 0.86;
    transition: transform 0.2s;
}

/* Submenu */
.mob-nav-sub {
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 6px 0 8px 18px;
    padding: 0;
    border-left: 2px solid rgba(255, 122, 0, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}

.mob-nav-sub.open {
    display: flex;
}

.mob-nav-group:has(.mob-nav-sub.open)+.mob-nav-link,
.mob-nav-group:has(.mob-nav-sub.open)+.mob-nav-group>.mob-nav-link {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mob-nav-sub-link {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 43px;
    padding: 10px 16px 10px 16px;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-headings);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 0;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    transition: background 0.15s, color 0.15s;
}

.mob-nav-sub-link:last-child {
    border-bottom: 0;
}

.mob-nav-sub-link::before {
    display: none;
}

.mob-nav-sub-link:hover {
    background: transparent;
    color: #fff;
}

.mob-nav-sub-link.mob-active {
    background: transparent;
    color: #fff;
}

.mob-install-app-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    padding: 12px 16px;
    border: 2px solid #ff7a00;
    border-radius: 4px;
    background: #ff7a00;
    color: #ffffff;
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(255, 122, 0, 0.22);
}

.mob-install-app-btn:hover {
    background: #e86f00;
    border-color: #e86f00;
}

/* Стеклянные (iOS-style "liquid glass") плавающие кнопки навигации назад/вперёд —
   только мобильная версия. backdrop-filter + полупрозрачность + блик сверху даёт
   "зеркальный" вид без сторонних библиотек. */
.mob-history-nav {
    display: none;
}

@media (max-width: 768px) {
    .mob-history-nav {
        display: flex;
        position: fixed;
        left: 50%;
        bottom: calc(6px + env(safe-area-inset-bottom, 0px));
        z-index: 3500;
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        transition: transform 0.3s ease, opacity 0.3s ease;
        pointer-events: auto;
    }

    .mob-history-nav.mob-history-nav-hidden {
        transform: translateX(-50%) translateY(140%);
        opacity: 0;
        pointer-events: none;
    }
}

/* Единый стеклянный (iOS-style "liquid glass") квадрат со стрелками назад/вперёд
   внутри — backdrop-filter + полупрозрачность + блик сверху, без сторонних библиотек. */
.glass-btn {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(20, 24, 34, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.mob-history-nav.glass-btn {
    width: 92px;
    height: 46px;
    border-radius: 0;
    padding: 0;
}

.mob-history-btn {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    flex: 1 1 50%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mob-history-btn:first-child {
    border-radius: 0;
}

.mob-history-btn:last-child {
    border-radius: 0;
}

.mob-history-btn:active {
    background: rgba(255, 255, 255, 0.16);
}

.mob-history-btn:disabled {
    color: rgba(255, 255, 255, 0.35);
    cursor: default;
}

.mob-history-btn:disabled:active {
    background: transparent;
}

.mob-history-btn svg {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.mob-history-divider {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

.pwa-install-guide-open {
    overflow: hidden;
}

.pwa-install-guide {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3, 10, 24, 0.62);
    touch-action: none;
}

.pwa-install-guide__dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.pwa-install-guide__x {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 1px solid #d7dee8;
    border-radius: 50%;
    background: #f8fafc;
    color: #0d2138;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-guide__title {
    margin: 0 38px 8px 0;
    color: #0d2138;
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
}

.pwa-install-guide__lead {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.pwa-install-guide__grid {
    display: grid;
    gap: 12px;
}

.pwa-install-guide__card {
    border: 1px solid #d7dee8;
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
}

.pwa-install-guide__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pwa-install-guide__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #0d2138;
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.pwa-install-guide__card h3 {
    margin: 0;
    color: #0d2138;
    font-size: 18px;
    font-weight: 800;
}

.pwa-install-guide__card ol {
    margin: 0;
    padding-left: 22px;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.45;
}

.pwa-install-guide__card li + li {
    margin-top: 6px;
}

.pwa-install-guide__close {
    width: 100%;
    min-height: 44px;
    margin-top: 16px;
    border: 0;
    border-radius: 6px;
    background: #ff7a00;
    color: #ffffff;
    font-family: var(--font-headings);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

/* ─── HEADER MOBILE ───────────────────────────────────────── */
@media (max-width: 768px) {
    .mob-burger {
        display: flex;
        align-self: center;
        margin-left: auto;
    }

    .mob-drawer {
        display: block;
    }

    .mob-overlay {
        display: block;
    }

    .mob-quickbar-toggle-row {
        display: flex;
    }

    .mob-quickbar.show {
        display: flex;
    }

    /* Hide desktop nav bar on mobile */
    .header-bottom-stripe {
        display: none;
    }

    /* Logo left + title inline */
    .header-inner-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 12px 0 0;
        gap: 6px;
        min-height: 64px;
    }

    .header-logo-link {
        position: static;
        width: 64px;
        height: 64px;
        flex-shrink: 0;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
    }

    .logo-container-full {
        width: 60px;
        height: 60px;
    }

    .header-top-stripe {
        padding: 0;
    }

    .header-top-row {
        flex: 1;
        height: auto;
        padding: 12px 0;
        justify-content: flex-start;
        text-align: left;
        display: flex;
        align-items: center;
    }

    .league-title {
        font-size: 15px;
        letter-spacing: 0.2px;
        line-height: 1.18;
        transform: translateY(3px);
    }
}

/* ─── MAIN CONTENT ────────────────────────────────────────── */
@media (max-width: 768px) {
    main {
        padding: 14px 9px 32px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .breadcrumb {
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        padding: 9px;
        margin: 0 0 12px;
    }

    .page-title {
        font-size: 22px;
    }

    /* Prevent any child from escaping viewport */
    main * {
        max-width: 100%;
    }

    .header-inner-container,
    .header-top-stripe,
    .header-bottom-stripe,
    header {
        max-width: 100vw;
        overflow: hidden;
    }

    /* Tables and wide elements scroll internally */
    .client-table,
    .admin-table,
    .schedule-tab-content,
    .bkt-wrap,
    .po-series-table {
        max-width: 100% !important;
        overflow-x: auto !important;
    }
}

/* ─── HERO SECTION ────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        padding: 36px 20px 36px;
        margin-bottom: 24px;
    }

    .hero-section::after {
        font-size: 80px;
        right: 10px;
        bottom: -10px;
    }

    .hero-title {
        font-size: 30px;
    }

    .hero-desc {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
}

/* ─── STATS ROW ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 24px;
    }

    .stat-card {
        padding: 18px 12px;
    }

    .stat-val {
        font-size: 28px;
    }
}

@media (max-width: 380px) {
    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─── HOME TWO-COL ────────────────────────────────────────── */
@media (max-width: 768px) {
    .home-two-col {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ─── MATCH ROW CARDS ─────────────────────────────────────── */
@media (max-width: 600px) {
    .match-row-card {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        padding: 10px 12px;
    }

    .match-row-meta {
        grid-column: 2;
        text-align: left;
    }

    .match-row-team {
        max-width: 120px;
        font-size: 13px;
    }
}

/* ─── TEAMS GRID ──────────────────────────────────────────── */
@media (max-width: 992px) {
    .teams-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ─── PLAYER CARDS GRID ───────────────────────────────────── */
@media (max-width: 640px) {
    .players-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ─── PROFILE / TEAM DETAIL ───────────────────────────────── */
@media (max-width: 768px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }

    .team-profile {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px 14px;
    }

    .team-profile-sidebar {
        padding: 0 0 18px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        align-items: center;
    }

    .team-profile .profile-avatar-detail-wrap {
        width: 150px;
        height: 150px;
    }

    .team-profile-name,
    .team-profile .profile-sidebar h2 {
        font-size: 24px !important;
    }

    .team-profile .profile-detail-row {
        flex-direction: column;
        gap: 2px;
        font-size: 15px;
    }

    .team-profile .profile-detail-row strong {
        min-width: 0;
        font-size: 13px;
        color: var(--text-muted);
    }

    .team-profile .profile-detail-row span {
        text-align: left;
    }
}

/* ─── CLIENT TABLE ────────────────────────────────────────── */
@media (max-width: 768px) {
    .client-table {
        font-size: 15px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* display:block на <table> создаёт анонимную таблицу вокруг thead/tbody —
       её ширина считается отдельно от самого <table> и НЕ подчиняется
       width/min-width, заданным на <table>, поэтому таблица всё равно
       сжимается по короткому содержимому (например "Игроки не найдены").
       У списка игроков скролл и так обеспечивает обёртка .client-mobile-edge-card
       (overflow-x:auto) — отключаем здесь display:block, таблица остаётся
       нормальной table и растягивается на все 100% ширины карточки. */
    #players-list-view .client-table,
    #referees-list-view .client-table,
    .home-table {
        display: table;
        width: 100%;
        white-space: normal;
    }
}

/* ─── SCHEDULE MATCH WIDGET ───────────────────────────────── */
@media (max-width: 640px) {
    .schedule-match-widget {
        position: relative;
        height: 105px;
        padding: 0;
        display: block;
    }

    .schedule-match-info-col {
        position: absolute;
        left: 12px;
        top: 10px;
        bottom: 10px;
        width: 150px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .schedule-match-stage,
    .schedule-match-arena {
        white-space: nowrap;
    }

    .schedule-match-teams-col {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 175px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    .schedule-match-logo,
    .schedule-match-logo-placeholder {
        width: 28px;
        height: 28px;
        padding: 1px;
    }

    .schedule-match-team-home,
    .schedule-match-team-away {
        font-size: 13px;
        gap: 4px;
    }

    /* Раздвигаем лого/аббревиатуру команд немного в стороны от центра,
       чтобы серый блок счёта не наезжал на лого на телефоне */
    .schedule-match-team-home {
        transform: translateX(-6px);
    }

    .schedule-match-team-away {
        transform: translateX(6px);
    }

    .schedule-match-score {
        width: 44px;
        height: 24px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .schedule-match-score-container {
        width: 50px;
    }

    .schedule-match-meta-col {
        position: absolute;
        right: 12px;
        top: 10px;
        bottom: 10px;
        width: 115px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        text-align: right;
    }

    .schedule-match-date,
    .schedule-match-stage,
    .schedule-match-arena {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #555555 !important;
        opacity: 1 !important;
    }

    .team-schedule-status-completed {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #15803d !important;
        opacity: 1 !important;
    }

    .team-schedule-status-planned {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #1b3f6b !important;
        opacity: 1 !important;
    }

    .team-schedule-status-live {
        font-size: 12px !important;
        font-weight: 800 !important;
        color: var(--accent-red) !important;
        opacity: 1 !important;
    }
}

/* ─── TABS ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .tabs {
        gap: 1px;
        padding: 1px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 10px 6px;
    }

    .sub-tabs {
        flex-wrap: wrap !important;
    }

    .sub-tab-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
        font-size: 11px;
        padding: 7px 8px;
    }
}

/* ─── FILTERS ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .schedule-filters {
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px;
    }

    .filter-group {
        min-width: 0;
        width: 100%;
    }

    .search-bar-container {
        flex-direction: column;
    }
}

/* ─── CUSTOM SELECT (mobile only) ────────────────────────── */
@media (max-width: 768px) {
    .cs-wrapper {
        position: relative;
        width: 100%;
    }

    .cs-trigger {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 5px 12px 5px 15px;
        border: 1px solid var(--border-color);
        border-radius: 0;
        background: var(--bg-card);
        cursor: pointer;
        font-family: var(--font-headings);
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-color);
        letter-spacing: 0.5px;
        user-select: none;
        -webkit-user-select: none;
    }

    .cs-trigger.cs-open {
        border-color: var(--accent-red);
    }

    .cs-arrow {
        font-size: 12px;
        color: var(--text-muted);
        flex-shrink: 0;
    }

    .cs-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border: 1.5px solid var(--accent-red);
        border-top: none;
        border-radius: 0;
        z-index: 9000;
        /* Показываем максимум ~10 пунктов, остальное — под скролл, иначе
           длинный список (например, туров) растягивает дропдаун на весь экран. */
        max-height: 320px;
        overflow-y: auto;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    .cs-dropdown.cs-open {
        display: block;
    }

    .cs-option {
        padding: 5px 15px;
        color: var(--text-color);
        font-family: var(--font-headings);
        font-size: 14px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        cursor: pointer;
        border-bottom: 1px solid var(--border-color);
    }

    .cs-option:last-child {
        border-bottom: none;
    }

    .cs-option:active {
        background: var(--bg-card-hover);
    }

    .cs-option.cs-selected {
        background: #1769ff;
        color: #fff;
    }
}

/* ─── PAGE HEADER + SEASON FILTER (teams, players, etc.) ──── */
@media (max-width: 768px) {

    /* Page header row: title + filters → stack vertically */
    .page-header-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Season filter form → stack vertically */
    .season-filter-container,
    .season-filter-container form {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* Each filter row (label + select) → full width */
    .season-filter-container form>div {
        display: flex !important;
        box-sizing: border-box !important;
        width: 100% !important;
        gap: 6px !important;
    }

    /* flex:1 + width:100% вместе ведут себя ненадёжно у <select> в некоторых
       мобильных браузерах (width игнорируется из-за flex-basis:0 от flex:1) —
       задаём явный min-width:0, чтобы select гарантированно дотягивался до
       правого края строки, а не сжимался по содержимому. */
    .season-select {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        flex: 1 1 0% !important;
    }

    .season-filter-label {
        min-width: 80px;
        margin-right: 0 !important;
        flex-shrink: 0;
    }

    .tournament-row {
        grid-template-columns: 1fr;
        gap: 16px;
        min-height: 0;
        padding: 15px 16px;
    }

    .tournament-row-title {
        font-size: 21px;
    }

    .tournament-row-meta {
        display: grid;
        gap: 7px;
    }

    .tournament-row-link {
        width: 100%;
        min-width: 0;
    }

    /* Page toolbar: one row, text left, switcher right */
    .page-toolbar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 0 !important;
        flex-wrap: nowrap !important;
        margin-top: 8px !important;
    }

    .page-header-container {
        margin-bottom: 8px !important;
    }

    .view-switcher {
        width: auto !important;
        flex-shrink: 0;
        display: flex !important;
    }

    /* Icon-only buttons, centered */
    .view-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 0 !important;
        padding: 0 !important;
        flex: none !important;
        position: relative !important;
        overflow: hidden !important;
        font-size: 0 !important;
        color: transparent !important;
    }

    .view-btn svg {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 18px !important;
        height: 18px !important;
        margin: 0 !important;
        color: white !important;
        fill: white !important;
    }
}

/* ─── MATCH CAROUSEL ──────────────────────────────────────── */
@media (max-width: 480px) {
    .mc-inner {
        gap: 2px;
        padding: 5px 0;
    }

    .mc-track {
        gap: 6px;
        padding-right: 1px;
    }

    .mc-card {
        width: calc((100% - 7px) / 2);
        min-height: 90px;
        padding: 2px 6px 4px;
    }

    .mc-logo,
    .mc-logo-ph {
        width: 32px;
        height: 32px;
    }

    .mc-body {
        position: relative;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .mc-body .mc-side:first-child {
        grid-column: 1;
        padding-right: 20px;
    }

    .mc-body .mc-side-r {
        grid-column: 2;
        padding-left: 20px;
    }

    .mc-mid {
        position: absolute;
        left: 50%;
        top: 50%;
        width: auto;
        min-width: 0;
        transform: translate(-50%, -50%);
        z-index: 1;
    }

    .mc-sc {
        font-size: 23px;
    }

    .mc-date,
    .mc-time {
        font-size: 12.5px;
    }

    .mc-abbr {
        font-size: 13px;
    }

    .mc-struct {
        font-size: 12.5px;
    }

    .mc-arrow {
        padding: 0 4px;
        font-size: 32px;
    }
}

/* ─── PLAYOFF BRACKET ─────────────────────────────────────── */
@media (max-width: 768px) {
    .bkt-wrap {
        padding: 10px;
        min-height: unset;
    }

    .po-series-table {
        min-width: 400px;
    }
}

/* ─── NEWS GRID ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-page-head {
        display: block;
        margin-bottom: 16px;
    }

    .news-page-subtitle {
        font-size: 14px;
    }

    .news-instagram-link {
        width: 100%;
        margin-top: 14px;
    }

    .instagram-feed-panel {
        padding: 10px;
    }

    .instagram-feed-frame {
        min-height: 620px;
    }
}

/* ─── FOOTER ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    footer {
        padding: 24px 16px;
    }
}

/* ─── RESPONSIVE TEAM NAMES IN WIDGETS ────────────────────── */
.team-short-name,
.date-short,
.status-short {
    display: none !important;
}
.team-full-name,
.date-full,
.status-full {
    display: inline !important;
}

@media (max-width: 768px) {
    .team-full-name,
    .date-full,
    .status-full {
        display: none !important;
    }
    .team-short-name,
    .date-short,
    .status-short {
        display: inline !important;
    }
}

/* ============================================================
   PLAYER / TEAM DETAIL CARD (pd-*) — shared by player_detail.html
   and team_detail.html
   ============================================================ */
.pd-info a,
.pd-link {
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.pd-info a:hover,
.pd-link:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

.pd-card {
    margin-bottom: 28px;
    background-color: #ffffff;
    background-image: url("../img/card-texture.8f58064653cf.png?v=2");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    border: 1px solid #d7e1ec;
    border-top: 3px solid var(--accent-red);
    display: grid;
    grid-template-columns: clamp(220px, 24vw, 280px) minmax(0, 1fr);
    align-items: stretch;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* ── Left column: photo/logo + name block ── */
.pd-left {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
}

.pd-photo {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    background: transparent;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-photo img.pd-avatar {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    cursor: pointer;
}

.pd-photo img.pd-silhouette {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
}

/* Team logos are full graphics on a transparent background, not a
   head-and-shoulders photo — contain them instead of cropping like .pd-avatar */
.pd-photo--logo {
    background: transparent;
    padding: 16px;
    box-sizing: border-box;
}

.pd-photo--logo img.pd-avatar,
.pd-photo--logo svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Точки-переключатели поверх фото игрока — когда есть несколько фото (по
   одному на каждую команду, в которой заявлен игрок) */
.pd-photo-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
}

.pd-photo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.25);
    padding: 0;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.pd-photo-dot:hover {
    background: #fff;
}

.pd-photo-dot.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.2);
}

.pd-badge {
    background: var(--accent-red);
    color: #fff;
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 900;
    padding: 4px 11px;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.pd-name-row {
    background: #0a4a82;
    padding: 12px 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pd-name-row h1 {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-family: var(--font-headings);
    font-size: 21px;
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

/* ── Right column: info rows ── */
.pd-message-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 30px;
    height: 30px;
    padding: 0 10px;
    margin-left: auto;
    flex-shrink: 0;
    background: #0084ff;
    color: #ffffff;
    text-decoration: none;
    font-family: var(--font-headings);
    font-size: 13px;
    font-weight: 900;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pd-message-btn:hover {
    background: #006cd9;
    color: #ffffff;
    transform: translateY(-1px);
}

.pd-message-btn svg {
    color: #ffffff;
    stroke: #ffffff;
}

.pd-message-btn .pd-message-text {
    color: #ffffff;
    font-family: var(--font-headings);
    font-weight: 900;
}

.pd-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-self: stretch;
}

.pd-row {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 0 0 auto;
    min-height: 31px;
    padding: 4px 20px;
    transition: background-color .15s;
}

.pd-row:hover {
    background: #f8fafc;
}

.pd-row span {
    width: 180px;
    flex-shrink: 0;
    color: #52667a;
    font-size: 15px;
    font-weight: 600;
}

.pd-row strong {
    color: #050b17;
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 900;
}

.pd-info a,
.pd-link {
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.captain-link {
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.pd-info a:hover,
.pd-link:hover,
.captain-link:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

.pd-team-link,
.pd-team-link:hover {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    color: #050b17;
}

.pd-team-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.pd-team-logo-placeholder {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--bg-nav);
    opacity: 0.15;
    flex-shrink: 0;
}

/* ── Contracts ── */

.pd-section-title {
    margin: 0 0 12px;
    padding-left: 12px;
    border-left: 4px solid var(--accent-red);
    font-family: var(--font-headings);
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
}

.pd-contracts {
    margin-bottom: 40px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #d7e1ec;
}

.pd-contracts .client-table {
    margin-bottom: 0;
}

.pd-player-table-card {
    box-sizing: border-box;
    margin-bottom: 28px;
    padding: 9px;
}

@media (max-width: 768px) {
    /* display:block ломает width:100% (см. комментарий у #players-list-view) —
       скролл и так обеспечивает .pd-contracts (overflow-x:auto). */
    .pd-contracts .client-table {
        display: table;
        width: 100%;
        white-space: normal;
    }

    .pd-player-table-card {
        padding: 9px !important;
    }
}

.pd-contracts th,
.pd-contracts td {
    white-space: nowrap;
}

.pd-contracts th:nth-child(n+3),
.pd-contracts td:nth-child(n+3) {
    text-align: center;
}

.pd-stat {
    font-family: var(--font-headings);
    font-weight: 700;
    color: #050b17;
}

.pd-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 10px;
    border: 1px solid #d7e1ec;
    color: #52667a;
    font-family: var(--font-headings);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pd-status-active {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #065f46;
}

.pd-empty {
    padding: 30px;
    text-align: center;
    color: #52667a;
}

@media (max-width: 640px) {
    .pd-card {
        grid-template-columns: 1fr;
    }

    .pd-left {
        width: 100%;
        max-width: 320px;
        height: auto;
        aspect-ratio: auto;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        background: transparent;
        border-bottom: 1px solid #d7e1ec;
        justify-self: center;
    }

    .pd-photo {
        width: min(72vw, 280px);
        height: auto;
        aspect-ratio: auto;
        flex: unset;
        background: transparent;
        align-items: flex-start;
    }

    .pd-photo img.pd-avatar {
        height: auto;
        object-position: center top;
    }

    .pd-card--player .pd-left {
        width: 100%;
        max-width: none;
        display: block;
    }

    .pd-card--player .pd-photo {
        width: 100%;
        height: clamp(320px, 100vw, 430px);
        aspect-ratio: auto;
    }

    .pd-card--player .pd-photo img.pd-avatar {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .pd-photo--logo {
        width: 200px;
        height: 200px;
    }

    .pd-row {
        flex: none;
        min-height: 28px;
        padding: 5px 15px;
    }

    .pd-row span {
        width: 150px;
        font-size: 13px;
    }

    .pd-row strong {
        font-size: 15px;
    }

    .pd-name-row {
        padding: 10px 15px;
    }

    .pd-name-row h1 {
        font-size: 18px;
    }

    .pd-message-btn {
        width: 30px;
        height: 30px;
        padding: 0;
        gap: 0;
        background: #0084ff;
    }

    .pd-message-text {
        display: none;
    }
}

@media (max-width: 768px) {
    :where(
        .client-mobile-edge-card,
        .profile-container,
        .season-filter-container,
        .search-bar-container,
        .mp-section,
        .cal-arena-card,
        .instagram-feed-panel,
        .instagram-feed-empty
    ) {
        margin-left: -9px;
        margin-right: -9px;
        max-width: calc(100% + 18px) !important;
    }

    :where(
        .client-mobile-edge-card,
        .profile-container,
        .season-filter-container,
        .search-bar-container,
        .mp-section,
        .cal-arena-card,
        .instagram-feed-panel,
        .instagram-feed-empty
    ) {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    .cal-arena-card {
        width: calc(100% + 18px) !important;
    }

    .season-filter-container {
        box-sizing: border-box !important;
        width: calc(100% + 18px) !important;
    }

    .schedule-match-widget {
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        width: 100vw !important;
        max-width: 100vw !important;
    }

    .schedule-tab-content {
        max-width: none !important;
        overflow: visible !important;
    }
}

/* Glossary Tooltip Component */
.alhl-glossary-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}

.alhl-glossary-icon {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color 0.2s ease, transform 0.2s ease;
}

.alhl-glossary-tooltip:hover .alhl-glossary-icon {
    color: var(--accent-red);
    transform: scale(1.1);
}

.alhl-glossary-popup {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    left: auto;
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
    min-width: 260px;
    max-width: 340px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    pointer-events: none;
}

.alhl-glossary-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 3px;
    border-width: 8px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.8) transparent transparent transparent;
}

.alhl-glossary-popup::before {
    content: '';
    position: absolute;
    top: 100%;
    right: 4px;
    border-width: 7px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
    z-index: 1;
}

.alhl-glossary-tooltip:hover .alhl-glossary-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 640px) {
    .alhl-glossary-popup {
        right: -9px;
        transform: translateY(10px);
    }
    .alhl-glossary-popup::after {
        right: 12px;
    }
    .alhl-glossary-popup::before {
        right: 13px;
    }
    .alhl-glossary-tooltip:hover .alhl-glossary-popup {
        transform: translateY(0);
    }
}

.alhl-glossary-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 16px;
    align-items: baseline;
    text-align: left;
}

.alhl-glossary-term {
    color: var(--bg-nav);
    font-weight: 800;
    font-family: var(--font-headings);
    white-space: nowrap;
    text-transform: uppercase;
}

.alhl-glossary-desc {
    color: var(--text-color);
    font-weight: 500;
}

/* Team detail page */
.team-detail-card {
    margin-bottom: 16px;
}

.team-tabs-wrap {
    margin-bottom: 40px;
}

.team-tabs {
    display: flex;
    gap: 2px;
    background-color: var(--border-color);
    padding: 2px;
    margin-bottom: 16px;
}

.team-tabs .tab-btn {
    flex: 1 1 0;
    min-width: 0;
    border-right: none;
    letter-spacing: .3px;
    white-space: nowrap;
}

.team-tab-content {
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

#tab-stats.team-tab-content,
#tab-calendar.team-tab-content {
    background: transparent;
    border: none;
}

#tab-calendar .season-filter-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.team-tab-content.active {
    display: block !important;
}

.team-roster-content {
    padding: 9px;
}

.team-scroll-x {
    overflow-x: auto;
}

.team-table-flush {
    margin-bottom: 0 !important;
}

.team-num-col,
th.team-num-col,
.team-num-cell {
    width: 36px;
    text-align: center;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.team-num-cell {
    font-weight: 800;
}

.team-col-citizenship {
    width: 150px;
}

.team-col-grip,
th.team-col-grip {
    width: 120px;
    text-align: left;
}

.team-col-birth,
th.team-col-birth {
    width: 180px;
    text-align: left;
}

.team-col-status,
th.team-col-status {
    width: 150px;
    text-align: left;
}

/* th.team-col-stat-* (а не просто .team-col-stat-*) — иначе более специфичное
   правило ".client-table th { text-align: left }" выше в файле перебивает
   центрирование заголовка, и заголовок съезжает влево, а данные под ним
   остаются по центру. */
.team-col-stat-sm,
th.team-col-stat-sm {
    width: 90px;
    text-align: center;
}

.team-col-stat-md,
th.team-col-stat-md {
    width: 100px;
    text-align: center;
}

.team-col-stat-lg,
th.team-col-stat-lg {
    width: 110px;
    text-align: center;
}

.team-col-stat-xl,
th.team-col-stat-xl {
    width: 120px;
    text-align: center;
}

.team-col-stat-xxl,
th.team-col-stat-xxl {
    width: 130px;
    text-align: center;
}

.team-cell-center {
    text-align: center;
}

.team-cell-center-bold {
    text-align: center;
    font-weight: 800;
}

.team-empty-table-cell {
    text-align: center;
    padding: 30px !important;
    color: var(--text-muted);
}

.team-season-filter {
    padding-bottom: 4px;
    margin: 0;
}

.team-season-form,
.team-season-controls {
    display: flex;
    align-items: center;
}

.team-season-controls {
    gap: 5px;
}

.team-player-photo-col,
th.team-player-photo-col,
.team-player-photo-cell {
    width: 52px;
    min-width: 52px;
    text-align: center;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.team-player-photo-thumb {
    display: block;
    width: 39px;
    height: 52px;
    aspect-ratio: 3 / 4;
    margin: 0 auto;
    border-radius: 0;
    object-fit: cover;
    object-position: top;
    cursor: zoom-in;
}

.team-player-photo-placeholder {
    opacity: 0.35;
    cursor: default;
}

.team-schedule-list {
    padding: 12px 0;
    background: transparent;
}

.team-schedule-status-completed {
    color: #15803d;
    font-weight: 800;
}

.team-schedule-status-live {
    color: var(--accent-red);
    font-weight: 800;
    animation: blink 1.5s infinite;
}

.team-schedule-status-planned {
    color: var(--text-muted);
}

.team-roster-player {
    white-space: nowrap;
    font-weight: 700;
}

.team-roster-player-inner {
    display: flex;
    align-items: center;
    gap: 4px;
}

.team-roster-player .mp-player-link:hover {
    color: var(--accent-red);
}

.team-roster-birth {
    text-align: left;
    white-space: nowrap;
}

.team-roster-birth span {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.team-roster-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 4px 9px;
    background-color: #eef6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    text-transform: uppercase;
    white-space: nowrap;
}

.team-stats-panel {
    display: grid;
    gap: 24px;
    padding: 0;
}

.team-stats-section {
    min-width: 0;
}

.team-stats-title {
    margin: 0 0 10px;
    padding-left: 10px;
    border-left: 4px solid var(--accent-red);
    color: #071832;
    font-size: 20px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.team-stats-table-wrap {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 9px;
}

.team-stats-table {
    margin-bottom: 0 !important;
}

.team-goalie-stats-table {
    min-width: 1040px;
}

.team-stats-empty {
    padding: 24px !important;
    text-align: center;
    color: var(--text-muted);
}

.team-stats-note {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.team-tab-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.team-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 18px;
}

.team-photo-card {
    width: 100%;
}

.team-dynamic-grid {
    padding: 16px;
}

.team-folder-trail {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 11px;
    text-transform: none;
}

.pd-name-row .my-team-star-btn {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.55);
}

.pd-name-row .my-team-star-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
    .team-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .team-tabs::-webkit-scrollbar {
        display: none;
    }

    .team-tabs .tab-btn {
        flex: 0 0 auto;
        padding: 10px 18px;
    }

    .team-player-photo-col,
    .team-player-photo-cell {
        width: 54px;
        min-width: 54px;
    }

    .team-player-photo-thumb {
        width: 39px;
        height: 52px;
    }
}
/* ============================================================
   Универсальные иконки сортировки таблиц (.sort-icon-th)
   Используется на страницах: игроки, команды и др.
   JS: sortByField(field, callback) в client.js
   ============================================================ */
.sort-icon-th {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    margin-left: 2px;
    vertical-align: middle;
}
/* убрать подсветку касания на мобильных */
th[onclick] {
    -webkit-tap-highlight-color: transparent;
}
.sort-icon-th .si-up,
.sort-icon-th .si-dn {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.22);
    transition: color 0.14s;
}
th:hover .sort-icon-th .si-up,
th:hover .sort-icon-th .si-dn {
    color: rgba(255,255,255,0.55);
}
/* active-asc: стрелка вверх оранжевая, вниз — светлеет как превью */
.sort-icon-th.active-asc .si-up {
    color: #f97316;
}
th:hover .sort-icon-th.active-asc .si-up {
    color: #f97316;
}
th:hover .sort-icon-th.active-asc .si-dn {
    color: rgba(255,255,255,0.55);
}
/* active-desc: стрелка вниз оранжевая, вверх — светлеет как превью */
.sort-icon-th.active-desc .si-dn {
    color: #f97316;
}
th:hover .sort-icon-th.active-desc .si-dn {
    color: #f97316;
}
th:hover .sort-icon-th.active-desc .si-up {
    color: rgba(255,255,255,0.55);
}

/* Team details page: make logo column a square on desktop to remove empty top/bottom space */
@media (min-width: 769px) {
    .team-detail-card .pd-left {
        aspect-ratio: 1 / 1;
    }
    .team-detail-card .pd-photo {
        aspect-ratio: 1 / 1;
        height: 100%;
    }
}

/* Force standard table layout and prevent column misalignment on all screen sizes */
.team-table-flush {
    display: table !important;
    width: 100% !important;
    min-width: 1000px !important;
}
.team-stats-table {
    display: table !important;
    width: 100% !important;
    min-width: 980px !important;
}
.team-goalie-stats-table {
    display: table !important;
    width: 100% !important;
    min-width: 1040px !important;
}

