* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3C2828;
    --bg-color: #FFF5EB;
    --bg-transition: 0.45s ease-in-out;
    --ui-scale-transition: 0.2s ease;
    --font-family: 'Space Mono', 'Courier New', monospace;
}

html {
    width: 100%;
    height: 100%;
    background: var(--bg-color);
}



body {
    width: 100vw;
    height: var(--app-height, 100vh);
    background: var(--bg-color);
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    font-family: var(--font-family);
    position: relative;
    opacity: 0;
    transition: opacity 0.25s ease, background-color var(--bg-transition);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Ccircle cx='1.5' cy='1.5' r='1.5' fill='%233C2828'/%3E%3C/svg%3E") 0 0, auto;
}

body.loaded {
    opacity: 1;
}

#click-cursor-label {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 40;
    opacity: 0;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 14px;
    font-style: italic;
    text-transform: lowercase;
    white-space: nowrap;
    transform: translate(calc(var(--click-label-x, -100px) + 18px), calc(var(--click-label-y, -100px) - 8px));
    transition: opacity 0.35s ease;
}

#click-cursor-label::before {
    content: '';
    margin-right: 8px;
}

#click-cursor-label::after {
    content: '';
    margin-left: 8px;
}

body.click-hint-cursor #click-cursor-label {
    opacity: 1;
}

body.click-hint-fading #click-cursor-label {
    opacity: 0;
}

@keyframes clickLabelBob {
    0%, 100% { transform: translate(-50%, calc(-100% - 14px)) translateY(0); }
    50% { transform: translate(-50%, calc(-100% - 14px)) translateY(-6px); }
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    transition: .5s ease, border-color var(--bg-transition), border-width var(--ui-scale-transition);
    border: 100px solid var(--bg-color);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

#lang-toggle {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 15;
    padding: 8px 10px;
    border: none;
    background: var(--bg-color);
    color: var(--primary-color);
    font: italic 14px var(--font-family);
    opacity: 0;
    pointer-events: none;
    cursor: inherit;
    font-weight: 700;
    transition: opacity 0.3s ease, transform 0.4s ease, top var(--ui-scale-transition), left var(--ui-scale-transition), padding var(--ui-scale-transition), font-size var(--ui-scale-transition);
}

#lang-toggle:hover {
    transform: translateY(-5px);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='3' cy='3' r='3' fill='%233C2828'/%3E%3C/svg%3E") 3 3, pointer;
}

#lang-toggle.visible {
    opacity: 1;
    pointer-events: auto;
}

#hud {
    color: var(--primary-color);
    font-size: 14px;
    font-style: italic;
    font-family: var(--font-family);
}

#hud {
    background: var(--bg-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: calc(100vw - 40px);
    margin: 10px 20px 20px;
    padding: 20px;
    white-space: pre-wrap;
    text-align: left;
    z-index: 11;
    opacity: 1;
    transition: width var(--ui-scale-transition), max-width var(--ui-scale-transition), margin var(--ui-scale-transition), padding var(--ui-scale-transition), font-size var(--ui-scale-transition);
}

#hud[data-mode="artwork"] {
    background: transparent;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px;
    transition: padding var(--ui-scale-transition);
}

#hud[data-mode="artwork"] .hud-name {
    display: block;
    max-width: min(90vw, 20ch);
    font-size: 100px;
    line-height: 0.9;
    font-weight: 700;
    text-transform: lowercase;
    transition: max-width var(--ui-scale-transition), font-size var(--ui-scale-transition);
}

#hud[data-mode="artwork"] .hud-description {
    position: fixed;
    right: 40px;
    bottom: 40px;
    max-width: min(50vw, 560px);
    line-height: 1.4;
    text-align: right;
    transition: right var(--ui-scale-transition), bottom var(--ui-scale-transition), max-width var(--ui-scale-transition), font-size var(--ui-scale-transition);
}

#hud .hud-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 80px));
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 28px;
    background: var(--bg-color);
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.22s ease, width var(--ui-scale-transition), max-height var(--ui-scale-transition), padding var(--ui-scale-transition);
}

#hud .hud-window.is-closing {
    opacity: 0;
}

#hud .hud-window-text {
    font-size: 14px;
    line-height: 1.5;
    font-style: normal;
    white-space: pre-wrap;
    transition: font-size var(--ui-scale-transition);
}

#hud .hud-window-name {
    display: block;
    max-width: 100%;
    font-size: min(100px, 22vw);
    line-height: 0.9;
    font-weight: 700;
    font-style: italic;
    margin-bottom: 10px;
}

#hud.hidden {
    opacity: 0;
    transition: opacity 0.4s ease-in;
}

@keyframes hudBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

@keyframes hudFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#hud[data-hint="1"]:not([data-details="1"]) {
    animation: hudFadeIn 0.4s ease-out forwards, hudBob 0.7s ease-in-out infinite;
    width: fit-content;
    max-width: fit-content;
    top: auto;
    bottom: 20px;
    transition: opacity 0.4s ease-out;
}

#hud[data-hint="1"]:not([data-details="1"]).hidden {
    opacity: 0;
    animation: hudBob 0.7s ease-in-out infinite;
}


/* Mobile responsive */
@media (max-width: 600px) {
    body::before {
        border: 50px solid var(--bg-color);
    }

    #lang-toggle {
        top: 20px;
        left: 20px;
    }

    #hud[data-mode="artwork"] {
        padding: 20px;
    }

    #hud[data-mode="artwork"] .hud-name {
        font-size: 56px;
        max-width: calc(100vw - 40px);
    }

    #hud[data-mode="artwork"] .hud-description {
        right: 20px;
        bottom: 20px;
        max-width: calc(100vw - 40px);
        font-size: 14px;
    }

    #hud .hud-window {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 20px;
    }

    #hud .hud-window-text {
        font-size: 14px;
    }

    #hud .hud-window,
    #hud .hud-window-text,
    #hud .hud-window-name {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    #hud .hud-window-text,
    #hud .hud-window-name {
        pointer-events: none;
    }

    #hud .hud-window .hud-social-links,
    #hud .hud-window .hud-social-links * {
        pointer-events: auto;
    }

    #list {
        top: 50%;
        transform: translate(-50%, -50%) scale(1.05);
        transform-origin: center;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        scrollbar-width: none;
    }

    #list::-webkit-scrollbar {
        display: none;
    }

    #list .list-line[data-alt] {
        font-size: 0;
    }

    #list .list-line[data-alt]::before {
        content: attr(data-alt);
        font-size: 14px;
    }

    #list a.list-line[href]:hover::before {
        text-decoration: underline;
    }
}

/* List styles */

#list {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 40px);
    padding: 20px;
    z-index: 11;
    font-size: 14px;
    transition: top var(--ui-scale-transition), max-width var(--ui-scale-transition), max-height var(--ui-scale-transition), padding var(--ui-scale-transition), font-size var(--ui-scale-transition);
}

#list-logo {
    width: 200px;
    height: auto;
    margin-bottom: 16px;
    image-rendering: pixelated;
    -webkit-user-drag: none;
    user-select: none;
    transition: width var(--ui-scale-transition), margin-bottom var(--ui-scale-transition);
}

.page-indicator {
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 14px;
    font-style: italic;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-align: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#page-indicator-index {
    margin-bottom: 8px;
}

#game-logo-wrap {
    position: fixed;
    right: 40px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 14;
    transition: transform 0.4s ease;
}

#page-indicator-game {
    pointer-events: none;
}

#game-logo {
    position: static;
    width: 170px;
    height: auto;
    image-rendering: pixelated;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.4s ease, width var(--ui-scale-transition);
}

#game-logo.visible {
    opacity: 1;
    pointer-events: auto;
}

#page-indicator-game.visible {
    opacity: 0;
}

#list a[aria-label="Open portfolio"],
#list a.list-logo-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: transform 0.4s ease;
}

#list a[aria-label="Open portfolio"]:hover,
#list a[aria-label="Open portfolio"]:focus-visible,
#game-logo-wrap:hover,
#game-logo-wrap:focus-within {
    transform: translateY(-5px);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='3' cy='3' r='3' fill='%233C2828'/%3E%3C/svg%3E") 3 3, pointer;
}

#list a[aria-label="Open portfolio"]:hover #page-indicator-index,
#list a[aria-label="Open portfolio"]:focus-visible #page-indicator-index {
    opacity: 1;
}

#game-logo-wrap:hover #page-indicator-game.visible,
#game-logo-wrap:focus-within #page-indicator-game.visible {
    opacity: 1;
}

#intro-text-window {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    background: var(--bg-color);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease;
}

#intro-text-window.active {
    visibility: visible;
}

#intro-text-window.active.is-visible {
    opacity: 1;
}

#intro-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: var(--primary-color);
    opacity: 0;
}

#intro-controls.is-animating {
    animation: introTextWindowFade var(--intro-step-duration, 5s) ease-in-out both;
}

#intro-controls-hint {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    text-transform: lowercase;
    max-width: calc(100vw - 160px);
    order: 2;
}

#intro-controls-arrows {
    position: relative;
    width: 320px;
    height: 240px;
    order: 1;
}

#intro-controls .intro-control-arrow {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 100px;
    font-weight: 700;
    line-height: 1;
    width: 1em;
    height: 1em;
    transform-origin: center;
}

#intro-controls .intro-control-arrow.top {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: introControlArrowTop 1s ease-in-out infinite;
}

#intro-controls .intro-control-arrow.right {
    top: 72%;
    right: 6%;
    transform: translateY(-50%) rotate(90deg);
    animation: introControlArrowRight 1s ease-in-out infinite;
}

#intro-controls .intro-control-arrow.bottom {
    top: 72%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
    animation: introControlArrowBottom 1s ease-in-out infinite;
}

#intro-controls .intro-control-arrow.left {
    top: 72%;
    left: 6%;
    transform: translateY(-50%) rotate(-90deg);
    animation: introControlArrowLeft 1s ease-in-out infinite;
}

#intro-text-window[data-controls="mobile"] #intro-controls .intro-control-arrow {
    opacity: 0;
    animation: none;
}

#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls .intro-control-arrow.left,
#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls .intro-control-arrow.right {
    opacity: 1;
    top: 50%;
}

#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls {
    gap: 8px;
}

#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls-arrows {
    height: 120px;
}

#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls .intro-control-arrow.left {
    left: 18%;
    right: auto;
    transform: translate(0, -50%) rotate(-90deg);
    animation: introMobileTurnLeft 1s ease-in-out infinite;
}

#intro-text-window[data-controls="mobile"][data-step="turn"] #intro-controls .intro-control-arrow.right {
    right: 18%;
    left: auto;
    transform: translate(0, -50%) rotate(90deg);
    animation: introMobileTurnRight 1s ease-in-out infinite;
}

#intro-text-window[data-controls="mobile"][data-step="pinch"] #intro-controls .intro-control-arrow.top,
#intro-text-window[data-controls="mobile"][data-step="pinch"] #intro-controls .intro-control-arrow.bottom {
    opacity: 1;
}

#intro-text-window[data-controls="mobile"][data-step="pinch"] #intro-controls .intro-control-arrow.top {
    top: 16%;
    right: 18%;
    left: auto;
    bottom: auto;
    transform: translate(0, 0) rotate(45deg);
    animation: introMobilePinchTop 1s ease-in-out infinite;
}

#intro-text-window[data-controls="mobile"][data-step="pinch"] #intro-controls .intro-control-arrow.bottom {
    top: 70%;
    left: 18%;
    right: auto;
    bottom: auto;
    transform: translate(0, 0) rotate(-135deg);
    animation: introMobilePinchBottom 1s ease-in-out infinite;
}

@keyframes introTextWindowFade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes introControlArrowTop {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes introControlArrowRight {
    0%, 100% { transform: translateY(-50%) rotate(90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(90deg) translateY(-10px); }
}

@keyframes introControlArrowBottom {
    0%, 100% { transform: translate(-50%, -50%) rotate(180deg) translateY(0); }
    50% { transform: translate(-50%, -50%) rotate(180deg) translateY(-10px); }
}

@keyframes introControlArrowLeft {
    0%, 100% { transform: translateY(-50%) rotate(-90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(-90deg) translateY(-10px); }
}

@keyframes introMobileTurnLeft {
    0%, 100% { transform: translate(0, -50%) rotate(-90deg); }
    50% { transform: translate(-10px, -50%) rotate(-90deg); }
}

@keyframes introMobileTurnRight {
    0%, 100% { transform: translate(0, -50%) rotate(90deg); }
    50% { transform: translate(10px, -50%) rotate(90deg); }
}

@keyframes introMobilePinchTop {
    0%, 100% { transform: translate(0, 0) rotate(45deg); }
    50% { transform: translate(-10px, 10px) rotate(45deg); }
}

@keyframes introMobilePinchBottom {
    0%, 100% { transform: translate(0, 0) rotate(-135deg); }
    50% { transform: translate(10px, -10px) rotate(-135deg); }
}

#idle-arrows {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 13;
    display: none;
}

#idle-arrows.intro-sync-fade {
    animation: idleArrowsIntroFade 5s ease-in-out both;
}

@media (pointer: coarse) and (hover: none) {
    #idle-arrows {
        display: block;
    }
}

#idle-arrows .idle-arrow {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 100px;
    font-weight: 700;
    line-height: 1;
    width: 1em;
    height: 1em;
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

#idle-arrows.visible .idle-arrow {
    opacity: 1;
}

#idle-arrows .idle-arrow.top {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: idleArrowTop 1s ease-in-out infinite;
}

#idle-arrows .idle-arrow.right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%) rotate(90deg);
    animation: idleArrowRight 1s ease-in-out infinite;
}

#idle-arrows .idle-arrow.bottom {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    animation: idleArrowBottom 1s ease-in-out infinite;
}

#idle-arrows .idle-arrow.left {
    top: 50%;
    left: 10px;
    transform: translateY(-50%) rotate(-90deg);
    animation: idleArrowLeft 1s ease-in-out infinite;
}

#click-prompt {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 13;
    opacity: 0;
    transition: opacity 0.35s ease;
}

#click-prompt .click-arrow {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-family: var(--font-family);
    font-size: 100px;
    font-weight: 700;
    line-height: 1;
    width: 1em;
    height: 1em;
    transform-origin: center;
    opacity: 0;
    transition: opacity 0.22s ease;
}

#click-prompt.visible .click-arrow {
    opacity: 1;
}

#click-prompt.visible {
    opacity: 1;
}

#click-prompt.fading-out {
    opacity: 0;
}

#click-prompt .click-arrow.top {
    top: 10px;
    left: 50%;
    transform: translateX(-50%) rotate(180deg);
    animation: clickArrowTop 1s ease-in-out infinite;
}

#click-prompt .click-arrow.right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%) rotate(-90deg);
    animation: clickArrowRight 1s ease-in-out infinite;
}

#click-prompt .click-arrow.bottom {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: clickArrowBottom 1s ease-in-out infinite;
}

#click-prompt .click-arrow.left {
    top: 50%;
    left: 10px;
    transform: translateY(-50%) rotate(90deg);
    animation: clickArrowLeft 1s ease-in-out infinite;
}

@keyframes clickArrowTop {
    0%, 100% { transform: translateX(-50%) rotate(180deg) translateY(0); }
    50% { transform: translateX(-50%) rotate(180deg) translateY(10px); }
}

@keyframes clickArrowRight {
    0%, 100% { transform: translateY(-50%) rotate(-90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(-90deg) translateY(10px); }
}

@keyframes clickArrowBottom {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes clickArrowLeft {
    0%, 100% { transform: translateY(-50%) rotate(90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(90deg) translateY(10px); }
}

@keyframes idleArrowTop {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes idleArrowRight {
    0%, 100% { transform: translateY(-50%) rotate(90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(90deg) translateY(-10px); }
}

@keyframes idleArrowBottom {
    0%, 100% { transform: translateX(-50%) rotate(180deg) translateY(0); }
    50% { transform: translateX(-50%) rotate(180deg) translateY(-10px); }
}

@keyframes idleArrowLeft {
    0%, 100% { transform: translateY(-50%) rotate(-90deg) translateY(0); }
    50% { transform: translateY(-50%) rotate(-90deg) translateY(-10px); }
}

@keyframes idleArrowsIntroFade {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

#list .list-line {
    display: block;
    align-self: stretch;
    margin-top: 24px;
    white-space: nowrap;
    transform: translateY(0);
    transition: transform 0.4s ease, margin-top var(--ui-scale-transition);
    will-change: transform;
    cursor: inherit;
    color: inherit;
    text-decoration: none;
}

#list a.list-line:not([href]) {
    cursor: inherit;
}

#list a.list-line[href] {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='3' cy='3' r='3' fill='%233C2828'/%3E%3C/svg%3E") 3 3, pointer;
}

#list a.list-line[href]:hover {
    transform: translateY(-5px);
    text-decoration: underline;
}

#list .about-text {
    width: 400px;
    align-self: center;
    white-space: normal;
}

#list .about-head {
    width: 400px;
    font-size: 50px;
    align-self: center;
    white-space: normal;
}

#social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    margin-top: 40px;
    transition: gap var(--ui-scale-transition), margin-top var(--ui-scale-transition);
}

#list > a[aria-label="Open portfolio"] + #social-links {
    margin-top: 20px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 36px;
    color: var(--primary-color);
    text-decoration: none;
    transition: transform 0.4s ease, min-width var(--ui-scale-transition), min-height var(--ui-scale-transition);
}

.social-link img {
    width: 17px;
    height: 17px;
    display: block;
    transition: width var(--ui-scale-transition), height var(--ui-scale-transition);
}

.social-link:hover {
    transform: translateY(-5px);
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='3' cy='3' r='3' fill='%233C2828'/%3E%3C/svg%3E") 3 3, pointer;
}

@media (max-width: 980px) and (orientation: portrait) {
    #click-cursor-label::before,
    #click-cursor-label::after {
        content: '↓';
    }

    #click-prompt .click-arrow.left,
    #click-prompt .click-arrow.right {
        display: none;
    }

    #click-prompt .click-arrow {
        font-size: 60px;
    }

    #click-cursor-label {
        top: 35%;
        left: 50%;
        transform: translate(-50%, calc(-100% - 14px));
    }

    body.click-hint-cursor #click-cursor-label {
        animation: clickLabelBob 1s ease-in-out infinite;
    }

    #intro-controls-hint {
        font-size: 12px;
        max-width: calc(100vw - 48px);
    }

    #intro-controls-arrows {
        width: 240px;
        height: 190px;
    }

    #intro-controls .intro-control-arrow {
        font-size: 60px;
    }

    #idle-arrows .idle-arrow {
        font-size: 60px;
    }

    body::before {
        border: 30px solid var(--bg-color);
    }

    #lang-toggle {
        top: 12px;
        left: 12px;
        padding: 5px 6px;
        font-size: 9px;
    }

    #hud {
        font-size: 10px;
        max-width: calc(100vw - 24px);
        margin: 6px 12px 12px;
        padding: 12px;
    }

    #hud[data-mode="artwork"] {
        padding: 12px;
    }

    #hud[data-mode="artwork"] .hud-name {
        font-size: 40px;
        max-width: calc(100vw - 24px);
    }

    #hud[data-mode="artwork"] .hud-description {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
        font-size: 12px;
    }

    #hud .hud-window {
        width: calc((100vw - 14px) * 0.7);
        max-height: calc(100vh - 14px);
        padding: 12px;
    }

    #hud .hud-window-text {
        font-size: 12px;
    }

    #hud .hud-window-name {
        font-size: min(38px, 20vw);
        margin-bottom: 6px;
    }

    #list {
        top: 50%;
        transform: translate(-50%, -50%) scale(1.05);
        transform-origin: center;
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 12px;
        font-size: 12px;
    }

    #list .list-line[data-alt]::before {
        font-size: 12px;
    }

    #list .about-text {
        width: 70vw;
    }

    #list .about-head {
        width: 70vw;
    }

    #page-indicator-index {
        margin-bottom: 6px;
    }

    #list .list-line {
        margin-top: 14px;
    }

    #game-logo-wrap {
        right: 24px;
        bottom: 24px;
        gap: 4px;
    }

    #page-indicator-game {
        font-size: 12px;
    }

    #game-logo {
        width: 102px;
    }

    #social-links {
        gap: 7px 11px;
        margin-top: 24px;
    }

}

@media (orientation: landscape) and (pointer: coarse) and (max-height: 600px) {
    #click-cursor-label::before,
    #click-cursor-label::after {
        content: '↓';
    }

    #click-prompt .click-arrow.left,
    #click-prompt .click-arrow.right {
        display: none;
    }

    #click-prompt .click-arrow {
        font-size: 60px;
    }

    #click-cursor-label {
        top: 35%;
        left: 50%;
        transform: translate(-50%, calc(-100% - 14px));
    }

    body.click-hint-cursor #click-cursor-label {
        animation: clickLabelBob 1s ease-in-out infinite;
    }

    #intro-controls-hint {
        font-size: 12px;
        max-width: calc(100vw - 80px);
    }

    #intro-controls-arrows {
        width: 220px;
        height: 170px;
    }

    #intro-controls .intro-control-arrow {
        font-size: 60px;
    }

    #idle-arrows .idle-arrow {
        font-size: 60px;
    }

    body::before {
        border: 30px solid var(--bg-color);
    }

    #lang-toggle {
        top: 12px;
        left: 12px;
        padding: 5px 6px;
        font-size: 9px;
    }

    #hud {
        font-size: 10px;
        max-width: calc(100vw - 24px);
        margin: 6px 12px 12px;
        padding: 12px;
    }

    #hud[data-mode="artwork"] {
        padding: 12px;
    }

    #hud[data-mode="artwork"] .hud-name {
        font-size: 40px;
        max-width: min(75vw, 20ch);
    }

    #hud[data-mode="artwork"] .hud-description {
        right: 12px;
        bottom: 12px;
        max-width: min(45vw, 336px);
        font-size: 12px;
    }

    #hud .hud-window {
        width: min(492px, calc(100vw - 14px));
        max-height: calc(100vh - 14px);
        padding: 12px;
    }

    #hud .hud-window-text {
        font-size: 12px;
    }

    #hud .hud-window-name {
        font-size: min(38px, 16vw);
        margin-bottom: 6px;
    }

    #game-logo {
        width: 102px;
    }

    #game-logo-wrap {
        right: 24px;
        bottom: 24px;
        gap: 4px;
    }

    #page-indicator-game {
        font-size: 12px;
    }

    #social-links {
        gap: 7px 11px;
        margin-top: 24px;
    }

    .social-link {
        min-width: 14.4px;
        min-height: 21.6px;
    }

    .social-link img {
        width: 9.6px;
        height: 9.6px;
    }
}

#hud .hud-social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px 14px;
    margin-top: 20px;
}

#hud .hud-social-links .social-link {
    min-width: 24px;
    min-height: 24px;
}

#hud .hud-social-links .social-link img {
    width: 16px;
    height: 16px;
}