/* ════════════════════════════════════════════════════════════════════════════
   Tournament Web — Turnaj živě
   Vlastní web turnaje na subdoméně
   ════════════════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties (přepisovány inline scriptem z config API) ─────── */
:root {
    --color-primary:    #1e40af;
    --color-secondary:  #3b82f6;
    --color-bg:         #ffffff;
    --color-text:       #1f2937;
    --color-text-muted: #6b7280;
    --color-border:     #e5e7eb;
    --color-card-bg:    #f9fafb;

    --font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius:       10px;
    --radius-sm:    6px;
    --shadow:       0 2px 8px rgba(0,0,0,.08);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.12);
    --header-h:     64px;
    --max-w:        1100px;
    --transition:   0.2s ease;
}

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ── Container ────────────────────────────────────────────────────────────── */
.tw-container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ════ HEADER ════════════════════════════════════════════════════════════════ */
.tw-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow);
    height: var(--header-h);
}
.tw-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
}

/* Logo */
.tw-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: #fff !important;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
.tw-logo img {
    height: 38px;
    width: auto;
    border-radius: 4px;
    object-fit: contain;
}

/* Nav */
.tw-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-left: auto;
}
.tw-nav__item {
    color: rgba(255,255,255,.85);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
.tw-nav__item:hover,
.tw-nav__item.active {
    background: rgba(255,255,255,.18);
    color: #fff;
    text-decoration: none;
}

/* Hamburger */
.tw-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
}

/* ════ MAIN ══════════════════════════════════════════════════════════════════ */
.tw-main {
    flex: 1;
    padding-bottom: 3rem;
}

/* Loading */
.tw-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}
.tw-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: tw-spin 0.8s linear infinite;
}
@keyframes tw-spin { to { transform: rotate(360deg); } }

/* ════ HERO (O turnaji) ══════════════════════════════════════════════════════ */
.tw-hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    padding: 3.5rem 0 2.5rem;
    margin-bottom: 2rem;
}
.tw-hero__sport {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,.15);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}
.tw-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.tw-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.tw-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.tw-hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.tw-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: opacity var(--transition), transform var(--transition);
    text-decoration: none !important;
}
.tw-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.tw-btn--white { background: #fff; color: var(--color-primary); }
.tw-btn--outline { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* ════ SECTION ═══════════════════════════════════════════════════════════════ */
.tw-section {
    padding: 2rem 0;
}
.tw-section__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.tw-section__title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--color-border);
    margin-left: 0.5rem;
}

/* ════ CARDS ═════════════════════════════════════════════════════════════════ */
.tw-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.tw-card + .tw-card { margin-top: 1rem; }

/* ════ NEWS GRID ═════════════════════════════════════════════════════════════ */
.tw-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}
.tw-news-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}
.tw-news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); text-decoration: none; }
.tw-news-card__img {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
    background: var(--color-card-bg);
}
.tw-news-card__body { padding: 1rem; flex: 1; }
.tw-news-card__date { font-size: 0.78rem; color: var(--color-text-muted); margin-bottom: 0.375rem; }
.tw-news-card__title { font-weight: 700; font-size: 1rem; color: var(--color-text); line-height: 1.35; }

/* ════ STANDINGS TABLE ═══════════════════════════════════════════════════════ */
.tw-table-wrap { overflow-x: auto; }
.tw-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.tw-table th {
    text-align: left;
    padding: 0.625rem 0.875rem;
    background: var(--color-card-bg);
    border-bottom: 2px solid var(--color-border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.tw-table td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.tw-table tr:last-child td { border-bottom: none; }
.tw-table tr:hover td { background: var(--color-card-bg); }

/* ════ SCHEDULE ══════════════════════════════════════════════════════════════ */
.tw-match-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 0.625rem;
    box-shadow: var(--shadow);
}
.tw-match-card__team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}
.tw-match-card__team--away { justify-content: flex-end; text-align: right; }
.tw-match-card__score {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-primary);
    text-align: center;
    white-space: nowrap;
}
.tw-match-card__meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 0.25rem;
}
.tw-match-card--live { border-color: #ef4444; }
.tw-match-card--live .tw-match-card__score { color: #ef4444; }

/* ════ TEAMS GRID ════════════════════════════════════════════════════════════ */
.tw-teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.tw-team-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: box-shadow var(--transition);
}
.tw-team-card:hover { box-shadow: var(--shadow-lg); }
.tw-team-card__logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
    display: block;
    background: var(--color-card-bg);
}
.tw-team-card__initial {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
}
.tw-team-card__name { font-weight: 700; font-size: 0.95rem; }

/* ════ STATS ═════════════════════════════════════════════════════════════════ */
.tw-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.tw-stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}
.tw-stat-card__title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* ════ PAGE CONTENT (custom pages) ══════════════════════════════════════════ */
.tw-page-content {
    line-height: 1.75;
    max-width: 760px;
}
.tw-page-content h1, .tw-page-content h2, .tw-page-content h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--color-primary);
}
.tw-page-content p { margin-bottom: 1rem; }
.tw-page-content ul, .tw-page-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.tw-page-content li { margin-bottom: 0.25rem; }
.tw-page-content img { border-radius: var(--radius-sm); margin: 1rem 0; }
.tw-page-content a { color: var(--color-primary); text-decoration: underline; }
.tw-page-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    color: var(--color-text-muted);
    background: var(--color-card-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ════ NEWS DETAIL ═══════════════════════════════════════════════════════════ */
.tw-news-detail__cover {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}
.tw-news-detail__title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}
.tw-news-detail__date {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
}

/* ════ GROUP TABS ════════════════════════════════════════════════════════════ */
.tw-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0;
}
.tw-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
}
.tw-tab:hover { color: var(--color-primary); }
.tw-tab.active { color: var(--color-primary); border-color: var(--color-primary); }

/* ════ STATUS BADGES ════════════════════════════════════════════════════════ */
.tw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    white-space: nowrap;
}
.tw-badge--live    { background: #fef2f2; color: #ef4444; }
.tw-badge--done    { background: #f0fdf4; color: #16a34a; }
.tw-badge--sched   { background: #eff6ff; color: #2563eb; }
.tw-badge--upcoming{ background: #fefce8; color: #ca8a04; }

/* ════ EMPTY STATE ═══════════════════════════════════════════════════════════ */
.tw-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}
.tw-empty i { font-size: 2.5rem; margin-bottom: 1rem; display: block; opacity: 0.4; }
.tw-empty p { font-size: 0.9rem; }

/* ════ FOOTER ════════════════════════════════════════════════════════════════ */
.tw-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,.75);
    padding: 1.25rem 0;
    font-size: 0.875rem;
    margin-top: auto;
}
.tw-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.tw-footer__social { display: flex; gap: 0.75rem; }
.tw-footer__social a {
    color: rgba(255,255,255,.75);
    font-size: 1.1rem;
    transition: color var(--transition);
    text-decoration: none;
}
.tw-footer__social a:hover { color: #fff; }
.tw-footer__brand { color: rgba(255,255,255,.6); text-decoration: none; }
.tw-footer__brand:hover { color: #fff; text-decoration: none; }
.tw-footer__brand strong { color: #fff; }

/* ════ LAYOUTS ═══════════════════════════════════════════════════════════════ */

/* Modern layout: header accent bar */
body.layout-modern .tw-hero {
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
    padding-bottom: 4rem;
}
body.layout-modern .tw-header { background: rgba(0,0,0,.03); backdrop-filter: blur(10px); }

/* Minimal layout */
body.layout-minimal .tw-hero {
    background: var(--color-card-bg);
    color: var(--color-text);
    padding: 2rem 0;
    border-bottom: 2px solid var(--color-primary);
}
body.layout-minimal .tw-hero__title { color: var(--color-primary); }
body.layout-minimal .tw-hero__meta { color: var(--color-text-muted); }
body.layout-minimal .tw-btn--white { background: var(--color-primary); color: #fff; }
body.layout-minimal .tw-btn--outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
body.layout-minimal .tw-header { background: #fff; border-bottom: 2px solid var(--color-primary); }
body.layout-minimal .tw-header .tw-logo { color: var(--color-primary) !important; }
body.layout-minimal .tw-nav__item { color: var(--color-text-muted); }
body.layout-minimal .tw-nav__item:hover, body.layout-minimal .tw-nav__item.active { color: var(--color-primary); background: rgba(0,0,0,.05); }

/* ════ MATCH CARD AS LINK ════════════════════════════════════════════════ */
.tw-match-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    margin-bottom: 0.625rem;
}
.tw-match-link:hover .tw-match-card { border-color: var(--color-primary); box-shadow: var(--shadow-lg); }
.tw-match-link .tw-match-card { margin-bottom: 0; }

/* ════ TEAM LIST LINK ════════════════════════════════════════════════════ */
.tw-team-card { display: block; text-decoration: none !important; color: inherit; cursor: pointer; }
.tw-team-row-link { display: inline-flex; align-items: center; gap: .4rem; text-decoration: none; color: inherit; font-weight: 700; }
.tw-team-row-link:hover { color: var(--color-primary); text-decoration: none; }

/* ════ LOGO / INITIAL HELPERS ════════════════════════════════════════════ */
.tw-tlogo {
    border-radius: 50%;
    object-fit: contain;
    background: var(--color-card-bg);
    flex-shrink: 0;
}
.tw-tinitial {
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ════ BACK BUTTON ═══════════════════════════════════════════════════════ */
.tw-back-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 1.25rem;
    transition: color var(--transition);
}
.tw-back-btn:hover { color: var(--color-primary); text-decoration: none; }

/* ════ SUBSECTION TITLE ══════════════════════════════════════════════════ */
.tw-subsection-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: .75rem;
    padding-bottom: .375rem;
    border-bottom: 1px solid var(--color-border);
}

/* ════ LIVE BAR ══════════════════════════════════════════════════════════ */
.tw-live-bar {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: 1.5rem;
}
.tw-live-bar__title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #ef4444;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}
.tw-live-bar__matches { display: flex; flex-wrap: wrap; gap: .5rem; }
.tw-live-bar__match {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #fff;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: .3rem .7rem;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none !important;
    color: var(--color-text);
    transition: border-color var(--transition);
}
.tw-live-bar__match:hover { border-color: #ef4444; }
.tw-live-dot {
    width: 8px; height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: tw-pulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes tw-pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.75)} }

/* ════ PLAYOFF BRACKET ═══════════════════════════════════════════════════ */
.tw-bracket { overflow-x: auto; padding-bottom: 1rem; }
.tw-bracket__rounds {
    display: flex;
    gap: 0;
    min-width: max-content;
    align-items: stretch;
}
.tw-bracket__round {
    display: flex;
    flex-direction: column;
    min-width: 190px;
    border-right: 1px solid var(--color-border);
}
.tw-bracket__round:last-child { border-right: none; }
.tw-bracket__round-label {
    font-size: .72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: .06em;
    text-align: center;
    padding: .5rem;
    background: var(--color-card-bg);
    border-bottom: 2px solid var(--color-border);
}
.tw-bracket__matches {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex: 1;
    padding: .75rem;
    gap: .75rem;
}
.tw-bracket__match {
    display: block;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none !important;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.tw-bracket__match:hover { border-color: var(--color-primary); box-shadow: var(--shadow-lg); }
.tw-bracket__match--live { border-color: #ef4444; }
.tw-bracket__match--done { }
.tw-bracket__team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .4rem .6rem;
    font-size: .8rem;
    font-weight: 600;
    border-bottom: 1px solid var(--color-border);
    gap: .4rem;
    color: var(--color-text);
}
.tw-bracket__team:last-child { border-bottom: none; }
.tw-bracket__team--winner { color: var(--color-primary); background: #eff6ff; }
.tw-bracket__team-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tw-bracket__team-score { font-size: .9rem; font-weight: 800; min-width: 1.4rem; text-align: right; flex-shrink: 0; }
.tw-bracket__third {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--color-border);
}
.tw-bracket__third-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* ════ MATCH DETAIL ══════════════════════════════════════════════════════ */
.tw-match-detail {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem 1.25rem;
    color: #fff;
    margin-bottom: 1.5rem;
}
.tw-md-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.tw-md-team { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.tw-md-team--away { }
.tw-md-team__name { font-weight: 700; font-size: 1rem; text-align: center; line-height: 1.25; }
.tw-md-center { text-align: center; }
.tw-md-score {
    font-size: 2.75rem;
    font-weight: 900;
    letter-spacing: .05em;
    white-space: nowrap;
}
.tw-md-score--sched { font-size: 1.5rem; opacity: .7; }
.tw-md-result-note { font-size: .78rem; opacity: .8; margin-top: .15rem; }
.tw-md-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 1.25rem;
    font-size: .82rem;
    opacity: .85;
}
.tw-md-meta span { display: flex; align-items: center; gap: .35rem; }

/* ════ EVENTS TIMELINE ═══════════════════════════════════════════════════ */
.tw-events { display: flex; flex-direction: column; gap: .25rem; }
.tw-ev {
    display: grid;
    grid-template-columns: 1fr 2rem 1fr;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .85rem;
}
.tw-ev:last-child { border-bottom: none; }
.tw-ev__icon { text-align: center; color: var(--color-primary); font-size: .95rem; }
.tw-ev__side { display: flex; flex-direction: column; }
.tw-ev__side--r { text-align: right; align-items: flex-end; }
.tw-ev__player { font-weight: 600; }
.tw-ev__assist { font-size: .75rem; color: var(--color-text-muted); }
.tw-ycard { color: #ca8a04 !important; }
.tw-rcard { color: #ef4444 !important; }

/* ════ TEAM PROFILE ══════════════════════════════════════════════════════ */
.tw-team-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.25rem;
}
.tw-team-profile__name { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.tw-team-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.tw-team-stat-item {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: .6rem .875rem;
    flex: 1;
    min-width: 200px;
}
.tw-team-stat-item__label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-text-muted);
    margin-bottom: .3rem;
    font-weight: 600;
}
.tw-team-stat-item__vals {
    display: flex;
    gap: .875rem;
    align-items: center;
    font-size: .875rem;
    font-weight: 600;
}

/* ════ TEAM MATCH LIST ═══════════════════════════════════════════════════ */
.tw-team-match {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .625rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fff;
    margin-bottom: .5rem;
    text-decoration: none !important;
    color: var(--color-text);
    font-size: .875rem;
    transition: border-color var(--transition);
}
.tw-team-match:hover { border-color: var(--color-primary); }
.tw-tm--win  { border-left: 3px solid #16a34a; }
.tw-tm--loss { border-left: 3px solid #ef4444; }
.tw-tm--draw { border-left: 3px solid #ca8a04; }
.tw-tm__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.tw-tm__round { font-size: .72rem; color: var(--color-text-muted); }
.tw-tm__time  { font-size: .72rem; color: var(--color-text-muted); }
.tw-tm__opp   { font-weight: 600; }
.tw-tm__vs    { color: var(--color-text-muted); font-size: .78rem; margin-right: .25rem; }
.tw-tm__score { font-size: 1rem; font-weight: 800; color: var(--color-primary); white-space: nowrap; }

/* ════ STATS OVERVIEW GRID ═══════════════════════════════════════════════ */
.tw-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1.5rem;
}
.tw-ov-box {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}
.tw-ov-box__val { font-size: 1.75rem; font-weight: 800; color: var(--color-primary); line-height: 1.1; }
.tw-ov-box__lbl { font-size: .72rem; color: var(--color-text-muted); margin-top: .3rem; }

/* ════ RESPONSIVE ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .tw-nav-toggle { display: flex; }
    .tw-nav {
        position: fixed;
        top: var(--header-h); /* aktualizováno JS v updateNavTop() */
        left: 0; right: 0;
        background: var(--color-primary);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: .25rem;
        transform: translateY(-100%);
        opacity: 0;
        transition: transform .25s ease, opacity .25s ease;
        pointer-events: none;
        z-index: 99;
        max-height: 80vh;
        overflow-y: auto;
    }
    .tw-nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }
    .tw-nav__item { padding: .625rem 1rem; }

    .tw-match-card { grid-template-columns: 1fr; text-align: center; }
    .tw-match-card__team--away { justify-content: center; }
    .tw-match-card__score { font-size: 1.5rem; }

    .tw-md-teams { grid-template-columns: 1fr auto 1fr; gap: .5rem; }
    .tw-md-score { font-size: 2rem; }
    .tw-md-team__name { font-size: .875rem; }

    .tw-footer__inner { flex-direction: column; text-align: center; }
    .tw-footer__social { justify-content: center; }
}

/* Header — mobilní optimalizace (dlouhý název webu) */
.tw-header { height: auto; min-height: var(--header-h); }
.tw-header__inner { height: auto; min-height: var(--header-h); flex-wrap: nowrap; }
.tw-logo { white-space: normal; word-break: break-word; flex: 1 1 auto; min-width: 0; }

@media (max-width: 480px) {
    .tw-logo { font-size: .92rem; }
    .tw-logo img { height: 30px; }
    .tw-bracket__round { min-width: 155px; }
    .tw-bracket__team { font-size: .73rem; padding: .35rem .45rem; }
    .tw-md-teams { gap: .3rem; }
    .tw-md-score { font-size: 1.75rem; }
    .tw-team-match { grid-template-columns: auto 1fr auto; gap: .4rem; font-size: .8rem; }
}
