body.history-day-body {
    background: radial-gradient(circle at top, rgba(10, 10, 10, 0.96), #030303 65%, #070402);
    color: var(--text-primary, #f5f5f5);
    min-height: 100vh;
    min-height: 100svh;
}

.history-day-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: calc(60px + 1.75rem) clamp(1rem, 3vw, 2rem) clamp(3rem, 6vh, 4.5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 5vh, 2.75rem);
    min-height: calc(100vh - 60px);
    min-height: calc(100svh - 60px);
}

.history-day-hero {
    text-align: center;
    margin-bottom: clamp(1.5rem, 4vh, 2.75rem);
}

.history-day-tag {
    display: inline-block;
    padding: 0.35rem 0.95rem;
    background: rgba(212, 169, 55, 0.12);
    border: 1px solid rgba(212, 169, 55, 0.45);
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: #e7c877;
}

.history-day-title {
    font-size: clamp(2.6rem, 6vw, 3.75rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #f9f6ed;
}

.history-day-subtitle {
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto 1.75rem;
    color: rgba(235, 220, 175, 0.7);
    line-height: 1.65;
}

.history-day-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: #f1d58a;
    text-decoration: none;
    background: rgba(212, 169, 55, 0.14);
    border: 1px solid rgba(212, 169, 55, 0.4);
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.history-day-back:hover {
    background: rgba(212, 169, 55, 0.22);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(212, 169, 55, 0.18);
}

.timeline-section {
    position: relative;
    width: 100vw;
    margin: clamp(2rem, 6vh, 4rem) calc(50% - 50vw) 0;
    padding: 0;
}

.timeline-wrapper {
    position: relative;
    height: clamp(260px, 42vh, 360px);
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    touch-action: pan-x;
    cursor: grab;
    background: linear-gradient(180deg, rgba(12, 12, 12, 0.94) 0%, rgba(3, 3, 3, 0.98) 100%);
    border-top: 1px solid rgba(212, 169, 55, 0.3);
    border-bottom: 1px solid rgba(212, 169, 55, 0.18);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.65);
    padding: clamp(4rem, 15vh, 7rem) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.timeline-wrapper::-webkit-scrollbar {
    display: none;
}

.timeline-wrapper:active {
    cursor: grabbing;
}

.timeline-wrapper::before,
.timeline-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(2rem, 7vw, 4rem);
    pointer-events: none;
    z-index: 2;
}

.timeline-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, rgba(3, 3, 3, 0.98) 10%, transparent 100%);
}

.timeline-wrapper::after {
    right: 0;
    background: linear-gradient(270deg, rgba(3, 3, 3, 0.98) 10%, transparent 100%);
}

.timeline-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(212, 169, 55, 0.06) 0%, rgba(212, 169, 55, 0.75) 50%, rgba(212, 169, 55, 0.06) 100%);
}

.timeline-events {
    position: relative;
    display: flex;
    gap: clamp(1.75rem, 7vw, 3.5rem);
    align-items: center;
    min-width: max-content;
    padding: 0 clamp(1.75rem, 6vw, 3.5rem);
    z-index: 3;
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    min-width: clamp(220px, 52vw, 320px);
    scroll-snap-align: center;
    text-align: center;
    color: #f7f0d6;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.timeline-item:focus-visible {
    outline: 2px solid rgba(232, 190, 88, 0.5);
    outline-offset: 4px;
}

.timeline-item__year {
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 190, 88, 0.68);
    transition: color 0.25s ease;
}

.timeline-item__title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(245, 235, 200, 0.78);
    max-width: clamp(200px, 48vw, 300px);
    transition: color 0.25s ease;
}

.timeline-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(249, 225, 149, 0.95), rgba(181, 132, 38, 0.6));
    border: 2px solid rgba(247, 212, 128, 0.6);
    box-shadow: 0 0 18px rgba(232, 190, 88, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-item.is-active {
    transform: scale(1.02);
}

.timeline-item.is-active .timeline-item__year {
    color: rgba(232, 190, 88, 0.92);
}

.timeline-item.is-active .timeline-item__title {
    color: #fff5cf;
}

.timeline-item.is-active .timeline-marker {
    transform: scale(1.2);
    box-shadow: 0 0 26px rgba(232, 190, 88, 0.55);
}

.timeline-detail {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.25rem, 4vw, 2rem);
    margin: clamp(1.5rem, 5vh, 2.75rem) auto 0;
    padding: clamp(1.75rem, 5vw, 2.5rem);
    max-width: min(980px, 92vw);
    background: linear-gradient(135deg, rgba(15, 13, 10, 0.92), rgba(5, 5, 5, 0.95));
    border: 1px solid rgba(212, 169, 55, 0.28);
    border-radius: 22px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.65);
    z-index: 4;
}

@media (min-width: 900px) {
    .timeline-detail {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: center;
    }
}

.timeline-detail__media {
    position: relative;
    overflow: hidden;
    border-radius: clamp(0.85rem, 3vw, 1.25rem);
    aspect-ratio: 4 / 3;
    background: rgba(30, 24, 16, 0.6);
    border: 1px solid rgba(212, 169, 55, 0.2);
}

.timeline-detail__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-detail__content {
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 3vw, 1.25rem);
}

.timeline-detail__year {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(232, 190, 88, 0.68);
}

.timeline-detail__title {
    margin: 0;
    font-size: clamp(1.3rem, 3.5vw, 1.9rem);
    font-weight: 600;
    color: #fff6d6;
}

.timeline-detail__description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(245, 232, 196, 0.78);
}

.timeline-detail__simulate {
    align-self: flex-start;
    padding: 0.65rem 1.65rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(118deg, #f4d364, #d4a937 65%, #a37118 100%);
    color: #211403;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-detail__simulate:hover,
.timeline-detail__simulate:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 42px rgba(212, 169, 55, 0.3);
}

.timeline-status {
    position: absolute;
    right: clamp(1rem, 4vw, 2rem);
    top: clamp(1rem, 4vw, 1.5rem);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(212, 169, 55, 0.35);
    color: rgba(245, 232, 196, 0.85);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 5;
}

.timeline-status[data-tone="error"] {
    border-color: rgba(255, 141, 141, 0.65);
    color: #ffbcbc;
}

@media (max-width: 960px) {
    .timeline-wrapper {
        height: clamp(260px, 48vh, 340px);
        padding: clamp(3.5rem, 18vh, 6.5rem) 0;
    }

    .timeline-events {
        gap: clamp(1.5rem, 9vw, 3rem);
    }

    .timeline-item {
        min-width: clamp(240px, 68vw, 320px);
    }
}

@media (max-width: 720px) {
    .history-day-main {
        padding: calc(60px + 1.25rem) clamp(0.65rem, 6vw, 1.25rem) clamp(2rem, 9vh, 3.25rem);
        gap: 1.5rem;
    }

    .timeline-section {
        margin-top: clamp(1.85rem, 8vh, 2.75rem);
    }

    .timeline-wrapper::before,
    .timeline-wrapper::after {
        width: clamp(1.25rem, 10vw, 2rem);
    }

    .timeline-item {
        min-width: clamp(240px, 82vw, 300px);
    }

    .timeline-detail {
        padding: clamp(1.25rem, 7vw, 2rem);
        border-radius: 18px;
    }
}

@media (max-width: 540px) {
    .timeline-wrapper {
        height: clamp(240px, 52vh, 320px);
        padding: clamp(3rem, 22vh, 5.5rem) 0;
    }

    .timeline-events {
        padding: 0 clamp(1rem, 8vw, 1.5rem);
        gap: clamp(1.25rem, 12vw, 1.9rem);
    }

    .timeline-item {
        min-width: clamp(220px, 88vw, 280px);
    }

    .timeline-detail {
        gap: 1rem;
    }
}

@media (hover: none) {
    .timeline-wrapper {
        cursor: auto;
    }

    .timeline-item {
        scroll-snap-align: start;
    }
}
