/* AivanCrate — Машина времени AivanLevels в стиле V2 */
.tmx-hud { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; padding: .75rem .9rem; margin-bottom: 1rem; }
.tmx-field { width: auto; min-width: 9rem; }
.tmx-field .av2-input { width: 6rem; }
.tmx-yearly { margin-left: auto; align-self: center; }
.tmx-layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 1rem; align-items: start; }
.tmx-stage { padding: 1rem 1rem 1.1rem; }
.tmx-clock { text-align: center; margin-bottom: .6rem; }
.tmx-date { font-family: "Oxygene1", "PusabGD", system-ui, sans-serif; font-size: clamp(1.5rem, 4vw, 2.6rem); font-weight: 400; text-transform: uppercase; line-height: 1.1; color: #fff; text-shadow: 0 3px 0 #000, 0 0 22px rgba(59, 73, 255, .6); }
.tmx-date b { font-weight: 400; color: var(--av2-gold); }
.tmx-date em { font-style: normal; color: var(--av2-sky); }
.tmx-date-sub { margin-top: .2rem; color: var(--av2-muted); font-weight: 700; font-size: .9rem; }
.tmx-date-sub #tmx-count { color: #fff; }
.tmx-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.tmx-play, .tmx-pause { min-width: 8.5rem; }
.tmx-pause { background: linear-gradient(180deg, #f59e0b, #b45309) !important; }

.tmx-timeline { position: relative; padding: 0 .3rem 2.4rem; margin-bottom: .9rem; }
.tmx-slider {
    --p: 0%;
    -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; cursor: pointer; outline: none;
    background: linear-gradient(90deg, var(--av2-blue) 0%, var(--av2-blue-2) var(--p), rgba(143, 160, 255, .15) var(--p));
    box-shadow: 0 0 0 2px #000, inset 0 1px 0 rgba(255, 255, 255, .15);
}
.tmx-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: grab;
    background: #0b1170 url("/static/images/player_icons/aivan.png") center / 86% no-repeat; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--av2-sky), 0 0 18px rgba(59, 73, 255, .9);
}
.tmx-slider::-moz-range-thumb {
    width: 30px; height: 30px; border-radius: 8px; border: 0; cursor: grab;
    background: #0b1170 url("/static/images/player_icons/aivan.png") center / 86% no-repeat; box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--av2-sky);
}
.tmx-ticks { position: absolute; left: .3rem; right: .3rem; top: 22px; height: 1.2rem; }
.tmx .d-none { display: none !important; }
.tmx-tick {
    position: absolute; transform: translateX(-50%); padding: .05rem .35rem; border: 0; border-radius: .35rem; cursor: pointer;
    font-family: "Oxygene1", "PusabGD", sans-serif; font-size: .72rem; color: var(--av2-muted); background: transparent; transition: color .15s, background .15s;
}
.tmx-tick::before { content: ""; position: absolute; left: 50%; top: -6px; width: 2px; height: 6px; background: var(--av2-sky); opacity: .6; }
.tmx-tick:hover { color: #fff; background: rgba(59, 73, 255, .35); }
.tmx-range { position: absolute; left: .3rem; right: .3rem; bottom: 0; display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; color: var(--av2-muted); }

/* Гонка уровней */
.tmx .tm-race-track { min-height: 120px; }
.tmx .tm-race-bar { color: var(--av2-ink); }
.tmx .tm-race-rank { font-family: "Oxygene1", "PusabGD", sans-serif; font-weight: 400; font-size: 1.05rem; color: var(--av2-sky); text-shadow: 0 2px 0 #000; }
.tmx .tm-race-bar.is-gold .tm-race-rank { color: var(--av2-gold); }
.tmx .tm-race-bar.is-silver .tm-race-rank { color: #e5e7f5; }
.tmx .tm-race-bar.is-bronze .tm-race-rank { color: #f0a35b; }
.tmx .tm-race-avatar { width: 64px; height: 36px; border-radius: .45rem; border: 0; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--bar-c); background: #03041a; }
.tmx .tm-race-bar.is-gold .tm-race-avatar { box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--av2-gold), 0 0 16px rgba(255, 216, 74, .6); }
.tmx .tm-race-fill-wrap { height: 38px; border-radius: .7rem; background: rgba(2, 3, 20, .7); box-shadow: inset 0 0 0 1px rgba(143, 160, 255, .14); }
.tmx .tm-race-fill { border-radius: .7rem; background: linear-gradient(90deg, color-mix(in srgb, var(--bar-c) 45%, #03041a), var(--bar-c)); box-shadow: 0 0 16px color-mix(in srgb, var(--bar-c) 55%, transparent), inset 0 2px 0 rgba(255, 255, 255, .2); }
.tmx .tm-race-bar.is-gold .tm-race-fill { background: linear-gradient(90deg, #8a6a00, var(--av2-gold)); }
.tmx .tm-race-name { font-family: "Oxygene1", "PusabGD", system-ui, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; text-shadow: 0 2px 0 #000; }
.tmx .tm-race-sub { color: #c9d1ff; text-shadow: 0 1px 0 #000; }
.tmx .tm-race-value { font-family: "Oxygene1", "PusabGD", sans-serif; font-weight: 400; min-width: 5rem; text-shadow: 0 2px 0 #000; }
.tmx .tm-race-bar:hover .tm-race-fill-wrap { box-shadow: inset 0 0 0 1px var(--av2-sky); }
.tmx-pag { text-align: center; color: var(--av2-muted); font-size: .8rem; margin: .5rem 0 0; }

/* Хроника */
.tmx-feed { padding: .8rem; position: sticky; top: 80px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; }
.tmx-feed-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.tmx-feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; overflow: auto; flex: 1; min-height: 6rem; }
.tmx-feed-list:not(:empty) + .tmx-feed-hint { display: none; }
.tmx-feed-list li { padding: .4rem .55rem; border-radius: .6rem; background: rgba(2, 3, 20, .55); border-left: 3px solid var(--av2-sky); font-size: .82rem; animation: tmxIn .3s ease; }
.tmx-feed-list li.is-lead { border-left-color: var(--av2-gold); background: rgba(255, 216, 74, .08); }
.tmx-feed-list li.is-layout { border-left-color: #5b6bff; }
.tmx-feed-list time { display: block; font-size: .68rem; font-weight: 800; color: var(--av2-muted); text-transform: uppercase; letter-spacing: .04em; }
.tmx-feed-list a { color: #fff !important; font-weight: 800; text-decoration: none; }
@keyframes tmxIn { from { opacity: 0; transform: translateX(-8px); } }
.tmx-feed-hint, .tmx-keys { color: var(--av2-muted); font-size: .78rem; margin: .5rem 0 0; }
.tmx-keys b { color: #fff; padding: 0 .3rem; border-radius: .3rem; background: rgba(143, 160, 255, .15); }

@media (max-width: 991.98px) {
    .tmx-layout { grid-template-columns: 1fr; }
    .tmx-feed { position: static; max-height: 22rem; }
}
@media (max-width: 575.98px) {
    .tmx .tm-race-avatar { width: 44px; height: 26px; }
    .tmx-yearly { margin-left: 0; }
}
