.tl { container-type: inline-size; margin: 18px 0 8px; }

.tl-filters {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    width: fit-content;    
    margin: 0 auto 8px;    
    gap: 3px;
    font-size: 0.8em;
}
.tl-filters label { cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.tl-filters input { margin: 0; accent-color: #f84791; cursor: pointer; }
.tl-filters:empty { display: none; }

.tl-title {
    margin: 4px 0 14px;
    text-align: center;
    font-size: 2.4em;
    font-weight: normal;
    line-height: 1.1;
}

.tl-wrap { position: relative; }
.tl-top {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1002;
    padding: 4px 9px;
    font: inherit;
    font-size: 0.8em;
    color: #fff;
    background: #000;
    border: 2px solid #f84791;
    border-radius: 4px;
    cursor: pointer;
}
.tl-top:hover, .tl-top:focus-visible { background: #f84791; color: #000; }
.tl-top[hidden] { display: none; }

.tl-scroll {
    max-height: 1000px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    border: 2px solid #383838;
    border-radius: 4px;
    scrollbar-width: thin;
    scrollbar-color: #f84791 #111;
}
.tl-scroll:focus-visible { outline: 2px solid #f84791; }

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 18px 0;
}
.tl-item::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: #fff;
}
.tl-item[hidden], .tl-era[hidden] { display: none; }

.tl-cover {
    position: relative;
    z-index: 1001;
    margin: 0;
    width: 100%;
    max-width: 180px;
    text-align: center;
    grid-row: 1;
}
.tl-item.tl-left .tl-cover  { grid-column: 1; justify-self: center; }
.tl-item.tl-right .tl-cover { grid-column: 2; justify-self: center; }

.tl-cover img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 120px;
    background: #111;
}
.tl-cover img { transition: transform .2s ease, box-shadow .2s ease, border-color .15s; }
.tl-cover figcaption { transition: color .2s ease; }
.tl-cover figcaption { margin-top: 3px; font-size: 0.85em; line-height: 1.25; }
.tl-cover .tl-date { display: block; color: gray; font-size: 0.9em; }

a.tl-cover { color: inherit; text-decoration: none; }
a.tl-cover img { border: 2px solid transparent; }
a.tl-cover:hover img, a.tl-cover:focus-visible img { border-color: #f84791; }
a.tl-cover:hover figcaption { color: #f84791; }

.tl-era {
    transition: transform .2s ease, color .2s ease, text-shadow .2s ease;
    margin: 4px 0;
    padding: 10px 0;
    text-align: center;
    font-size: 1.5em;
    line-height: 1.2;
}

@container (max-width: 480px) {
    .tl-scroll { max-height: 70vh; }
    .tl-title { font-size: 1.8em; }
    .tl-item { grid-template-columns: 1fr; padding-left: 28px; }
    .tl-item::before { left: 8px; transform: none; }
    .tl-item.tl-left .tl-cover,
    .tl-item.tl-right .tl-cover { grid-column: 1; justify-self: start; }
    .tl-era { text-align: left; padding-left: 28px; }
}

@media (hover: hover) {
    .tl-cover:hover img {
        transform: translateY(-4px) scale(1.06);
        box-shadow: 0 0 14px rgba(248, 71, 145, 0.7);
    }
    .tl-cover:hover figcaption { color: #f84791; }

    .tl-era:hover {
        transform: scale(1.06);
        color: #f84791;
        text-shadow: 0 0 10px rgba(248, 71, 145, 0.7);
    }
}

.tl-has-info { cursor: pointer; }
.tl-has-info:focus-visible img { box-shadow: 0 0 14px rgba(248, 71, 145, 0.7); }

.tl-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.88);
    opacity: 0;
    transition: opacity .2s ease;
}
.tl-modal.tl-open { opacity: 1; }
.tl-modal[hidden] { display: none; }

.tl-modal-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 26px;
    box-sizing: border-box;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    color: #fff;
    background: #000;
    border: 2px solid #383838;
    border-radius: 4px;
}
.tl-modal-img {
    flex: none;
    width: 300px;
    max-width: 45%;
    height: auto;
    background: #111;
}
.tl-modal-text { flex: 1; min-width: 0; line-height: 1.5; overflow-wrap: anywhere; }
.tl-modal-title { margin: 0 0 2px; font-size: 1.3em; font-weight: normal; }
.tl-modal-date { color: gray; font-size: 0.85em; margin-bottom: 10px; }
.tl-modal-date[hidden] { display: none; }
.tl-modal-body p { margin: 0 0 12px; }
.tl-modal-link { display: inline-block; margin-top: 4px; color: #f84791; }
.tl-modal-link[hidden] { display: none; }

.tl-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    font: inherit;
    line-height: 1;
    color: #fff;
    background: #000;
    border: 2px solid #383838;
    border-radius: 4px;
    cursor: pointer;
}
.tl-modal-close:hover, .tl-modal-close:focus-visible { border-color: #f84791; color: #f84791; }

@media (max-width: 600px) {
    .tl-modal { padding: 10px; }
    .tl-modal-card { flex-direction: column; align-items: center; gap: 16px; padding: 44px 16px 20px; }
    .tl-modal-img { width: 220px; max-width: 70%; }
    .tl-modal-text { width: 100%; }
}
