@import url("../fonts/Gilroy/stylesheet.css");
@import url("../fonts/Helios/stylesheet.css");

:root {
    --primary: #156cff;
    --ink: #050505;
    --paper: #f2f8fe;
    --window: rgba(255, 255, 255, 0.92);
    --pink: #ff91c8;
    --mint: #66e5c4;
    --yellow: #ffe46b;
    --shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
    line-height: 140%;
}

[x-cloak] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    overflow: hidden;
    font-family: "Gilroy", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    selection-color: white;
    selection-background-color: var(--primary);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    user-select: none;
    pointer-events: none;
}

.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: var(--paper);
    color: var(--ink);
}

.boot-noise,
.desktop-noise {
    position: absolute;
    inset: 0;
    background-image: url("../images/noise.gif");
    opacity: 0.16;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.boot-card {
    position: relative;
    width: min(42rem, 100%);
    min-height: 30rem;
    overflow: hidden;
    border: 0.25rem solid var(--ink);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 1rem 1rem 0 var(--ink);
    padding: 2rem;
}

.boot-copy {
    position: relative;
    z-index: 2;
    margin-top: 9rem;
}

.boot-kicker,
.eyebrow {
    margin: 0 0 0.5rem;
    color: var(--primary);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.boot-copy h1,
.birthday-view h2,
.patch-view h2,
.game-head h2,
.media-view h2 {
    margin: 0;
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
    line-height: 100%;
    letter-spacing: 0;
}

.boot-copy h1 {
    max-width: 11ch;
    font-size: clamp(3rem, 9vw, 6rem);
}

.boot-subtitle {
    margin: 1rem 0 0;
    font-size: 1.3rem;
    font-weight: 800;
}

.boot-progress {
    position: relative;
    z-index: 2;
    height: 1.2rem;
    margin-top: 2rem;
    border: 0.1875rem solid var(--ink);
    background: white;
    overflow: hidden;
}

.boot-progress span {
    display: block;
    width: 0;
    height: 100%;
    background:
        linear-gradient(90deg, var(--primary), var(--mint), var(--pink));
    transition: width 0.2s ease;
}

.boot-terminal {
    position: relative;
    z-index: 2;
    min-height: 5rem;
    margin-top: 1.5rem;
    border: 0.1875rem solid var(--ink);
    background: var(--ink);
    color: #dcfff7;
    padding: 0.8rem 1rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.86rem;
}

.boot-terminal p {
    margin: 0 0 0.25rem;
}

.containerLoader {
    position: absolute;
    top: 5rem;
    left: 50%;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 2000px;
    transform: rotateZ(0) rotateX(-30deg) rotateY(-45deg);
    animation: AnimatecontainerLoader 3s infinite;
}

.wrapperLoader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    transform: translate3d(0em, 3em, 1.5em);
}

.wrapperLoader:last-child {
    transform: rotateY(-90deg) rotateX(90deg) translate3d(0, 3em, 1.5em);
}

.wrapperLoader:first-child {
    transform: rotateZ(-90deg) rotateX(-90deg) translate3d(0, 3em, 1.5em);
}

.wrapperLoader:nth-child(1) .cubeLoader {
    background-color: #0577b7;
}

.wrapperLoader:nth-child(1) .cubeLoader:before {
    background-color: #45bcff;
}

.wrapperLoader:nth-child(1) .cubeLoader:after {
    background-color: #15abff;
}

.wrapperLoader:nth-child(2) .cubeLoader {
    background-color: #000;
}

.wrapperLoader:nth-child(2) .cubeLoader:before {
    background-color: #2f2f2f;
}

.wrapperLoader:nth-child(2) .cubeLoader:after {
    background-color: #2d2d2d;
}

.wrapperLoader:nth-child(3) .cubeLoader {
    background-color: #1bebfd;
}

.wrapperLoader:nth-child(3) .cubeLoader:before {
    background-color: #21bfcd;
}

.wrapperLoader:nth-child(3) .cubeLoader:after {
    background-color: #0ca4b1;
}

.cubeLoader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3em;
    height: 3em;
    transform-style: preserve-3d;
    transform: translate3d(-1.5em, -3em, 0) scaleY(0.01);
    animation: AnimatecubeLoader 3s infinite;
}

.cubeLoader:before,
.cubeLoader:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
}

.cubeLoader:before {
    left: 100%;
    bottom: 0;
    transform: rotateY(90deg);
    transform-origin: 0 50%;
}

.cubeLoader:after {
    left: 0;
    bottom: 100%;
    transform: rotateX(90deg);
    transform-origin: 0 100%;
}

@keyframes AnimatecontainerLoader {
    100% {
        transform: rotateZ(360deg) rotateX(-30deg) rotateY(-45deg);
    }
}

@keyframes AnimatecubeLoader {
    12.5% {
        transform: translate3d(-50%, -50%, 0) scaleY(1);
    }
    25% {
        transform: translate3d(-50%, -50%, 0) scaleZ(2);
    }
    37.5% {
        transform: translate3d(-50%, -50%, 0) scaleZ(1);
    }
    50% {
        transform: translate3d(0, -50%, 0) scaleX(2);
    }
    62.5% {
        transform: translate3d(-50%, -50%, 0) scaleX(1);
    }
    75% {
        transform: translate3d(-50%, 0, 0) scaleY(2);
    }
    87.5%,
    100% {
        transform: translate3d(-1.5em, -3em, 0) scaleY(0.01);
    }
}

.desktop-shell {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background: #b6d5f6;
}

.wallpaper {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 145, 200, 0.18)),
        url("../images/wallpaper.jpeg") center / cover no-repeat;
    transform: scale(1.02);
}

.rain-layer {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(110deg, transparent 0 48%, rgba(255, 255, 255, 0.65) 49%, transparent 51%),
        linear-gradient(110deg, transparent 0 48%, rgba(21, 108, 255, 0.38) 49%, transparent 51%);
    background-size: 7rem 7rem, 11rem 11rem;
    animation: rainShift 9s linear infinite;
    pointer-events: none;
}

@keyframes rainShift {
    to {
        background-position: -11rem 18rem, -15rem 22rem;
    }
}

.top-widget {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.5rem;
    max-width: min(32rem, calc(100vw - 2rem));
    border: 0.1875rem solid var(--ink);
    background: rgba(255, 255, 255, 0.84);
    padding: 0.45rem 0.75rem;
    box-shadow: 0.35rem 0.35rem 0 var(--ink);
    font-weight: 900;
}

.top-widget b {
    color: var(--primary);
}

.system-dot {
    width: 0.75rem;
    height: 0.75rem;
    border: 0.125rem solid var(--ink);
    border-radius: 999px;
    background: var(--mint);
    box-shadow: 0 0 0 0.25rem rgba(102, 229, 196, 0.3);
}

.desktop-icons {
    position: absolute;
    top: 1.5rem;
    left: 1.25rem;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, 7rem);
    gap: 0.95rem;
    padding-bottom: 6rem;
}

.desktop-icon {
    width: 7rem;
    min-height: 7.5rem;
    border: 0;
    background: transparent;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    text-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.45);
}

.desktop-icon:hover .icon-frame,
.desktop-icon:focus-visible .icon-frame {
    transform: translateY(-0.25rem);
    box-shadow: 0.45rem 0.45rem 0 var(--ink);
}

.icon-frame {
    width: 4.6rem;
    height: 4.6rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0.1875rem solid var(--ink);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink);
    box-shadow: 0.25rem 0.25rem 0 var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-frame.blue {
    background: var(--primary);
    color: white;
}

.icon-frame.pink {
    background: var(--pink);
}

.icon-frame.yellow {
    background: var(--yellow);
}

.icon-frame.mint {
    background: var(--mint);
}

.icon-frame.black {
    background: var(--ink);
    color: white;
}

.file-glyph {
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
    font-size: 1.2rem;
    line-height: 100%;
}

.icon-label {
    width: 100%;
    padding: 0.18rem 0.25rem;
    border-radius: 0.25rem;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.88rem;
    font-weight: 900;
    word-break: break-word;
}

.app-window {
    position: absolute;
    z-index: 5;
    max-height: var(--window-max-height, calc(100dvh - 6.5rem));
    overflow: hidden;
    border: 0.25rem solid var(--ink);
    background: var(--window);
    box-shadow: var(--shadow);
    backdrop-filter: blur(1rem);
}

.app-window.is-focused {
    box-shadow: 0.7rem 0.7rem 0 var(--ink), var(--shadow);
}

.window-bar {
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 0.1875rem solid var(--ink);
    background: var(--paper);
    padding: 0 0.8rem 0 1rem;
    user-select: none;
    touch-action: none;
}

.window-title {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.6rem;
    font-weight: 900;
}

.window-title span:last-child {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.window-app-dot {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    border: 0.125rem solid var(--ink);
    background: var(--primary);
}

.window-actions {
    display: flex;
    gap: 0.45rem;
}

.window-btn {
    position: relative;
    width: 1.8rem;
    height: 1.8rem;
    border: 0.15625rem solid var(--ink);
    background: white;
}

.window-btn.minimize:before {
    content: "";
    position: absolute;
    left: 0.38rem;
    right: 0.38rem;
    bottom: 0.45rem;
    height: 0.1875rem;
    background: var(--ink);
}

.window-btn.close {
    background: var(--pink);
}

.window-btn.close:before,
.window-btn.close:after {
    content: "";
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    top: 50%;
    height: 0.1875rem;
    background: var(--ink);
}

.window-btn.close:before {
    transform: rotate(45deg);
}

.window-btn.close:after {
    transform: rotate(-45deg);
}

.window-body {
    max-height: var(--window-body-max, calc(100dvh - 10rem));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.2rem;
}

.window-body::-webkit-scrollbar {
    width: 0.45rem;
}

.window-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--ink);
}

.birthday-view,
.patch-view,
.game-view,
.terminal-view,
.media-view,
.text-file,
.cats-view {
    min-height: 100%;
}

.birthday-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.birthday-view h2 {
    font-size: clamp(2.25rem, 5vw, 4.65rem);
}

.birthday-view p,
.media-view p,
.patch-view p {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.4rem;
}

.status-grid div {
    min-height: 5.5rem;
    border: 0.1875rem solid var(--ink);
    background: white;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-grid span,
.game-score span {
    color: #686868;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.status-grid b,
.game-score b {
    color: var(--primary);
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
    font-size: 1.35rem;
}

.primary-command,
.secondary-command {
    min-height: 3.7rem;
    border: 0.25rem solid var(--ink);
    background: white;
    color: var(--ink);
    padding: 0.75rem 1rem;
    font-weight: 900;
    text-transform: lowercase;
    box-shadow: 0.35rem 0.35rem 0 var(--ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-command:hover,
.secondary-command:hover,
.primary-command:focus-visible,
.secondary-command:focus-visible {
    transform: translate(0.2rem, 0.2rem);
    box-shadow: 0.15rem 0.15rem 0 var(--ink);
}

.primary-command {
    background: var(--yellow);
}

.secondary-command {
    width: 100%;
    background: var(--paper);
}

.accepted-note {
    border-left: 0.3rem solid var(--primary);
    padding-left: 0.8rem;
    color: var(--primary);
}

.text-file {
    border: 0.1875rem solid var(--ink);
    background: #fffef7;
}

.file-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 0.1875rem solid var(--ink);
    background: var(--yellow);
    padding: 0.65rem 0.85rem;
    font-weight: 900;
}

.text-file pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1rem;
    font-weight: 700;
    padding: 1rem;
}

.media-view {
    display: grid;
    grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: center;
    overflow: hidden;
}

.media-view h2 {
    grid-column: 2;
    min-width: 0;
    font-size: clamp(1.9rem, 3.1vw, 3rem);
    overflow-wrap: anywhere;
}

.media-view p {
    grid-column: 2;
}

.pixel-card {
    grid-row: 1 / span 3;
    margin: 0;
    height: min(18rem, calc(var(--window-body-max, 32rem) - 0.5rem));
    overflow: hidden;
    border: 0.25rem solid var(--ink);
    background: white;
    align-self: stretch;
}

.pixel-card img {
    width: 100%;
    height: 100%;
    max-height: min(20rem, calc(var(--window-body-max, 32rem) - 0.5rem));
    aspect-ratio: 1;
    object-fit: contain;
    image-rendering: pixelated;
}

.stamp-row {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stamp-row span {
    border: 0.15625rem solid var(--ink);
    background: var(--mint);
    padding: 0.3rem 0.55rem;
    font-weight: 900;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.media-grid figure {
    margin: 0;
    overflow: hidden;
    border: 0.1875rem solid var(--ink);
    background: white;
}

.media-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.media-grid figcaption {
    min-height: 3.4rem;
    border-top: 0.1875rem solid var(--ink);
    padding: 0.6rem;
    font-weight: 900;
}

.patch-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.patch-view h2,
.game-head h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.compliment-screen {
    min-height: 10rem;
    display: grid;
    place-items: center;
    border: 0.25rem solid var(--ink);
    background:
        linear-gradient(135deg, rgba(255, 145, 200, 0.28), rgba(102, 229, 196, 0.3)),
        white;
    padding: 1.25rem;
}

.compliment-screen p {
    max-width: 26rem;
    text-align: center;
    font-size: clamp(1.35rem, 3vw, 2.4rem);
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
    line-height: 105%;
}

.game-view {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    overflow: hidden;
}

.game-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.game-head > div:first-child {
    min-width: 0;
}

.game-head h2 {
    max-width: 11ch;
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    overflow-wrap: anywhere;
}

.game-score {
    min-width: 5.3rem;
    border: 0.1875rem solid var(--ink);
    background: white;
    padding: 0.5rem;
    text-align: right;
}

.game-status {
    border: 0.1875rem solid var(--ink);
    background: var(--ink);
    color: white;
    padding: 0.5rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    font-weight: 800;
}

.heart-game-field {
    position: relative;
    height: min(20rem, calc(var(--window-body-max, 34rem) - 10.5rem));
    min-height: 14rem;
    overflow: hidden;
    border: 0.1875rem solid var(--ink);
    background:
        linear-gradient(180deg, rgba(255, 145, 200, 0.18), rgba(102, 229, 196, 0.18)),
        rgba(255, 255, 255, 0.82);
    touch-action: none;
    contain: layout paint;
}

.heart-game-field:before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(5, 5, 5, 0.08) 0.0625rem, transparent 0.0625rem),
        linear-gradient(90deg, rgba(5, 5, 5, 0.08) 0.0625rem, transparent 0.0625rem);
    background-size: 2rem 2rem;
    opacity: 0.45;
    pointer-events: none;
}

.heart-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
}

.falling-heart {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    width: var(--heart-size);
    height: var(--heart-size);
    object-fit: contain;
    transform: translate3d(-100vw, -100vh, 0);
    will-change: transform;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.heart-catcher {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    z-index: 3;
    width: 5rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border: 0.1875rem solid var(--ink);
    background: var(--yellow);
    box-shadow: 0.25rem 0.25rem 0 var(--ink);
    transform: translateX(-50%);
    transition: background 0.18s ease, transform 0.18s ease;
    will-change: left, transform;
}

.heart-catcher span {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 900;
}

.heart-catcher.is-catching {
    background: var(--mint);
    transform: translateX(-50%) translateY(-0.2rem) scale(1.04);
}

.heart-catcher.is-missing {
    background: var(--pink);
    animation: catcherShake 0.28s ease;
}

.heart-controls {
    display: grid;
    grid-template-columns: 3.1rem 1fr 3.1rem;
    gap: 0.55rem;
}

.cake-game-view .game-head h2 {
    max-width: 13ch;
}

.cake-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    height: min(18rem, calc(var(--window-body-max, 34rem) - 10.5rem));
    min-height: 12.5rem;
}

.cake-cell {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 0.1875rem solid var(--ink);
    background: rgba(255, 255, 255, 0.88);
    color: rgba(5, 5, 5, 0.34);
    font: 900 0.82rem/1 "Gilroy", sans-serif;
    box-shadow: inset 0 0 0 0.125rem rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.cake-cell img {
    display: block;
    width: min(92%, 9rem);
    height: min(92%, 6.4rem);
    object-fit: contain;
    mix-blend-mode: multiply;
    animation: cakePop 0.18s ease-out;
}

.cake-cell.has-cake {
    background: var(--pink);
    color: var(--ink);
    box-shadow: inset 0 0 0 0.25rem rgba(255, 255, 255, 0.45);
}

.cake-cell.is-hit {
    background: var(--mint);
    transform: translateY(-0.16rem) scale(1.02);
    box-shadow: 0.22rem 0.22rem 0 var(--ink);
}

.cake-cell.is-miss {
    background: #ffd5e9;
    animation: cakeMiss 0.24s ease;
}

.game-actions {
    display: grid;
}

@keyframes catcherShake {
    0%,
    100% {
        transform: translateX(-50%);
    }
    30% {
        transform: translateX(calc(-50% - 0.18rem));
    }
    65% {
        transform: translateX(calc(-50% + 0.18rem));
    }
}

@keyframes cakePop {
    from {
        opacity: 0;
        transform: scale(0.82) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes cakeMiss {
    0%,
    100% {
        transform: translateX(0);
    }
    30% {
        transform: translateX(-0.14rem);
    }
    65% {
        transform: translateX(0.14rem);
    }
}

.game-gift {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(242, 248, 254, 0.94)),
        url("../images/noise.gif");
    padding: 0.8rem;
}

.gift-card {
    width: min(22rem, 100%);
    border: 0.25rem solid var(--ink);
    background: white;
    box-shadow: 0.45rem 0.45rem 0 var(--ink);
    padding: 0.8rem;
    display: grid;
    gap: 0.65rem;
    text-align: center;
}

.gift-card img {
    width: 100%;
    max-height: min(16rem, calc(var(--window-body-max, 32rem) - 11rem));
    object-fit: contain;
}

.heart-prize {
    overflow: hidden;
}

.heart-prize .prize-cat {
    animation: prizeCatSlide 0.75s cubic-bezier(0.18, 0.95, 0.32, 1.2), prizeCatFloat 1.8s ease-in-out 0.75s infinite;
}

.cake-prize {
    overflow: hidden;
}

.cake-prize .prize-bear {
    animation: prizeBearPop 0.7s cubic-bezier(0.18, 0.95, 0.32, 1.2), prizeCatFloat 1.9s ease-in-out 0.7s infinite;
}

@keyframes prizeCatSlide {
    0% {
        opacity: 0;
        transform: translateX(-35%) rotate(-8deg) scale(0.86);
    }
    70% {
        opacity: 1;
        transform: translateX(4%) rotate(3deg) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg) scale(1);
    }
}

@keyframes prizeBearPop {
    0% {
        opacity: 0;
        transform: translateY(20%) scale(0.78) rotate(-5deg);
    }
    70% {
        opacity: 1;
        transform: translateY(-4%) scale(1.04) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes prizeCatFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-0.35rem) rotate(1.5deg);
    }
}

.gift-card h3 {
    margin: 0;
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    line-height: 100%;
}

.gift-card span {
    display: block;
    margin-top: 0.35rem;
    font-weight: 800;
}

.terminal-view {
    border: 0.1875rem solid var(--ink);
    background: #050505;
    color: #dfffee;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.terminal-lines {
    height: 18rem;
    overflow: auto;
    padding: 0.9rem;
}

.terminal-lines p {
    margin: 0 0 0.35rem;
}

.terminal-lines .input {
    color: var(--yellow);
}

.terminal-lines .error {
    color: #ff91c8;
}

.terminal-input {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    border-top: 0.1875rem solid #313131;
    padding: 0.6rem;
}

.terminal-input input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
}

.terminal-input button {
    border: 0.125rem solid #dfffee;
    background: transparent;
    color: #dfffee;
    padding: 0.25rem 0.55rem;
    font-weight: 900;
}

.toast-stack {
    position: fixed;
    right: 1rem;
    bottom: 5.4rem;
    z-index: 90;
    display: grid;
    gap: 0.6rem;
}

.toast {
    max-width: min(24rem, calc(100vw - 2rem));
    border: 0.1875rem solid var(--ink);
    background: white;
    padding: 0.75rem 0.9rem;
    box-shadow: 0.35rem 0.35rem 0 var(--ink);
    font-weight: 900;
}

.confetti-piece {
    position: fixed;
    top: -1rem;
    z-index: 80;
    width: 0.7rem;
    height: 1rem;
    border: 0.08rem solid rgba(0, 0, 0, 0.45);
    animation: confettiFall 2.7s ease-in forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-2rem) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(110dvh) rotate(520deg);
        opacity: 0;
    }
}

.taskbar {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 60;
    min-height: 4rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    border: 0.25rem solid var(--ink);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0.5rem 0.5rem 0 var(--ink);
    backdrop-filter: blur(0.9rem);
    padding: 0.55rem;
}

.start-button,
.task-app,
.tray {
    min-height: 2.75rem;
    border: 0.1875rem solid var(--ink);
    background: white;
    color: var(--ink);
    font-weight: 900;
}

.start-button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0 0.85rem;
    background: var(--primary);
    color: white;
}

.start-logo {
    width: 1.3rem;
    height: 1.3rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.16rem;
}

.start-logo:before,
.start-logo:after {
    content: "";
}

.start-logo,
.start-logo:before,
.start-logo:after {
    background:
        linear-gradient(90deg, white 0 46%, transparent 46% 54%, white 54% 100%),
        linear-gradient(180deg, white 0 46%, transparent 46% 54%, white 54% 100%);
}

.task-apps {
    display: flex;
    gap: 0.5rem;
    min-width: 0;
    overflow-x: auto;
}

.task-app {
    flex: 0 0 auto;
    min-width: 3.1rem;
    padding: 0 0.75rem;
}

.task-app.is-active {
    background: var(--yellow);
}

.tray {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0 0.75rem;
}

.wifi-icon {
    width: 1.5rem;
    height: 1.5rem;
    background: url("../images/wifi-icon.png") center / contain no-repeat;
}

.battery-icon {
    position: relative;
    width: 1.8rem;
    height: 1rem;
    border: 0.15625rem solid var(--ink);
}

.battery-icon:before {
    content: "";
    position: absolute;
    top: 0.16rem;
    left: 0.16rem;
    bottom: 0.16rem;
    width: 1.1rem;
    background: var(--mint);
}

.battery-icon:after {
    content: "";
    position: absolute;
    right: -0.36rem;
    top: 0.23rem;
    width: 0.25rem;
    height: 0.4rem;
    background: var(--ink);
}

.tray-mode {
    color: var(--primary);
}

.start-menu {
    position: fixed;
    left: 1rem;
    bottom: 5.6rem;
    z-index: 70;
    width: min(22rem, calc(100vw - 2rem));
    border: 0.25rem solid var(--ink);
    background: white;
    box-shadow: 0.5rem 0.5rem 0 var(--ink);
    padding: 0.8rem;
}

.start-menu-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 0.1875rem solid var(--ink);
    padding-bottom: 0.7rem;
    margin-bottom: 0.7rem;
}

.start-menu-head b {
    font-family: "HeliosExtBlackC", "Gilroy", sans-serif;
}

.start-menu-head span {
    color: var(--primary);
    font-weight: 900;
}

.start-menu button {
    width: 100%;
    min-height: 2.8rem;
    border: 0;
    background: white;
    text-align: left;
    padding: 0 0.55rem;
    font-weight: 900;
}

.start-menu button:hover,
.start-menu button:focus-visible {
    background: var(--paper);
}

@media (min-width: 901px) and (max-height: 980px) {
    .boot-card {
        min-height: 26rem;
        padding: 1.45rem;
        box-shadow: 0.65rem 0.65rem 0 var(--ink);
    }

    .containerLoader {
        top: 4.25rem;
        font-size: 0.82rem;
    }

    .boot-copy {
        margin-top: 7.1rem;
    }

    .boot-copy h1 {
        font-size: clamp(2.6rem, 6vw, 4.35rem);
    }

    .boot-subtitle {
        margin-top: 0.65rem;
        font-size: 1.05rem;
    }

    .boot-progress {
        height: 1rem;
        margin-top: 1.15rem;
    }

    .boot-terminal {
        min-height: 4.15rem;
        margin-top: 0.9rem;
        padding: 0.55rem 0.75rem;
        font-size: 0.76rem;
    }

    .top-widget {
        top: 0.65rem;
        min-height: 2.15rem;
        padding: 0.3rem 0.6rem;
        box-shadow: 0.25rem 0.25rem 0 var(--ink);
        font-size: 0.9rem;
    }

    .desktop-icons {
        top: 0.8rem;
        left: 0.8rem;
        grid-template-columns: repeat(2, 5.8rem);
        gap: 0.45rem 0.55rem;
    }

    .desktop-icon {
        width: 5.8rem;
        min-height: 6.1rem;
        gap: 0.3rem;
    }

    .icon-frame {
        width: 3.55rem;
        height: 3.55rem;
        box-shadow: 0.18rem 0.18rem 0 var(--ink);
    }

    .desktop-icon:hover .icon-frame,
    .desktop-icon:focus-visible .icon-frame {
        box-shadow: 0.3rem 0.3rem 0 var(--ink);
    }

    .icon-label {
        font-size: 0.73rem;
    }

    .app-window {
        border-width: 0.1875rem;
    }

    .app-window.is-focused {
        box-shadow: 0.42rem 0.42rem 0 var(--ink), var(--shadow);
    }

    .window-bar {
        height: 2.65rem;
        padding: 0 0.55rem 0 0.75rem;
    }

    .window-app-dot {
        width: 0.78rem;
        height: 0.78rem;
    }

    .window-btn {
        width: 1.45rem;
        height: 1.45rem;
    }

    .window-body {
        padding: 0.75rem;
    }

    .birthday-view,
    .patch-view,
    .game-view {
        gap: 0.65rem;
    }

    .birthday-view h2 {
        font-size: clamp(2rem, 4vw, 3.25rem);
    }

    .patch-view h2,
    .game-head h2,
    .media-view h2 {
        font-size: clamp(1.7rem, 3vw, 2.45rem);
    }

    .birthday-view p,
    .media-view p,
    .patch-view p {
        font-size: 0.95rem;
    }

    .eyebrow {
        margin-bottom: 0.3rem;
        font-size: 0.68rem;
    }

    .status-grid {
        gap: 0.5rem;
        margin-top: 0.1rem;
    }

    .status-grid div {
        min-height: 4.25rem;
        padding: 0.55rem;
    }

    .status-grid span,
    .game-score span {
        font-size: 0.67rem;
    }

    .status-grid b,
    .game-score b {
        font-size: 1.05rem;
    }

    .primary-command,
    .secondary-command {
        min-height: 3rem;
        padding: 0.55rem 0.85rem;
        border-width: 0.1875rem;
        box-shadow: 0.25rem 0.25rem 0 var(--ink);
    }

    .text-file pre {
        padding: 0.75rem;
        font-size: 0.88rem;
    }

    .file-meta {
        padding: 0.5rem 0.65rem;
        font-size: 0.84rem;
    }

    .media-view {
        grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr);
        gap: 0.8rem;
    }

    .stamp-row span {
        padding: 0.24rem 0.45rem;
        font-size: 0.82rem;
    }

    .media-grid {
        gap: 0.55rem;
    }

    .media-grid figcaption {
        min-height: 2.45rem;
        padding: 0.45rem;
        font-size: 0.82rem;
    }

    .compliment-screen {
        min-height: 7.2rem;
        padding: 0.85rem;
    }

    .compliment-screen p {
        font-size: clamp(1.25rem, 2.4vw, 1.85rem);
    }

    .game-head {
        align-items: center;
    }

    .game-score {
        min-width: 5rem;
        padding: 0.45rem;
    }

    .game-status {
        padding: 0.45rem 0.6rem;
        font-size: 0.82rem;
    }

    .heart-game-field {
        height: min(16rem, calc(var(--window-body-max, 30rem) - 9rem));
        min-height: 11.5rem;
    }

    .falling-heart {
        width: calc(var(--heart-size) * 0.86);
        height: calc(var(--heart-size) * 0.86);
    }

    .heart-catcher {
        width: 4.5rem;
        height: 1.9rem;
        bottom: 0.55rem;
        box-shadow: 0.18rem 0.18rem 0 var(--ink);
    }

    .heart-controls {
        grid-template-columns: 2.8rem 1fr 2.8rem;
        gap: 0.42rem;
    }

    .cake-grid {
        gap: 0.42rem;
        height: min(13.5rem, calc(var(--window-body-max, 30rem) - 9.4rem));
        min-height: 10rem;
    }

    .cake-cell {
        font-size: 0.72rem;
        border-width: 0.15625rem;
    }

    .cake-cell img {
        width: min(94%, 7.4rem);
        height: min(94%, 5.2rem);
    }

    .game-gift {
        padding: 0.55rem;
    }

    .gift-card {
        width: min(18rem, 100%);
        gap: 0.45rem;
        padding: 0.6rem;
        box-shadow: 0.3rem 0.3rem 0 var(--ink);
    }

    .gift-card img {
        max-height: 11.5rem;
    }

    .gift-card h3 {
        font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    }

    .gift-card span {
        font-size: 0.84rem;
    }

    .terminal-lines {
        height: 12.5rem;
        padding: 0.65rem;
        font-size: 0.82rem;
    }

    .terminal-input {
        padding: 0.45rem;
    }

    .taskbar {
        left: 0.65rem;
        right: 0.65rem;
        bottom: 0.65rem;
        min-height: 3.35rem;
        gap: 0.5rem;
        border-width: 0.1875rem;
        box-shadow: 0.32rem 0.32rem 0 var(--ink);
        padding: 0.4rem;
    }

    .start-button,
    .task-app,
    .tray {
        min-height: 2.35rem;
        border-width: 0.15625rem;
    }

    .task-app {
        min-width: 2.7rem;
        padding: 0 0.55rem;
    }

    .tray {
        gap: 0.5rem;
        padding: 0 0.55rem;
    }

    .start-menu {
        bottom: 4.6rem;
        box-shadow: 0.35rem 0.35rem 0 var(--ink);
    }

    .toast-stack {
        bottom: 4.75rem;
    }
}

@media (min-width: 901px) and (max-width: 1280px) {
    .desktop-icons {
        grid-template-columns: repeat(2, 5.8rem);
    }

    .top-widget {
        max-width: 25rem;
    }
}

@media (max-width: 900px) {
    body {
        overflow: hidden;
    }

    .desktop-icons {
        top: 4.5rem;
        grid-template-columns: repeat(2, 6.25rem);
        gap: 0.6rem;
    }

    .desktop-icon {
        width: 6.25rem;
        min-height: 6.8rem;
    }

    .icon-frame {
        width: 4rem;
        height: 4rem;
    }

    .app-window {
        left: 0.75rem !important;
        right: 0.75rem !important;
        top: 4.8rem !important;
        width: auto !important;
        max-height: calc(100dvh - 10.7rem);
    }

    .window-body {
        max-height: calc(100dvh - 14rem);
    }

    .top-widget {
        left: 1rem;
        right: 1rem;
        justify-content: center;
    }

    .media-view {
        grid-template-columns: 1fr;
    }

    .media-view h2,
    .media-view p,
    .stamp-row,
    .pixel-card {
        grid-column: auto;
        grid-row: auto;
    }

    .pixel-card {
        max-width: 15rem;
    }

    .media-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .taskbar {
        grid-template-columns: auto 1fr;
    }

    .tray {
        grid-column: 1 / -1;
        justify-content: space-between;
        min-height: 2.35rem;
    }

    .toast-stack {
        bottom: 8rem;
    }
}

@media (max-width: 560px) {
    .boot-card {
        min-height: 31rem;
        padding: 1.15rem;
        box-shadow: 0.5rem 0.5rem 0 var(--ink);
    }

    .boot-copy h1 {
        font-size: 3rem;
    }

    .boot-copy {
        margin-top: 8.5rem;
    }

    .desktop-icons {
        left: 0.75rem;
        grid-template-columns: repeat(2, 5.8rem);
    }

    .desktop-icon {
        width: 5.8rem;
    }

    .icon-label {
        font-size: 0.76rem;
    }

    .window-bar {
        height: 3rem;
        padding-left: 0.7rem;
    }

    .window-body {
        padding: 0.85rem;
    }

    .birthday-view h2 {
        font-size: 2.25rem;
    }

    .game-head {
        flex-direction: column;
    }

    .game-score {
        width: 100%;
        text-align: left;
    }

    .taskbar {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        gap: 0.45rem;
        padding: 0.45rem;
    }

    .start-button span:last-child,
    .tray-mode {
        display: none;
    }
}
