body {
    margin: 0;
    padding: 30px 15px;
    background-color: #008080;
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 2px,
            transparent 2px,
            transparent 4px
        );
    color: #222;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    font-size: 14px;
    isolation: isolate;
    touch-action: manipulation;
}

body.backrooms {
    background: #b09b5e;
}

#entry-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 9999;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

#entry-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.55;
}

.entry-box {
    position: relative;
    width: 220px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    z-index: 2;
    pointer-events: none;
}

.entry-titlebar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 8px;
}

.entry-body {
    padding: 22px 14px;
    text-align: center;
}

.entry-body p {
    margin: 0;
    font-size: 14px;
    color: #222;
    font-weight: bold;
}

#system-info {
    position: fixed;
    top: 10px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 11px;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    text-align: center;
    line-height: 1.3;
    pointer-events: none;
    z-index: 1;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

#system-info img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    opacity: 0.6;
    image-rendering: pixelated;
}

button {
    padding: 6px 14px;
    background: #d4d0c8;
    color: #000;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    cursor: pointer;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    font-size: 13px;
}

button:hover {
    background: #e4e0d8;
}

button:active {
    border-color: #808080 #fff #fff #808080;
}

button:focus {
    outline: none;
}

.os-window {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    width: 700px;
    height: 550px;
    min-width: 300px;
    min-height: 200px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.os-window.minimizing-out {
    transform: translate(var(--mz-dx, 0px), var(--mz-dy, 0px)) scale(0.05);
    opacity: 0;
    pointer-events: none;
}

.window-titlebar {
    box-sizing: border-box;
    height: 28px;
    padding-left: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    font-weight: bold;
    font-size: 13px;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    user-select: none;
    cursor: move;
    touch-action: none;
}

.titlebar-label {
    display: flex;
    align-items: center;
    gap: 5px;
}

.titlebar-icon {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
}

.window-buttons {
    display: flex;
    height: 100%;
}

.window-buttons button {
    box-sizing: border-box;
    width: 22px;
    height: 20px;
    padding: 0;
    margin-right: 2px;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    background: #d4d0c8;
    color: #000;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.window-buttons button:hover {
    background: #e4e0d8;
}

.window-buttons button:active {
    border-color: #808080 #fff #fff #808080;
}

.window-content {
    box-sizing: border-box;
    width: 100%;
    height: calc(100% - 28px);
    padding: 0;
    background: #222;
    overflow: hidden;
    position: relative;
}

.window-content iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.iframe-blocker {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.os-window.interacting .iframe-blocker {
    display: block;
}

.os-window.minimized {
    height: 28px !important;
    min-height: 28px;
}

.os-window.minimized .window-content,
.os-window.minimized .resize {
    display: none;
}

.resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    touch-action: none;
}

.resize::after {
    content: "";
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #777;
    border-bottom: 2px solid #777;
}

@media (max-width: 600px) {
    .os-window:not(.minimized) {
        left: 6px !important;
        top: 6px !important;
        width: calc(100vw - 12px) !important;
        height: calc(100vh - 52px) !important;
        height: calc(100dvh - 52px) !important;
    }

    .os-window .resize {
        display: none;
    }

    #music-player {
        right: 6px;
    }

    #local-save-notice {
        bottom: 88px;
    }

    #system-info {
        display: none;
    }
}

.taskbar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 34px;
    background: #d4d0c8;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    box-sizing: border-box;
    z-index: 2000;
}

#start-button {
    flex-shrink: 0;
    height: 26px;
    padding: 0 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

body.backrooms #start-button {
    background: #cabb85;
    color: #2a2210;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

.context-menu-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    image-rendering: pixelated;
}

#taskbar-items {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    overflow: hidden;
}

.taskbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    background: #d4d0c8;
    color: #000;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    font-size: 12px;
    line-height: 24px;
    cursor: pointer;
    user-select: none;
}

.taskbar-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.taskbar-item:hover {
    background: #e4e0d8;
}

.taskbar-item.active {
    border-color: #fff #808080 #808080 #fff;
    background: #c0bcb4;
}

#taskbar-clock {
    margin-left: auto;
    padding: 0 8px;
    color: #000;
    font-size: 12px;
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    flex-shrink: 0;
}

body.backrooms #taskbar-clock {
    color: #2a1f0d;
}

.properties-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 8px;
}

.properties-titlebar .properties-close {
    box-sizing: border-box;
    width: 20px;
    height: 18px;
    padding: 0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    background: #d4d0c8;
    color: #000;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.properties-titlebar .properties-close:active {
    border-color: #808080 #fff #fff #808080;
}

.properties-body {
    padding: 14px;
}

.properties-body p {
    margin: 0 0 8px;
    line-height: 1.4;
    color: #222;
}

.properties-body p:last-child {
    margin-bottom: 0;
}

.properties-footer {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px 12px;
}

.properties-footer .properties-ok {
    padding: 5px 18px;
}

body.backrooms .properties-dialog {
    background: #cabb85;
    border-color: #6b5a1e;
}

body.backrooms .properties-titlebar {
    background: linear-gradient(90deg, #6b5a1e, #b89a3f);
}

body.backrooms .properties-body p {
    color: #2a1f0d;
}

.context-menu {
    position: fixed;
    min-width: 170px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    z-index: 5000;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    font-size: 12px;
    padding: 2px;
    user-select: none;
}

.context-menu-item {
    padding: 5px 10px;
    cursor: pointer;
    color: #000;
    white-space: nowrap;
}

.context-menu-item:hover {
    background: #000080;
    color: #fff;
}

.context-menu-separator {
    height: 0;
    margin: 3px 2px;
    border-bottom: 1px solid #808080;
    border-top: 1px solid #fff;
}

body.backrooms .context-menu {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms .context-menu-item {
    color: #2a1f0d;
}

body.backrooms .context-menu-item:hover {
    background: #6b5a1e;
    color: #f2e9c8;
}

body.backrooms .context-menu-separator {
    border-bottom-color: #6b5a1e;
    border-top-color: #f0e4b0;
}

#desktop-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 34px;
    overflow: hidden;
}

.desktop-icon {
    position: absolute;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.desktop-icon.dragging {
    cursor: grabbing;
    z-index: 10;
    opacity: 0.85;
}

.desktop-icon img {
    width: 40px;
    height: 40px;
    pointer-events: none;
}

.desktop-icon span {
    color: #1a3a63;
    font-size: 12px;
    text-align: center;
    line-height: 1.2;
    pointer-events: none;
}

.desktop-icon:hover span {
    text-decoration: underline;
}

#music-player {
    position: fixed;
    right: 12px;
    bottom: 44px;
    width: 250px;
    min-height: 40px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    z-index: 1500;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    transition: width 0.15s ease;
}

#music-player.collapsed .music-body {
    display: none;
}

#music-player .music-titlebar {
    cursor: pointer;
}

#music-player.expanded {
    width: 300px;
}

.music-titlebar {
    display: flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    user-select: none;
}

.music-icon {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
}

.music-titlebar span#music-title-label {
    flex: 1;
}

#track-number {
    font-size: 10px;
    font-weight: normal;
    color: rgba(255, 255, 255, 0.8);
}

.music-body {
    box-sizing: border-box;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.list-toggle-btn {
    align-self: flex-start;
    width: 28px;
    height: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-toggle-btn img {
    width: 12px;
    height: 12px;
    image-rendering: pixelated;
}

#art {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    image-rendering: pixelated;
}

.info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    user-select: none;
}

#track {
    font-size: 12px;
    font-weight: bold;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

#artist {
    font-size: 11px;
    color: #444;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.controls {
    display: flex;
    gap: 3px;
}

.controls button {
    width: 32px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.controls button img {
    width: 14px;
    height: 14px;
    image-rendering: pixelated;
}

.hidden {
    display: none !important;
}

.toggle-row {
    display: flex;
    gap: 4px;
}

.mini-toggle {
    width: 28px;
    height: 22px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-color: #fff #808080 #808080 #fff;
    background: #d4d0c8;
}

.mini-toggle img {
    width: 13px;
    height: 13px;
    image-rendering: pixelated;
}

.mini-toggle.active {
    border-color: #808080 #fff #fff #808080 !important;
    background: #7fae4a !important;
}

.seek-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}

.seek-row span {
    font-size: 10px;
    color: #333;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

#seek {
    flex: 1;
}

.volume-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}

.volume-label {
    font-size: 10px;
    color: #333;
    width: 24px;
    flex-shrink: 0;
}

#volume-percent {
    font-size: 10px;
    color: #333;
    width: 32px;
    text-align: right;
    flex-shrink: 0;
}

#seek,
#volume {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    background: #808080;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    outline: none;
}

#seek::-webkit-slider-thumb,
#volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 16px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    cursor: pointer;
}

#seek::-moz-range-thumb,
#volume::-moz-range-thumb {
    width: 12px;
    height: 16px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    cursor: pointer;
    border-radius: 0;
}

#track-list {
    display: none;
    width: 100%;
    max-height: 130px;
    overflow-y: auto;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    box-sizing: border-box;
}

#music-player.expanded #track-list {
    display: block;
}

.track-item {
    padding: 5px 8px;
    font-size: 11px;
    color: #222;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-item:last-child {
    border-bottom: 0;
}

.track-item:hover {
    background: #e4e0d8;
}

.track-item.active {
    background: #000080;
    color: #fff;
}

#local-save-notice {
    position: fixed;
    left: -260px;
    bottom: 44px;
    width: 230px;
    background: #d4d0c8;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.4);
    z-index: 1500;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    transition: left 0.3s ease;
}

#local-save-notice.visible {
    left: 12px;
}

.notice-titlebar {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 4px 4px 8px;
}

.notice-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-titlebar button {
    flex-shrink: 0;
    width: 20px;
    height: 18px;
    padding: 0;
    font-size: 12px;
    line-height: 1;
    border-color: #fff #808080 #808080 #fff;
}

.notice-body {
    padding: 10px;
}

.notice-body p {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #222;
}

#backrooms-girl,
#backrooms-still-life {
    position: fixed;
    bottom: 30px;
    left: -200px;
    width: 140px;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    image-rendering: pixelated;
}

#backrooms-still-life {
    width: 130px;
}

body.backrooms * {
    animation: br-flicker 4s infinite;
}

@keyframes br-flicker {
    0%, 96%, 100% {
        text-shadow: none;
    }
    97% {
        text-shadow: 1px 0 0 rgba(255, 0, 0, 0.35), -1px 0 0 rgba(0, 255, 255, 0.35);
    }
    98% {
        text-shadow: none;
    }
}

body.backrooms #backrooms-girl {
    opacity: 0.9;
    animation: br-walk 14s linear infinite;
}

body.backrooms #backrooms-still-life {
    opacity: 0.75;
    animation: br-walk 14s linear infinite;
    animation-delay: 2.5s;
}

@keyframes br-walk {
    0% {
        left: -200px;
    }
    100% {
        left: 110%;
    }
}

#backrooms-tint {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, #e8d896 0%, #b89a4a 100%);
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 1.6s ease;
}

body.backrooms #backrooms-tint {
    opacity: 0.4;
}

.backrooms-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #b09b5e;
    background-image: url("images/kanerooms.png");
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.6s ease;
    z-index: -1;
}

body.backrooms .backrooms-scene {
    opacity: 1;
}

body.backrooms .os-window {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms .window-titlebar {
    background: linear-gradient(90deg, #6b5a1e, #b89a3f);
}

body.backrooms .music-titlebar {
    background: linear-gradient(90deg, #6b5a1e, #b89a3f);
}

body.backrooms .notice-titlebar {
    background: linear-gradient(90deg, #6b5a1e, #b89a3f);
}

body.backrooms .taskbar,
body.backrooms #music-player,
body.backrooms #local-save-notice {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms .window-buttons button,
body.backrooms .mini-toggle,
body.backrooms .list-toggle-btn {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms .taskbar-item {
    background: #cabb85;
    border-color: #6b5a1e #f0e4b0 #f0e4b0 #6b5a1e;
}

body.backrooms .taskbar-item.active {
    background: #b6a56b;
}

body.backrooms button {
    background: #cabb85;
    color: #2a2210;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms button:hover {
    background: #d8c996;
}

body.backrooms button:active {
    border-color: #6b5a1e #f0e4b0 #f0e4b0 #6b5a1e;
}

body.backrooms #seek,
body.backrooms #volume {
    background: #8a7645;
    border-color: #6b5a1e #f0e4b0 #f0e4b0 #6b5a1e;
}

body.backrooms #seek::-webkit-slider-thumb,
body.backrooms #volume::-webkit-slider-thumb {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms #seek::-moz-range-thumb,
body.backrooms #volume::-moz-range-thumb {
    background: #cabb85;
    border-color: #f0e4b0 #6b5a1e #6b5a1e #f0e4b0;
}

body.backrooms .track-item {
    background: #f2e9c8;
    color: #2a2210;
    border-bottom-color: #b6a56b;
}

body.backrooms .track-item:hover {
    background: #e5d9a8;
}

body.backrooms .track-item.active {
    background: #6b5a1e;
    color: #f2e9c8;
}

body.backrooms #track-list {
    background: #f2e9c8;
    border-color: #6b5a1e #f0e4b0 #f0e4b0 #6b5a1e;
}

body.backrooms .desktop-icon span,
body.backrooms .notice-body p,
body.backrooms #track,
body.backrooms #artist,
body.backrooms #track-number,
body.backrooms .taskbar-item span,
body.backrooms .seek-row span,
body.backrooms .volume-label,
body.backrooms #volume-percent {
    color: #2a1f0d;
}

body.theme-dark {
    background-color: #1e1e1e;
    background-image: none;
}

body.theme-dark .os-window,
body.theme-dark .taskbar,
body.theme-dark #music-player,
body.theme-dark #local-save-notice,
body.theme-dark .context-menu,
body.theme-dark .properties-dialog {
    background: #2b2b2b;
    border-color: #555 #000 #000 #555;
}

body.theme-dark .window-titlebar,
body.theme-dark .music-titlebar,
body.theme-dark .notice-titlebar,
body.theme-dark .properties-titlebar {
    background: linear-gradient(90deg, #202020, #3a3a3a);
}

body.theme-dark button,
body.theme-dark #start-button,
body.theme-dark .window-buttons button,
body.theme-dark .mini-toggle,
body.theme-dark .list-toggle-btn,
body.theme-dark .properties-close,
body.theme-dark .properties-ok {
    background: #3a3a3a;
    color: #ddd;
    border-color: #555 #000 #000 #555;
}

body.theme-dark .taskbar-item {
    background: #2b2b2b;
    color: #ddd;
    border-color: #000 #555 #555 #000;
}

body.theme-dark .taskbar-item.active {
    background: #444;
}

body.theme-dark .desktop-icon span,
body.theme-dark #track,
body.theme-dark #artist,
body.theme-dark #track-number,
body.theme-dark .notice-body p,
body.theme-dark .properties-body p,
body.theme-dark .context-menu-item,
body.theme-dark #taskbar-clock,
body.theme-dark .seek-row span,
body.theme-dark .volume-label,
body.theme-dark #volume-percent {
    color: #ddd;
}

body.theme-dark .track-item {
    background: #333;
    color: #ddd;
    border-bottom-color: #444;
}

body.theme-dark .track-item.active {
    background: #555;
}

body.theme-miku {
    background-color: #86cecb;
    background-image: none;
}

body.theme-miku .os-window,
body.theme-miku .taskbar,
body.theme-miku #music-player,
body.theme-miku #local-save-notice,
body.theme-miku .context-menu,
body.theme-miku .properties-dialog {
    background: #bec8d1;
    border-color: #fff #373b3e #373b3e #fff;
}

body.theme-miku .window-titlebar,
body.theme-miku .music-titlebar,
body.theme-miku .notice-titlebar,
body.theme-miku .properties-titlebar {
    background: linear-gradient(90deg, #137a7f, #373b3e);
}

body.theme-miku button,
body.theme-miku #start-button,
body.theme-miku .window-buttons button,
body.theme-miku .mini-toggle,
body.theme-miku .list-toggle-btn,
body.theme-miku .properties-close,
body.theme-miku .properties-ok {
    background: #bec8d1;
    color: #373b3e;
    border-color: #fff #373b3e #373b3e #fff;
}

body.theme-miku button:hover,
body.theme-miku #start-button:hover,
body.theme-miku .window-buttons button:hover {
    background: #86cecb;
}

body.theme-miku button:active {
    border-color: #373b3e #fff #fff #373b3e;
}

body.theme-miku .mini-toggle.active {
    background: #e12885 !important;
    border-color: #373b3e #fff #fff #373b3e !important;
}

body.theme-miku .taskbar-item {
    background: #bec8d1;
    color: #373b3e;
    border-color: #373b3e #fff #fff #373b3e;
}

body.theme-miku .taskbar-item:hover {
    background: #86cecb;
}

body.theme-miku .taskbar-item.active {
    background: #86cecb;
    border-color: #fff #373b3e #373b3e #fff;
}

body.theme-miku .context-menu-item {
    color: #373b3e;
}

body.theme-miku .context-menu-item:hover {
    background: #137a7f;
    color: #fff;
}

body.theme-miku .desktop-icon span {
    color: #373b3e;
}

body.theme-miku .track-item {
    background: #fff;
    color: #373b3e;
    border-bottom-color: #bec8d1;
}

body.theme-miku .track-item:hover {
    background: #86cecb;
}

body.theme-miku .track-item.active {
    background: #e12885;
    color: #fff;
}

body.theme-miku #seek::-webkit-slider-thumb,
body.theme-miku #volume::-webkit-slider-thumb {
    background: #bec8d1;
}

body.theme-miku #seek::-moz-range-thumb,
body.theme-miku #volume::-moz-range-thumb {
    background: #bec8d1;
}

#sfx-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 22px;
    padding: 0;
    margin: 0 4px;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sfx-toggle img {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

#snap-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 1900;
    box-sizing: border-box;
    background: rgba(16, 132, 208, 0.28);
    border: 2px solid rgba(255, 255, 255, 0.7);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}

#snap-preview.visible {
    opacity: 1;
}

body.backrooms #snap-preview {
    background: rgba(184, 154, 63, 0.3);
    border-color: #f0e4b0;
}

body.theme-dark #snap-preview {
    background: rgba(255, 255, 255, 0.12);
    border-color: #888;
}

body.theme-miku #snap-preview {
    background: rgba(134, 206, 203, 0.35);
    border-color: #e12885;
}

#konami-rain {
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    overflow: hidden;
}

#konami-rain img {
    position: absolute;
    top: 0;
    height: auto;
    animation-name: konami-fall;
    animation-timing-function: linear;
    animation-iteration-count: 1;
    animation-fill-mode: both;
}

@keyframes konami-fall {
    from {
        transform: translateY(-150px) rotate(0deg);
    }
    to {
        transform: translateY(calc(100vh + 150px)) rotate(var(--spin, 360deg));
    }
}

#konami-bsod {
    position: fixed;
    inset: 0;
    z-index: 9997;
    background: #0000aa;
    color: #fff;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    padding: 8vh 8vw;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: none;
}

#konami-bsod p {
    margin: 0;
    line-height: 1.4;
}

#konami-bsod .bsod-title {
    align-self: center;
    background: #aaaaaa;
    color: #0000aa;
    padding: 2px 12px;
    font-weight: bold;
}

#konami-bsod .bsod-prompt {
    text-align: center;
    margin-top: 12px;
}

#konami-bsod .bsod-blink {
    animation: konami-blink 1s steps(1) infinite;
}

@keyframes konami-blink {
    50% {
        opacity: 0;
    }
}

#screensaver {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9998;
    display: none;
    cursor: none;
    overflow: hidden;
}

#screensaver.active {
    display: block;
}

#screensaver img {
    position: absolute;
    top: 0;
    left: 0;
    width: 96px;
    height: auto;
    pointer-events: none;
    will-change: transform;
}

#wallpaper {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

body.has-wallpaper:not(.backrooms) .desktop-icon span {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0, 0, 0, 0.7);
}

#shutdown-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    color: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
}

#shutdown-overlay .shutdown-hint {
    font-size: 11px;
    opacity: 0.5;
}

#desktop-pet {
    position: absolute;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
    z-index: 5;
    user-select: none;
    transition: transform 0.15s ease;
}

#desktop-pet img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    pointer-events: none;
    display: block;
}

#pet-bubble {
    position: absolute;
    display: none;
    background: #fff;
    border: 2px solid #000;
    padding: 4px 8px;
    font-size: 11px;
    font-family: "MS Sans Serif", "Tahoma", Arial, sans-serif;
    color: #222;
    border-radius: 6px;
    z-index: 6;
    max-width: 140px;
    pointer-events: none;
}