.cg {
    --cg-yellow: var(--bg-color-yellow, rgba(227, 177, 4, 1));
    --cg-purple: var(--bg-color-purple, rgba(54, 13, 67, 1));
    --cg-white: var(--text-color-white, rgba(225, 225, 225, 1));
    --cg-black: var(--text-color-black, rgba(0, 0, 0, 1));
    --cg-gap: 14px;
    --cg-overlay: rgba(0,0,0,.80);

    padding: 0 104px 3rem 0;                /* room for the timeline strip */
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    color: var(--cg-white);
    background-color: var(--cg-black);
}

.cg-title {
    margin: 0 0 1rem; text-align: center;
    font-family: "Tulpen One", cursive;
    font-size: 64px; font-weight: 400; line-height: 1; color: var(--cg-yellow);
    padding-bottom: 1rem;
    padding-top: 2rem;
    text-transform: uppercase;
}

.cg-bar { margin-bottom: 1.5rem; }
.cg-bar input {
    width: 100%; box-sizing: border-box; padding: 12px 16px;
    font: inherit; font-size: 18px; color: var(--cg-white);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(227, 177, 4, .45); border-radius: 8px;
}
.cg-bar input::placeholder { color: rgba(225, 225, 225, .55); }
.cg-bar input:focus { outline: 0; border-color: var(--cg-yellow); box-shadow: 0 0 0 3px rgba(227, 177, 4, .25); }

/* groups: one block per show, title on top */
.cg-group { margin-bottom: 2.5rem; scroll-margin-top: 100px; }
.cg-group-head { margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid rgba(227, 177, 4, .35); }
.cg-group-head h2 {
    margin: 0; font-family: "Tulpen One", cursive; font-weight: 400;
    font-size: 48px; line-height: 1; color: var(--cg-yellow);
    text-transform: uppercase;
}
.cg-group-head p { margin: 4px 0 0; font-size: 16px; opacity: .75; }

.cg-tiles {
    display: grid; gap: var(--cg-gap);
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.cg-item {
    position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; cursor: zoom-in;
    background: #000; border: 5px solid #fff; border-radius: 2px;
    box-shadow: 4px 4px 14px rgba(0, 0, 0, .55);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cg-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-item:hover {
    transform: scale(1.12); z-index: 5; border-color: var(--cg-yellow);
    box-shadow: 8px 10px 28px rgba(0, 0, 0, .75);
}
.cg-item figcaption {
    position: absolute; inset: auto 0 0; padding: 26px 10px 8px;
    font-size: 15px; line-height: 1.25; color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .85));
    opacity: 0; transition: opacity .2s;
}
.cg-item:hover figcaption { opacity: 1; }
#cg-empty { text-align: center; opacity: .7; }

/* timeline: a strip of thumbnails that scrolls along with the page */
/* timeline: one cover per show, with the show name below */
.cg-rail {
    --cg-slot: 64px;
    --cg-gap-r: 10px;       /* space between shows */
    --cg-name: 15px;        /* height of the name line */
    position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 20;
    width: 98px; padding-left: 20px; box-sizing: border-box;
    cursor: ns-resize; touch-action: none; user-select: none;
}
.cg-strip { display: flex; flex-direction: column; }
.cg-cell {
    display: flex; flex-direction: column; box-sizing: border-box;
    height: var(--cg-slot); padding-bottom: var(--cg-gap-r);
    opacity: .7; transition: opacity .15s;
}
.cg-rail:hover .cg-cell { opacity: .95; }
.cg-cell.is-current { opacity: 1; }
.cg-thumb {
    flex: 1; min-height: 0; overflow: hidden;
    background: rgba(255, 255, 255, .12); border: 2px solid rgba(255, 255, 255, .75);
    transition: border-color .15s;
}
.cg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-cell.is-current .cg-thumb { border-color: var(--cg-yellow); }
.cg-name {
    height: var(--cg-name); line-height: var(--cg-name); font-size: 11px; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cg-white);
}
.cg-cell.is-current .cg-name { color: var(--cg-yellow); font-weight: 600; }

/* arrow pointing at the current show's thumbnail */
.cg-arrow {
    position: absolute; left: 0; top: 0; width: 20px;
    height: calc(var(--cg-slot) - var(--cg-gap-r) - var(--cg-name));
    display: flex; align-items: center; pointer-events: none;
    transition: transform .18s ease;
}
.cg-arrow::before {
    content: ""; margin-left: 2px;
    border-top: 9px solid transparent; border-bottom: 9px solid transparent;
    border-left: 13px solid var(--cg-yellow);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

.cg-bubble {
    position: fixed; right: 122px; transform: translateY(-50%); z-index: 21; pointer-events: none;
    padding: 6px 14px; border-radius: 999px; white-space: nowrap; max-width: 60vw;
    overflow: hidden; text-overflow: ellipsis; font-size: 15px; font-weight: 600;
    background: var(--cg-yellow); color: var(--cg-purple); box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}

/* arrow pointing at the current thumbnail */
.cg-arrow {
    position: absolute; left: 0; top: 0; width: 20px; height: var(--cg-slot);
    display: flex; align-items: center; pointer-events: none;
    transition: transform .18s ease;
}
.cg-arrow::before {
    content: ""; margin-left: 2px;
    border-top: 9px solid transparent; border-bottom: 9px solid transparent;
    border-left: 13px solid var(--cg-yellow);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

.cg-bubble {
    position: fixed; right: 108px; transform: translateY(-50%); z-index: 21; pointer-events: none;
    padding: 6px 14px; border-radius: 999px; white-space: nowrap; max-width: 60vw;
    overflow: hidden; text-overflow: ellipsis; font-size: 15px; font-weight: 600;
    background: var(--cg-yellow); color: var(--cg-purple); box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}

/* lightbox */
.cg-lightbox {
    position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    background: rgb(0,0,0,.80); ; font-family: 'Quicksand', sans-serif; font-size: 18px;
}
.cg-lightbox[hidden] { display: none; }
.cg-lightbox img {
    max-width: 92vw; max-height: 76vh; object-fit: contain;
    border: 8px solid #fff; box-shadow: 7px 7px 20px 3px #000; animation: cgzoom .25s ease;
}
@keyframes cgzoom { from { transform: scale(.88); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cg-btn {
    position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
    font-size: 56px; line-height: 1; padding: 6px 16px; opacity: .8; transition: color .15s, opacity .15s;
}
.cg-btn:hover { opacity: 1; color: var(--cg-yellow); }
.cg-close { top: 8px; right: 14px; font-size: 60px; }
.cg-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.cg-next { right: 8px; top: 50%; transform: translateY(-50%); }
.cg-caption { margin-top: 16px; text-align: center; max-width: 90vw; line-height: 1.4; }
.cg-caption strong { font-size: 22px; color: var(--cg-yellow); }
.cg-caption .cg-meta { opacity: .8; }
.cg-chip {
    display: inline-block; margin: 8px 4px 0; padding: 3px 14px; font: inherit; font-size: 15px;
    color: var(--cg-yellow); background: transparent; cursor: pointer;
    border: 1px solid var(--cg-yellow); border-radius: 999px; transition: background .15s, color .15s;
}
.cg-chip:hover { background: var(--cg-yellow); color: var(--cg-purple); }
body.cg-lock { overflow: hidden; }

/* small screens */
@media (max-width: 640px), (max-height: 620px) {
    .cg { padding-right: 64px; }
    .cg-title { font-size: 48px; }
    .cg-group-head h2 { font-size: 38px; }
    .cg-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .cg-rail { right: 4px; width: 58px; padding-left: 16px; }
    .cg-arrow { width: 16px; }
    .cg-arrow::before { border-top-width: 7px; border-bottom-width: 7px; border-left-width: 10px; }
    .cg-bubble { right: 70px; }
    .cg-item:hover { transform: none; }
}