.otd-week-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.48rem;
    margin: 0 0 0.72rem;
}

.otd-day-pill {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 86px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    gap: 0.18rem 0.35rem;
    align-items: center;
    overflow: hidden;
    padding: 0.62rem 0.68rem 0.58rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #0c0c0c;
    color: #ffffff;
    isolation: isolate;
    text-align: left;
    cursor: pointer;
    transition:
        border-color 170ms ease,
        background-color 170ms ease,
        box-shadow 190ms ease,
        transform 190ms cubic-bezier(.2, .75, .25, 1);
}

.otd-day-pill > :not(.otd-day-pill-image) {
    position: relative;
    z-index: 2;
}

.otd-day-pill::after {
    position: absolute;
    z-index: 3;
    right: 14%;
    bottom: 0;
    left: 14%;
    height: 2px;
    border-radius: 999px 999px 0 0;
    background: var(--accent);
    content: "";
    opacity: 0;
    transform: scaleX(0.3);
    transform-origin: center;
    transition:
        opacity 180ms ease,
        transform 220ms cubic-bezier(.2, .75, .25, 1);
}

.otd-day-pill:hover,
.otd-day-pill:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    background: #111111;
    transform: translateY(-2px);
}

.otd-day-pill.is-today {
    box-shadow: inset 0 0 0 1px rgba(255, 74, 84, 0.3);
}

.otd-day-pill.is-active {
    border-color: var(--accent);
    background:
        linear-gradient(150deg, rgba(255, 74, 84, 0.15), transparent 72%),
        #111111;
    box-shadow:
        inset 0 -3px 0 rgba(255, 74, 84, 0.18),
        0 10px 26px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.otd-day-pill.is-active::after {
    opacity: 0.9;
    transform: scaleX(1);
}

.otd-day-pill:active {
    transform: translateY(0) scale(0.985);
}

.otd-day-pill-image {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.otd-day-pill.has-image .otd-day-pill-image {
    opacity: 1;
}

.otd-day-pill-image::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(7, 7, 7, 0.28), rgba(7, 7, 7, 0.74)),
        linear-gradient(120deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.5));
    content: "";
}

.otd-day-pill.is-active .otd-day-pill-image::after {
    background:
        linear-gradient(to bottom, rgba(15, 7, 8, 0.2), rgba(8, 7, 7, 0.7)),
        linear-gradient(145deg, rgba(255, 74, 84, 0.18), transparent 58%);
}

.otd-day-pill-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.78) contrast(1.07) brightness(0.77);
    transform: scale(1.035);
    transition:
        filter 190ms ease,
        transform 260ms cubic-bezier(.2, .75, .25, 1);
}

.otd-day-pill:hover .otd-day-pill-image img,
.otd-day-pill:focus-visible .otd-day-pill-image img {
    filter: saturate(0.98) contrast(1.05) brightness(0.83);
    transform: scale(1.065);
}

.otd-day-pill-weekday {
    grid-column: 1;
    grid-row: 1;
    color: var(--muted);
    font: 900 0.53rem/1 "Courier New", monospace;
    letter-spacing: 0.085em;
    text-transform: uppercase;
}

.otd-day-pill-date {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: end;
    color: #ffffff;
    font-family: "Gobold", Impact, sans-serif;
    font-size: clamp(1.38rem, 2.1vw, 1.78rem);
    font-weight: 700;
    line-height: 0.9;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.72);
}

.otd-day-pill.is-active .otd-day-pill-weekday,
.otd-day-pill.is-active .otd-day-pill-types {
    color: var(--accent-soft);
}

.otd-day-pill-summary {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 3;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    min-width: 0;
}

.otd-day-pill-total {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    font: 900 0.58rem/1 "Courier New", monospace;
}

.otd-day-pill.is-active .otd-day-pill-total {
    border-color: rgba(255, 74, 84, 0.55);
    color: var(--accent-soft);
}

.otd-day-pill-types {
    overflow: hidden;
    color: #929292;
    font: 900 0.48rem/1 "Courier New", monospace;
    letter-spacing: 0.035em;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.92);
    white-space: nowrap;
}

.otd-kind--event {
    color: #d8d8d8;
}

.otd-controls {
    margin-top: 0;
}

@keyframes otd-pill-in {
    from {
        opacity: 0;
        transform: translateY(7px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.otd-week-strip.is-entering .otd-day-pill {
    animation: otd-pill-in 300ms cubic-bezier(.2, .75, .25, 1) both;
    animation-delay: calc(min(var(--otd-order, 0), 6) * 32ms);
}

html.reduce-motion .otd-day-pill,
html.reduce-motion .otd-day-pill::after,
html.reduce-motion .otd-day-pill-image,
html.reduce-motion .otd-day-pill-image img {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .otd-day-pill,
    .otd-day-pill::after,
    .otd-day-pill-image,
    .otd-day-pill-image img {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@media (hover: none) {
    .otd-day-pill:hover,
    .otd-day-pill:focus-visible,
    .otd-day-pill.is-active {
        transform: none;
    }
}

@media (max-width: 760px) {
    .otd-week-strip {
        grid-template-columns: repeat(7, minmax(86px, 1fr));
        gap: 0.38rem;
        margin-right: -0.9rem;
        padding-right: 0.9rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .otd-week-strip::-webkit-scrollbar {
        display: none;
    }

    .otd-day-pill {
        min-height: 80px;
        padding: 0.55rem 0.58rem 0.5rem;
        border-radius: 14px;
        scroll-snap-align: start;
    }

    .otd-day-pill-date {
        font-size: 1.42rem;
    }
}

@media (max-width: 420px) {
    .otd-week-strip {
        grid-template-columns: repeat(7, 82px);
    }

    .otd-day-pill {
        min-height: 76px;
    }
}
