:root {
    --bg: #07111f;
    --bg-elevated: rgba(9, 17, 34, 0.88);
    --surface: #0d1830;
    --surface-2: #101c35;
    --surface-3: #132241;
    --text: #edf2ff;
    --text-soft: #a6b4d1;
    --muted: #7d8aa6;
    --line: rgba(120, 146, 220, 0.16);
    --line-strong: rgba(120, 146, 220, 0.28);
    --primary: #4f6ef7;
    --primary-strong: #6f8bff;
    --lofi: #7b5cff;
    --rnb: #4a8cff;
    --open: #f06ca0;
    --ambient: #c08c48;
    --glow: 0 18px 50px rgba(79, 110, 247, 0.22);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-pill: 999px;
    --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.28);
    --shell: 1180px;
    --shell-inset: 40px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    margin: 0;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(39, 74, 152, 0.18),
            transparent 35%
        ),
        radial-gradient(
            circle at 80% 18%,
            rgba(79, 110, 247, 0.12),
            transparent 30%
        ),
        radial-gradient(
            circle at 50% 65%,
            rgba(23, 39, 77, 0.25),
            transparent 42%
        ),
        linear-gradient(180deg, #05101f 0%, #061120 38%, #081528 100%);
    color: var(--text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    background: #ffffff;
    color: #0b1220;
    padding: 10px 14px;
    border-radius: 10px;
    z-index: 9999;
}

.skip-link:focus {
    top: 12px;
}

.site-shell {
    width: min(var(--shell), calc(100% - var(--shell-inset)));
    margin: 0 auto;
}

.narrow {
    width: min(860px, calc(100% - var(--shell-inset)));
}

.site-topbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    background: rgba(5, 13, 27, 0.72);
    border-bottom: 1px solid rgba(125, 150, 220, 0.08);
}

.topbar-inner,
.footer-inner,
.archive-toolbar,
.hero-actions,
.track-head,
.track-actions,
.footer-links,
.active-filters {
    display: flex;
    align-items: center;
}

.hero-actions {
    justify-content: center;
}

.topbar-inner {
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}

.brand-link,
.top-links,
.footer-links,
.hero-actions,
.track-actions,
.active-filters,
.tag-row,
.archive-meta {
    gap: 12px;
}

.top-links,
.footer-links {
    justify-content: center;
    flex-wrap: wrap;
}

.top-links {
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(125, 150, 220, 0.2);
    background: rgba(10, 20, 40, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text);
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: 0 0 18px rgba(79, 110, 247, 0.7);
}

.top-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    color: var(--text-soft);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.footer-links a {
    color: var(--text-soft);
    font-size: 0.95rem;
    transition:
        color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.top-links a:hover,
.top-links a:focus-visible {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(79, 110, 247, 0.16);
    transform: translateY(-1px);
}

.top-links a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(111, 139, 255, 0.24);
}

.top-links a:active {
    transform: translateY(0);
}

.footer-links a:hover,
.brand-link:hover {
    color: var(--text);
}

.hero {
    position: relative;
    overflow: clip;
    min-height: 88svh;
    display: grid;
    place-items: center;
}

.hero-bg,
.hero-bg .glow,
.hero-bg .wave {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg .glow {
    width: 38vw;
    height: 38vw;
    max-width: 520px;
    max-height: 520px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.28;
}

.glow-a {
    background: rgba(79, 110, 247, 0.58);
    inset: 14% auto auto 12%;
}

.glow-b {
    background: rgba(43, 96, 200, 0.42);
    inset: auto 8% 8% auto;
}

.hero-bg .wave {
    background-repeat: no-repeat;
    opacity: 0.12;
}

.wave-a {
    background-image: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.08) 1px,
        transparent 1px
    );
    background-size: 12px 12px;
    mask-image: linear-gradient(
        180deg,
        transparent,
        black 24%,
        black 72%,
        transparent
    );
}

.wave-b {
    background:
        radial-gradient(
            140% 85% at 50% 5%,
            transparent 54%,
            rgba(100, 140, 255, 0.2) 55%,
            transparent 57%
        ),
        radial-gradient(
            130% 78% at 50% 100%,
            transparent 52%,
            rgba(100, 140, 255, 0.14) 53%,
            transparent 55%
        );
    mask-image: linear-gradient(
        180deg,
        transparent 12%,
        black 30%,
        black 75%,
        transparent 92%
    );
}

.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 108px 0 72px;
}

.hero-logo {
    width: 172px;
    height: 172px;
    margin: 0 auto 28px;
    object-fit: contain;
    filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.24));
}

.eyebrow {
    margin: 0 0 12px;
    color: #9cb3ff;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(3.3rem, 8vw, 6.4rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

h2 {
    margin-bottom: 10px;
    font-size: clamp(2rem, 3vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero-copy,
.section-copy,
.about-copy p,
.feature-description,
.marathon-description,
.track-card p,
.final-cta p {
    color: var(--text-soft);
}

.hero-copy {
    width: min(760px, 100%);
    margin: 0 auto 34px;
    font-size: clamp(1.02rem, 2vw, 1.32rem);
}

.btn {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 56px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    box-shadow: var(--glow);
}

.btn-primary:hover {
    box-shadow: 0 20px 48px rgba(79, 110, 247, 0.34);
}

.btn-secondary,
.clear-filters,
.track-link-secondary {
    background: rgba(14, 26, 51, 0.7);
    border-color: rgba(125, 150, 220, 0.22);
}

.btn-secondary:hover,
.clear-filters:hover,
.track-link-secondary:hover {
    border-color: rgba(125, 150, 220, 0.38);
    background: rgba(18, 34, 65, 0.8);
}

.btn-icon,
.track-link-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.btn-icon svg,
.track-link-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.btn-label,
.track-link-label {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(-0.5px);
}

.section {
    padding: 96px 0;
}

.section-soft {
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.01),
        rgba(255, 255, 255, 0.03)
    );
}

.section-heading {
    margin-bottom: 28px;
}

.section-heading.center {
    text-align: center;
}

.section-heading.center .section-copy {
    max-width: 680px;
    margin-inline: auto;
}

.feature-card,
.category-card,
.marathon-card,
.track-card,
.cta-card,
.search-wrap,
.clear-filters {
    border: 1px solid var(--line);
    background: rgba(10, 19, 37, 0.78);
    box-shadow: var(--shadow-soft);
}

.feature-card,
.marathon-card,
.track-card,
.cta-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.feature-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.feature-media,
.marathon-cover-wrap,
.track-cover-wrap {
    position: relative;
    background: linear-gradient(
        140deg,
        rgba(28, 47, 93, 0.9),
        rgba(9, 17, 34, 0.95)
    );
}

.feature-media {
    aspect-ratio: 16 / 10;
}

.feature-media img,
.marathon-cover,
.track-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-media::after,
.marathon-cover-wrap::after,
.track-cover-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(5, 13, 27, 0.18) 68%,
        rgba(5, 13, 27, 0.5)
    );
}

.feature-content {
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge,
.track-category,
.track-number,
.tag-chip,
.filter-chip,
.marathon-duration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong);
    padding: 5px 11px;
    font-size: 0.76rem;
    font-weight: 700;
}

.badge,
.track-category {
    background: rgba(79, 110, 247, 0.16);
    color: #dfe6ff;
}

.track-category {
    white-space: nowrap;
    flex-shrink: 0;
}

.feature-title {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 3vw, 3rem);
}

.feature-description {
    margin-bottom: 26px;
    font-size: 1.04rem;
}

.feature-actions,
.track-actions {
    flex-wrap: wrap;
}

.category-grid,
.marathon-grid,
.archive-grid {
    display: grid;
    gap: 22px;
}

.category-toolbar {
    display: flex;
    justify-content: center;
    margin: 0 auto 22px;
    max-width: 980px;
}

.category-all-button {
    width: 100%;
    max-width: 360px;
    min-height: auto;
    padding: 18px 22px;
}

.category-all-button h3 {
    margin-bottom: 8px;
}

.category-all-button p {
    margin-bottom: 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    max-width: 980px;
    margin: 0 auto;
}

@media (max-width: 820px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-toolbar {
        justify-content: stretch;
    }

    .category-all-button {
        max-width: none;
    }
}

.category-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    text-align: left;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-3px);
    border-color: rgba(125, 150, 220, 0.34);
    background: rgba(13, 24, 48, 0.94);
}

.category-card h3 {
    margin-bottom: 8px;
    font-size: 1.36rem;
}

.category-card p {
    margin-bottom: 0;
    color: var(--text-soft);
    font-size: 0.96rem;
}

.category-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    font-size: 1.7rem;
}

.category-all {
    background: rgba(79, 110, 247, 0.14);
}

.category-lofi {
    background: rgba(123, 92, 255, 0.16);
}

.category-rnb {
    background: rgba(74, 140, 255, 0.16);
}

.category-open {
    background: rgba(240, 108, 160, 0.14);
}

.category-ambient {
    background: rgba(243, 181, 98, 0.2);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(243, 181, 98, 0.08);
}

.marathon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.marathon-cover-wrap {
    aspect-ratio: 16 / 9;
}

.marathon-body {
    padding: 26px;
}

.marathon-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 10px;
}

.marathon-title {
    margin-bottom: 10px;
    font-size: 1.72rem;
}

.marathon-description {
    margin-bottom: 18px;
}

.archive-toolbar {
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    max-width: 100%;
}

.search-wrap {
    flex: 1 1 auto;
    max-width: none;
    min-height: 60px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    gap: 12px;
}

.clear-filters {
    flex: 0 0 auto;
    min-height: 52px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    color: var(--text);
    cursor: pointer;
}

.search-icon {
    color: var(--muted);
    font-size: 1.2rem;
}

.search-wrap input {
    width: 100%;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text);
}

.search-wrap input::placeholder {
    color: var(--muted);
}

.active-filters,
.archive-meta {
    flex-wrap: wrap;
}

.active-filters,
.tag-row {
    margin-bottom: 14px;
}

.filter-chip,
.tag-chip {
    background: rgba(16, 28, 53, 0.86);
    color: var(--text-soft);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.filter-chip {
    cursor: default;
}

.tag-chip:hover,
.tag-chip.active {
    border-color: rgba(125, 150, 220, 0.42);
    color: var(--text);
}

.tag-chip.active {
    background: rgba(79, 110, 247, 0.18);
}

.tag-scroll-wrap {
    position: relative;
    margin-bottom: 14px;
}

.tag-scroll-wrap {
    position: relative;
    margin-bottom: 14px;
}

.tag-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 2px 56px 6px;
    touch-action: pan-x;
}

.tag-row::-webkit-scrollbar {
    display: none;
}

.tag-chip {
    flex: 0 0 auto;
}

.tag-scroll-button {
    position: absolute;
    top: calc(50% - 2px);
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(125, 150, 220, 0.24);
    border-radius: 999px;
    background: rgba(10, 20, 40, 0.9);
    color: #dfe7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}

.tag-scroll-button span {
    display: inline-block;
    line-height: 1;
    transform: translateY(-1px);
    font-size: 20px;
}

.tag-scroll-button:hover {
    background: rgba(20, 35, 68, 0.96);
    border-color: rgba(125, 150, 220, 0.42);
}

.tag-scroll-button:active {
    transform: translateY(-50%) scale(0.96);
}

.tag-scroll-button:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.tag-scroll-button-left {
    left: 8px;
}

.tag-scroll-button-right {
    right: 8px;
}

.tag-scroll-fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    pointer-events: none;
    z-index: 2;
}

.tag-scroll-fade-left {
    left: 0;
    background: linear-gradient(
        90deg,
        rgba(8, 21, 40, 1) 0%,
        rgba(8, 21, 40, 0.82) 35%,
        rgba(8, 21, 40, 0) 100%
    );
}

.tag-scroll-fade-right {
    right: 0;
    background: linear-gradient(
        270deg,
        rgba(8, 21, 40, 1) 0%,
        rgba(8, 21, 40, 0.82) 35%,
        rgba(8, 21, 40, 0) 100%
    );
}

@media (max-width: 640px) {
    .tag-row {
        padding: 2px 44px 6px;
    }

    .tag-scroll-button {
        width: 34px;
        height: 34px;
    }

    .tag-scroll-button-left {
        left: 6px;
    }

    .tag-scroll-button-right {
        right: 6px;
    }
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(125, 150, 220, 0.22);
    background: rgba(16, 28, 53, 0.86);
    color: var(--text-soft);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.tag-chip:hover,
.tag-chip.active {
    border-color: rgba(125, 150, 220, 0.42);
    color: var(--text);
    transform: translateY(-1px);
}

.tag-chip.active {
    background: rgba(79, 110, 247, 0.18);
}

.archive-meta {
    min-height: 22px;
    margin-bottom: 18px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.track-card {
    min-width: 0;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.track-card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 150, 220, 0.34);
}

.track-cover-wrap {
    aspect-ratio: 16 / 9;
}

.track-number {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    background: rgba(5, 13, 27, 0.78);
}

.track-body {
    padding: 20px 20px 22px;
}

.track-title {
    margin-bottom: 8px;
    font-size: 1.26rem;
    line-height: 1.2;
    min-width: 0;
}

.track-head {
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.track-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.track-tag {
    display: inline-flex;
    border-radius: var(--radius-pill);
    padding: 6px 10px;
    background: rgba(18, 34, 65, 0.88);
    color: var(--text-soft);
    font-size: 0.82rem;
    border: 1px solid rgba(125, 150, 220, 0.12);
}

.track-link {
    line-height: 1;
    flex: 1 1 140px;
    min-height: 48px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    padding: 0 16px;
    border: 1px solid transparent;
}

.track-link-primary {
    background: linear-gradient(
        135deg,
        rgba(79, 110, 247, 0.96),
        rgba(111, 139, 255, 0.96)
    );
    color: #fff;
}

.track-link-secondary {
    color: var(--text);
}

.empty-state {
    text-align: center;
    padding: 56px 24px;
    border: 1px dashed rgba(125, 150, 220, 0.18);
    border-radius: var(--radius-xl);
    background: rgba(10, 19, 37, 0.4);
}

.empty-state.hidden,
.hidden {
    display: none !important;
}

.pagination {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(12, 22, 43, 0.82);
    color: var(--text-soft);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.pagination button:hover:not(:disabled),
.pagination button.active {
    background: rgba(79, 110, 247, 0.18);
    border-color: rgba(125, 150, 220, 0.36);
    color: var(--text);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.about-copy {
    text-align: center;
}

.about-copy p {
    font-size: 1.08rem;
    margin-inline: auto;
    max-width: 780px;
}

.final-cta {
    padding-top: 36px;
}

.cta-card {
    text-align: center;
    padding: 42px 28px;
}

.site-footer {
    border-top: 1px solid rgba(125, 150, 220, 0.08);
    padding: 28px 0 40px;
}

.footer-inner {
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skeleton-box,
.skeleton-line {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.04)
    );
    background-size: 200% 100%;
    animation: shimmer 1.35s infinite linear;
}

.skeleton-line {
    height: 18px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.skeleton-line.short {
    width: 68%;
}

.skeleton-pill {
    width: 88px;
    height: 34px;
}

.skeleton-actions {
    display: flex;
    gap: 12px;
    min-height: 54px;
}

.skeleton-actions::before,
.skeleton-actions::after {
    content: "";
    display: block;
    height: 54px;
    width: 180px;
    max-width: 48%;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04),
        rgba(255, 255, 255, 0.12),
        rgba(255, 255, 255, 0.04)
    );
    background-size: 200% 100%;
    animation: shimmer 1.35s infinite linear;
}

/* related resource: zylochord.css:555:1 */
.search-wrap {
    /* the element was label.search-wrap */
    display: flex;
    align-items: center;
}

@keyframes shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@media (max-width: 1100px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .feature-card,
    .marathon-grid {
        grid-template-columns: 1fr;
    }

    .feature-media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 720px) {
    :root {
        --shell-inset: 28px;
    }

    .site-shell,
    .narrow {
        width: min(var(--shell), calc(100% - var(--shell-inset)));
    }

    .topbar-inner,
    .footer-inner {
        justify-content: center;
        text-align: center;
    }

    .topbar-inner {
        flex-direction: column;
        gap: 10px;
        min-height: auto;
        padding: 10px 0 12px;
    }

    .top-links,
    .footer-links,
    .section-nav-inner {
        justify-content: center;
        flex-wrap: wrap;
    }

    .top-links {
        width: 100%;
        gap: 8px;
        padding: 5px;
    }

    .top-links a {
        flex: 1 1 0;
        min-height: 42px;
        padding: 0 10px;
        font-size: 0.88rem;
    }

    .hero-logo {
        width: 138px;
        height: 138px;
        margin-bottom: 22px;
    }

    .section {
        padding: 78px 0;
    }

    .feature-content,
    .marathon-body,
    .track-body,
    .cta-card,
    .category-card {
        padding: 22px;
    }

    .category-grid,
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .feature-actions {
        flex-direction: column;
    }

    .btn,
    .track-link,
    .clear-filters {
        width: 100%;
    }

    .track-head,
    .marathon-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .tag-chip,
    .filter-chip {
        padding: 5px 10px;
        font-size: 0.74rem;
    }

    .tag-row {
        gap: 8px;
        margin-bottom: 12px;
        padding-bottom: 2px;
    }
}

.active-filters:empty {
    display: none;
    margin-bottom: 0;
}

.is-hidden {
    display: none !important;
}

.section-tabs-wrap {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(5, 16, 31, 0.82);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-tabs {
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 0.85rem 1rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.section-tabs::-webkit-scrollbar {
    display: none;
}

.section-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(124, 139, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1;
    transition: 0.2s ease;
}

.section-tab:hover,
.section-tab.active {
    background: rgba(108, 124, 255, 0.16);
    border-color: rgba(124, 139, 255, 0.32);
    color: #fff;
}

@media (min-width: 768px) {
    .section-tabs {
        justify-content: center;
        overflow: visible;
        white-space: normal;
    }
}

.section-tabs-wrap::before,
.section-tabs-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18px;
    pointer-events: none;
    z-index: 2;
}

.section-tabs-wrap::before {
    left: 0;
    background: linear-gradient(
        to right,
        rgba(5, 16, 31, 0.95),
        rgba(5, 16, 31, 0)
    );
}

.section-tabs-wrap::after {
    right: 0;
    background: linear-gradient(
        to left,
        rgba(5, 16, 31, 0.95),
        rgba(5, 16, 31, 0)
    );
}

/* ===== ZyloChord Music Cursor ===== */

.music-cursor {
    position: fixed;
    left: 0;
    top: 0;
    width: 46px;
    height: 46px;
    margin-left: -23px;
    margin-top: -23px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transform: translate3d(-999px, -999px, 0);
    will-change: transform;
    border: 1px solid rgba(121, 168, 255, 0.42);
    background: radial-gradient(
        circle,
        rgba(121, 168, 255, 0.08),
        rgba(121, 168, 255, 0.015)
    );
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 0 28px rgba(121, 168, 255, 0.08);
    transition:
        opacity 0.18s ease,
        width 0.18s ease,
        height 0.18s ease,
        margin-left 0.18s ease,
        margin-top 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.music-cursor__eq {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.music-cursor__eq span {
    width: 3px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #79a8ff, #a57bff);
    transform-origin: center bottom;
}

body.music-cursor-visible .music-cursor {
    opacity: 1;
}

body.music-cursor-hover .music-cursor {
    width: 58px;
    height: 58px;
    margin-left: -29px;
    margin-top: -29px;
    border-color: rgba(121, 168, 255, 0.72);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 34px rgba(121, 168, 255, 0.18);
}

body.music-cursor-hover .music-cursor__eq {
    opacity: 1;
}

body.music-cursor-hover .music-cursor__eq span:nth-child(1) {
    animation: zyloCursorBeat 0.65s infinite ease-in-out;
}

body.music-cursor-hover .music-cursor__eq span:nth-child(2) {
    animation: zyloCursorBeat 0.65s infinite ease-in-out 0.1s;
}

body.music-cursor-hover .music-cursor__eq span:nth-child(3) {
    animation: zyloCursorBeat 0.65s infinite ease-in-out 0.2s;
}

@keyframes zyloCursorBeat {
    0%,
    100% {
        transform: scaleY(0.65);
        opacity: 0.72;
    }
    50% {
        transform: scaleY(1.45);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
    .music-cursor {
        display: none;
    }
}

.tag-row {
    cursor: grab;
    user-select: none;
}

.tag-row.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.tag-row.is-dragging .tag-chip {
    pointer-events: none;
}

.marathon-card-placeholder {
    border: 1px dashed rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.03),
            rgba(255, 255, 255, 0.02)
        ),
        rgba(255, 255, 255, 0.02);
}

.marathon-card-placeholder .marathon-body {
    min-height: 180px;
    display: flex;
    align-items: center;
}

.marathon-duration {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: max-content;
    padding: 7px 14px;
    border-radius: 999px;
}

.marathon-card-placeholder .marathon-duration {
    opacity: 0.8;
}

#marathonGrid {
    justify-content: center;
}

#marathonGrid .marathon-card-placeholder {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(100%, 760px);
    margin-inline: auto;
}

#marathonGrid .marathon-card:only-child {
    grid-column: 1 / -1;
    width: min(100%, 680px);
    justify-self: center;
}

#marathonGrid .marathon-card:only-child {
    grid-column: 1 / -1;
    width: min(100%, 620px);
    justify-self: center;
}

.marathon-cover-wrap {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.marathon-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.marathon-body {
    padding: 24px;
}

.marathon-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ===== Scroll to top ===== */

.scroll-top-btn {
    position: fixed;
    right: calc(24px + env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    pointer-events: none;
    touch-action: manipulation;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        visibility 0.22s ease;
}

.scroll-top-btn svg {
    width: 34px;
    height: 34px;
    display: block;
}

.scroll-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    transform: translateY(-2px);
}

.scroll-top-btn:focus-visible {
    outline: none;
}

@media (max-width: 819px) {
    .scroll-top-btn {
        right: calc(12px + env(safe-area-inset-right));
        bottom: calc(18px + env(safe-area-inset-bottom));
        width: 52px;
        height: 52px;
    }

    .scroll-top-btn svg {
        width: 32px;
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-top-btn {
        transition: none;
    }
}

/* ===== Large-screen layout polish ===== */
@media (min-width: 1440px) {
    :root {
        --shell: 1220px;
        --shell-inset: 56px;
    }

    .section {
        padding: 104px 0;
    }

    .hero-inner {
        padding: 116px 0 80px;
    }

    .hero-logo {
        width: 184px;
        height: 184px;
    }

    .feature-content,
    .marathon-body {
        padding: 32px;
    }

    .track-body {
        padding: 22px 22px 24px;
    }
}

/* Archive column contract: 3 desktop / 2 tablet / 1 mobile — no auto-fit */
.archive-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

main#main,
.site-footer {
    overflow-x: clip;
}
