/* ===== Halaman Tim (Teams) ===== */
.teams-section {
    max-width: 900px;
}

.team-card {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.team-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.team-head::-webkit-details-marker {
    display: none;
}

.team-head:hover {
    background: rgba(127, 224, 255, 0.05);
}

details.team-card[open] > .team-head {
    border-bottom: 1px solid var(--border-ice);
}

.team-caret {
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 0.85rem;
    transition: transform 0.15s ease;
}

details.team-card[open] > .team-head .team-caret {
    transform: rotate(90deg);
}

.team-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.team-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.flag-spr {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    vertical-align: middle;
}

.team-count {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(127, 224, 255, 0.14);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
}

.team-name {
    color: var(--accent-secondary);
    font-size: 1.3rem;
    margin: 0;
}

.team-author {
    color: var(--text-soft);
    font-size: 0.85rem;
    margin: 2px 0 0;
}

.team-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.team-fmt {
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
}

/* Badge regulasi di detail tim = tautan ke daftar tim regulasi itu. */
.team-fmt-link {
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.team-fmt-link:hover {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

/* Regulasi arsip (historis) di detail tim: badge diredupkan (abu-abu) supaya
   jelas beda dari regulasi aktif, tanpa menyembunyikan formatnya. Modifier
   dari .team-fmt (dipakai di team_detail.html: class "team-fmt team-fmt-arsip"). */
.team-fmt-arsip {
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.32);
}

.team-place {
    background: linear-gradient(135deg, var(--accent-primary), #2b8fc0);
    color: #04121f;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(95, 211, 240, 0.4);
}

.team-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.tefilter {
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 8px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.tefilter:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.tefilter.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.tef-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tef-n {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--accent-primary);
    color: #04121f;
}

.tefilter.active .tef-n {
    background: rgba(4, 18, 31, 0.22);
    color: inherit;
}

.team-event {
    margin-bottom: 10px;
    border: 1px solid var(--border-ice);
    border-radius: 12px;
    background: var(--card-bg);
    overflow: hidden;
}

.event-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.event-head::-webkit-details-marker {
    display: none;
}

.event-head:hover {
    background: rgba(127, 224, 255, 0.05);
}

.event-caret {
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 0.9rem;
    transition: transform 0.15s ease;
}

details.team-event[open] > .event-head .event-caret {
    transform: rotate(90deg);
}

.event-head-text {
    flex: 1 1 auto;
    min-width: 0;
}

.event-name {
    color: var(--accent-secondary);
    font-size: 1.05rem;
    margin: 0;
}

.event-meta {
    color: var(--text-soft);
    font-size: 0.8rem;
    margin: 2px 0 0;
}

.event-teams {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    align-items: start;
    padding: 4px 18px 20px;
}

.event-teams .team-card {
    margin-bottom: 0;
}

.team-src {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.team-src:hover {
    text-decoration: underline;
}

.team-mons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    align-items: start;
    padding: 14px 18px 18px;
}

.tmon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-ice);
    border-radius: 12px;
    overflow: hidden;
}

.tmon-sum {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.tmon-sum::-webkit-details-marker {
    display: none;
}

.tmon-spr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 224, 255, 0.16), transparent 70%);
}

.tmon-spr {
    width: 44px;
    height: 44px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.tmon-spr.spr-x {
    visibility: hidden;
}

.tmon-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.tmon-name {
    font-weight: 700;
    color: var(--accent-secondary);
    font-size: 0.95rem;
}

.tmon-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.tmon-arrow {
    margin-left: auto;
    color: var(--text-soft);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
    flex: none;
}

.tmon[open] .tmon-arrow {
    transform: rotate(180deg);
}

.tmon-body {
    padding: 4px 14px 14px;
    border-top: 1px solid var(--border-ice);
}

.tmon-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 10px 0 8px;
}

.tmon-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-main);
}

.tmon-tag b {
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.tmon-evs {
    font-size: 0.82rem;
    color: var(--text-main);
    margin: 0 0 10px;
}

.tmon-evs b {
    color: var(--text-soft);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
}

.tmon-moves {
    list-style: none;
    margin: 0 0 10px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.tmon-moves li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 8px;
    padding: 7px 12px;
}

.tmon-moves li.move-item {
    border-left: 3px solid var(--mv, var(--border-ice));
    background: var(--mv-bg, var(--card-bg));
}

.move-type-normal   { --mv: #9099a1; --mv-bg: rgba(144, 153, 161, 0.14); }
.move-type-fire     { --mv: #ff9d55; --mv-bg: rgba(255, 157, 85, 0.14); }
.move-type-water    { --mv: #4d90d5; --mv-bg: rgba(77, 144, 213, 0.14); }
.move-type-electric { --mv: #f4d23c; --mv-bg: rgba(244, 210, 60, 0.14); }
.move-type-grass    { --mv: #63bc5a; --mv-bg: rgba(99, 188, 90, 0.14); }
.move-type-ice      { --mv: #73cec0; --mv-bg: rgba(115, 206, 192, 0.14); }
.move-type-fighting { --mv: #ce4069; --mv-bg: rgba(206, 64, 105, 0.14); }
.move-type-poison   { --mv: #ab6ac8; --mv-bg: rgba(171, 106, 200, 0.14); }
.move-type-ground   { --mv: #d97845; --mv-bg: rgba(217, 120, 69, 0.14); }
.move-type-flying   { --mv: #8fa9de; --mv-bg: rgba(143, 169, 222, 0.14); }
.move-type-psychic  { --mv: #fa7179; --mv-bg: rgba(250, 113, 121, 0.14); }
.move-type-bug      { --mv: #90c12c; --mv-bg: rgba(144, 193, 44, 0.14); }
.move-type-rock     { --mv: #c5b78c; --mv-bg: rgba(197, 183, 140, 0.14); }
.move-type-ghost    { --mv: #5269ad; --mv-bg: rgba(82, 105, 173, 0.14); }
.move-type-dragon   { --mv: #0b6dc3; --mv-bg: rgba(11, 109, 195, 0.14); }
.move-type-dark     { --mv: #5a5366; --mv-bg: rgba(90, 83, 102, 0.16); }
.move-type-steel    { --mv: #5a8ea1; --mv-bg: rgba(90, 142, 161, 0.14); }
.move-type-fairy    { --mv: #ec8fe6; --mv-bg: rgba(236, 143, 230, 0.14); }

.tmon-nature {
    flex-wrap: wrap;
}

.tmon-nature .nat-eff {
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.62rem;
}

.tmon-nature .nat-up {
    background: rgba(123, 216, 143, 0.16);
}

.tmon-nature .nat-down {
    background: rgba(224, 112, 138, 0.16);
}

.tmon-detail-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.tmon-detail-link:hover {
    text-decoration: underline;
}

@media (max-width: 520px) {
    .tmon-moves {
        grid-template-columns: 1fr;
    }
}

/* ===== Detail Satu Tim (/teams/<slug>) — mobile-first ===== */
.td-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.td-back {
    display: inline-block;
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.td-back:hover {
    text-decoration: underline;
}

.td-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.td-head-main {
    min-width: 0;
    flex: 1 1 auto;
}

.td-title {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin: 0;
    word-break: break-word;
}

.td-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.td-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: help;
}

.td-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.td-event {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 4px;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.td-event-name {
    color: var(--accent-secondary);
    font-weight: 700;
}

/* Aksi tim (Fase 10): Builder GlacierDex sebagai aksi utama, Poképaste sebagai
   tautan sumber historis sekunder. Hanya tampil bila tim punya tautannya. */
.td-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 16px 0 4px;
}

.td-act {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
    font-weight: 800;
    font-size: 0.86rem;
    padding: 10px 18px;
    border-radius: 999px;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.td-act-utama {
    background: linear-gradient(135deg, var(--accent-primary), #2b8fc0);
    color: #04121f;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 6px 18px rgba(95, 211, 240, 0.35);
}

.td-act-utama:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(95, 211, 240, 0.5);
}

.td-act-sekunder {
    background: transparent;
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 700;
}

.td-act-sekunder:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.td-mons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
}

.td-mon {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    overflow: hidden;
}

.td-mon-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(127, 224, 255, 0.05);
    border-bottom: 1px solid var(--border-ice);
}

.td-mon-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.td-mon-name {
    font-weight: 800;
    color: var(--accent-secondary);
    font-size: 1.05rem;
    text-decoration: none;
}

.td-mon-name:hover {
    text-decoration: underline;
}

.td-mon-body {
    padding: 12px 14px 14px;
}

@media (min-width: 640px) {
    .td-mons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .td-mons {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Daftar Tim — kartu grid (revamp 2A-2, mobile-first) ===== */
.team-cofilters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.cofilter {
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.76rem;
    padding: 6px 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cofilter:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.cofilter.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.teamgrid-event {
    margin-bottom: 26px;
}

.tge-head {
    margin-bottom: 12px;
}

.tge-name {
    color: var(--accent-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.tge-meta {
    color: var(--text-soft);
    font-size: 0.8rem;
    margin: 2px 0 0;
}

.teamgrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.tcard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tcard:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 14px 32px rgba(30, 58, 95, 0.18);
}

.tcard-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tcard-id {
    min-width: 0;
    flex: 1 1 auto;
}

.tcard-name {
    color: var(--accent-secondary);
    font-size: 1.15rem;
    margin: 0;
    word-break: break-word;
}

/* Headline kartu = tautan nama pemain (/creator/<slug>). Mewarisi gaya heading
   .tcard-name; hanya menambah afordance link (hover + fokus) tanpa garis bawah
   default. Terpisah dari tombol "Lihat tim" — keduanya bisa diklik sendiri. */
.tcard-name-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.tcard-name-link:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.tcard-name-link:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 3px;
}

.tcard-author {
    color: var(--text-soft);
    font-size: 0.82rem;
    margin: 2px 0 0;
}

/* Nama pembuat di dalam kartu = tautan sendiri ke profil pemain (/creator/<slug>).
   Kartu sudah BUKAN <a> pembungkus, jadi ini <a> biasa yang bisa diklik terpisah
   dari tombol "Lihat tim". */
.tcard-author-link {
    color: var(--accent-secondary);
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
    transition: color 0.15s ease;
}

.tcard-author-link:hover {
    color: var(--accent-primary);
}

.tcard-author-link:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 3px;
}

.tcard-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.tcard-country {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 0.8rem;
    cursor: help;
}

.tcard-place {
    flex: 0 0 auto;
    background: linear-gradient(135deg, var(--accent-primary), #2b8fc0);
    color: #04121f;
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(95, 211, 240, 0.4);
}

.tcard-mons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tcard-spr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 224, 255, 0.16), transparent 70%);
}

.tcard-spr {
    width: 42px;
    height: 42px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.tcard-spr.spr-x {
    visibility: hidden;
}

.tcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.tcard-fmt {
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
}

/* Badge regulasi versi tombol: bisa diklik untuk menyaring ke regulasi ini.
   Reset tampilan tombol bawaan + afordance hover. Dipakai di kartu tim. */
.tcard-fmt-btn {
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tcard-fmt-btn:hover {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.tcard-fmt-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.tcard-link {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.tcard-link:hover {
    text-decoration: underline;
}

@media (min-width: 600px) {
    .teamgrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 980px) {
    .teamgrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Filter ala Tier List (mode + subfilter) — revamp ===== */
.team-filterbar {
    margin-bottom: 24px;
}

.team-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.team-mode {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 9px 12px;
    border-radius: 10px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.team-mode:hover {
    border-color: var(--accent-primary);
}

.team-mode.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.team-mode.sel {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tm-chip {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #04121f;
    background: var(--accent-primary);
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.team-subfilter {
    margin-bottom: 12px;
    animation: moreFade 0.2s ease;
}

.team-chiprow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Panel Regulasi: baris sub-chip regulasi yang muncul di bawah tab Aktif/
   Historis. Diberi indentasi + garis kiri sebagai penanda tingkat, dibatasi
   tinggi & bisa di-scroll agar rapi saat regulasi makin banyak. */
.regfilter-sub {
    margin-top: 10px;
    padding: 8px 2px 2px 12px;
    border-left: 2px solid var(--border-ice);
    max-height: 160px;
    overflow-y: auto;
}

.regfilter-sub[hidden] {
    display: none;
}

/* Chip regulasi placeholder (belum ada data, mis. Reg M-A): diredupkan + garis
   putus-putus supaya jelas beda dari regulasi berisi, tetap bisa diklik. */
.regfilter-soon {
    opacity: 0.65;
    border-style: dashed;
}

.team-search {
    width: 100%;
    margin-bottom: 12px;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-ice);
    background: rgba(8, 21, 36, 0.55);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.team-search::placeholder {
    color: var(--text-soft);
}

.team-search:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(95, 211, 240, 0.15);
}

.team-pokegrid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    padding: 2px;
}

.pokefilter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.76rem;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pokefilter:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.pokefilter.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.pokefilter-spr {
    width: 26px;
    height: 26px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: none;
}

.pokefilter[data-poke="all"] {
    padding: 5px 14px;
}

/* Ringkasan hitung tim (#teamCount): badge tengah yang rapi & menarik. */
#teamCount {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    color: var(--accent-secondary);
    background: linear-gradient(135deg, rgba(95, 211, 240, 0.16), rgba(127, 224, 255, 0.05));
    border: 1px solid var(--border-ice);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.18);
}

/* IceCard: 6 Pokemon dalam satu baris */
.tcard-mons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.tcard-spr-wrap {
    width: 100%;
    max-width: 46px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
}

.tcard-spr {
    width: 100%;
    height: 100%;
    max-width: 42px;
    max-height: 42px;
}

/* ===== Revamp filter Teams: combobox, fold, negara+hitung, chip Pokemon ===== */
.team-filterbar {
    margin-bottom: 20px;
}

.teamgrid-event {
    margin-bottom: 18px;
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.tge-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 12px 16px;
    margin: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.tge-head::-webkit-details-marker { display: none; }

.tge-head:hover { background: rgba(127, 224, 255, 0.05); }

.tge-caret {
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 0.8rem;
    transition: transform 0.15s ease;
    align-self: center;
}

details.teamgrid-event[open] > .tge-head .tge-caret { transform: rotate(90deg); }

.tge-name {
    color: var(--accent-secondary);
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    flex: 0 1 auto;
    min-width: 0;
    word-break: break-word;
    text-decoration: none;
    transition: color 0.15s ease;
}

.tge-name:hover {
    color: var(--accent-primary);
    text-decoration: underline;
}

.tge-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    margin-left: auto;
    flex: 0 0 auto;
}

.tge-date {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.tge-tag {
    background: rgba(95, 211, 240, 0.14);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.3px;
    padding: 2px 9px;
    border-radius: 999px;
}

.teamgrid-event > .teamgrid {
    padding: 4px 16px 18px;
}

.cof-code { font-weight: 800; }

.cof-n {
    font-size: 0.64rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
}

.cofilter.active .cof-n {
    background: rgba(4, 18, 31, 0.22);
    color: inherit;
}

/* Filter negara: toolbar urut (Abjad/Jumlah), kotak cari, dan daftar chip yang
   dibatasi tinggi + bisa di-scroll agar tetap rapi saat negara makin banyak. */
.cosort {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.cosort-label {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.cosort-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 5px 12px;
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cosort-btn:hover {
    border-color: var(--accent-primary);
}

.cosort-btn.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.cosort-arrow {
    font-size: 0.72rem;
    opacity: 0.85;
}

.cochiprow {
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}

.team-ac {
    border: 1px solid var(--border-ice);
    border-radius: 12px;
    background: var(--card-bg);
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#pokeBox { margin-top: 8px; display: none; }

.team-ac-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.86rem;
    padding: 8px 12px;
    border-radius: 9px;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.team-ac-item:hover { background: rgba(127, 224, 255, 0.08); }

.team-ac-item.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.tac-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tac-n {
    flex: 0 0 auto;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
}

.tac-n0 { opacity: 0.55; }

.tac-date {
    flex: 0 0 auto;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.tac-spr {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: 0 0 auto;
}

.team-selpoke {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.selpoke-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-primary);
    color: #04121f;
    font-weight: 800;
    font-size: 0.76rem;
    padding: 4px 6px 4px 12px;
    border-radius: 999px;
}

.selpoke-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(4, 18, 31, 0.22);
    color: #04121f;
    font-size: 0.6rem;
    cursor: pointer;
}

.selpoke-x:hover { background: rgba(4, 18, 31, 0.4); }

.team-barbot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.team-reset {
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: transparent;
    color: var(--text-soft);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.74rem;
    padding: 4px 12px;
    border-radius: 999px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.team-reset:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.team-empty {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.9rem;
    padding: 30px 0;
}

/* ===== Filter Pokemon: kisi chip (sprite + jumlah) + baris tipe — revamp Jul 2026 ===== */
/* Baris toolbar: "Urutkan" (chip Pokemon) + "Tipe" (chip tipe), membungkus rapi
   di layar sempit. Tiap grup .cosort tetap menyatu saat turun baris. */
.poke-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 10px;
}

.poke-tools .cosort {
    margin-bottom: 0;
}

/* Baris chip tipe (simbol bulat + jumlah). Alat bantu menjelajah: menyaring
   daftar chip Pokemon, tidak memengaruhi tim yang tampil. */
.poke-typerow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 2px;
}

.typechip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.74rem;
    padding: 4px 12px 4px 6px;
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.typechip:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.typechip.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.typechip-spr {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex: none;
}

.typechip-n {
    font-size: 0.66rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
}

.typechip.active .typechip-n {
    background: rgba(4, 18, 31, 0.22);
    color: inherit;
}

/* Kisi chip Pokemon (sprite + jumlah, tanpa teks nama; nama muncul saat hover). */
.poke-chipgrid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 2px;
}

.pokechip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: var(--card-bg);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.74rem;
    padding: 3px 12px 3px 4px;
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pokechip:hover {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.pokechip.active {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

.pokechip-spr {
    width: 30px;
    height: 30px;
    object-fit: contain;
    image-rendering: pixelated;
    flex: none;
}

.pokechip-spr.spr-x {
    visibility: hidden;
}

.pokechip-n {
    font-size: 0.66rem;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
}

.pokechip.active .pokechip-n {
    background: rgba(4, 18, 31, 0.22);
    color: inherit;
}

.poke-more {
    margin-top: 10px;
}

/* ===== Bar filter melayang saat scroll + tombol ke atas (revamp Jul 2026) ===== */
.team-sticky {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 9;
    background: rgba(10, 26, 44, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-ice);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
    pointer-events: none;
}

.team-sticky.show {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.team-sticky-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.team-sticky-ic {
    flex: 0 0 auto;
    font-size: 0.95rem;
    opacity: 0.85;
}

.team-sticky-label {
    flex: 0 1 auto;
    max-width: 42%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--accent-secondary);
}

.team-sticky-count {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.78rem;
    color: var(--text-soft);
}

.team-sticky-top {
    flex: 0 0 auto;
    margin-left: auto;
    cursor: pointer;
    border: 1px solid var(--border-ice);
    background: rgba(95, 211, 240, 0.14);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 5px 14px;
    border-radius: 999px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.team-sticky-top:hover {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
}

@media (max-width: 640px) {
    .team-sticky-count {
        display: none;
    }

    .team-sticky-label {
        max-width: 58%;
    }
}

/* ===== Winrate (rekor tim) & Organizer turnamen — enrich 2B ===== */
.tcard-fmtwrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tcard-wr {
    background: rgba(123, 216, 143, 0.16);
    color: #7bd88f;
    border: 1px solid rgba(123, 216, 143, 0.32);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* Chip organizer di header turnamen (varian .tge-tag, warna emas) */
.tge-org {
    background: rgba(255, 209, 102, 0.12);
    color: #ffd166;
    border-color: rgba(255, 209, 102, 0.3);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tge-org:hover {
    background: #ffd166;
    color: #04121f;
    border-color: #ffd166;
}

/* Chip winrate di halaman detail tim */
.team-wr {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(123, 216, 143, 0.16);
    color: #7bd88f;
    border: 1px solid rgba(123, 216, 143, 0.32);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: 999px;
}

.td-event-org {
    color: var(--text-soft);
    font-size: 0.85rem;
}

/* ===== Tim Serupa (Team Similarity) — 2C-4 ===== */
.td-similar {
    margin-top: 28px;
}

.td-similar-title {
    color: var(--accent-secondary);
    font-size: 1.15rem;
    margin: 0 0 2px;
}

.td-similar-sub {
    color: var(--text-soft);
    font-size: 0.85rem;
    margin: 0 0 14px;
}

.simgrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.simcard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.simcard:hover {
    transform: translateY(-3px);
    border-color: var(--accent-primary);
    box-shadow: 0 14px 32px rgba(30, 58, 95, 0.18);
}

.simcard-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.simcard-id {
    min-width: 0;
    flex: 1 1 auto;
}

.simcard-name {
    color: var(--accent-secondary);
    font-size: 1.05rem;
    margin: 0;
    word-break: break-word;
}

.simcard-author {
    color: var(--text-soft);
    font-size: 0.8rem;
    margin: 2px 0 0;
}

.simcard-shared {
    flex: 0 0 auto;
    background: rgba(127, 224, 255, 0.16);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.simcard-event {
    color: var(--text-soft);
    font-size: 0.8rem;
    margin: 0;
}

.simcard-mons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.simcard-spr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 44px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(127, 224, 255, 0.16), transparent 70%);
}

.simcard-spr {
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
}

.simcard-spr.spr-x {
    visibility: hidden;
}

.simcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.simcard-link {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.82rem;
}

@media (min-width: 600px) {
    .simgrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 980px) {
    .simgrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== Timeline Turnamen (/timeline) — 2C-4, mobile-first ===== */
.tl-wrap {
    max-width: 820px;
    margin: 0 auto;
}

.tl-head {
    margin-bottom: 20px;
}

.tl-title {
    color: var(--accent-secondary);
    font-size: 1.5rem;
    margin: 0 0 4px;
}

.tl-sub {
    color: var(--text-soft);
    font-size: 0.9rem;
    margin: 0;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 26px;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
}

.tl-item {
    position: relative;
    margin-bottom: 18px;
}

.tl-dot {
    position: absolute;
    left: -26px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--accent-primary);
}

.tl-card {
    background: var(--card-bg);
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
}

.tl-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.tl-card-id {
    min-width: 0;
    flex: 1 1 auto;
}

.tl-name {
    color: var(--accent-secondary);
    font-size: 1.1rem;
    margin: 0;
    word-break: break-word;
}

.tl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 0.8rem;
}

.tl-org {
    color: #ffd166;
}

.tl-fmt {
    flex: 0 0 auto;
    background: rgba(95, 211, 240, 0.16);
    color: var(--accent-secondary);
    border: 1px solid var(--border-ice);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 999px;
}

.tl-champ {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(255, 209, 102, 0.08);
    border: 1px solid rgba(255, 209, 102, 0.28);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tl-champ:hover {
    background: rgba(255, 209, 102, 0.14);
    border-color: rgba(255, 209, 102, 0.5);
}

.tl-champ-badge {
    flex: 0 0 auto;
    color: #ffd166;
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.3px;
}

.tl-champ-mons {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.tl-champ-spr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
}

.tl-champ-spr {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.tl-champ-spr.spr-x {
    visibility: hidden;
}

.tl-champ-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tl-champ-name {
    font-weight: 800;
    color: var(--accent-secondary);
    font-size: 0.9rem;
}

.tl-champ-author {
    color: var(--text-soft);
    font-size: 0.76rem;
}

.tl-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.tl-count {
    color: var(--text-soft);
    font-size: 0.8rem;
}

.tl-drop {
    color: #ff9e9e;
}

.tl-all {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
}

.tl-all:hover {
    text-decoration: underline;
}

.tl-empty {
    text-align: center;
    color: var(--text-soft);
    font-size: 0.9rem;
    padding: 30px 0;
}

/* ===== Grup tanggal di Tim + tombol "Tampilkan lebih banyak" — revamp Jul 2026 ===== */
.tgd-fold {
    margin-bottom: 22px;
    border: 1px solid var(--border-ice);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(127, 224, 255, 0.03);
}

.tgd-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.tgd-head::-webkit-details-marker { display: none; }
.tgd-head:hover { background: rgba(127, 224, 255, 0.06); }

.tgd-caret {
    flex: 0 0 auto;
    color: var(--accent-primary);
    font-size: 0.8rem;
    transition: transform 0.15s ease;
}

details.tgd-fold[open] > .tgd-head .tgd-caret { transform: rotate(90deg); }

.tgd-date {
    color: var(--accent-secondary);
    font-weight: 800;
    font-size: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.tgd-count {
    color: var(--text-soft);
    font-size: 0.78rem;
    background: rgba(95, 211, 240, 0.12);
    border: 1px solid var(--border-ice);
    padding: 2px 10px;
    border-radius: 999px;
}

.tgd-body {
    padding: 6px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tgd-body .teamgrid-event { margin-bottom: 0; }

.tge-more {
    display: block;
    width: 100%;
    margin: 12px 0 4px;
    padding: 10px 16px;
    cursor: pointer;
    border: 1px dashed var(--border-ice);
    border-radius: 999px;
    background: rgba(95, 211, 240, 0.08);
    color: var(--accent-secondary);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tge-more:hover {
    background: var(--accent-primary);
    color: #04121f;
    border-color: var(--accent-primary);
    border-style: solid;
}

.tge-more[hidden] { display: none; }

/* ===== Timeline: node harian yang bisa dilipat (klik titik) — revamp Jul 2026 ===== */
.tl-day {
    position: relative;
    list-style: none;
    margin-bottom: 6px;
}

.tl-dayfold { margin: 0; }

.tl-daysum {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
    list-style: none;
    user-select: none;
    padding: 6px 0 6px 4px;
    margin-bottom: 10px;
}

.tl-daysum::-webkit-details-marker { display: none; }

.tl-dot-day {
    position: absolute;
    left: -26px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--card-bg);
    box-shadow: 0 0 0 2px var(--accent-primary);
    transition: box-shadow 0.15s ease, background 0.15s ease;
}

.tl-daysum:hover .tl-dot-day { box-shadow: 0 0 0 4px var(--accent-primary); }

details.tl-dayfold[open] > .tl-daysum .tl-dot-day {
    background: var(--card-bg);
    box-shadow: 0 0 0 3px var(--accent-primary);
}

.tl-daylabel {
    color: var(--accent-secondary);
    font-weight: 800;
    font-size: 1.05rem;
}

.tl-daycount {
    color: var(--text-soft);
    font-size: 0.76rem;
    background: rgba(95, 211, 240, 0.12);
    border: 1px solid var(--border-ice);
    padding: 2px 10px;
    border-radius: 999px;
}

/* ===== Timeline "Jejak Juara": identitas visual sendiri (bukan grid Tim) — glow-up Jul 2026 ===== */
/* Spine bercahaya: gradasi emas -> es, sedikit menyala. */
.timeline::before {
    width: 3px;
    background: linear-gradient(180deg, #ffd166, var(--accent-primary) 42%, transparent);
    box-shadow: 0 0 12px rgba(255, 209, 102, 0.28);
}

/* Kartu turnamen: aksen emas di tepi kiri + angkat saat hover (poster kronologis). */
.tl-card {
    border-left: 3px solid rgba(255, 209, 102, 0.55);
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tl-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 209, 102, 0.5);
    box-shadow: 0 14px 34px rgba(30, 58, 95, 0.22);
}

/* Sorotan Juara: blok hero bertema emas dengan trofi samar sebagai latar. */
.tl-champ {
    gap: 10px 12px;
    margin-top: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.18), rgba(255, 209, 102, 0.03));
    border: 1px solid rgba(255, 209, 102, 0.4);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
}

.tl-champ::before {
    content: "🏆";
    position: absolute;
    right: -8px;
    bottom: -16px;
    font-size: 4.2rem;
    opacity: 0.09;
    transform: rotate(-12deg);
    pointer-events: none;
}

.tl-champ:hover {
    background: linear-gradient(135deg, rgba(255, 209, 102, 0.26), rgba(255, 209, 102, 0.06));
    border-color: rgba(255, 209, 102, 0.6);
}

/* Badge "Juara" jadi label baris penuh di atas jajaran sprite. */
.tl-champ-badge {
    flex: 1 0 100%;
    color: #ffd166;
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

/* Sprite juara lebih besar + lingkaran cahaya emas, sedikit terangkat saat hover. */
.tl-champ-spr-wrap {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.24), transparent 70%);
    transition: transform 0.15s ease;
}

.tl-champ:hover .tl-champ-spr-wrap { transform: translateY(-2px); }

.tl-champ-spr {
    width: 40px;
    height: 40px;
}

.tl-champ-name { font-size: 0.98rem; }

/* Node hari terbaru: label emas, denyut lembut untuk menarik mata. */
.timeline > .tl-day:first-child .tl-daylabel { color: #ffd166; }

.timeline > .tl-day:first-child .tl-dot-day {
    background: #ffd166;
    animation: tlPulse 2.2s ease-in-out infinite;
}

@keyframes tlPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(255, 209, 102, 0.9); }
    50% { box-shadow: 0 0 0 7px rgba(255, 209, 102, 0.35); }
}

/* Chip "Terbaru" di samping tanggal teratas. */
.tl-daynew {
    color: #04121f;
    background: linear-gradient(135deg, #ffd166, #ffb43d);
    font-weight: 800;
    font-size: 0.66rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(255, 209, 102, 0.42);
}

/* ===== Timeline: preview saat baris tanggal terlipat (isi ruang kosong) — Jul 2026 ===== */
.tl-daypeek {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    max-width: 60%;
    overflow: hidden;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.28s ease, transform 0.32s ease, max-width 0.32s ease;
}

.tl-peek-sprs {
    display: inline-flex;
    align-items: center;
}

.tl-peek-spr {
    width: 26px;
    height: 26px;
    object-fit: contain;
    image-rendering: pixelated;
    margin-left: -8px;
    padding: 2px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 209, 102, 0.22), rgba(15, 36, 56, 0.9) 72%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.tl-peek-spr:first-child { margin-left: 0; }

.tl-peek-txt {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Saat dibuka: preview memudar & bergeser ke kanan, lalu menyusut hilang. */
details.tl-dayfold[open] > .tl-daysum .tl-daypeek {
    opacity: 0;
    transform: translateX(18px);
    max-width: 0;
    margin-left: auto;
    pointer-events: none;
}

/* Body turnamen: muncul dengan geser-halus saat dibuka. */
details.tl-dayfold[open] > .tl-daybody {
    animation: tlBodyIn 0.34s ease both;
}

@keyframes tlBodyIn {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 520px) {
    .tl-peek-txt { display: none; }
    .tl-daypeek { max-width: 46%; }
}