
html.sos-fullscreen-mode,
body.sos-fullscreen-mode {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.sos-fullscreen-mode.auth-body {
    display: block;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100dvh;
    height: 100dvh;
}

body.sos-fullscreen-mode #main,
body.sos-fullscreen-mode .tpl-detail--full-page,
body.sos-fullscreen-mode .tpl-detail__panel--full-page {
    width: 100% !important;
    max-width: none !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.sos-fullscreen-mode .tpl-detail__panel--full-page {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

:root {
    --sos-green: #39ff88;
    --sos-green-soft: rgba(57, 255, 136, 0.18);
    --sos-cyan: #5ee7ff;
    --sos-orange: #ff8b3d;
    --sos-red: #ff4b6b;
    --sos-bg: #030707;
    --sos-panel: rgba(5, 13, 15, 0.86);
    --sos-panel-strong: rgba(8, 18, 22, 0.96);
    --sos-border: rgba(94, 231, 255, 0.22);
    --sos-text: #e9fff3;
    --sos-muted: #8ab8a1;
    --sos-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}

.tpl-detail--full-page:has(.sos-shell) {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.tpl-detail__panel--full-page:has(.sos-shell) {
    min-height: 100vh;
}

.sos-shell,
.sos-shell * {
    box-sizing: border-box;
}

.sos-shell {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--sos-text);
    background:
        radial-gradient(circle at 14% 12%, rgba(57, 255, 136, 0.2), transparent 28rem),
        radial-gradient(circle at 88% 18%, rgba(94, 231, 255, 0.16), transparent 24rem),
        radial-gradient(circle at 60% 90%, rgba(255, 139, 61, 0.1), transparent 30rem),
        linear-gradient(135deg, #020403 0%, #03100c 42%, #020509 100%);
    font-family: "Segoe UI", Arial, sans-serif;
    isolation: isolate;
}

.sos-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25));
}

.sos-shell::after {
    content: "SERGEY SOLUTIONS OS";
    position: absolute;
    right: 3vw;
    bottom: 10vh;
    color: rgba(255, 255, 255, 0.045);
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.82;
    text-align: right;
    pointer-events: none;
    z-index: 0;
}

.sos-matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: var(--sos-matrix-opacity, 0.3);
    z-index: 0;
    pointer-events: none;
}

.sos-boot {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.94);
    transition: opacity 420ms ease, visibility 420ms ease;
}

.sos-boot.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sos-boot__box {
    width: min(560px, 100%);
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid rgba(57, 255, 136, 0.38);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(4, 19, 12, 0.96), rgba(2, 8, 8, 0.98));
    box-shadow: 0 0 80px rgba(57, 255, 136, 0.18);
    text-align: center;
}

.sos-boot__kicker {
    margin: 0 0 0.6rem;
    color: var(--sos-green);
    font-family: "Cascadia Mono", "Consolas", monospace;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.sos-boot h2 {
    margin: 0;
    font-size: clamp(2rem, 7vw, 4.6rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.sos-boot__line {
    margin: 1rem 0 0;
    color: var(--sos-muted);
    font-family: "Cascadia Mono", "Consolas", monospace;
}

.sos-boot__bar {
    height: 10px;
    overflow: hidden;
    margin: 2rem 0 0;
    border: 1px solid rgba(57, 255, 136, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.sos-boot__bar span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    animation: sosBootLoad 1.35s ease both;
    background: linear-gradient(90deg, var(--sos-green), var(--sos-cyan));
}

@keyframes sosBootLoad {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.sos-topbar,
.sos-taskbar,
.sos-launcher,
.sos-window,
.sos-desktop {
    position: relative;
    z-index: 2;
}

.sos-topbar {
    height: 58px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem clamp(0.8rem, 2vw, 1.4rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(18px);
}

.sos-start,
.sos-exit,
.sos-topbar button,
.sos-taskbar button,
.sos-launcher button,
.sos-desktop-icon,
.sos-desktop-shortcut,
.sos-window button {
    font: inherit;
}

.sos-start {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 38px;
    border: 1px solid rgba(57, 255, 136, 0.35);
    border-radius: 999px;
    color: var(--sos-text);
    background: linear-gradient(135deg, rgba(57, 255, 136, 0.18), rgba(94, 231, 255, 0.08));
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    box-shadow: 0 0 28px rgba(57, 255, 136, 0.12);
}

.sos-start__mark {
    font-weight: 900;
    letter-spacing: -0.04em;
}

.sos-start__version,
.sos-chip {
    font-family: "Cascadia Mono", "Consolas", monospace;
    color: var(--sos-green);
}

.sos-topbar__center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-width: 0;
    color: var(--sos-muted);
    font-size: 0.9rem;
    text-align: center;
}

.sos-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--sos-green);
    box-shadow: 0 0 0 0 rgba(57, 255, 136, 0.5);
    animation: sosPulse 1.6s infinite;
}

@keyframes sosPulse {
    70% { box-shadow: 0 0 0 12px rgba(57, 255, 136, 0); }
    100% { box-shadow: 0 0 0 0 rgba(57, 255, 136, 0); }
}

.sos-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sos-chip {
    border: 1px solid rgba(255, 139, 61, 0.4);
    border-radius: 999px;
    color: var(--sos-orange);
    padding: 0.28rem 0.58rem;
    background: rgba(255, 139, 61, 0.1);
}

.sos-exit {
    color: var(--sos-text);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    background: rgba(255, 255, 255, 0.06);
}

.sos-launcher {
    position: absolute;
    top: 68px;
    left: 1rem;
    width: min(340px, calc(100vw - 2rem));
    padding: 0.9rem;
    border: 1px solid var(--sos-border);
    border-radius: 22px;
    background: rgba(4, 12, 14, 0.93);
    box-shadow: var(--sos-shadow);
    backdrop-filter: blur(22px);
    z-index: 20;
}

.sos-launcher__head {
    display: grid;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem 0.9rem;
    color: var(--sos-muted);
}

.sos-launcher__head strong {
    color: var(--sos-text);
    font-size: 1.05rem;
}

.sos-launcher__item {
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    border: 0;
    border-radius: 16px;
    color: var(--sos-text);
    background: transparent;
    padding: 0.7rem;
    text-align: left;
    cursor: pointer;
}

.sos-launcher__item:hover,
.sos-desktop-icon:hover,
.sos-taskbar button:hover,
.sos-window__actions button:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sos-lock {
    font-size: 0.95rem;
    opacity: 0.86;
}

.sos-desktop {
    height: calc(100dvh - 108px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: clamp(1rem, 2vw, 2rem);
}

.sos-desktop-icon {
    width: 130px;
    min-height: 132px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 0.45rem;
    border: 1px solid transparent;
    border-radius: 22px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
    cursor: pointer;
}

.sos-desktop-icon strong {
    font-size: 0.94rem;
}

.sos-desktop-icon small {
    color: var(--sos-muted);
    font-size: 0.76rem;
    line-height: 1.22;
}

.sos-desktop-icon.is-locked {
    opacity: 0.7;
}

.sos-app-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    font-weight: 900;
    font-family: "Cascadia Mono", "Consolas", monospace;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 16px 30px rgba(0, 0, 0, 0.24);
}

.sos-app-icon--vscode {
    color: #a9eeff;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.9), rgba(11, 32, 52, 0.9));
}

.sos-app-icon--postman {
    color: #fff0e5;
    background: linear-gradient(135deg, #ff6b2c, #4b1807);
}

.sos-app-icon--terminal {
    color: var(--sos-green);
    background: linear-gradient(135deg, rgba(57, 255, 136, 0.28), rgba(4, 10, 8, 0.92));
}

.sos-window {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 86px);
    display: none;
    overflow: hidden;
    border: 1px solid var(--sos-border);
    border-radius: 22px;
    background: var(--sos-panel);
    box-shadow: var(--sos-shadow);
    backdrop-filter: blur(20px);
}

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

.sos-window.is-focused {
    border-color: rgba(57, 255, 136, 0.5);
    box-shadow: 0 0 0 1px rgba(57, 255, 136, 0.18), var(--sos-shadow);
}

.sos-window.is-maximized {
    left: 0.75rem !important;
    top: 58px !important;
    width: calc(100vw - 1.5rem) !important;
    height: calc(100dvh - 124px) !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 18px;
}

.sos-window.is-maximized .sos-window__bar {
    cursor: default;
}

.sos-window__bar {
    min-height: 46px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.045);
    cursor: grab;
    user-select: none;
}

.sos-window__bar:active {
    cursor: grabbing;
}

.sos-window__bar strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.sos-window__traffic {
    display: flex;
    gap: 0.45rem;
}

.sos-window__traffic span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.sos-window__traffic span:nth-child(1) { background: var(--sos-red); }
.sos-window__traffic span:nth-child(2) { background: var(--sos-orange); }
.sos-window__traffic span:nth-child(3) { background: var(--sos-green); }

.sos-window__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sos-window__actions button {
    width: 30px;
    height: 28px;
    border: 0;
    border-radius: 9px;
    color: var(--sos-text);
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
}

.sos-vscode {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: 210px 1fr;
}

.sos-vscode__tree {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem;
    border-right: 1px solid rgba(255,255,255,0.09);
    background: rgba(0,0,0,0.24);
}

.sos-vscode__tree strong {
    color: var(--sos-muted);
    font-size: 0.74rem;
    letter-spacing: 0.12em;
}

.sos-vscode__tree button,
.sos-tabs button {
    border: 0;
    color: var(--sos-text);
    background: transparent;
    text-align: left;
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    cursor: pointer;
}

.sos-vscode__tree button.is-active,
.sos-tabs button.is-active {
    color: var(--sos-green);
    background: rgba(57, 255, 136, 0.12);
}

.sos-vscode__editor {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sos-tabs {
    display: flex;
    gap: 0.2rem;
    padding: 0.45rem 0.55rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sos-vscode pre,
.sos-postman__response,
.sos-terminal__output {
    margin: 0;
    overflow: auto;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.88rem;
    line-height: 1.58;
}

.sos-vscode pre {
    flex: 1;
    padding: 1rem;
    color: #d9ffe8;
}

.sos-postman {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.9rem;
}

.sos-postman__request {
    display: grid;
    grid-template-columns: 92px 1fr auto;
    gap: 0.55rem;
}

.sos-postman select,
.sos-postman input,
.sos-terminal__input input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    color: var(--sos-text);
    background: rgba(0, 0, 0, 0.28);
    padding: 0.7rem 0.8rem;
    outline: none;
}

.sos-postman select:focus,
.sos-postman input:focus,
.sos-terminal__input input:focus {
    border-color: rgba(57, 255, 136, 0.5);
    box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.12);
}

.sos-postman__request button,
.sos-terminal__input button {
    border: 0;
    border-radius: 12px;
    color: #031008;
    background: linear-gradient(135deg, var(--sos-green), var(--sos-cyan));
    padding: 0.7rem 1rem;
    font-weight: 800;
    cursor: pointer;
}

.sos-postman__presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.sos-postman__presets button {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.055);
    padding: 0.48rem 0.75rem;
    cursor: pointer;
}

.sos-postman__response {
    flex: 1;
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: #d9ffe8;
    background: rgba(0, 0, 0, 0.34);
    padding: 0.9rem;
}

.sos-window--terminal {
    border-color: rgba(57, 255, 136, 0.28);
}

.sos-terminal-status {
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    padding: 0.25rem 0.5rem;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.74rem;
}

.sos-terminal-status.is-online {
    color: var(--sos-green);
    border-color: rgba(57, 255, 136, 0.35);
    background: rgba(57, 255, 136, 0.09);
}

.sos-terminal-status.is-locked {
    color: var(--sos-orange);
    border-color: rgba(255, 139, 61, 0.38);
    background: rgba(255, 139, 61, 0.09);
}

.sos-terminal {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.32);
}

.sos-terminal__output {
    flex: 1;
    padding: 1rem;
    color: #dfffe9;
}

.sos-terminal__output p {
    margin: 0 0 0.55rem;
    white-space: pre-wrap;
}

.sos-terminal__output span {
    color: var(--sos-green);
    margin-right: 0.45rem;
}

.sos-terminal__input {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sos-terminal__input label {
    color: var(--sos-green);
    font-family: "Cascadia Mono", "Consolas", monospace;
}

.sos-terminal__input input:disabled,
.sos-terminal__input button:disabled {
    opacity: 0.54;
    cursor: not-allowed;
}

.sos-taskbar {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: calc(100vw - 2rem);
    overflow-x: auto;
    padding: 0.55rem;
    border: 1px solid var(--sos-border);
    border-radius: 24px;
    background: rgba(3, 9, 10, 0.86);
    box-shadow: var(--sos-shadow);
    backdrop-filter: blur(18px);
}

.sos-taskbar button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 16px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.045);
    padding: 0.45rem 0.7rem;
    cursor: pointer;
    white-space: nowrap;
}

.sos-taskbar .sos-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.7rem;
}



.sos-shell.is-matrix-off .sos-matrix {
    display: none;
}

.sos-shell.is-compact .sos-desktop-icon {
    width: 104px;
    min-height: 104px;
    border-radius: 18px;
}

.sos-shell.is-compact .sos-desktop-icon small {
    display: none;
}

.sos-open-tab {
    color: var(--sos-text);
    text-decoration: none;
    border: 1px solid rgba(94, 231, 255, 0.24);
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    background: rgba(94, 231, 255, 0.08);
    white-space: nowrap;
}

.sos-launcher__group {
    display: grid;
    gap: 0.25rem;
    margin-top: 0.45rem;
}

.sos-launcher__group p {
    margin: 0.4rem 0 0.15rem;
    padding: 0 0.65rem;
    color: var(--sos-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sos-app-icon--settings {
    color: #f8fbff;
    background: linear-gradient(135deg, rgba(141, 158, 255, 0.9), rgba(23, 28, 60, 0.92));
}

.sos-app-icon--notepad {
    color: #eafff1;
    background: linear-gradient(135deg, rgba(37, 209, 118, 0.85), rgba(3, 38, 23, 0.94));
}

.sos-app-icon--paint {
    color: #fff;
    background: conic-gradient(from 180deg, #39ff88, #5ee7ff, #ff8b3d, #ff4b6b, #39ff88);
}

.sos-app-icon--google {
    color: #0b1020;
    background: linear-gradient(135deg, #ffffff, #dcecff);
}

.sos-app-icon--favorites {
    color: #06110c;
    background: linear-gradient(135deg, #ffe66b, var(--sos-green));
}

.sos-settings,
.sos-notepad,
.sos-paint,
.sos-browser,
.sos-favorites {
    min-height: 0;
    flex: 1;
    padding: 1rem;
}

.sos-window--browser .sos-window__bar {
    border-bottom-color: rgba(94, 231, 255, 0.16);
}

.sos-browser {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.8rem;
}

.sos-browser__toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.sos-browser__nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.sos-browser__nav button,
.sos-browser__toolbar button,
.sos-browser__quicklinks button {
    border: 1px solid rgba(94, 231, 255, 0.18);
    border-radius: 12px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
    font-weight: 800;
}

.sos-browser__nav button {
    width: 34px;
    height: 34px;
    padding: 0;
    font-size: 1.1rem;
}

.sos-browser__nav button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.sos-browser__toolbar input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: var(--sos-text);
    background: rgba(0, 0, 0, 0.34);
    padding: 0.72rem 1rem;
    outline: none;
}

.sos-browser__toolbar > button {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: #03100d;
    background: linear-gradient(135deg, var(--sos-green), var(--sos-cyan));
}

.sos-browser__stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.34);
}

.sos-browser__home {
    min-height: 100%;
    display: grid;
    place-content: center;
    gap: 1.2rem;
    padding: 2rem;
    text-align: center;
}

.sos-browser__home[hidden],
.sos-browser iframe[hidden] {
    display: none !important;
}

.sos-browser iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.sos-google__logo {
    font-size: clamp(2.7rem, 9vw, 5.2rem);
    font-weight: 900;
    letter-spacing: -0.08em;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sos-browser__home p,
.sos-browser__note {
    margin: 0;
    color: var(--sos-muted);
    line-height: 1.45;
}

.sos-browser__quicklinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
}

.sos-browser__quicklinks button {
    padding: 0.65rem 0.85rem;
}

.sos-browser__note {
    font-size: 0.82rem;
    text-align: center;
}

.sos-paint__canvas {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: #07100d;
    touch-action: none;
    cursor: crosshair;
}


.sos-window--favorites .sos-window__bar {
    border-bottom-color: rgba(255, 230, 107, 0.2);
}

.sos-favorites {
    min-height: 0;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.35fr) minmax(220px, 0.95fr);
    gap: 0.85rem;
    overflow: hidden;
}

.sos-favorites__editor,
.sos-favorites__list-panel,
.sos-favorites__io {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem;
}

.sos-favorites__section-head,
.sos-favorites__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.sos-favorites__section-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sos-favorites label {
    display: grid;
    gap: 0.35rem;
    color: var(--sos-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.sos-favorites input,
.sos-favorites select,
.sos-favorites textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    color: var(--sos-text);
    background: rgba(0, 0, 0, 0.34);
    padding: 0.68rem 0.75rem;
    outline: none;
}

.sos-favorites textarea {
    min-height: 126px;
    resize: vertical;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.78rem;
}

.sos-favorites button {
    border: 1px solid rgba(94, 231, 255, 0.18);
    border-radius: 12px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    font-weight: 800;
}

.sos-favorites__save,
#sosFavoriteExport,
#sosFavoriteImport {
    color: #03100d !important;
    background: linear-gradient(135deg, var(--sos-green), var(--sos-cyan)) !important;
}

.sos-favorites__toolbar input {
    min-width: 0;
}

#sosFavoriteCount {
    white-space: nowrap;
    border: 1px solid rgba(57, 255, 136, 0.2);
    border-radius: 999px;
    padding: 0.45rem 0.65rem;
    color: var(--sos-green);
    background: rgba(57, 255, 136, 0.08);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.78rem;
}

.sos-favorites__list {
    min-height: 0;
    display: grid;
    gap: 0.65rem;
    overflow: auto;
    padding-right: 0.15rem;
}

.sos-favorite-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.045);
}

.sos-favorite-card__main {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.sos-favorite-card__main strong,
.sos-favorite-card__main small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sos-favorite-card__main small {
    color: var(--sos-muted);
}

.sos-favorite-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.sos-favorite-card__tags span {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 0.18rem 0.45rem;
    color: rgba(233, 255, 243, 0.78);
    background: rgba(255, 255, 255, 0.045);
    font-size: 0.68rem;
}

.sos-favorite-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sos-favorite-card__actions button {
    min-width: 78px;
    padding: 0.42rem 0.55rem;
    font-size: 0.76rem;
}

.sos-favorites__empty,
.sos-favorites__hint {
    margin: 0;
    color: var(--sos-muted);
    line-height: 1.45;
}

.sos-favorites__empty {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
}


.sos-desktop-widget {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 3;
    width: min(260px, 28vw);
    border: 1px solid rgba(57, 255, 136, 0.18);
    border-radius: 22px;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, rgba(2, 16, 10, 0.72), rgba(0, 0, 0, 0.36));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(16px);
}

.sos-desktop-widget span,
.sos-desktop-widget small {
    display: block;
    color: var(--sos-muted);
    font-family: "Cascadia Mono", "Consolas", monospace;
}

.sos-desktop-widget span {
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sos-desktop-widget strong {
    display: block;
    margin-top: 0.25rem;
    color: var(--sos-green);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
    line-height: 1;
}

.sos-desktop-widget small {
    margin-top: 0.3rem;
    font-size: 0.78rem;
}

.sos-desktop-shortcuts {
    position: absolute;
    top: 156px;
    right: 24px;
    z-index: 3;
    width: min(260px, 28vw);
    display: grid;
    gap: 0.55rem;
}

.sos-desktop-shortcuts:empty {
    display: none;
}

.sos-desktop-shortcut {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(255, 230, 107, 0.22);
    border-radius: 18px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.07);
    padding: 0.62rem 0.7rem;
    cursor: pointer;
    text-align: start;
    backdrop-filter: blur(14px);
}

.sos-desktop-shortcut:hover {
    border-color: rgba(255, 230, 107, 0.48);
    transform: translateY(-1px);
}

.sos-desktop-shortcut__icon,
.sos-favorite-card__icon-img,
.sos-favorites__icon-preview {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #06110c;
    background: linear-gradient(135deg, #ffe66b, var(--sos-green));
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.72rem;
    font-weight: 900;
}

img.sos-desktop-shortcut__icon,
.sos-favorite-card__icon-img,
.sos-favorites__icon-preview img {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    object-fit: cover;
}

.sos-desktop-shortcut strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.82rem;
}

.sos-browser__blocked {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--sos-text);
    text-align: center;
    background: radial-gradient(circle at center, rgba(4, 20, 14, 0.96), rgba(0, 0, 0, 0.88));
}

.sos-browser__blocked[hidden] {
    display: none !important;
}

.sos-browser__blocked strong {
    color: var(--sos-green);
    font-size: 1.15rem;
}

.sos-browser__blocked p {
    max-width: 48ch;
    margin: 0 auto;
    color: var(--sos-muted);
    line-height: 1.45;
}

.sos-browser__blocked button {
    justify-self: center;
    border: 1px solid rgba(57, 255, 136, 0.32);
    border-radius: 999px;
    color: #03100d;
    background: linear-gradient(135deg, var(--sos-green), var(--sos-cyan));
    padding: 0.72rem 1rem;
    cursor: pointer;
    font-weight: 900;
}

.sos-favorites__folders {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.sos-favorites__folders button {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0.42rem 0.65rem;
    color: var(--sos-muted);
}

.sos-favorites__folders button.is-active {
    color: #03100d;
    border-color: rgba(255, 230, 107, 0.45);
    background: linear-gradient(135deg, #ffe66b, var(--sos-green));
}

.sos-favorites__icon-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sos-favorites__icon-preview {
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.sos-favorite-card__folder {
    color: #06110c !important;
    border-color: rgba(255, 230, 107, 0.38) !important;
    background: linear-gradient(135deg, rgba(255, 230, 107, 0.92), rgba(57, 255, 136, 0.86)) !important;
}

.sos-favorite-card__actions button.is-installed {
    color: var(--sos-green);
    border-color: rgba(57, 255, 136, 0.28);
    background: rgba(57, 255, 136, 0.08);
}


@media (max-width: 900px) {
    .sos-topbar {
        grid-template-columns: auto auto;
    }

    .sos-topbar__center {
        display: none;
    }

    .sos-desktop {
        height: auto;
        min-height: calc(100dvh - 122px);
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
    }

    .sos-window {
        left: 0.5rem !important;
        top: 76px !important;
        width: calc(100vw - 1rem) !important;
        height: calc(100dvh - 150px) !important;
        max-height: none;
    }

    .sos-vscode {
        grid-template-columns: 1fr;
    }

    .sos-vscode__tree {
        display: none;
    }

    .sos-postman__request,
    .sos-terminal__input {
        grid-template-columns: 1fr;
    }

    .sos-favorites {
        grid-template-columns: 1fr;
        overflow: auto;
    }
}




@media (max-width: 900px) {
    .sos-shell {
        width: 100%;
        height: 100dvh;
        min-height: 100dvh;
    }

    .sos-topbar {
        height: 56px;
        grid-template-columns: auto 1fr;
        gap: 0.5rem;
        padding: 0.5rem 0.6rem;
    }

    .sos-topbar__right {
        justify-content: flex-end;
        gap: 0.4rem;
        min-width: 0;
    }

    .sos-chip {
        display: none;
    }

    .sos-open-tab,
    .sos-exit {
        padding: 0.36rem 0.55rem;
        font-size: 0.78rem;
    }

    .sos-launcher {
        top: 64px;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-height: calc(100dvh - 136px);
        overflow: auto;
    }

    .sos-desktop {
        height: calc(100dvh - 116px);
        min-height: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
        align-content: start;
        align-items: start;
        gap: 0.75rem;
        overflow: hidden;
        padding: 0.75rem;
    }

    .sos-desktop-icon {
        width: 100%;
        min-height: 104px;
        border-radius: 18px;
        padding: 0.55rem;
    }

    .sos-desktop-icon small {
        display: none;
    }

    .sos-window {
        left: 0.5rem !important;
        top: 64px !important;
        width: calc(100vw - 1rem) !important;
        height: calc(100dvh - 132px) !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 18px;
    }

    .sos-window__bar {
        min-height: 44px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.55rem;
    }

    .sos-terminal-status {
        display: none;
    }

    .sos-taskbar {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        transform: none;
        max-width: none;
        border-radius: 18px;
        padding: 0.45rem;
    }

    .sos-taskbar button {
        padding: 0.42rem 0.55rem;
        font-size: 0.82rem;
    }

    .sos-browser__toolbar,
    .sos-postman__request,
    .sos-terminal__input {
        grid-template-columns: 1fr;
    }

    .sos-favorites {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .sos-favorite-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .sos-favorite-card__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sos-browser__nav {
        justify-content: center;
    }

    .sos-paint__tools {
        max-height: 112px;
        overflow: auto;
    }
}

@media (max-width: 520px) {
    .sos-start__version,
    .sos-exit {
        display: none;
    }

    .sos-open-tab {
        max-width: 46vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sos-window__traffic {
        display: none;
    }

    .sos-taskbar button span + * {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sos-boot__bar span,
    .sos-pulse {
        animation: none;
    }
}


/* S.OS fullscreen boundary hotfix
   Keep maximized app windows inside the S.OS shell, not inside raw 100vw.
   This prevents right-side overflow when the template is hosted inside MVC wrappers. */
body.sos-fullscreen-mode,
body.sos-fullscreen-mode #main,
body.sos-fullscreen-mode .tpl-detail--full-page,
body.sos-fullscreen-mode .tpl-detail__panel--full-page,
.sos-shell {
    max-width: 100% !important;
    overflow: hidden !important;
}

.sos-window {
    max-width: calc(100% - 1rem);
    max-height: calc(100% - 86px);
}

.sos-window.is-maximized {
    left: 0.75rem !important;
    right: 0.75rem !important;
    top: 58px !important;
    bottom: 64px !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    transform: none !important;
}

@media (max-width: 900px) {
    .sos-window.is-maximized {
        left: 0.5rem !important;
        right: 0.5rem !important;
        top: 64px !important;
        bottom: 58px !important;
        width: auto !important;
        height: auto !important;
    }
}


/* S.OS window/content layout fix: keep app content stretched and readable. */
.sos-window.is-open > :not(.sos-window__bar) {
    width: 100%;
    min-width: 0;
}

.sos-settings,
.sos-notepad,
.sos-paint,
.sos-browser,
.sos-favorites {
    width: 100%;
    height: 100%;
    min-width: 0;
}

.sos-notepad {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.sos-notepad__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    color: var(--sos-muted);
    font-weight: 800;
}

.sos-notepad textarea {
    flex: 1;
    min-height: 0;
    width: 100%;
    resize: none;
    border: 1px solid rgba(57, 255, 136, 0.18);
    border-radius: 16px;
    color: #dfffe9;
    background: rgba(0, 0, 0, 0.32);
    padding: 1rem;
    outline: none;
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.sos-notepad textarea:focus {
    border-color: rgba(57, 255, 136, 0.5);
    box-shadow: 0 0 0 3px rgba(57, 255, 136, 0.1);
}

.sos-paint {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}

.sos-paint__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.sos-paint__tools label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sos-muted);
    font-weight: 800;
}

.sos-paint__tools button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    color: var(--sos-text);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.42rem 0.65rem;
    cursor: pointer;
    font-weight: 800;
}

.sos-favorites {
    grid-template-columns: minmax(270px, 300px) minmax(0, 1fr) minmax(270px, 300px);
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.sos-favorites > * {
    min-width: 0;
}

.sos-favorites__editor,
.sos-favorites__list-panel,
.sos-favorites__io {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.sos-favorite-card {
    min-width: 0;
}

.sos-favorite-card__actions button {
    min-width: 72px;
}

/* Desktop icon positioning/dragging. */
.sos-desktop {
    position: relative;
}

.sos-desktop-icon.is-desktop-positioned {
    position: absolute;
    margin: 0;
    touch-action: none;
    user-select: none;
}

.sos-desktop-icon.is-dragging {
    opacity: 0.92;
    border-color: rgba(57, 255, 136, 0.55);
    background: rgba(57, 255, 136, 0.1);
    box-shadow: 0 0 0 1px rgba(57, 255, 136, 0.18), 0 24px 60px rgba(0, 0, 0, 0.42);
    z-index: 8;
}

@media (max-width: 1180px) {
    .sos-favorites {
        grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.1fr);
        overflow: auto;
    }

    .sos-favorites__io {
        grid-column: 1 / -1;
        min-height: 220px;
    }
}

@media (max-width: 900px) {
    .sos-desktop-icon.is-desktop-positioned {
        position: static;
    }

    .sos-desktop-widget,
    .sos-desktop-shortcuts {
        position: static;
        width: 100%;
    }

    .sos-desktop-widget {
        grid-column: 1 / -1;
        border-radius: 18px;
    }

    .sos-desktop-shortcuts {
        grid-column: 1 / -1;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .sos-favorites {
        grid-template-columns: 1fr;
        overflow: auto;
    }
}

/* S.OS scoped reset against global site.css section rules.
   site.css has a global `section { max-width: calc(100% - 300px); margin:20px auto; }`
   and mobile section padding. Those rules broke S.OS windows, especially Favorites, because
   Favorites uses nested <section> panels. Keep all page-level section styling outside S.OS only. */
.sos-shell section,
.sos-shell main,
.sos-shell header,
.sos-shell footer {
    max-width: none !important;
    margin: 0 !important;
}

.sos-shell section {
    padding: 0 !important;
}

.sos-shell .sos-window {
    padding: 0 !important;
}

.sos-shell .sos-favorites__editor,
.sos-shell .sos-favorites__list-panel,
.sos-shell .sos-favorites__io {
    padding: 0.85rem !important;
}

.sos-shell .sos-favorites {
    display: grid !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0.85rem !important;
    gap: 0.85rem !important;
    grid-template-columns: minmax(260px, 300px) minmax(360px, 1fr) minmax(260px, 300px) !important;
    overflow: hidden !important;
}

.sos-shell .sos-favorites__editor,
.sos-shell .sos-favorites__list-panel,
.sos-shell .sos-favorites__io {
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

.sos-shell .sos-favorites__list-panel {
    min-width: 360px !important;
}

@media (max-width: 1260px) {
    .sos-shell .sos-favorites {
        grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) !important;
        overflow: auto !important;
    }

    .sos-shell .sos-favorites__io {
        grid-column: 1 / -1 !important;
        min-height: 220px !important;
    }

    .sos-shell .sos-favorites__list-panel {
        min-width: 0 !important;
    }
}

@media (max-width: 900px) {
    .sos-shell .sos-favorites {
        grid-template-columns: 1fr !important;
        overflow: auto !important;
    }

    .sos-shell .sos-favorites__editor,
    .sos-shell .sos-favorites__list-panel,
    .sos-shell .sos-favorites__io {
        min-height: 260px !important;
        height: auto !important;
    }

    .sos-shell .sos-desktop-widget,
    .sos-shell .sos-desktop-shortcuts {
        position: static !important;
        width: 100% !important;
    }
}

/* Iteration: Start menu taskbar, dynamic running apps, and desktop shortcut menu. */
.sos-window.is-open.is-minimized {
    display: none;
}

.sos-taskbar {
    left: 50% !important;
    right: auto !important;
    bottom: 0.75rem !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    width: auto;
    max-width: min(100% - 1.5rem, 980px) !important;
    min-height: 58px;
    padding: 0.45rem 0.55rem !important;
    border-radius: 22px !important;
    border: 1px solid rgba(94, 231, 255, 0.24) !important;
    background: linear-gradient(180deg, rgba(8, 20, 22, 0.94), rgba(2, 7, 8, 0.92)) !important;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    overflow: hidden !important;
}

.sos-taskbar__start,
.sos-taskbar__app {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    color: var(--sos-text) !important;
    background: rgba(255, 255, 255, 0.055) !important;
    padding: 0.38rem 0.68rem !important;
    cursor: pointer;
    white-space: nowrap;
}

.sos-taskbar__start {
    flex: 0 0 auto;
    gap: 0.55rem !important;
    background: linear-gradient(135deg, rgba(57, 255, 136, 0.26), rgba(94, 231, 255, 0.1)) !important;
    border-color: rgba(57, 255, 136, 0.32) !important;
    box-shadow: 0 0 30px rgba(57, 255, 136, 0.12);
}

.sos-taskbar__start[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(57, 255, 136, 0.42), rgba(94, 231, 255, 0.16)) !important;
    border-color: rgba(57, 255, 136, 0.56) !important;
}

.sos-taskbar__start-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    color: #06110c;
    background: var(--sos-green);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.78rem;
    font-weight: 900;
}

.sos-taskbar__apps {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(68vw, 720px);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.sos-taskbar__apps:empty {
    display: none;
}

.sos-taskbar__app {
    flex: 0 0 auto;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sos-taskbar__app.is-active {
    border-color: rgba(57, 255, 136, 0.5) !important;
    background: rgba(57, 255, 136, 0.14) !important;
    box-shadow: inset 0 -2px 0 rgba(57, 255, 136, 0.72);
}

.sos-taskbar__app.is-minimized {
    opacity: 0.78;
    box-shadow: inset 0 -2px 0 rgba(255, 230, 107, 0.56);
}

.sos-taskbar__start:hover,
.sos-taskbar__app:hover {
    background: rgba(255, 255, 255, 0.105) !important;
    transform: translateY(-1px);
}

.sos-taskbar__app .sos-app-icon,
.sos-taskbar .sos-app-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    border-radius: 10px !important;
    font-size: 0.68rem !important;
}

.sos-launcher {
    top: auto;
    bottom: 74px;
    left: clamp(0.75rem, 2vw, 1.4rem);
}

.sos-desktop-menu {
    position: absolute;
    z-index: 5000;
    min-width: 198px;
    display: grid;
    gap: 0.35rem;
    padding: 0.45rem;
    border: 1px solid rgba(94, 231, 255, 0.3);
    border-radius: 15px;
    color: var(--sos-text);
    background: rgba(3, 9, 10, 0.96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(18px);
}

.sos-desktop-menu[hidden] {
    display: none !important;
}

.sos-desktop-menu button {
    width: 100%;
    border: 0;
    border-radius: 11px;
    color: var(--sos-text);
    background: transparent;
    padding: 0.62rem 0.7rem;
    text-align: start;
    cursor: pointer;
}

.sos-desktop-menu button:hover {
    background: rgba(57, 255, 136, 0.12);
}

@media (max-width: 900px) {
    .sos-taskbar {
        width: auto;
        max-width: calc(100% - 1rem) !important;
        min-height: 54px;
        bottom: 0.5rem !important;
        border-radius: 18px !important;
    }

    .sos-taskbar__start strong,
    .sos-taskbar__app {
        font-size: 0.82rem;
    }

    .sos-launcher {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 66px;
        width: auto;
        max-width: none;
    }
}


/* Iteration fix: anchor START menu above the clicked START button and keep empty taskbar compact. */
.sos-launcher {
    max-height: min(76dvh, 620px);
    overflow-y: auto;
}

.sos-taskbar:has(.sos-taskbar__apps:empty) {
    width: auto !important;
}
