:root {
    --ink: #191a1d;
    --desktop-deep: #18202b;
    --desktop-mid: #273545;
    --desktop-warm: #5b4636;
    --desktop-wallpaper: none;

    --panel: #dedbd1;
    --panel-light: #f5f2ea;
    --panel-mid: #c8c5bc;
    --panel-shadow: #6a6b6d;

    --title: #263747;
    --title-active: #1e3f58;
    --title-warm: #94633f;

    --orange: #d58a45;
    --cream: #f2e4cc;
    --brown: #5d3928;
    --cyan: #6fb8c3;
    --cyan-dark: #36737d;
    --blue: #365a77;

    --screen: #101922;
    --screen-text: #d6e0e4;
    --muted: #60656a;
    --danger: #7d352e;
    --success: #3c6a56;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow: hidden;
    color: var(--ink);
    background: #050608;
    font-family: Tahoma, "MS Sans Serif", Arial, sans-serif;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.hidden {
    display: none !important;
}

/* =========================
   BIOS
   ========================= */

.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #050608;
}

.bios-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 28px 34px 22px;
    color: #d7d7d7;
    background: #050608;
    font: 15px/1.45 "Courier New", Consolas, monospace;
}

.bios-top {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #8d8d8d;
}

.bios-top strong {
    color: white;
    letter-spacing: 0.08em;
}

.bios-top span {
    color: #969696;
}

.bios-output {
    flex: 1;
    margin: 22px 0 12px;
    overflow: hidden;
    color: #d5d5d5;
    white-space: pre-wrap;
}

.bios-output .ok {
    color: #f1f1f1;
}

.bios-output .accent {
    color: #d9b17a;
}

.bios-output .muted {
    color: #929292;
}

.bios-footer {
    display: flex;
    gap: 28px;
    padding-top: 9px;
    border-top: 1px solid #484848;
    color: #8c8c8c;
    font-size: 12px;
}

/* =========================
   SYSTEM LOADER
   ========================= */

.loader-screen {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    color: #e7ebee;
    background:
        radial-gradient(circle at 50% 35%, rgba(111, 184, 195, 0.09), transparent 32%),
        linear-gradient(145deg, #111820, #1c2732 60%, #11161d);
    text-align: center;
}

.loader-logo {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid #607b8b;
    background:
        linear-gradient(145deg, rgba(213, 138, 69, 0.28), rgba(54, 115, 125, 0.22)),
        #1b2731;
    box-shadow:
        inset 0 0 0 5px #18212a,
        0 14px 34px rgba(0, 0, 0, 0.35);
}

.loader-mark {
    color: var(--cream);
    font-family: Georgia, serif;
    font-size: 46px;
    font-weight: bold;
}

.loader-screen h1 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 42px;
    letter-spacing: 0.02em;
}

.loader-screen p {
    margin: 7px 0 27px;
    color: #aeb8bf;
    font-size: 13px;
}

.loader-track {
    width: min(360px, 72vw);
    height: 18px;
    padding: 3px;
    border: 2px inset #6d7377;
    background: #0e1318;
}

.loader-segments {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #638794 0,
        #638794 15px,
        #17222a 15px,
        #17222a 20px
    );
    animation: loader-slide 1.1s linear infinite;
    background-size: 80px 100%;
}

.loader-screen small {
    margin-top: 15px;
    color: #7f8c95;
    font-family: "Courier New", monospace;
}

/* =========================
   LOGIN
   ========================= */

.login-screen {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        linear-gradient(90deg, rgba(213, 138, 69, 0.06), transparent 35%, rgba(111, 184, 195, 0.05)),
        linear-gradient(145deg, #202b36, #151c24);
}

.login-shell {
    width: min(520px, calc(100% - 34px));
    border: 2px solid #111820;
    background: var(--panel);
    box-shadow: 12px 18px 45px rgba(0, 0, 0, 0.43);
}

.login-header {
    display: flex;
    justify-content: space-between;
    padding: 13px 16px;
    color: white;
    background: linear-gradient(90deg, var(--title-active), #385468);
    font-size: 13px;
}

.login-brand {
    font-family: Georgia, serif;
    font-weight: bold;
}

.login-user {
    display: flex;
    width: calc(100% - 42px);
    align-items: center;
    gap: 18px;
    margin: 28px 21px 18px;
    padding: 14px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel-light);
    text-align: left;
    cursor: pointer;
}

.login-user:hover {
    background: white;
}

.login-user:active {
    border-style: inset;
}

.login-user img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border: 2px inset var(--panel);
    background: var(--cream);
}

.login-user-text {
    display: grid;
    gap: 5px;
}

.login-user-text strong {
    font-family: Georgia, serif;
    font-size: 24px;
}

.login-user-text small {
    color: var(--muted);
}

.login-user-text em {
    margin-top: 7px;
    color: var(--cyan-dark);
    font-style: normal;
    font-size: 12px;
}

.login-hint {
    margin: 0 21px 22px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

/* =========================
   DESKTOP
   ========================= */

.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(12, 18, 24, 0.18), rgba(12, 18, 24, 0.24)),
        var(--desktop-wallpaper),
        radial-gradient(circle at 80% 16%, rgba(111, 184, 195, 0.15), transparent 28%),
        radial-gradient(circle at 30% 80%, rgba(213, 138, 69, 0.12), transparent 33%),
        linear-gradient(140deg, var(--desktop-deep), var(--desktop-mid) 62%, #332c2a);
    background-position: center, center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-size: cover, cover, auto, auto, cover;
}

.wallpaper-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.has-custom-wallpaper .wallpaper-grid {
    opacity: 0.065;
}

.wallpaper-grid::after {
    position: absolute;
    right: 6vw;
    bottom: 11vh;
    width: min(420px, 43vw);
    height: min(420px, 43vw);
    border: 1px solid rgba(111, 184, 195, 0.24);
    border-radius: 50%;
    box-shadow:
        0 0 0 32px rgba(111, 184, 195, 0.03),
        0 0 0 64px rgba(213, 138, 69, 0.025);
    content: "";
}

/* Desktop icons */

.desktop-icons {
    position: absolute;
    top: 18px;
    left: 14px;
    z-index: 2;
    display: grid;
    width: 108px;
    gap: 8px;
}

.desktop-icon {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 7px 4px;
    border: 1px solid transparent;
    color: white;
    background: transparent;
    text-decoration: none;
    text-shadow: 1px 1px 2px #000;
    cursor: pointer;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.desktop-icon > span:last-child {
    max-width: 102px;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.icon-tile {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 2px outset #b8bec0;
    color: white;
    background: #344e62;
    box-shadow: 2px 3px 8px rgba(0, 0, 0, 0.28);
    font-family: Georgia, serif;
    font-size: 24px;
    font-weight: bold;
    text-shadow: none;
}

.icon-profile {
    color: var(--cream);
    background: linear-gradient(145deg, var(--orange), var(--brown));
}

.icon-computer {
    color: #eaf7f8;
    background: linear-gradient(145deg, #4b6b7d, #182838);
}

.icon-network {
    background: linear-gradient(145deg, #5e8792, #315664);
}

.icon-lock {
    background: linear-gradient(145deg, #4d6275, #222f3b);
}

.icon-commissions {
    color: #3f2d20;
    background: linear-gradient(145deg, #efd09a, #c88546);
}

.icon-gallery {
    background: linear-gradient(145deg, #6a503f, #3d3028);
}

/* =========================
   WINDOWS
   ========================= */

.os-window {
    position: absolute;
    top: var(--window-y, 12vh);
    left: var(--window-x, 18vw);
    z-index: 10;
    display: none;
    width: var(--window-w, 720px);
    max-width: calc(100vw - 124px);
    max-height: calc(100vh - 82px);
    overflow: hidden;
    border: 2px outset var(--panel);
    background: var(--panel);
    box-shadow: 7px 9px 20px rgba(0, 0, 0, 0.38);
}

.os-window.window-open {
    display: block;
}

.os-window.active-window {
    z-index: 40;
}

.os-window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw;
    height: calc(100vh - 39px);
    max-height: calc(100vh - 39px);
}

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

.titlebar {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    padding: 4px 5px 4px 7px;
    color: #d8dce0;
    background: linear-gradient(90deg, #263747, #3b5366);
    user-select: none;
    touch-action: none;
}

.active-window .titlebar {
    color: white;
    background:
        linear-gradient(90deg, var(--title-active), #36586d 70%, #6d4b36);
}

.titlebar-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.titlebar-title strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-app-icon {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--cream);
    background: rgba(0, 0, 0, 0.2);
    font-family: Georgia, serif;
    font-size: 12px;
    font-weight: bold;
}

.window-buttons {
    display: flex;
    gap: 3px;
}

.window-buttons button {
    width: 25px;
    height: 23px;
    padding: 0;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel);
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}

.window-buttons button:active {
    border-style: inset;
}

.menu-strip {
    display: flex;
    gap: 18px;
    padding: 5px 8px;
    border-bottom: 1px solid #9c9b95;
    color: #303235;
    background: var(--panel);
    font-size: 12px;
}

.window-body {
    max-height: calc(100vh - 160px);
    overflow: auto;
    padding: 17px;
    background: var(--panel);
}

.maximized .window-body {
    max-height: calc(100vh - 112px);
}

/* Profile */

.profile-layout {
    display: grid;
    grid-template-columns: 196px 1fr;
    gap: 18px;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-frame {
    padding: 7px;
    border: 2px inset var(--panel);
    background: var(--panel-light);
}

.avatar-frame img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid #777;
}

.profile-status {
    padding: 9px;
    border: 1px solid #a2a098;
    background: var(--panel-light);
    font-size: 11px;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--success);
}

.profile-main {
    min-width: 0;
}

.profile-heading {
    display: grid;
    grid-template-columns: 1fr 188px;
    gap: 17px;
    align-items: start;
}

.system-kicker {
    margin: 0 0 7px;
    color: var(--cyan-dark);
    font: bold 11px/1.3 "Courier New", monospace;
    letter-spacing: 0.06em;
}

.profile-main h1 {
    margin: 0 0 10px;
    color: #273543;
    font-family: Georgia, serif;
    font-size: clamp(28px, 4vw, 43px);
}

.profile-main h1 span {
    color: #9b5e32;
}

.lead {
    margin: 0;
    color: #4f5458;
    line-height: 1.55;
}

/* CSS synth mascot */

.synth-card {
    display: grid;
    min-height: 174px;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 13px;
    border: 2px inset var(--panel);
    background:
        linear-gradient(rgba(111, 184, 195, 0.05), rgba(213, 138, 69, 0.07)),
        #202b35;
    color: #e7ecee;
    text-align: center;
}

.synth-card strong {
    font-family: Georgia, serif;
}

.synth-card small {
    color: #92a4ac;
    font: 9px "Courier New", monospace;
}

.synth-head {
    position: relative;
    width: 112px;
    height: 88px;
}

.synth-visor {
    position: absolute;
    inset: 25px 7px 5px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    border: 2px solid #5d909b;
    border-radius: 42% 42% 48% 48%;
    background: #0d141b;
    box-shadow: inset 0 0 15px rgba(111, 184, 195, 0.14);
}

.synth-visor i {
    width: 27px;
    height: 8px;
    border-radius: 50%;
    background: #8ec7ce;
    box-shadow: 0 0 8px rgba(142, 199, 206, 0.58);
    transform: rotate(-5deg);
}

.synth-visor i:last-child {
    transform: rotate(5deg);
}

.synth-crest {
    position: absolute;
    top: 1px;
    width: 23px;
    height: 45px;
    border: 2px solid #b77642;
    border-radius: 55% 55% 15% 15%;
    background: linear-gradient(#e2a461, #684432);
}

.synth-crest.left {
    left: 20px;
    transform: rotate(-13deg);
}

.synth-crest.right {
    right: 20px;
    transform: rotate(13deg);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 17px 0;
}

.skill-chips span {
    padding: 5px 8px;
    border: 1px solid #9d9c95;
    background: var(--panel-light);
    color: #4b5054;
    font-size: 11px;
}

.profile-panels {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 12px;
}

.info-panel {
    padding: 13px;
    border: 2px inset var(--panel);
    background: #f0eee7;
}

.info-panel h2 {
    margin: 0 0 8px;
    color: #354958;
    font-family: Georgia, serif;
    font-size: 17px;
}

.info-panel p {
    margin: 0;
    color: #50555a;
    font-size: 13px;
    line-height: 1.55;
}

.quick-actions {
    display: grid;
    gap: 7px;
}

.profile-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #aaa9a2;
    color: #686d70;
    font: 10px "Courier New", monospace;
}

/* Classic controls */

.classic-button {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel);
    text-decoration: none;
    cursor: pointer;
}

.classic-button:hover {
    background: var(--panel-light);
}

.classic-button:active {
    border-style: inset;
}

.wide-button {
    width: 100%;
}

/* Socials */

.address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    padding: 6px;
    border: 2px inset var(--panel);
    background: white;
    font-size: 11px;
}

.address-bar code {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.social-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel-light);
    text-decoration: none;
}

.social-grid a:hover {
    background: white;
}

.social-grid a:active {
    border-style: inset;
}

.social-grid b {
    color: #324a5c;
}

.social-grid small {
    color: #777b7e;
}

.contact-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px;
    border: 2px inset var(--panel);
    background: #efede6;
}

.contact-box strong,
.contact-box code {
    display: block;
}

.contact-box code {
    margin-top: 4px;
    color: var(--cyan-dark);
}

.small-status {
    min-height: 16px;
    margin: 8px 0 0;
    color: var(--success);
    font-size: 11px;
}

/* =========================
   ZERCRYPT
   ========================= */

.crypt-banner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 13px;
    border: 2px inset var(--panel);
    color: #e8ecee;
    background:
        linear-gradient(90deg, #1a2732, #2f4351 68%, #5c4434);
}

.crypt-banner h2 {
    margin: 3px 0 5px;
    font-family: Georgia, serif;
    font-size: 24px;
}

.crypt-banner p:last-child {
    margin: 0;
    color: #b4c0c6;
    font-size: 12px;
}

.security-badge {
    align-self: start;
    padding: 5px 7px;
    border: 1px solid #91adb4;
    color: #cbe4e7;
    background: rgba(111, 184, 195, 0.11);
    font: 10px "Courier New", monospace;
    white-space: nowrap;
}

.app-tabs {
    display: flex;
    gap: 4px;
    margin-top: 11px;
    border-bottom: 1px solid #858780;
}

.app-tab {
    padding: 8px 13px;
    border: 2px outset var(--panel);
    background: var(--panel);
    cursor: pointer;
}

.app-tab.active {
    border-style: inset;
    background: var(--panel-light);
    font-weight: bold;
}

.crypt-panel {
    display: none;
    padding: 17px 4px 2px;
}

.crypt-panel.active {
    display: block;
}

.crypt-panel label:not(.file-picker) {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 12px;
}

.crypt-panel textarea {
    width: 100%;
    min-height: 82px;
    resize: vertical;
    padding: 9px;
    border: 2px inset var(--panel);
    outline: none;
    color: #dce7e9;
    background: var(--screen);
    font: 12px/1.4 "Courier New", monospace;
}

.crypt-panel textarea:focus {
    box-shadow: inset 0 0 0 1px var(--cyan);
}

.file-picker {
    position: relative;
    display: grid;
    min-height: 120px;
    place-items: center;
    align-content: center;
    gap: 6px;
    margin-top: 13px;
    padding: 14px;
    border: 2px inset var(--panel);
    background: #efede6;
    text-align: center;
    cursor: pointer;
}

.compact-picker {
    min-height: 86px;
}

.file-picker:hover {
    background: white;
}

.file-picker input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-picker-icon {
    color: var(--cyan-dark);
    font-size: 30px;
}

.file-picker small {
    color: var(--muted);
}

.action-button {
    width: 100%;
    margin-top: 13px;
    padding: 11px;
    border: 2px outset var(--panel);
    color: white;
    background: linear-gradient(#46768a, #315a6c);
    font-weight: bold;
    cursor: pointer;
}

.action-button:hover {
    filter: brightness(1.08);
}

.action-button:active {
    border-style: inset;
}

.action-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.secondary-action {
    background: linear-gradient(#9b683f, #71492f);
}

.operation-status {
    min-height: 20px;
    margin: 10px 0 0;
    padding: 7px;
    border: 2px inset var(--panel);
    color: #32434e;
    background: #f1efe8;
    font: 11px "Courier New", monospace;
    text-align: center;
}

.manual-list {
    display: grid;
    gap: 9px;
}

.manual-list article {
    padding: 12px;
    border: 2px inset var(--panel);
    background: #efede6;
}

.manual-list b {
    display: block;
    margin-bottom: 7px;
    color: #334c5d;
}

.manual-list p {
    margin: 0;
    line-height: 1.5;
}

.manual-list code {
    display: block;
    margin-top: 5px;
    padding: 5px;
    overflow-x: auto;
    background: #151d24;
    color: #d9e5e7;
    white-space: nowrap;
}

.warning-note {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #9b765b;
    background: #efe0c9;
    color: #5e3a27;
}

/* =========================
   TASKBAR + START MENU
   ========================= */

.taskbar {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 500;
    display: grid;
    height: 40px;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 5px;
    padding: 4px;
    border-top: 2px outset var(--panel);
    background: var(--panel);
}

.start-button {
    display: flex;
    height: 31px;
    align-items: center;
    gap: 7px;
    padding: 0 10px 0 5px;
    border: 2px outset var(--panel);
    background: var(--panel);
    font-weight: bold;
    cursor: pointer;
}

.start-button.active,
.start-button:active {
    border-style: inset;
}

.start-mark {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--cream);
    background: linear-gradient(145deg, var(--orange), var(--brown));
    font-family: Georgia, serif;
}

.task-buttons {
    display: flex;
    min-width: 0;
    gap: 4px;
    overflow: hidden;
}

.task-button {
    min-width: 112px;
    max-width: 190px;
    height: 31px;
    overflow: hidden;
    padding: 0 10px;
    border: 2px outset var(--panel);
    background: var(--panel);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.task-button.active {
    border-style: inset;
    background: var(--panel-light);
    font-weight: bold;
}

.system-tray {
    display: flex;
    height: 31px;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border: 2px inset var(--panel);
    background: var(--panel-mid);
    font-size: 11px;
}

.tray-status {
    color: var(--cyan-dark);
}

.start-menu {
    position: absolute;
    bottom: 39px;
    left: 3px;
    z-index: 700;
    display: grid;
    width: 300px;
    min-height: 310px;
    grid-template-columns: 38px 1fr;
    border: 2px outset var(--panel);
    background: var(--panel);
    box-shadow: 6px 8px 22px rgba(0, 0, 0, 0.42);
}

.start-brand {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 9px 0;
    color: #dbe3e6;
    background: linear-gradient(#3c5364, #293844);
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: bold;
    letter-spacing: 0.03em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.start-items {
    display: grid;
    align-content: start;
    padding: 6px;
}

.start-items button,
.start-items a {
    display: flex;
    min-height: 45px;
    align-items: center;
    gap: 10px;
    padding: 6px 9px;
    border: 1px solid transparent;
    color: var(--ink);
    background: transparent;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.start-items button:hover,
.start-items a:hover {
    color: white;
    background: var(--title-active);
}

.start-items span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid #999;
    background: white;
    color: #405b6c;
    font-weight: bold;
}

.start-separator {
    height: 1px;
    margin: 5px 3px;
    background: #9c9c96;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes loader-slide {
    to {
        background-position: 80px 0;
    }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 760px) {
    .bios-screen {
        padding: 17px;
        font-size: 11px;
    }

    .bios-top {
        display: grid;
        gap: 5px;
    }

    .bios-footer {
        gap: 12px;
        font-size: 9px;
    }

    .desktop-icons {
        width: 90px;
    }

    .os-window {
        top: 8px !important;
        left: 7px !important;
        width: calc(100vw - 14px) !important;
        max-width: none;
        max-height: calc(100vh - 54px);
    }

    .window-body {
        max-height: calc(100vh - 135px);
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        display: grid;
        grid-template-columns: 112px 1fr;
        align-items: start;
    }

    .profile-sidebar .wide-button {
        grid-column: 2;
    }

    .profile-heading,
    .profile-panels {
        grid-template-columns: 1fr;
    }

    .synth-card {
        display: none;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .profile-footer {
        display: grid;
    }

    .crypt-banner {
        display: grid;
    }

    .task-button {
        min-width: 72px;
    }

    .system-tray {
        padding: 0 5px;
    }

    .tray-status {
        display: none;
    }
}

/* =========================================================
   OCZERRS FINAL PATCH — explorer, portfolio, persistent CMD
   ========================================================= */

:root {
    --glow-cyan: rgba(111, 184, 195, 0.56);
    --glow-orange: rgba(213, 138, 69, 0.45);
}

/* Only one visible desktop file */
.single-desktop-icon,
.desktop-icon-stack {
    top: 22px;
    left: 18px;
    width: 142px;
}

.desktop-icon-main {
    gap: 7px;
    padding: 10px 7px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: rgba(7, 14, 21, 0.2);
}

.desktop-icon-main .icon-tile {
    width: 66px;
    height: 66px;
    font-size: 34px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.18),
        0 0 20px rgba(213, 138, 69, 0.22),
        4px 6px 11px rgba(0, 0, 0, 0.34);
}

.desktop-icon-main > span:nth-child(2) {
    color: #fff7e9;
    font-weight: bold;
    letter-spacing: 0.06em;
}

.desktop-icon-main small {
    color: #9db4c0;
    font: 10px "Courier New", monospace;
    text-shadow: 1px 1px 2px #000;
}

/* Better hover / focus glow without changing the old-OS silhouette */
button:hover,
a:hover,
[role="button"]:hover {
    filter: brightness(1.045);
}

.desktop-icon:hover,
.classic-button:hover,
.toolbar-button:hover,
.folder-button:hover,
.portfolio-card:hover,
.start-items button:hover,
.start-items a:hover,
.social-grid a:hover,
.app-tab:hover,
.window-buttons button:hover {
    box-shadow:
        0 0 0 1px rgba(125, 205, 215, 0.36),
        0 0 12px var(--glow-cyan),
        0 0 22px rgba(213, 138, 69, 0.12);
}

button:focus-visible,
a:focus-visible {
    outline: 1px dotted #f9f4e8;
    outline-offset: 2px;
}

/* Window sizing */
.os-window {
    height: var(--window-h, auto);
    min-width: 330px;
    min-height: 210px;
}

.os-window.window-open {
    display: flex;
    flex-direction: column;
}

.os-window > .window-body,
.os-window > .preview-body {
    flex: 1;
    min-height: 0;
}

.fixed-window {
    width: min(var(--window-w), calc(100vw - 124px));
    height: min(var(--window-h), calc(100vh - 82px));
    resize: none;
}

.resizable-window {
    width: var(--window-w, 720px);
    height: var(--window-h, 520px);
    min-width: 480px;
    min-height: 340px;
    resize: both;
}

.resizable-window:not(.maximized) {
    overflow: hidden;
}

.resizable-window .window-body {
    max-height: none;
}

.os-window.maximized {
    z-index: 900 !important;
    resize: none;
}

/* Profile menu is clickable but still looks like an old menu strip */
.profile-menu {
    align-items: center;
}

.menu-link {
    padding: 0;
    border: 0;
    color: #303235;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
}

.menu-link:hover,
.menu-link.active {
    color: #183d52;
    text-decoration: underline;
    box-shadow: none;
}

/* Explorer */
.explorer-window {
    min-width: 650px;
    min-height: 430px;
}

.explorer-menu {
    flex: 0 0 auto;
}

.explorer-toolbar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 5px 7px;
    border-bottom: 1px solid #8f908a;
    background: var(--panel);
}

.toolbar-button {
    width: 31px;
    height: 28px;
    padding: 0;
    border: 2px outset var(--panel);
    background: var(--panel);
    color: #233f50;
    font-weight: bold;
    cursor: pointer;
}

.toolbar-button:active {
    border-style: inset;
}

.explorer-address {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 7px;
    height: 29px;
    padding: 4px 7px;
    border: 2px inset var(--panel);
    background: white;
    font-size: 11px;
}

.explorer-address code {
    overflow: hidden;
    color: #263e4e;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.explorer-body {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: 215px 1fr;
    overflow: hidden;
    border-top: 1px solid #f6f4ed;
}

.folder-tree {
    overflow: auto;
    padding: 10px 7px;
    border-right: 2px inset var(--panel);
    background: #f3f1e9;
    color: #26323a;
    font-size: 12px;
    line-height: 1.75;
}

.tree-root {
    margin-bottom: 4px;
    font-weight: bold;
}

.tree-computer {
    color: var(--cyan-dark);
}

.tree-branch {
    margin-left: 8px;
    padding-left: 9px;
    border-left: 1px dotted #858782;
}

.tree-branch.nested {
    margin-left: 8px;
}

.tree-folder {
    white-space: nowrap;
}

.folder-buttons {
    display: grid;
    gap: 2px;
}

.folder-button {
    width: 100%;
    padding: 3px 5px;
    border: 1px solid transparent;
    color: #25333d;
    background: transparent;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.folder-button:hover {
    color: white;
    background: #29536d;
}

.folder-button.active {
    border-color: #24465a;
    color: white;
    background: #1f4f6a;
}

.file-pane {
    min-width: 0;
    overflow: auto;
    padding: 13px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.74), rgba(246, 244, 237, 0.9)),
        repeating-linear-gradient(0deg, transparent 0 23px, rgba(54, 90, 119, 0.035) 23px 24px);
}

.file-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #aaa9a2;
}

.file-pane-header h2 {
    margin: 0;
    color: #2f485a;
    font-family: Georgia, serif;
    font-size: 22px;
}

.file-count {
    padding: 4px 7px;
    border: 1px solid #aaa9a2;
    background: var(--panel-light);
    color: #62676b;
    font-size: 10px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(166px, 1fr));
    gap: 13px;
    align-content: start;
}

.portfolio-card {
    display: grid;
    min-width: 0;
    grid-template-rows: 160px auto;
    padding: 5px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel);
    text-align: left;
    cursor: pointer;
}

.portfolio-card:active,
.portfolio-card.selected {
    border-style: inset;
}

.portfolio-card.selected {
    color: white;
    background: #285a77;
}

.portfolio-thumb {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    border: 2px inset var(--panel);
    background:
        linear-gradient(45deg, rgba(111, 184, 195, 0.05), rgba(213, 138, 69, 0.06)),
        #d8d5cb;
}

.portfolio-thumb > img,
.portfolio-thumb > .portfolio-placeholder {
    grid-area: 1 / 1;
}

.portfolio-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
}

.portfolio-card.image-loaded .portfolio-thumb img {
    opacity: 1;
    visibility: visible;
}

.portfolio-card.image-loaded .portfolio-placeholder {
    display: none;
}

.portfolio-placeholder {
    display: grid;
    place-items: center;
    gap: 5px;
    color: #53636c;
    text-align: center;
}

.portfolio-placeholder span {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border: 2px solid #647983;
    background: #172630;
    color: #9dd9df;
    font: bold 34px "Courier New", monospace;
    box-shadow: inset 0 0 14px rgba(111, 184, 195, 0.18);
}

.portfolio-placeholder small {
    font: 9px "Courier New", monospace;
}

.portfolio-caption {
    display: grid;
    gap: 2px;
    padding: 7px 4px 3px;
}

.portfolio-caption strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-caption small {
    overflow: hidden;
    color: #73777a;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-card.selected .portfolio-caption small {
    color: #d7e6ed;
}

.explorer-statusbar {
    display: flex;
    flex: 0 0 auto;
    min-height: 25px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 7px;
    border-top: 2px inset var(--panel);
    background: var(--panel);
    color: #5e6366;
    font-size: 10px;
}

/* Image viewer */
.preview-window {
    width: min(80vw, 1280px);
    height: min(78vh, 860px);
    min-width: min(620px, calc(100vw - 28px));
    min-height: min(440px, calc(100vh - 58px));
    max-width: calc(100vw - 28px);
    max-height: calc(100vh - 58px);
    resize: none;
}

.preview-body {
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    padding: 9px;
    background: var(--panel);
}

.preview-canvas {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    border: 2px inset var(--panel);
    background:
        radial-gradient(circle, rgba(111, 184, 195, 0.07), transparent 45%),
        #172028;
    contain: layout paint size;
}

.preview-canvas img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.preview-placeholder {
    display: grid;
    place-items: center;
    gap: 10px;
    color: #b8c9d0;
    text-align: center;
}

.preview-placeholder span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border: 2px solid #6f98a2;
    color: #a8e0e5;
    font: bold 48px "Courier New", monospace;
}

.preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 5px 1px;
    color: #3f484e;
    font-size: 11px;
}

.preview-meta span {
    color: #6e7478;
}

/* Persistent commission CMD */
.commission-console {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 35;
    width: min(405px, calc(100vw - 180px));
    border: 2px outset #c9c8c1;
    background: #07090b;
    box-shadow:
        7px 9px 20px rgba(0, 0, 0, 0.48),
        0 0 18px rgba(111, 184, 195, 0.12);
}

.cmd-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 27px;
    padding: 2px 3px 2px 7px;
    color: white;
    background: linear-gradient(90deg, #1b3b52, #335e72);
    font: 11px Tahoma, sans-serif;
}

.cmd-titlebar button {
    width: 24px;
    height: 21px;
    padding: 0;
    border: 2px outset var(--panel);
    background: var(--panel);
    color: #1d2225;
    font-weight: bold;
    cursor: pointer;
}

.cmd-screen {
    padding: 10px 12px;
    color: #cfd7d9;
    background:
        linear-gradient(rgba(111, 184, 195, 0.025), rgba(0, 0, 0, 0.04)),
        #050708;
    font: 12px/1.5 "Courier New", Consolas, monospace;
}

.cmd-screen p {
    margin: 0 0 3px;
}

.cmd-status-line {
    margin-top: 8px !important;
    padding: 5px 7px;
    border: 1px solid #3b5963;
    background: #0c1418;
}

.cmd-status-line strong {
    color: #ff876e;
    background: rgba(125, 53, 46, 0.22);
    text-shadow: 0 0 7px rgba(255, 95, 75, 0.48);
    letter-spacing: 0.08em;
}

#commission-spinner {
    display: inline-block;
    width: 12px;
    margin-left: 5px;
    color: #8ed8df;
    font-weight: bold;
}

.cmd-hint {
    color: #60747c;
    font-size: 9px;
}

.commission-console.restore-flash {
    animation: cmd-restore 0.32s ease-out;
}

/* Copyright / avatar */
.tray-copyright {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-right: 7px;
    border-right: 1px solid #969892;
}

.tray-copyright img {
    width: 21px;
    height: 21px;
    border: 1px solid #727675;
    object-fit: cover;
}

.tray-copyright span {
    white-space: nowrap;
}

.start-user-card {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding: 8px;
    border: 2px inset var(--panel);
    background: #ece9df;
}

.start-user-card img {
    width: 38px;
    height: 38px;
    border: 1px solid #747877;
    object-fit: cover;
}

.start-user-card strong,
.start-user-card small {
    display: block;
}

.start-user-card small {
    margin-top: 3px;
    color: #687076;
    font-size: 9px;
}

.help-content code {
    padding: 2px 4px;
    background: #1a252d;
    color: #d5e5e7;
}

@keyframes cmd-restore {
    0% { opacity: 0; transform: translateY(-8px) scale(0.98); }
    100% { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
    .fixed-window {
        width: min(820px, calc(100vw - 118px));
    }

    .commission-console {
        width: 340px;
    }
}

@media (max-width: 760px) {
    .single-desktop-icon {
        width: 94px;
    }

    .desktop-icon-main .icon-tile {
        width: 52px;
        height: 52px;
    }

    .commission-console {
        top: 7px;
        right: 7px;
        width: calc(100vw - 112px);
    }

    .cmd-screen {
        font-size: 10px;
    }

    .fixed-window,
    .resizable-window {
        width: calc(100vw - 14px) !important;
        height: calc(100vh - 54px) !important;
        min-width: 0;
        min-height: 0;
        resize: none;
    }

    .explorer-body {
        grid-template-columns: 152px 1fr;
    }

    .folder-tree {
        font-size: 10px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .portfolio-card {
        grid-template-rows: 120px auto;
    }

    .preview-window {
        top: 7px !important;
        left: 7px !important;
        width: calc(100vw - 14px) !important;
        height: calc(100vh - 54px) !important;
        min-width: 0;
        min-height: 0;
        max-width: calc(100vw - 14px);
        max-height: calc(100vh - 54px);
    }

    .tray-copyright span {
        display: none;
    }
}

@media (max-width: 1100px) and (min-width: 761px) {
    #profile-window {
        top: 178px !important;
        left: 7vw !important;
    }
}

@media (max-width: 760px) {
    .commission-console {
        top: auto;
        right: 7px;
        bottom: 47px;
        width: calc(100vw - 14px);
    }
}

/* =========================
   RU / EN LANGUAGE SWITCH
   ========================= */

.language-toggle {
    position: fixed;
    right: 14px;
    /* Keep the language switch above the verified-owner badge. */
    bottom: 112px;
    z-index: 12000;
    display: inline-flex;
    min-width: 82px;
    height: 31px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 9px;
    border: 2px outset var(--panel);
    color: #3f464a;
    background: var(--panel);
    box-shadow:
        3px 4px 10px rgba(0, 0, 0, 0.32),
        0 0 0 rgba(111, 184, 195, 0);
    font: bold 11px Tahoma, "MS Sans Serif", sans-serif;
    cursor: pointer;
    transition: box-shadow 120ms ease, filter 120ms ease;
}

.language-toggle:hover,
.language-toggle:focus-visible {
    outline: none;
    filter: brightness(1.08);
    box-shadow:
        3px 4px 10px rgba(0, 0, 0, 0.32),
        0 0 14px rgba(111, 184, 195, 0.58);
}

.language-toggle:active {
    border-style: inset;
}

.language-toggle [data-lang-code] {
    display: grid;
    min-width: 24px;
    height: 20px;
    place-items: center;
    padding: 0 3px;
    border: 1px solid transparent;
}

.language-toggle [data-lang-code].active {
    border-color: #7fa6af;
    color: white;
    background: linear-gradient(#47758a, #294f63);
    text-shadow: 0 0 5px rgba(142, 216, 223, 0.7);
}

.language-divider {
    color: #777d80;
}

@media (max-width: 760px) {
    .language-toggle {
        top: 7px;
        right: 7px;
        bottom: auto;
        z-index: 13000;
    }
}

/* =========================
   OCZerrs v4 — OS polish
   ========================= */

/* Must be placed after the later .os-window.window-open flex rule. */
.os-window.window-open.minimized {
    display: none !important;
}

.owner-verification {
    position: absolute;
    right: 14px;
    bottom: 50px;
    z-index: 4;
    display: flex;
    max-width: 360px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 1px solid rgba(161, 199, 209, 0.48);
    background: rgba(10, 19, 27, 0.88);
    color: #dce8ea;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.35);
    font: 10px/1.35 "Courier New", monospace;
    pointer-events: none;
}

.owner-verification img {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid #82939a;
    object-fit: cover;
}

.owner-verification div {
    display: grid;
    gap: 2px;
}

.owner-verification strong {
    color: #8ed8df;
    letter-spacing: 0.08em;
}

.owner-verification span {
    color: #f0e5d4;
}

/* My Computer */
.computer-body {
    display: grid;
    align-content: start;
    gap: 18px;
    background: #f0eee7;
}

.computer-group {
    border: 1px solid #aaa89f;
    background: #e7e4dc;
}

.computer-group h2 {
    margin: 0;
    padding: 7px 10px;
    border-bottom: 1px solid #aaa89f;
    color: #263f52;
    background: linear-gradient(90deg, #d1d8db, #ece9df);
    font-family: Georgia, serif;
    font-size: 16px;
}

.drive-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px;
}

.drive-item {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 10px;
    min-height: 86px;
    padding: 9px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: #f5f2ea;
    text-align: left;
    cursor: pointer;
}

.drive-item:hover,
.system-folder-grid button:hover {
    background: #fff;
    box-shadow: 0 0 12px rgba(111, 184, 195, 0.42);
}

.drive-item:active,
.system-folder-grid button:active {
    border-style: inset;
}

.drive-icon {
    display: grid;
    width: 58px;
    height: 48px;
    place-items: center;
    border: 2px outset #aeb6b8;
    color: #fff;
    background: linear-gradient(145deg, #5f7f91, #294353);
    font: bold 17px Georgia, serif;
}

.art-drive { background: linear-gradient(145deg, #8d684d, #49382e); }
.network-drive { background: linear-gradient(145deg, #5d949e, #315b66); }
.crypt-drive { background: linear-gradient(145deg, #596f84, #222f3b); }

.drive-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.drive-copy strong,
.drive-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drive-copy strong { color: #294457; font-size: 12px; }
.drive-copy small { color: #6f7477; font-size: 10px; }

.drive-copy i {
    display: block;
    height: 9px;
    padding: 1px;
    border: 1px inset #a2a39e;
    background: #d0cec7;
}

.drive-copy i b {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #315a76, #69a7b1);
}

.system-folder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 10px;
}

.system-folder-grid button {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border: 2px outset var(--panel);
    color: #273f50;
    background: #f5f2ea;
    text-align: left;
    cursor: pointer;
}

.system-folder-grid button span { font-size: 23px; }
.system-folder-grid button strong { font-size: 11px; }

/* Desktop right-click menu */
.desktop-context-menu {
    position: absolute;
    z-index: 760;
    width: 248px;
    padding: 3px;
    border: 2px outset var(--panel);
    background: var(--panel);
    box-shadow: 5px 7px 18px rgba(0, 0, 0, 0.42);
}

.desktop-context-menu button {
    display: flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    gap: 9px;
    padding: 5px 8px;
    border: 0;
    color: var(--ink);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.desktop-context-menu button > span:first-child {
    display: inline-grid;
    width: 22px;
    place-items: center;
    color: #294d61;
    font-weight: bold;
}

.desktop-context-menu button:hover,
.desktop-context-menu button:focus-visible {
    color: white;
    background: #285a77;
    box-shadow: none;
    outline: none;
}

.context-separator {
    height: 1px;
    margin: 3px 2px;
    border-top: 1px solid #878983;
    border-bottom: 1px solid #f8f6ee;
}

.tray-button {
    display: grid;
    width: 25px;
    height: 23px;
    place-items: center;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
}

.tray-button:hover,
.tray-button:focus-visible {
    border: 1px outset var(--panel);
    background: var(--panel-light);
    outline: none;
    box-shadow: none;
}

.tray-button.muted {
    opacity: 0.55;
    filter: grayscale(1);
}

.desktop.refresh-flash::after {
    position: absolute;
    inset: 0 0 40px;
    z-index: 3;
    pointer-events: none;
    background: rgba(111, 184, 195, 0.06);
    content: "";
    animation: desktop-refresh 0.28s ease-out;
}

@keyframes desktop-refresh {
    from { opacity: 0.9; }
    to { opacity: 0; }
}

@media (max-width: 760px) {
    .owner-verification {
        right: 7px;
        bottom: 48px;
        max-width: min(300px, calc(100vw - 112px));
    }

    .drive-grid,
    .system-folder-grid {
        grid-template-columns: 1fr;
    }

    .desktop-context-menu {
        width: min(248px, calc(100vw - 18px));
    }
}

/* =========================
   SYSTEM32 EASTER EGG
   ========================= */

.system32-window {
    min-width: 680px;
    min-height: 440px;
}

.system32-selected {
    margin-top: 2px;
    padding: 1px 4px;
    color: #fff;
    background: #1f4f6a;
}

.danger-toolbar-button {
    flex: 0 0 auto;
    color: #6b211c;
    background: #ead7cf;
    font-size: 18px;
}

.danger-toolbar-button:hover,
.danger-toolbar-button:focus-visible {
    color: #fff;
    background: #9a382f;
    box-shadow: 0 0 10px rgba(154, 56, 47, 0.48);
    outline: none;
}

.system32-file-pane {
    position: relative;
}

.system-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    align-content: start;
}

.system-file {
    display: grid;
    min-height: 112px;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 9px;
    border: 2px outset var(--panel);
    color: #263c4b;
    background: #f4f1e9;
    text-align: center;
    cursor: default;
}

.system-file:hover,
.system-file:focus-visible {
    background: #fff;
    box-shadow: 0 0 12px rgba(111, 184, 195, 0.42);
    outline: none;
}

.system-file > span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 2px outset #aeb6b8;
    color: #d9edf0;
    background: linear-gradient(145deg, #51758a, #243b49);
    font: bold 20px Georgia, serif;
}

.system-file strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.system-file small {
    color: #74797c;
    font-size: 9px;
}

.system-file.deleting {
    animation: system-file-delete 0.22s steps(2, end) forwards;
}

@keyframes system-file-delete {
    0% { opacity: 1; transform: translate(0); filter: none; }
    45% { opacity: 0.75; transform: translate(2px, -1px); filter: saturate(0); }
    100% { opacity: 0; transform: scale(0.72); filter: grayscale(1); visibility: hidden; }
}

.system32-delete-progress {
    position: absolute;
    right: 22px;
    bottom: 22px;
    left: 22px;
    z-index: 5;
    display: grid;
    gap: 8px;
    padding: 13px;
    border: 2px outset var(--panel);
    color: #1c2b34;
    background: #e2ded4;
    box-shadow: 6px 8px 20px rgba(0, 0, 0, 0.34);
}

.system32-delete-progress code {
    overflow: hidden;
    color: #6b211c;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-progress-track {
    height: 18px;
    padding: 2px;
    border: 2px inset var(--panel);
    background: #111820;
}

.delete-progress-track i {
    display: block;
    width: 0;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        #5e91a0 0,
        #5e91a0 13px,
        #213641 13px,
        #213641 17px
    );
    transition: width 0.16s linear;
}

.system-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1400;
    width: min(430px, calc(100vw - 32px));
    border: 2px outset var(--panel);
    background: var(--panel);
    box-shadow: 10px 14px 34px rgba(0, 0, 0, 0.55);
    transform: translate(-50%, -50%);
}

.system-dialog-titlebar {
    padding: 6px 8px;
    color: #fff;
    background: linear-gradient(90deg, #263f52, #44667a);
    font-weight: bold;
    font-size: 12px;
}

.system-dialog-body {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: start;
    padding: 18px;
    background: #eeeae1;
}

.system-dialog-body p {
    margin: 7px 0 0;
    color: #4f5559;
    font-size: 12px;
    line-height: 1.5;
}

.system-dialog-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: #6e2c24;
    font-size: 34px;
}

.system-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 9px 12px 12px;
    background: #eeeae1;
}

.system-dialog-actions .classic-button {
    min-width: 78px;
}

/* When System32 is deleted, every normal part of the site disappears. */
body.system-failed > :not(#no-os-screen) {
    display: none !important;
}

.no-os-screen {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #dce4e8;
    background:
        radial-gradient(circle at 50% 42%, rgba(48, 83, 107, 0.14), transparent 42%),
        #05080b;
    font-family: "Courier New", Consolas, monospace;
}

.no-os-content {
    width: min(720px, 100%);
    padding: 28px;
    border: 1px solid #425865;
    background: #081016;
    box-shadow: 0 0 42px rgba(0, 0, 0, 0.85);
}

.no-os-brand {
    margin: 0 0 26px;
    color: #9fb7c2;
    letter-spacing: 0.12em;
}

.no-os-error {
    margin: 0 0 9px;
    color: #d47b63;
}

.no-os-content h1 {
    margin: 0 0 12px;
    color: #f0f3f4;
    font-size: clamp(22px, 4vw, 38px);
}

.no-os-content > p:not(.no-os-brand):not(.no-os-error) {
    margin: 0 0 18px;
    color: #d8c8ae;
    font-size: clamp(15px, 2vw, 20px);
}

.no-os-content code {
    display: block;
    margin: 0 0 24px;
    color: #7f98a3;
    white-space: normal;
}

.no-os-content button {
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid #7894a1;
    color: #e9f1f3;
    background: #1b3442;
    font: inherit;
    cursor: pointer;
}

.no-os-content button:hover,
.no-os-content button:focus-visible {
    background: #2a5368;
    box-shadow: 0 0 12px rgba(111, 184, 195, 0.45);
    outline: none;
}

.no-os-content small {
    display: block;
    margin-top: 13px;
    color: #60747d;
}

@media (max-width: 760px) {
    .system32-window {
        min-width: 0;
    }

    .system-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system32-body {
        grid-template-columns: 1fr;
    }

    .system32-body .folder-tree {
        display: none;
    }
}


/* =========================
   INFORMATION / NOTEPAD
   ========================= */

.information-window {
    min-width: 420px;
    min-height: 310px;
}

.notepad-menu {
    gap: 22px;
}

.information-body {
    height: calc(100% - 86px);
    min-height: 225px;
    padding: 0;
    overflow: auto;
    background: #fff;
}

.information-document {
    min-height: 100%;
    padding: 24px 28px 34px;
    color: #111;
    background:
        linear-gradient(rgba(55, 115, 125, 0.055) 1px, transparent 1px),
        #fff;
    background-size: 100% 24px;
    font: 15px/1.6 "Courier New", Consolas, monospace;
}

.information-document h2 {
    margin: 0 0 22px;
    color: #17384a;
    font: bold 21px/1.3 "Courier New", Consolas, monospace;
}

.information-document p {
    margin: 0 0 16px;
}

.information-document hr {
    margin: 24px 0 17px;
    border: 0;
    border-top: 1px dashed #6d7a80;
}

.information-signature {
    color: #315b69;
    font-weight: bold;
}

.notepad-statusbar {
    display: flex;
    min-height: 22px;
    align-items: center;
    justify-content: space-between;
    padding: 2px 7px;
    border-top: 1px solid #8f908b;
    color: #444;
    background: var(--panel);
    font-size: 10px;
}

@media (max-width: 760px) {
    .information-window {
        min-width: 0;
    }

    .information-document {
        padding: 18px 16px 28px;
        font-size: 13px;
    }
}


/* =========================
   OCZerrs v4.5 — viewport responsive shell
   ========================= */

:root {
    --shell-margin: 10px;
    --shell-bottom: 50px;
}

.os-window {
    max-width: calc(100vw - (var(--shell-margin) * 2));
    max-height: calc(100dvh - var(--shell-bottom));
}

#profile-window {
    width: min(820px, calc(100vw - (var(--shell-margin) * 2)));
    height: min(540px, calc(100dvh - var(--shell-bottom)));
}

#portfolio-window,
#computer-window,
#system32-window,
#social-window,
#crypt-window,
#help-window,
#information-window {
    width: min(var(--window-w, 920px), calc(100vw - (var(--shell-margin) * 2)));
    height: min(var(--window-h, 650px), calc(100dvh - var(--shell-bottom)));
}

.preview-window {
    width: min(80vw, 1280px, calc(100vw - (var(--shell-margin) * 2)));
    height: min(78dvh, 860px, calc(100dvh - var(--shell-bottom)));
}

.explorer-body {
    grid-template-columns: clamp(155px, 22vw, 215px) minmax(0, 1fr);
}

.portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(135px, 18vw, 180px), 1fr));
}

.portfolio-empty-card {
    width: min(280px, 100%);
    cursor: default;
}

.portfolio-empty-card:hover {
    box-shadow: none;
}

@media (max-height: 620px) and (min-width: 761px) {
    :root {
        --shell-margin: 6px;
        --shell-bottom: 46px;
    }

    .os-window {
        top: 6px !important;
    }

    #profile-window,
    #portfolio-window,
    #computer-window,
    #system32-window,
    #social-window,
    #crypt-window,
    #help-window,
    #information-window,
    .preview-window {
        height: calc(100dvh - var(--shell-bottom)) !important;
    }

    .window-body,
    .file-pane,
    .folder-tree {
        scrollbar-width: thin;
    }

    .portfolio-card {
        grid-template-rows: clamp(105px, 24vh, 145px) auto;
    }
}

@media (max-width: 760px) {
    :root {
        --shell-margin: 7px;
        --shell-bottom: 54px;
    }

    .explorer-body {
        grid-template-columns: minmax(112px, 34vw) minmax(0, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

/* =========================================================
   OCZerrs v4.8 — PHONE / TOUCH MODE
   Final overrides. Keep this block at the very end of CSS.
   ========================================================= */

:root {
    --app-width: 100vw;
    --app-height: 100dvh;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --mobile-taskbar-height: calc(48px + var(--safe-bottom));
}

html,
body {
    overscroll-behavior: none;
}

@supports not (height: 100dvh) {
    :root {
        --app-height: 100vh;
    }
}

@media (hover: none), (pointer: coarse) {
    button,
    a,
    [role="button"] {
        touch-action: manipulation;
    }

    button:hover,
    a:hover,
    [role="button"]:hover {
        filter: none;
    }
}

@media (max-width: 820px), (max-width: 1024px) and (pointer: coarse) {
    html,
    body {
        width: 100%;
        height: var(--app-height, 100dvh);
        min-height: 0;
        overflow: hidden;
    }

    body {
        position: fixed;
        inset: 0;
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .boot-screen,
    .desktop,
    .no-os-screen {
        width: var(--app-width, 100vw);
        height: var(--app-height, 100dvh);
        min-height: 0;
    }

    .desktop {
        overflow: hidden;
        background-attachment: scroll;
    }

    .bios-screen {
        padding:
            calc(12px + var(--safe-top))
            calc(12px + var(--safe-right))
            calc(12px + var(--safe-bottom))
            calc(12px + var(--safe-left));
        font-size: clamp(9px, 2.8vw, 12px);
    }

    .bios-output {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bios-footer {
        flex-wrap: wrap;
        gap: 5px 12px;
    }

    .loader-screen,
    .login-screen {
        padding:
            calc(12px + var(--safe-top))
            calc(12px + var(--safe-right))
            calc(12px + var(--safe-bottom))
            calc(12px + var(--safe-left));
    }

    .login-shell {
        width: min(520px, 100%);
        max-height: calc(var(--app-height, 100dvh) - var(--safe-top) - var(--safe-bottom) - 24px);
        overflow: auto;
    }

    .login-user {
        width: calc(100% - 24px);
        gap: 12px;
        margin: 18px 12px 12px;
        padding: 11px;
    }

    .login-user img {
        width: clamp(70px, 24vw, 90px);
        height: clamp(70px, 24vw, 90px);
        flex: 0 0 auto;
    }

    .login-user-text strong {
        font-size: clamp(20px, 7vw, 26px);
    }

    .login-hint {
        margin: 0 12px 16px;
    }

    /* Mobile windows behave like full-screen applications. */
    .os-window,
    .fixed-window,
    .resizable-window,
    #profile-window,
    #portfolio-window,
    #computer-window,
    #system32-window,
    #social-window,
    #crypt-window,
    #help-window,
    #information-window,
    .preview-window,
    .os-window.maximized {
        position: absolute;
        top: var(--safe-top) !important;
        right: 0 !important;
        bottom: var(--mobile-taskbar-height) !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(var(--app-height, 100dvh) - var(--mobile-taskbar-height) - var(--safe-top)) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: none !important;
        resize: none !important;
        border-width: 0 0 2px;
        box-shadow: none;
    }

    .os-window.window-open {
        display: flex;
        flex-direction: column;
    }

    .titlebar {
        min-height: 43px;
        flex: 0 0 43px;
        padding: 4px 5px 4px 8px;
    }

    .titlebar-title {
        min-width: 0;
        gap: 6px;
    }

    .titlebar-title strong {
        max-width: calc(100vw - 145px);
        font-size: 12px;
    }

    .mini-app-icon {
        width: 23px;
        height: 23px;
        flex: 0 0 auto;
    }

    .window-buttons {
        flex: 0 0 auto;
        gap: 4px;
    }

    .window-buttons button {
        width: 40px;
        height: 34px;
        font-size: 18px;
    }

    /* Maximizing has no value when every mobile app is already full-screen. */
    .window-buttons [data-action="maximize"] {
        display: none;
    }

    .menu-strip {
        min-height: 34px;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        gap: 18px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 7px 9px;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .menu-strip::-webkit-scrollbar,
    .folder-tree::-webkit-scrollbar,
    .task-buttons::-webkit-scrollbar,
    .app-tabs::-webkit-scrollbar {
        display: none;
    }

    .menu-strip span,
    .menu-link {
        flex: 0 0 auto;
        font-size: 12px;
    }

    .window-body,
    .os-window > .window-body {
        min-height: 0;
        max-height: none;
        overflow: auto;
        padding: 12px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    #profile-window .window-body,
    #social-window .window-body,
    #crypt-window .window-body,
    #help-window .window-body,
    #information-window .information-body,
    .file-pane {
        scroll-padding-bottom: 52px;
    }

    /* Profile */
    .profile-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .profile-sidebar {
        display: grid;
        grid-template-columns: 104px minmax(0, 1fr);
        gap: 10px;
        align-items: stretch;
    }

    .avatar-frame {
        width: 104px;
        padding: 5px;
    }

    .profile-sidebar .wide-button {
        grid-column: 2;
        min-height: 48px;
        align-self: end;
        font-size: 14px;
    }

    .profile-heading,
    .profile-panels {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .profile-main h1 {
        margin-bottom: 7px;
        font-size: clamp(29px, 9vw, 39px);
        line-height: 1.03;
    }

    .lead {
        font-size: 14px;
        line-height: 1.48;
    }

    .synth-card {
        display: grid !important;
        min-height: 108px;
        grid-template-columns: 94px minmax(0, 1fr);
        grid-template-rows: auto auto;
        place-items: center start;
        gap: 3px 10px;
        padding: 8px 12px;
        text-align: left;
    }

    .synth-head {
        grid-row: 1 / 3;
        transform: scale(0.72);
        transform-origin: center;
    }

    .synth-card strong {
        align-self: end;
        font-size: 17px;
    }

    .synth-card small {
        align-self: start;
        font-size: 9px;
    }

    .skill-chips {
        gap: 5px;
        margin: 12px 0;
    }

    .skill-chips span {
        padding: 6px 8px;
    }

    .info-panel {
        padding: 11px;
    }

    .profile-footer {
        display: grid;
        gap: 4px;
        font-size: 9px;
    }

    /* Explorer navigation becomes a touch-friendly horizontal folder bar. */
    .explorer-toolbar {
        min-height: 46px;
        flex: 0 0 auto;
        gap: 5px;
        padding: 5px;
        overflow: hidden;
    }

    .toolbar-button {
        width: 43px;
        height: 36px;
        flex: 0 0 43px;
        font-size: 18px;
    }

    .explorer-address {
        height: 36px;
        padding: 4px 7px;
    }

    .explorer-address > span {
        display: none;
    }

    .explorer-address code {
        font-size: 10px;
    }

    .explorer-body {
        display: flex !important;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        overflow: hidden;
    }

    .folder-tree {
        display: block !important;
        width: 100%;
        max-height: 55px;
        flex: 0 0 55px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 5px;
        border-right: 0;
        border-bottom: 2px inset var(--panel);
        font-size: 11px;
        line-height: normal;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .folder-tree .tree-root,
    .folder-tree .tree-folder {
        display: none !important;
    }

    .folder-tree .tree-branch,
    .folder-tree .tree-branch.nested {
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    .folder-buttons {
        display: flex;
        width: max-content;
        min-width: 100%;
        gap: 4px;
    }

    .folder-button {
        width: auto;
        min-width: max-content;
        min-height: 42px;
        flex: 0 0 auto;
        padding: 8px 12px;
        border: 2px outset var(--panel);
        background: var(--panel);
        font-size: 11px;
    }

    .folder-button.active {
        border-style: inset;
    }

    .file-pane {
        min-height: 0;
        flex: 1 1 auto;
        padding: 8px;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .file-pane-header {
        position: sticky;
        top: -8px;
        z-index: 2;
        margin: -8px -8px 8px;
        padding: 9px 9px 7px;
        background: rgba(246, 244, 237, 0.97);
    }

    .file-pane-header h2 {
        font-size: 20px;
    }

    .system-kicker {
        font-size: 9px;
    }

    .file-count {
        flex: 0 0 auto;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .portfolio-card {
        min-height: 0;
        grid-template-rows: clamp(132px, 24dvh, 190px) auto;
        padding: 4px;
    }

    .portfolio-thumb img {
        object-fit: cover;
    }

    .portfolio-caption {
        min-width: 0;
        padding: 7px 3px 3px;
    }

    .portfolio-caption strong {
        font-size: 10px;
    }

    .portfolio-caption small {
        font-size: 8px;
    }

    .portfolio-placeholder span {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .explorer-statusbar {
        min-height: 27px;
        flex: 0 0 27px;
        gap: 6px;
        overflow: hidden;
        white-space: nowrap;
    }

    .explorer-statusbar span {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .explorer-statusbar span:last-child {
        display: none;
    }

    /* Image viewer */
    .preview-body,
    .os-window > .preview-body {
        min-height: 0;
        flex: 1 1 auto;
        padding: 5px;
        overflow: hidden;
    }

    .preview-canvas {
        min-height: 0;
        touch-action: pinch-zoom;
    }

    .preview-canvas img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .preview-meta {
        min-height: 42px;
        gap: 3px;
        padding: 7px 86px 2px 4px;
        overflow: hidden;
    }

    .preview-meta strong,
    .preview-meta span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Contacts and tools */
    .social-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    .social-grid a {
        min-height: 54px;
        padding: 10px 12px;
    }

    .contact-box {
        gap: 8px;
    }

    .contact-box .classic-button {
        min-height: 44px;
    }

    .app-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .app-tab {
        min-height: 44px;
        flex: 0 0 auto;
    }

    .crypt-banner {
        display: grid;
        gap: 8px;
    }

    .security-badge {
        justify-self: start;
    }

    .file-picker {
        min-height: 102px;
    }

    .action-button,
    .classic-button {
        min-height: 44px;
    }

    .drive-grid,
    .system-folder-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .drive-item,
    .system-folder-grid button {
        min-height: 72px;
    }

    .system-file-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .system-file {
        min-height: 92px;
    }

    .information-document {
        padding: 18px 14px 32px;
        font-size: 13px;
        line-height: 1.55;
    }

    /* Start menu becomes a large bottom drawer. */
    .start-menu {
        position: fixed;
        top: auto;
        right: var(--safe-right);
        bottom: var(--mobile-taskbar-height);
        left: var(--safe-left);
        z-index: 21000;
        width: auto;
        min-height: 0;
        max-height: min(76dvh, 650px);
        grid-template-columns: 34px minmax(0, 1fr);
        overflow: hidden;
        box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.5);
    }

    .start-brand {
        font-size: 15px;
    }

    .start-items {
        min-height: 0;
        overflow-y: auto;
        padding: 6px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .start-items button,
    .start-items a {
        min-height: 52px;
        padding: 8px 9px;
        font-size: 14px;
    }

    .start-items span {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }

    /* Taskbar remains usable with thumbs and safe-area insets. */
    .taskbar {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20000;
        height: var(--mobile-taskbar-height);
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 3px;
        padding:
            4px
            calc(4px + var(--safe-right))
            calc(4px + var(--safe-bottom))
            calc(4px + var(--safe-left));
    }

    .start-button {
        width: 48px;
        height: 36px;
        justify-content: center;
        gap: 0;
        padding: 0;
        font-size: 0;
    }

    .start-mark {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    .task-buttons {
        gap: 3px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .task-button {
        min-width: 104px;
        max-width: 144px;
        height: 36px;
        flex: 0 0 118px;
        padding: 0 8px;
        font-size: 11px;
    }

    .system-tray {
        height: 36px;
        gap: 4px;
        padding: 0 6px;
    }

    .tray-button {
        width: 30px;
        height: 30px;
    }

    .tray-status,
    .tray-copyright {
        display: none;
    }

    #clock {
        font-size: 10px;
        white-space: nowrap;
    }

    /* Small desktop widgets do not block apps. */
    .commission-console {
        top: calc(6px + var(--safe-top));
        right: calc(6px + var(--safe-right));
        bottom: auto;
        left: calc(108px + var(--safe-left));
        z-index: 35;
        width: auto;
        max-width: none;
    }

    .cmd-titlebar {
        height: 25px;
        font-size: 9px;
    }

    .cmd-titlebar button {
        width: 30px;
        height: 22px;
    }

    .cmd-screen {
        padding: 6px 8px;
        font-size: 10px;
    }

    .cmd-screen > p:not(.cmd-status-line),
    .cmd-hint {
        display: none;
    }

    .cmd-status-line {
        margin: 0 !important;
        padding: 4px 6px;
        white-space: nowrap;
    }

    .owner-verification {
        right: auto;
        bottom: calc(var(--mobile-taskbar-height) + 6px);
        left: calc(6px + var(--safe-left));
        z-index: 4;
        max-width: calc(100vw - 94px - var(--safe-left) - var(--safe-right));
        gap: 6px;
        padding: 5px 7px;
        font-size: 8px;
    }

    .owner-verification img {
        width: 28px;
        height: 28px;
    }

    .owner-verification span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .language-toggle {
        top: auto;
        right: calc(7px + var(--safe-right));
        bottom: calc(var(--mobile-taskbar-height) + 7px);
        left: auto;
        z-index: 22000;
        min-width: 76px;
        height: 32px;
        padding: 0 7px;
    }

    .desktop-icons {
        top: calc(12px + var(--safe-top));
        left: calc(8px + var(--safe-left));
    }

    .desktop-icon-main {
        min-height: 104px;
    }

    .desktop-context-menu {
        max-height: calc(var(--app-height, 100dvh) - var(--mobile-taskbar-height) - 16px);
        overflow: auto;
    }

    .system-dialog {
        width: calc(100vw - 20px);
        max-width: 520px;
    }

    .system-dialog-actions button {
        min-width: 84px;
        min-height: 44px;
    }

    .no-os-content {
        max-height: calc(var(--app-height, 100dvh) - 24px - var(--safe-top) - var(--safe-bottom));
        overflow: auto;
        padding: 20px 16px;
    }
}

@media (max-width: 390px) {
    .titlebar-title strong {
        max-width: calc(100vw - 112px);
    }

    .window-buttons button {
        width: 37px;
    }

    .profile-sidebar {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .avatar-frame {
        width: 92px;
    }

    .profile-main h1 {
        font-size: 29px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .portfolio-card {
        grid-template-rows: 128px auto;
    }

    .system-tray {
        padding: 0 4px;
    }

    .task-button {
        min-width: 92px;
        flex-basis: 100px;
    }
}

@media (max-width: 340px) {
    .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .portfolio-card {
        grid-template-rows: 190px auto;
    }

    #clock {
        display: none;
    }
}

/* Phone landscape: keep the system compact without shrinking text to dust. */
@media (max-width: 950px) and (max-height: 520px) and (orientation: landscape) {
    :root {
        --mobile-taskbar-height: calc(43px + var(--safe-bottom));
    }

    .titlebar {
        min-height: 37px;
        flex-basis: 37px;
    }

    .window-buttons button {
        height: 29px;
    }

    .menu-strip {
        min-height: 30px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .profile-layout {
        grid-template-columns: 122px minmax(0, 1fr);
    }

    .profile-sidebar {
        display: flex;
        flex-direction: column;
    }

    .avatar-frame {
        width: 112px;
    }

    .profile-sidebar .wide-button {
        min-height: 40px;
    }

    .synth-card {
        display: none !important;
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .portfolio-card {
        grid-template-rows: 120px auto;
    }

    .owner-verification {
        display: none;
    }

    .language-toggle {
        bottom: calc(var(--mobile-taskbar-height) + 5px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* v4.8 finishing fixes */
@media (max-width: 820px), (max-width: 1024px) and (pointer: coarse) {
    .start-menu-open .language-toggle {
        display: none !important;
    }
}

@media (max-width: 1100px) and (min-width: 821px) and (max-height: 720px) {
    #profile-window {
        top: 8px !important;
        height: min(540px, calc(100dvh - 50px)) !important;
    }
}


/* =========================================================
   OCZERRS v4.9 — portfolio loading/performance states
   ========================================================= */

.portfolio-card.image-loading .portfolio-placeholder span {
    animation: oczerrs-image-loading 0.9s steps(8, end) infinite;
}

.portfolio-card.image-loading .portfolio-placeholder small {
    color: #4b6874;
}

.portfolio-card.image-error .portfolio-placeholder span {
    border-color: #8d4a42;
    color: #ffb1a7;
    background: #2a1717;
    box-shadow: inset 0 0 14px rgba(125, 53, 46, 0.28);
}

.portfolio-card.image-error .portfolio-placeholder small {
    color: #7d352e;
    font-weight: bold;
}

.portfolio-card {
    content-visibility: auto;
    contain-intrinsic-size: 190px 235px;
}

@keyframes oczerrs-image-loading {
    to { transform: rotate(1turn); }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio-card.image-loading .portfolio-placeholder span {
        animation: none;
    }
}


/* =========================================================
   OCZerrs v4.10 — reliable portfolio image loading
   Lazy images must keep a real layout box. `display: none`
   prevented Chromium from ever starting some requests.
   ========================================================= */

.portfolio-thumb > img,
.portfolio-thumb > .portfolio-placeholder {
    grid-area: 1 / 1;
}

.portfolio-thumb > img {
    display: block !important;
    opacity: 0;
    visibility: visible;
    transition: opacity 120ms linear;
}

.portfolio-card.image-loaded .portfolio-thumb > img {
    display: block !important;
    opacity: 1;
}

.portfolio-thumb > .portfolio-placeholder {
    position: relative;
    z-index: 1;
}

.portfolio-card.image-loaded .portfolio-thumb > .portfolio-placeholder {
    display: grid;
    opacity: 0;
    pointer-events: none;
}

/* =========================================================
   OCZERRS v5.0 FINAL — profile polish + system explorer
   ========================================================= */

.loader-version {
    margin-top: 6px !important;
    color: #d9b17a !important;
    letter-spacing: 0.08em;
}

.site-version-badge {
    position: absolute;
    right: 14px;
    bottom: 91px;
    z-index: 28;
    padding: 5px 8px;
    border: 1px solid rgba(142, 216, 223, 0.45);
    color: #dbe9ea;
    background: rgba(9, 16, 22, 0.78);
    box-shadow: 0 0 14px rgba(111, 184, 195, 0.14);
    font: 10px "Courier New", monospace;
    letter-spacing: 0.07em;
}

#profile-window {
    width: min(920px, calc(100vw - (var(--shell-margin, 10px) * 2))) !important;
}

.profile-heading {
    grid-template-columns: minmax(0, 1fr) 188px;
}

.profile-main h1 {
    white-space: nowrap;
    font-size: clamp(34px, 3.65vw, 46px);
}

.quick-actions p {
    margin: 0 0 8px;
    color: #50555a;
    font-size: 12px;
    line-height: 1.45;
}

.computer-explorer-body {
    display: grid;
    min-height: 0;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    background: var(--panel);
}

.computer-tree {
    min-height: 0;
}

.computer-tree-buttons {
    display: grid;
    gap: 2px;
}

.computer-file-pane {
    min-height: 0;
}

.computer-item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 10px;
    align-content: start;
}

.computer-item {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 9px;
    border: 2px outset var(--panel);
    color: var(--ink);
    background: var(--panel-light);
    text-align: left;
    cursor: pointer;
}

.computer-item:hover {
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(125, 205, 215, 0.32),
        0 0 12px rgba(111, 184, 195, 0.36);
}

.computer-item:active {
    border-style: inset;
}

.computer-item-icon {
    display: grid;
    width: 48px;
    height: 44px;
    place-items: center;
    border: 2px outset #aeb6b8;
    color: #fff;
    background: linear-gradient(145deg, #5f7f91, #294353);
    font: bold 16px Georgia, serif;
}

.computer-item.folder .computer-item-icon {
    color: #2d2517;
    background: linear-gradient(145deg, #f6d36b, #c58d2b);
}

.computer-item.drive .computer-item-icon {
    background: linear-gradient(145deg, #6f8ea1, #243d4f);
}

.computer-item.program .computer-item-icon {
    background: linear-gradient(145deg, #6b503d, #243d4f);
}

.computer-item.danger-item .computer-item-icon {
    background: linear-gradient(145deg, #a25748, #451e1a);
}

.computer-item-copy {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.computer-item-copy strong,
.computer-item-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.computer-item-copy strong {
    color: #294457;
    font-size: 12px;
}

.computer-item-copy small {
    color: #6f7477;
    font-size: 10px;
}

.danger-item .computer-item-copy strong {
    color: #7d352e;
}

.cmd-titlebar {
    cursor: move;
}

.commission-console.user-moved {
    right: auto;
}

.single-desktop-icon.dragging {
    opacity: 0.92;
}

@media (max-width: 820px) {
    .site-version-badge {
        right: 10px;
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
        font-size: 9px;
    }

    #profile-window {
        width: calc(100vw - 14px) !important;
    }

    .profile-main h1 {
        white-space: normal;
        font-size: clamp(30px, 9vw, 42px);
    }

    .computer-explorer-body {
        grid-template-columns: 1fr;
    }

    .computer-tree {
        display: none;
    }

    .computer-item-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .computer-item {
        min-height: 66px;
    }
}

/* =========================================================
   OCZerrs v5.1 — per-image censor / context menu
   ========================================================= */

.image-context-menu {
    position: absolute;
    z-index: 980;
    width: 238px;
    padding: 4px;
    border: 2px outset var(--panel);
    background: var(--panel);
    box-shadow: 6px 8px 20px rgba(0, 0, 0, 0.44);
}

.image-context-menu button {
    display: flex;
    width: 100%;
    min-height: 30px;
    align-items: center;
    gap: 9px;
    padding: 5px 8px;
    border: 1px solid transparent;
    color: var(--ink);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.image-context-menu button:hover {
    color: white;
    background: var(--title-active);
}

.image-context-menu button span {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    border: 1px solid #888;
    background: #f6f3ea;
    color: #2e5266;
    font-weight: bold;
}

.portfolio-card.censored .portfolio-thumb img {
    filter: blur(15px);
    transform: scale(1.04);
}

.portfolio-card.censored .portfolio-thumb::after {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 3px 6px;
    border: 1px solid rgba(207, 225, 230, 0.55);
    color: #cfe7eb;
    background: rgba(16, 25, 34, 0.82);
    content: "CENSORED";
    font: bold 9px "Courier New", monospace;
    letter-spacing: 0.08em;
    pointer-events: none;
}

.preview-canvas.censored::after {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    padding: 5px 8px;
    border: 1px solid rgba(207, 225, 230, 0.65);
    color: #cfe7eb;
    background: rgba(16, 25, 34, 0.82);
    content: "CENSORED";
    font: bold 11px "Courier New", monospace;
    letter-spacing: 0.1em;
    pointer-events: none;
}

.preview-canvas img.censored-image {
    filter: blur(22px);
    transform: scale(1.025);
}

.preview-menu {
    align-items: center;
}

.preview-menu .menu-link {
    margin-left: auto;
    padding: 0 2px;
    border: 0;
    color: #253d4f;
    background: transparent;
    font-size: 12px;
    cursor: pointer;
}

.preview-menu .menu-link:hover {
    text-decoration: underline;
    box-shadow: none;
}

.image-properties-window {
    z-index: 70;
}

.image-properties-body {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: start;
}

.properties-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 2px outset var(--panel);
    color: #cfe7eb;
    background: #172630;
    font: bold 26px Georgia, serif;
}

.properties-list {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.properties-list p {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 8px;
    margin: 0;
    font-size: 12px;
}

.properties-list span {
    overflow: hidden;
    color: #314a5c;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.properties-hint {
    grid-column: 1 / -1;
    margin: 8px 0 0;
    padding: 8px;
    border: 2px inset var(--panel);
    color: #4f5458;
    background: #efede6;
    font-size: 11px;
}

@media (max-width: 820px) {
    .image-context-menu {
        position: fixed;
        right: 8px !important;
        bottom: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
        left: auto !important;
        top: auto !important;
        width: min(280px, calc(100vw - 16px));
    }

    .image-context-menu button {
        min-height: 42px;
        font-size: 14px;
    }

    .image-properties-body {
        grid-template-columns: 1fr;
    }

    .properties-list p {
        grid-template-columns: 1fr;
    }
}


/* v5.2 profile/desktop fix */
.desktop-icon-stack {
    gap: 12px;
}

.desktop-icon-computer .icon-tile {
    width: 58px;
    height: 58px;
    font-size: 25px;
}

.desktop-icon-computer > span:nth-child(2) {
    color: #fff7e9;
    font-weight: bold;
    letter-spacing: 0.03em;
}

.desktop-icon-computer small {
    color: #9db4c0;
    font: 10px "Courier New", monospace;
    text-shadow: 1px 1px 2px #000;
}

@media (max-width: 760px) {
    .desktop-icon-stack {
        width: 102px;
        gap: 8px;
    }

    .desktop-icon-computer .icon-tile {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}


/* =========================================================
   OCZerrs v5.5 — mobile layout cleanup
   Fixes compact commission CMD, profile layout, and My Computer mobile view.
   ========================================================= */

@media (max-width: 820px), (max-width: 1024px) and (pointer: coarse) {
    /* Keep the protected CMD visible, but stop it from eating the phone screen. */
    .commission-console {
        top: calc(7px + var(--safe-top, 0px)) !important;
        right: calc(7px + var(--safe-right, 0px)) !important;
        bottom: auto !important;
        left: auto !important;
        width: min(292px, calc(100vw - 132px)) !important;
        min-width: 0 !important;
        max-width: min(292px, calc(100vw - 132px)) !important;
        max-height: 70px !important;
        overflow: hidden !important;
        z-index: 34;
    }

    .cmd-titlebar {
        height: 22px !important;
        min-height: 22px !important;
        padding: 2px 2px 2px 6px !important;
        gap: 5px;
    }

    .cmd-titlebar span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 9px;
    }

    .cmd-titlebar button {
        width: 24px !important;
        height: 19px !important;
        flex: 0 0 24px;
        font-size: 11px;
        line-height: 1;
    }

    .cmd-screen {
        padding: 4px 6px !important;
        font-size: 9px !important;
        line-height: 1.25 !important;
    }

    .cmd-screen > p:not(.cmd-status-line),
    .cmd-hint {
        display: none !important;
    }

    .cmd-status-line {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 4px;
        margin: 0 !important;
        padding: 4px 5px !important;
        overflow: hidden;
        white-space: nowrap;
    }

    .cmd-status-line strong {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    #commission-spinner {
        flex: 0 0 10px;
        margin-left: auto;
    }

    /* The global desktop polish forced the profile back into two columns.
       On phones it must behave like a single app page again. */
    #profile-window .window-body.profile-layout {
        gap: 12px !important;
        padding: 12px !important;
    }

    .profile-sidebar {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 10px !important;
        align-items: center !important;
    }

    .avatar-frame {
        width: 92px !important;
        padding: 5px !important;
    }

    .profile-sidebar .wide-button {
        grid-column: 2 !important;
        align-self: center !important;
        width: 100% !important;
        min-height: 44px !important;
        margin: 0 !important;
    }

    .profile-heading {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 9px !important;
    }

    .profile-main h1 {
        white-space: normal !important;
        font-size: clamp(33px, 11vw, 44px) !important;
        line-height: 1.02 !important;
        margin: 0 0 6px !important;
    }

    .synth-card {
        display: grid !important;
        width: 100%;
        min-height: 84px !important;
        grid-template-columns: 76px minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 2px 8px !important;
        padding: 7px 10px !important;
        text-align: left !important;
    }

    .synth-head {
        grid-row: 1 / 3;
        width: 86px;
        height: 66px;
        transform: scale(0.62) !important;
        transform-origin: center;
    }

    .synth-card strong {
        align-self: end;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 16px !important;
    }

    .synth-card small {
        align-self: start;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 8px !important;
    }

    .skill-chips {
        margin: 10px 0 !important;
    }

    .profile-panels {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .info-panel {
        padding: 11px !important;
    }

    .profile-footer {
        gap: 5px !important;
        margin-top: 10px !important;
    }

    /* Remove the stray full-width tree strip from My Computer on mobile. */
    .computer-explorer-body {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .computer-tree {
        display: none !important;
    }

    .computer-item-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 380px) {
    .commission-console {
        width: min(252px, calc(100vw - 116px)) !important;
    }

    .cmd-titlebar span {
        font-size: 8px;
    }

    .cmd-status-line {
        font-size: 8px;
    }

    .profile-sidebar {
        grid-template-columns: 84px minmax(0, 1fr) !important;
    }

    .avatar-frame {
        width: 84px !important;
    }

    .profile-main h1 {
        font-size: clamp(30px, 10.5vw, 38px) !important;
    }

    .synth-card {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }
}
