#termine {
    --bg: #0b1020;
    --grid: #1b2750;
    --text: #e9eef7;
    --muted: #98a7c7;
    --tile: #0c1226;
    --tile-edge: #050914;
    --tile-w: 22px;
    --tile-h: 34px;
    --tile-font: 18px;
}

#termine .wrap {
    max-width: 960px;
    margin: 2rem auto;
    padding: 1rem;
}

#termine .board {
    color: var(--text);
}

#termine .head {
    display: grid;
    grid-template-columns: 72px 180px 1fr;
    padding: .8rem 1rem;
    text-transform: uppercase;
    letter-spacing: .12em;
}

#termine .row {
    display: grid;
    grid-template-columns: 72px 180px 1fr;
}

#termine .cell {
    padding: .5rem 1rem;
}

#termine .cell-ticket {
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: .5rem .35rem .5rem 1rem;
    position: relative;
    z-index: 5;
}

#termine .ticket-btn {
    width: 56px;
    height: 30px;
    border-radius: 0;
    color: var(--accent);
    margin-bottom: 0;
    position: relative;
}

#termine .ticket-btn .ticket-icon {
    width: 50px;
    height: 50px;
    display: inline-block;
    background-color: currentColor;
    -webkit-mask: url('/media/ticket.svg') center/contain no-repeat;
    mask: url('/media/ticket.svg') center/contain no-repeat;
    transition: transform var(--transition);
}

#termine .ticket-btn:hover,
#termine .ticket-btn:focus {
    transform: none;
}

#termine .ticket-btn:not(.ticket-btn--disabled):hover .ticket-icon,
#termine .ticket-btn:not(.ticket-btn--disabled):focus .ticket-icon {
    transform: rotate(15deg) scale(1.2);
}

#termine .ticket-btn--inline {
    display: none;
}

#termine .ticket-btn--disabled {
    color: var(--white);
    position: relative;
}

#termine .ticket-btn--disabled .ticket-icon {
    opacity: 0.7;
}

#termine .ticket-btn--disabled:hover,
#termine .ticket-btn--disabled:focus {
    transform: none;
    background: transparent;
    cursor: help;
}

#termine .ticket-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    min-width: 180px;
    max-width: min(320px, 60vw);
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    background: rgba(0, 0, 0);
    border: 1px solid var(--accent);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: opacity 150ms ease;
}

#termine .ticket-btn[data-tooltip]:hover::after,
#termine .ticket-btn[data-tooltip]:focus::after {
    opacity: 1;
}

#termine .flaps {
    display: flex;
    gap: .22rem;
    flex-wrap: nowrap;
}

#termine .flaps-location {
    margin-top: .35rem;
    opacity: 0.9;
}

#termine .char {
    position: relative;
    width: var(--tile-w);
    height: var(--tile-h);
    border-radius: 3px;
    background: var(--tile);
    box-shadow: inset 0 -2px 0 var(--tile-edge);
    perspective: 500px;
}

#termine .char::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(0, 0, 0, .45);
    z-index: 1;
}

#termine .char::after {
    content: "";
    position: absolute;
    inset: 0 0 50% 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, 0));
    pointer-events: none;
}

#termine .glyph {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--tile-font);
    color: var(--text);
    line-height: 1;
    white-space: pre;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

#termine .glyph.flip {
    animation: flip .08s linear;
    transform-origin: center;
}

#termine .terminliste {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#termine .terminliste li {
    padding: 1rem;
    border-left: 4px solid var(--accent);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: transform var(--transition);
}

#termine .terminliste li:hover {
    transform: translateX(5px);
}

#termine .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes flip {
    0% {
        transform: rotate3d(1, 0, 0, 0deg);
    }
    49% {
        transform: rotate3d(1, 0, 0, -90deg);
    }
    50% {
        transform: rotate3d(1, 0, 0, 90deg);
    }
    100% {
        transform: rotate3d(1, 0, 0, 0deg);
    }
}

@media (max-width: 700px) {
    #termine {
        --tile-w: 20px;
        --tile-h: 30px;
        --tile-font: 16px;
    }

    #termine .head {
        display: none;
    }

    #termine .row {
        display: block;
        padding: .35rem 0 .6rem;
    }

    #termine .cell {
        padding: .15rem 0;
    }

    #termine .cell-ticket {
        display: none;
    }

    #termine .cell-date .date-line {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
    }

    #termine .ticket-btn--inline {
        display: inline-flex;
        width: 34px;
        height: 34px;
    }

    #termine .ticket-btn--inline .ticket-icon {
        width: 18px;
        height: 18px;
    }

    #termine .ticket-btn[data-tooltip]::after {
        left: auto;
        right: calc(100% + 10px);
    }
}

@media (max-width: 600px) {
    #termine {
        --tile-w: 18px;
        --tile-h: 28px;
        --tile-font: 14px;
    }
}
