
a { text-decoration: none; }

.main-content,
widecontent,
body {
    background-color: #000;
}


body > article > yrxtals img {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto;
    margin: 1rem 0 4rem !important;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 !important;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
}

body > article > p:nth-child(3) > img {
    height: auto;
    max-width: 10rem;
}

body > article > p:nth-child(4) > img,
body > article > p:nth-child(4) {
    box-shadow: none !important;
    margin: 3rem 0;
    width: 50vw;
    right: 5vw;
    max-width: 50vw;
    position: relative;
}

body > article > p:nth-child(2) p {
    color: lightblue!important;
    font-size: 250%!important;
    margin: 2rem 4rem 5rem 0!important;
    padding: 2rem 0 5rem 0!important;
}

.main-content > h1:first-of-type {
    font-size: 3.5rem;
    text-align: center;
    margin-top: 3rem;
}
.main-content > p:first-of-type,
.main-content > p:nth-of-type(2) {
    font-size: 1.35em;
    text-align: center;
    max-width: 720px;
    margin: 0 auto 1rem;
}


h1:nth-of-type(2) {
    max-width: 460px;
    margin: 5rem auto 0;
    padding: 1.75rem 1.25rem 1.5rem;
    background: var(--code-bg);
    color: var(--text-color);
    border: 0.225rem solid var(--border-color);
    border-bottom: none;
    border-radius: 2.5rem 2.5rem 0 0;
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.05em;
    box-shadow: 0 0 0 0.5rem var(--code-bg),
                0 0 1.5rem rgba(0, 0, 0, 0.08);
}
h1:nth-of-type(2)::before {
    content: "";
    display: block;
    width: 5rem;
    height: 0.4rem;
    background: var(--border-color);
    border-radius: 1rem;
    margin: 0 auto 1.25rem;
    opacity: 0.6;
}

/** phone  **/
h1:nth-of-type(2) ~ h2:has(~ widecontent),
h1:nth-of-type(2) ~ p:has(~ widecontent) {
    max-width: 460px;
    margin: 0 auto;
    padding: 0.6rem 1.75rem;
    background: var(--bg-color);
    border-left: 0.225rem solid var(--border-color);
    border-right: 0.225rem solid var(--border-color);
    box-sizing: border-box;
    font-size: 1.1rem;
}
h1:nth-of-type(2) ~ h2:has(~ widecontent) {
    font-size: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 700;
}
h1:nth-of-type(2) ~ p:has(~ widecontent) > a > img {
    display: block;
    margin: 1rem auto;
    width: 70%;
    max-width: 280px;
    height: auto;
}
h1:nth-of-type(2) ~ hr:has(~ widecontent) {
    max-width: 460px;
    height: 2.5rem;
    margin: 0 auto 5rem;
    background: var(--code-bg);
    border: 0.225rem solid var(--border-color);
    border-radius: 0 0 2.5rem 2.5rem;
    position: relative;
    box-shadow: 0 0 0 0.5rem var(--code-bg),
                0 0.75rem 1.5rem rgba(0, 0, 0, 0.08);
}
h1:nth-of-type(2) ~ hr:has(~ widecontent)::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0.6rem;
    transform: translateX(-50%);
    width: 7rem;
    height: 0.35rem;
    background: var(--border-color);
    border-radius: 1rem;
    opacity: 0.6;
}


widecontent {
    display: block;
    box-sizing: border-box;
    width: min(1240px, calc(100vw - 3rem));
    min-height: min(720px, calc((100vw - 3rem) * 10 / 16));
    margin: 2rem auto 5rem;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    background: var(--code-bg);
    border: 0.3rem solid var(--border-color);
    border-radius: 1rem 1rem 0.4rem 0.4rem;
    padding: 0 2rem 2.5rem;
    box-shadow: 0 1.75rem 3rem rgba(0, 0, 0, 0.25);
}


widecontent::after {
    content: "";
    display: block;
    position: absolute;
    left: -3.5rem;
    right: -3.5rem;
    bottom: -1.5rem;
    height: 1.5rem;
    background: var(--border-color);
    opacity: 0.45;
    border-radius: 0 0 1.25rem 1.25rem;
    z-index: -1;
}


widecontent > h1 {
    margin: 0 -2rem 2rem;
    padding: 0.85rem 1.5rem;
    background: var(--header-bg);
    color: var(--header-text);
    font-size: 1rem;
    font-family: var(--font-mono);
    text-align: center;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 0.7rem 0.7rem 0 0;
    border-bottom: 0.3rem solid var(--border-color);
}


widecontent > section.os-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
}

widecontent .os-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

widecontent .os-info h2 {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
widecontent .os-info h2::before {
    content: "▸ ";
    color: var(--link-color);
}


widecontent .os-info > p {
    display: inline-block;
    margin: 0;
    padding: 0.5rem 1rem;
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 1rem;
    letter-spacing: 0.02em;
}
widecontent .os-info > p strong {
    color: var(--text-color);
    font-weight: 700;
}


widecontent details.download-dropdown {
    position: relative;
    flex: 0 0 auto;
}
widecontent details.download-dropdown > summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--link-color);
    color: var(--header-bg);
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
    transition: background 0.15s, transform 0.1s;
}
widecontent details.download-dropdown > summary:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-1px);
}
widecontent details.download-dropdown > summary::-webkit-details-marker { display: none; }
widecontent details.download-dropdown[open] > summary {
    background: var(--accent-color);
    color: #fff;
}

widecontent details.download-dropdown > ul {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 30;
    min-width: 240px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
}
widecontent details.download-dropdown > ul > li {
    margin: 0;
    padding: 0;
    border: none;
    flex: none;
    font-size: 1rem;
    font-weight: normal;
}
widecontent details.download-dropdown > ul > li > a {
    display: block;
    padding: 0.6rem 1.1rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: var(--font-mono);
}
widecontent details.download-dropdown > ul > li > a:hover {
    background: var(--link-color);
    color: var(--bg-color);
}
widecontent details.download-dropdown > ul > li + li {
    border-top: 1px solid var(--border-color);
}


/* Phone-sized views */
@media (max-width: 700px) {
    widecontent {
        display: block;
        width: auto;
        min-height: 0;
        margin: 2rem 0;
        position: static;
        left: auto;
        transform: none;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
    }
    widecontent::after { display: none; }

    widecontent > h1 {
        margin: 0 0 1rem;
        padding: 0;
        background: transparent;
        color: var(--text-color);
        font-size: 2rem;
        font-family: inherit;
        text-align: left;
        letter-spacing: normal;
        text-transform: none;
        border: none;
        border-radius: 0;
    }

    widecontent > section.os-section {
        display: block;
        margin: 1.25rem 0;
        padding: 0.75rem 0;
        background: transparent;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }

    widecontent .os-info {
        display: block;
        gap: 0;
    }
    widecontent .os-info h2 {
        display: block;
        margin: 0 0 0.5rem;
        font-size: 1.25rem;
    }
    widecontent .os-info > p {
        display: block;
        margin: 0.5rem 0;
    }

    widecontent details.download-dropdown {
        display: block;
        margin-top: 0.75rem;
    }
    widecontent details.download-dropdown > summary {
        display: inline-block;
    }
    widecontent details.download-dropdown > ul {
        position: static;
        right: auto;
        top: auto;
        margin-top: 0.5rem;
        min-width: 0;
    }

    /* Dark mode chassis overrides outrank the bare-element rules above by
       specificity, so repeat the strip-down with the body.dark-mode prefix. */
    body.dark-mode widecontent {
        background: transparent;
        border: none;
        box-shadow: none;
    }
    body.dark-mode widecontent > h1 {
        background: transparent;
        border-bottom: none;
    }
    body.dark-mode widecontent > section.os-section {
        background: transparent;
        border: none;
        border-bottom: 1px solid var(--blockquote-border);
    }
    body.dark-mode widecontent .os-info > p {
        background: var(--sidebar-bg);
        border-color: var(--blockquote-border);
    }
}


body.dark-mode .main-content > p > img:first-child {
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.6),
                0 0 0 1px var(--blockquote-border);
}

body.dark-mode h1:nth-of-type(2),
body.dark-mode h1:nth-of-type(2) ~ hr:has(~ widecontent) {
    background: var(--sidebar-bg);
    border-color: var(--blockquote-border);
    box-shadow: 0 0 0 0.5rem var(--sidebar-bg),
                0 0 1.5rem rgba(196, 157, 212, 0.1);
}
body.dark-mode h1:nth-of-type(2)::before,
body.dark-mode h1:nth-of-type(2) ~ hr:has(~ widecontent)::after {
    background: var(--link-color);
    opacity: 0.55;
}
body.dark-mode h1:nth-of-type(2) ~ h2:has(~ widecontent),
body.dark-mode h1:nth-of-type(2) ~ p:has(~ widecontent) {
    border-color: var(--blockquote-border);
}

body.dark-mode widecontent {
    background: var(--sidebar-bg);
    border-color: var(--blockquote-border);
    box-shadow: 0 1.75rem 3rem rgba(0, 0, 0, 0.55),
                0 0 2rem rgba(196, 157, 212, 0.08);
}
body.dark-mode widecontent::after {
    background: var(--blockquote-border);
    opacity: 0.5;
}
body.dark-mode widecontent > h1 {
    background: var(--header-bg);
    border-bottom-color: var(--blockquote-border);
}
body.dark-mode widecontent > section.os-section {
    background: var(--header-bg);
    border-color: var(--blockquote-border);
}
body.dark-mode widecontent .os-info > p {
    background: var(--sidebar-bg);
    border-color: var(--blockquote-border);
}
body.dark-mode widecontent details.download-dropdown > ul {
    background: var(--header-bg);
    border-color: var(--blockquote-border);
}
body.dark-mode widecontent details.download-dropdown > ul > li + li {
    border-top-color: var(--blockquote-border);
}
body.dark-mode widecontent details.download-dropdown > summary {
    color: var(--bg-color);
}



/* ------ bottom album image ------ */

body > article > p:nth-child(23) > a > img {
    margin: 0;
    padding: 0.4rem 0 2rem 0;
    position: absolute;
    left: 25vw;
    max-width: 50vw;
    width: 50vw;

}

/* -------- desktop -------- */

.viz-desktop.viz-wrap {
    position: relative;
    margin: 1rem 0 4rem;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    line-height: 0;
}
.viz-desktop .viz-canvas-wrap {
    position: relative;
    line-height: 0;
    min-width: 0;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
}
.viz-desktop .viz-canvas-wrap canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.viz-desktop .viz-tracks {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    bottom: 3.5rem;
    width: 13rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 0.4rem;
    z-index: 2;
}
.viz-desktop .viz-tracks::-webkit-scrollbar { width: 4px; }
.viz-desktop .viz-tracks::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 2px; }
.viz-desktop .viz-track {
    font: inherit;
    font-size: 0.8rem;
    line-height: 1.45;
    text-align: left;
    padding: 0.1rem 0.5rem;
    border: none;
    background: transparent;
    color: rgba(200, 200, 200, 0.4);
    cursor: pointer;
    transition: color 120ms ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.viz-desktop .viz-track:hover { color: rgba(235, 235, 235, 0.85); }
.viz-desktop .viz-track.active { color: #fff; }
.viz-desktop .viz-vol {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
}
.viz-desktop .viz-vol .viz-prompt { display: none; }
.viz-desktop .viz-vol.initial {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    padding: 1.1rem 1.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.6);
    gap: 1rem;
}
.viz-desktop .viz-vol.initial img { width: 3rem; height: 3rem; }
.viz-desktop .viz-vol.initial .viz-prompt {
    display: inline-block;
    font: inherit;
    font-size: 1.15rem;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}
.viz-desktop .viz-transport {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
    opacity: 1;
    transition: opacity 400ms ease;
}
.viz-desktop .viz-transport.fade { opacity: 0; }
.viz-desktop .viz-ctrl {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: rgba(220, 220, 220, 0.85);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 120ms ease, opacity 400ms ease;
    opacity: 1;
}
.viz-desktop .viz-ctrl.fade { opacity: 0; }
.viz-desktop .viz-ctrl:hover { background: rgba(0, 0, 0, 0.55); }
.viz-desktop .viz-ctrl img { width: 58%; height: 58%; display: block; pointer-events: none; user-select: none; }
.viz-desktop .viz-ctrl-play img { width: 50%; height: 50%; }

/* -------- mobile -------- */

.viz-mobile.viz-wrap {
    position: relative;
    margin: 1rem 0 2rem;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    line-height: 0;
}
.viz-mobile .viz-canvas-wrap {
    position: relative;
    line-height: 0;
    min-width: 0;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
}
.viz-mobile .viz-canvas-wrap canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.viz-mobile .viz-vol {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
}
.viz-mobile .viz-vol .viz-prompt { display: none; }
.viz-mobile .viz-vol.initial {
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    padding: 0.85rem 1.2rem;
    border-radius: 999px;
    background: transparent;
    gap: 0.75rem;
}
.viz-mobile .viz-vol.initial img { width: 2.2rem; height: 2.2rem; }
.viz-mobile .viz-vol.initial .viz-prompt {
    display: inline-block;
    font: inherit;
    font-size: 0.95rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    white-space: normal;
    max-width: 60vw;
}
.viz-mobile .viz-transport {
    position: absolute;
    bottom: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
    opacity: 1;
    transition: opacity 400ms ease;
}
.viz-mobile .viz-transport.fade { opacity: 0; }
.viz-mobile .viz-ctrl {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 120ms ease, opacity 400ms ease;
    opacity: 1;
}
.viz-mobile .viz-ctrl.fade { opacity: 0; }
.viz-mobile .viz-ctrl:active { background: rgba(0, 0, 0, 0.6); }
.viz-mobile .viz-ctrl img { width: 58%; height: 58%; display: block; pointer-events: none; user-select: none; }
.viz-mobile .viz-ctrl-play img { width: 50%; height: 50%; }

.viz-tracks {
    display: block;
    max-width: 92vw;
    margin: 1rem auto 3rem;
    padding: 0 0.5rem;
}
.viz-track {
    display: inline;
    width: auto;
    text-align: left;
    font: inherit;
    font-size: 1rem;
    line-height: 1.6;
    padding: 0.5rem 1.45rem;
    border: none;
    background: transparent;
    color: rgba(220, 220, 220, 0.7);
    cursor: pointer;
    transition: color 120ms ease;
}
yrxtals-tracks .viz-track:hover { color: rgba(245, 245, 245, 0.95); }
yrxtals-tracks .viz-track.active { color: #fff; }
