@font-face {
    font-family: 'Akatab';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/akatab-regular-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Akatab';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/akatab-bold-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Akatab';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/akatab-extrabold-latin.woff2') format('woff2');
}
*, *::before, *::after {
    box-sizing: border-box;
    border-radius: 0;
}
html {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #000000;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: auto;
}
html, body {
    overscroll-behavior: none;
}
@supports (padding: env(safe-area-inset-top)) {
    #top-bar {
        padding-top: env(safe-area-inset-top);
    }
    #bottom-taskbar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .menu-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    color: #ffffff;
    font-family: 'Akatab', 'Share Tech Mono', monospace;
    width: calc(100vw / var(--k-ui-scale, 1));
    height: calc(100vh / var(--k-ui-scale, 1));
    max-width: calc(100vw / var(--k-ui-scale, 1));
    max-height: calc(100vh / var(--k-ui-scale, 1));
    overflow: hidden;
    text-transform: lowercase;
    box-sizing: border-box;
}
body.bold-text, body.bold-text *, body.bold-text button, body.bold-text input, body.bold-text textarea {
    font-weight: bold !important;
}
::-webkit-scrollbar {
    display: none;
}
* {
    scrollbar-width: none;
}
* {
    -webkit-tap-highlight-color: transparent;
}
::selection {
    background: rgba(255, 255, 255, 0.2);
}
@media (pointer: coarse) {
    ::selection {
        background: rgba(255, 255, 255, 0.35);
    }
    *::-webkit-scrollbar {
        display: none;
    }
}
button {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #333333;
    font-family: inherit;
    cursor: pointer;
    text-transform: lowercase;
    transition: border-color 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}
button:hover {
    border-color: #ffffff;
}
input[type="text"], input[type="search"], input[type="password"], textarea, select {
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #333333;
    font-family: inherit;
    outline: none;
    padding: 6px 10px;
    box-sizing: border-box;
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #111111;
    border: 1px solid #333333;
    outline: none;
    cursor: pointer;
    margin: 0;
    vertical-align: middle;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
}
@media (pointer: coarse) {
    input[type="range"]::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    input[type="range"]::-moz-range-thumb {
        width: 20px;
        height: 20px;
    }
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: #222222;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 12px;
    background: #ffffff;
    border: 1px solid #ffffff;
    cursor: pointer;
    margin-top: -4px;
}
input[type="range"]::-moz-range-track {
    height: 4px;
    background: #222222;
}
input[type="range"]::-moz-range-thumb {
    width: 8px;
    height: 12px;
    background: #ffffff;
    border: 1px solid #ffffff;
    cursor: pointer;
}
input[type="range"]:focus {
    border-color: #ffffff;
}
input:focus {
    border-color: #ffffff;
}
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px;
    background-color: #000000;
    border-bottom: 1px solid #333333;
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}
#top-bar.visible {
    transform: translateY(0);
}
.top-bar-section {
    display: flex;
    align-items: center;
}
.top-bar-section.left { flex: 0 0 auto; gap: 8px; margin-right: 10px; }
.top-bar-section.center-left { flex: 0 0 auto; margin-right: 10px; }
.top-bar-section.tiles-container { flex: 1; display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; gap: 4px; }
.top-bar-section.center { flex: 0 0 auto; margin: 0 10px; }
.top-bar-section.right { flex: 0 0 auto; gap: 8px; margin-left: auto; }
.top-bar-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
}
.top-bar-btn:hover {
    border-color: #ffffff;
}
/* --- Notifications bell --- */
.bell-btn {
    position: relative;
}
.bell-badge {
    display: none;
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    align-items: center;
    justify-content: center;
    background: #ff3333;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    border-radius: 8px;
    letter-spacing: 0;
}
.bell-btn.has-unread {
    border-color: #ff3333;
}
.bell-panel {
    position: fixed;
    top: 40px;
    right: 12px;
    z-index: 9999;
    width: min(340px, calc(100vw - 24px));
    max-height: min(480px, calc(100vh - 60px));
    overflow-y: auto;
    scrollbar-width: none;
    background: #000;
    border: 1px solid #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    font-size: 12px;
}
.bell-panel.visible {
    display: flex;
}
.bell-panel-header {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    color: #aaa;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: lowercase;
    position: sticky;
    top: 0;
    background: #000;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.bell-panel-actions {
    display: flex;
    gap: 4px;
}
.bell-panel-btn {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    line-height: 1;
    padding: 2px 5px;
}
.bell-panel-btn:hover {
    border-color: #fff;
    color: #fff;
}
.bell-panel-btn:disabled {
    opacity: 0.4;
    cursor: default;
    border-color: #333;
    color: #888;
}
.bell-empty {
    padding: 24px 12px;
    color: #555;
    text-align: center;
    font-size: 11px;
}
.bell-day {
    padding: 8px 12px 2px;
    color: #555;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: lowercase;
}
.bell-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-left: 2px solid transparent;
}
.bell-item.unread {
    border-left-color: #ff3333;
    background: rgba(255, 51, 51, 0.06);
}
.bell-item:hover {
    background: #111;
}
.bell-item-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    font-size: 11px;
    margin-top: 1px;
}
.bell-item-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bell-item-title {
    color: #fff;
    font-size: 12px;
    word-break: break-word;
}
.bell-item-body {
    color: #888;
    font-size: 10px;
    word-break: break-word;
    max-height: 3em;
    overflow: hidden;
}
.bell-item-time {
    flex: 0 0 auto;
    color: #555;
    font-size: 9px;
    padding-top: 2px;
}
.top-bar-clock {
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: normal;
    color: #ffffff;
}
.top-bar-date {
    font-size: 10px;
    letter-spacing: 0.5px;
    font-weight: normal;
    color: #aaaaaa;
    margin-left: 3px;
}
.top-bar-tiles {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.top-bar-tiles::-webkit-scrollbar {
    display: none;
}
.top-bar-tile-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    height: 24px;
    background-color: #050505;
    border: 1px solid #333333;
    color: #888888;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    user-select: none;
    max-width: 160px;
    flex-shrink: 0;
}
.top-bar-tile-tab:hover {
    border-color: #666666;
    color: #cccccc;
}
.top-bar-tile-tab.active {
    background-color: #1a1a1a;
    border-color: #ffffff;
    color: #ffffff;
}
.top-bar-tile-tab .tab-title {
    color: #3399ff !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-bar-tile-tab .tab-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 2px;
    font-size: 10px;
    color: #666666;
    transition: color 0.2s;
}
.top-bar-player {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 6px;
    border: 1px solid #333333;
    background-color: #050505;
    font-size: 11px;
    max-width: 220px;
    box-sizing: border-box;
}
.top-bar-player .top-bar-btn {
    width: 20px;
    height: 20px;
    font-size: 10px;
    border: none;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: transparent;
}
.top-bar-player .top-bar-btn:hover {
    border: none;
    color: #ffffff;
    background: #222222;
}
.top-bar-track-name {
    font-size: 10px;
    color: #888888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
    margin-left: 2px;
    cursor: pointer;
    transition: color 0.2s ease;
}
.top-bar-track-name:hover {
    color: #ffffff;
}
#main-menu {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - 32px);
    max-height: calc(100% - 32px);
    background-color: #000000;
    z-index: 900;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.3s ease, opacity 0.25s ease;
}
#main-menu.collapsed {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}
.menu-tab-bar {
    display: flex;
    flex: 0 0 auto;
    border-bottom: 1px solid #333333;
}
.menu-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 13px;
    color: #888888;
    transition: color 0.25s ease, border-bottom-color 0.25s ease;
}
.menu-tab.active {
    border-bottom-color: #ffffff;
    color: #ffffff;
}
.menu-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding: 16px;
    scrollbar-width: none;
}
.k-player-bar-container {
    flex: 0 0 auto;
}
.menu-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 10px 16px;
    border-top: 1px solid #222222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
}
.menu-clock {
    font-size: clamp(18px, 5.5vw, 36px);
    letter-spacing: 1px;
    font-weight: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}
.menu-clock-date {
    font-size: 11px;
    color: #888888;
    margin-top: 2px;
    margin-left: 6px;
    white-space: nowrap;
}
.os-link, a.os-link, a.os-link:visited {
    color: #ff0000 !important;
    font-size: 11px !important;
    text-decoration: none !important;
    border: 1px solid #ff0000 !important;
    padding: 6px 12px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.os-link:hover, .os-link:focus, .os-link:active, a.os-link:hover {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background-color: #111111 !important;
}
.wandering-menu-btn {
    position: fixed;
    z-index: 99999;
    padding: 8px 14px;
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    text-transform: lowercase;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.95);
    transition: transform 0.15s ease-out, border-color 0.2s ease, background-color 0.2s ease, opacity 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    opacity: 0;
    pointer-events: none;
}
.wandering-menu-btn.visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}
.wandering-menu-btn:hover {
    background-color: #111111;
    border-color: #ff3333;
    color: #ff3333;
}
.folder-category-card {
    border: 1px solid #333333 !important;
    background-color: #050505;
    transition: all 0.2s ease;
}
.folder-category-card:hover {
    border-color: #ffffff !important;
    background-color: #111111;
    transform: translateY(-2px);
}
.unrolled-folder-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #000000;
    border-bottom: 1px solid #333333;
}
.close-unrolled-btn:hover {
    border-color: #ff0000 !important;
    background-color: #220000 !important;
    color: #ffffff !important;
}
.file-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}
@media (min-width: 650px) {
    .file-tree {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 20px;
        align-items: start;
    }
}
@media (min-width: 1050px) {
    .file-tree {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1450px) {
    .file-tree {
        grid-template-columns: repeat(4, 1fr);
    }
}
.top-bar-media-toggle {
    font-size: 10px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid #333333;
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.top-bar-media-toggle:hover {
    border-color: #ffffff;
}
.top-bar-media-toggle.open {
    transform: rotate(90deg);
    border-color: #ffffff;
    background-color: #111111;
}
.top-bar-media-popup {
    position: absolute;
    top: 32px;
    left: 0;
    z-index: 9999;
    background-color: #000000;
    border: 1px solid #ffffff;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9);
    opacity: 0;
    transform: translateY(-8px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.top-bar-media-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.top-bar-media-track-title {
    font-size: 12px;
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    border-bottom: 1px solid #222222;
    padding-bottom: 6px;
    transition: color 0.2s ease;
}
.top-bar-media-track-title:hover {
    color: #3399ff;
}
.top-bar-media-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 8px;
}
.apps-menu-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    max-height: 100%;
    scrollbar-width: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
}
.apps-menu-container::-webkit-scrollbar {
    display: none;
}
.apps-section-header {
    font-size: 12px;
    color: #888888;
    text-transform: lowercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #222222;
    font-weight: 600;
}
.file-tree-item {
    padding: 12px 16px;
    border-bottom: 1px solid #222222;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}
.file-tree-item:hover {
    background-color: #111111;
}
.file-tree-folder {
    color: #ffffff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 14px 12px 6px;
    cursor: pointer;
    font-weight: 600;
}
.file-tree-folder::before {
    content: '▸ ';
    display: inline-block;
    transition: transform 0.2s;
}
.file-tree-folder.open::before {
    content: '▾ ';
}
.file-tree-folder-header.is-game-app, .is-game-app, .is-game-app .name, .file-nav-item.is-game-app .name {
    color: #ffffff !important;
}
.file-tree-children {
    padding-left: 16px;
    border-left: 1px solid #222222;
}
.file-type-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    opacity: 0.6;
}
.player-controls-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}
.player-controls-row button {
    padding: 10px 16px !important;
    font-size: 16px !important;
    min-height: 46px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #444444;
    background-color: #111111;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.player-controls-row button:hover {
    background-color: #222222;
    border-color: #ffffff;
}
.player-controls-row button svg {
    width: 22px;
    height: 22px;
}
@media (max-width: 768px) {
    .player-controls-row {
        gap: 14px;
        justify-content: space-around;
    }
    .player-controls-row button {
        padding: 14px 20px !important;
        font-size: 18px !important;
        min-height: 54px;
        min-width: 54px;
        flex: 1 1 auto;
    }
    .player-controls-row button svg {
        width: 28px;
        height: 28px;
    }
    .player-controls-row .player-visualizer {
        width: 80px !important;
        height: 26px !important;
    }
}
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding: 10px 0;
    width: 100%;
}
.app-grid-item {
    padding: 20px 12px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #222222;
    background-color: #050505;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
    border-radius: 0;
}
.app-grid-item:hover {
    border-color: #ffffff;
    background-color: #111111;
    transform: translateY(-2px);
}
.app-grid-item .app-icon {
    width: 44px;
    height: 44px;
    border: 1px solid #444444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.app-name, .app-grid-item .app-name {
    font-size: 12px;
    line-height: 1.3;
    color: #ffffff !important;
    font-weight: 500;
    word-break: break-word;
    text-align: center;
}
@media (max-width: 768px) {
    .app-grid {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding: 6px 0;
    }
    .app-grid-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 12px 14px;
        gap: 12px;
        border: 1px solid #1e1e1e;
        border-bottom: 1px solid #282828;
        background-color: #080808;
        width: 100%;
        min-height: 48px;
    }
    .app-grid-item:active {
        background-color: #1a1a1a;
        border-color: #ffffff;
    }
    .app-grid-item .app-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        border: 1px solid #333333;
        flex-shrink: 0;
    }
    .app-name, .app-grid-item .app-name {
        text-align: left;
        font-size: 13px;
        flex: 1;
    }
}
.search-container {
    padding: 16px;
}
.search-input {
    width: 100%;
    padding: 10px 14px;
    background-color: #000000;
    border: 1px solid #333333;
    font-size: 14px;
    margin-bottom: 16px;
}
.search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}
.search-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #111111;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: #111111;
}
.menu-footer {
    padding: 12px 16px;
    border-top: 1px solid #222222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    box-sizing: border-box;
}
.menu-clock {
    font-size: clamp(24px, 6vw, 42px);
    letter-spacing: 1px;
    font-weight: normal;
    word-break: break-word;
}
.menu-clock-date {
    font-size: 12px;
    color: #888888;
    margin-top: 2px;
}
.k-player-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-top: 1px solid #222222;
}
.player-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 1px solid #333333;
    cursor: pointer;
}
.player-btn:hover {
    border-color: #ffffff;
}
.player-track-name {
    font-size: 11px;
    color: #888888;
    flex-shrink: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}
.player-progress-container {
    flex: 1;
    height: 6px;
    background-color: #222222;
    cursor: pointer;
    position: relative;
    border-radius: 3px;
    min-width: 60px;
}
.player-progress-fill {
    height: 100%;
    background-color: #ff3333;
    border-radius: 3px;
    pointer-events: none;
    z-index: 1;
}
.player-progress-thumb {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 0;
    position: absolute;
    top: -3px;
    transform: translateX(-50%);
}
.player-time {
    font-size: 10px;
    color: #444444;
    min-width: 70px;
    text-align: right;
}
.player-app {
    height: 100%;
}
.player-app-header {
    padding: 12px;
    border-bottom: 1px solid #222222;
}
.player-playlist {
    overflow-y: auto;
    padding: 8px;
}
.playlist-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #111111;
    display: flex;
    justify-content: space-between;
}
.playlist-item:hover {
    background-color: #111111;
}
.playlist-item.playing {
    color: #ffffff;
    border-left: 2px solid #ffffff;
}
.player-visualizer {
    height: 60px;
    border-top: 1px solid #222222;
    background-color: #000000;
}
.player-app-controls {
    padding: 12px;
    border-top: 1px solid #222222;
    display: flex;
    align-items: center;
    gap: 8px;
}
.volume-slider {
    width: 60px;
    appearance: none;
    -webkit-appearance: none;
    background-color: #333333;
    height: 2px;
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 0;
}
.volume-slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 0;
    border: none;
}
#tile-container {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: grid;
    gap: 1px;
    background-color: #111111;
    transition: grid-template 0.3s ease;
}
.tile-window {
    background-color: #000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}
.tile-header {
    height: 24px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-bottom: 1px solid #222222;
    flex-shrink: 0;
    transition: border-bottom-color 0.25s ease;
    user-select: none;
}
.tile-title {
    font-size: 11px;
    color: #888888;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}
.tile-controls {
    display: flex;
    gap: 2px;
}
.tile-control-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #888888;
    border: none;
    padding: 0;
}
.tile-control-btn:hover {
    color: #ffffff;
    border: none;
}
.tile-control-btn.close:hover {
    color: #ff4444;
}
.tile-control-btn.minimize:hover {
    color: #ffffff;
}
.top-bar-tile-tab.minimized {
    opacity: 0.5;
    border-bottom: 1px dashed #555555;
}
.top-bar-tile-tab.minimized:hover {
    opacity: 1;
}
.top-bar-tile-tab .tab-restore-btn {
    display: none;
    color: #3399ff;
    cursor: pointer;
    margin-left: 4px;
}
.top-bar-tile-tab.minimized:hover .tab-restore-btn {
    display: inline;
}
.mobile-task-item.minimized {
    opacity: 0.6;
}
.tile-content {
    flex: 1;
    height: calc(100% - 24px);
    overflow: auto;
    position: relative;
}
.tile-window.focused .tile-header {
    border-bottom-color: #ffffff;
}
.tile-window.focused .tile-title {
    color: #ffffff;
}
.tile-window.floating {
    position: fixed;
    z-index: 800;
    border: 1px solid #333333;
}
.tile-window.floating.focused {
    border-color: #ffffff;
}
/* floating-window drag handle: grip affordance + grab affordance */
.tile-grip {
    display: none;
}
.tile-window.floating:not(.maximized) .tile-header {
    cursor: grab;
}
.tile-window.floating .tile-header {
    touch-action: none;
}
@media (pointer: coarse) {
    .tile-window.floating .tile-grip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        margin-right: 6px;
        color: #666666;
        font-size: 13px;
        line-height: 1;
        user-select: none;
        -webkit-user-select: none;
    }
    .tile-control-btn {
        min-width: 32px;
        min-height: 32px;
    }
    .tile-control-btn.mute,
    .tile-control-btn.float {
        display: none;
    }
    .tile-control-btn.more-btn {
        display: flex;
    }
    .tile-control-btn.close {
        background: rgba(255,50,50,0.15);
        color: #ff4444;
    }
    .tile-control-btn.close:active {
        background: rgba(255,50,50,0.4);
    }
    .top-bar-tile-tab .tab-close-btn {
        width: 24px;
        height: 24px;
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }
    .top-bar-tile-tab .tab-close-btn:active {
        background: rgba(255,50,50,0.3);
        color: #ff4444;
    }
}
.tile-window:not(.floating) .float-resize-h,
.tile-window:not(.floating) .float-resize-v,
.tile-window:not(.floating) .float-resize-corner {
    display: none;
}
.tile-window.floating .float-resize-h,
.tile-window.floating .float-resize-v,
.tile-window.floating .float-resize-corner {
    position: absolute;
    display: block;
    touch-action: none;
}
.tile-window.floating .float-resize-h {
    width: 8px;
    top: 0;
    bottom: 0;
    z-index: 10;
    cursor: ew-resize;
}
.tile-window.floating .float-resize-h.left { left: 0; }
.tile-window.floating .float-resize-h.right { right: 0; }
.tile-window.floating .float-resize-v {
    height: 8px;
    left: 0;
    right: 0;
    z-index: 10;
    cursor: ns-resize;
}
.tile-window.floating .float-resize-v.top { top: 0; }
.tile-window.floating .float-resize-v.bottom { bottom: 0; }
.tile-window.floating .float-resize-corner {
    width: 16px;
    height: 16px;
    z-index: 11;
}
.tile-window.floating .float-resize-corner.nw { top: 0; left: 0; cursor: nwse-resize; }
.tile-window.floating .float-resize-corner.ne { top: 0; right: 0; cursor: nesw-resize; }
.tile-window.floating .float-resize-corner.sw { bottom: 0; left: 0; cursor: nesw-resize; }
.tile-window.floating .float-resize-corner.se { bottom: 0; right: 0; cursor: nwse-resize; }
@media (pointer: coarse) {
    .tile-window.floating .float-resize-h { width: 20px; }
    .tile-window.floating .float-resize-v { height: 20px; }
    .tile-window.floating .float-resize-corner { width: 36px; height: 36px; }
}
/* While a tile/divider drag is active, iframes must not swallow pointer events
   or the parent document loses mousemove/mouseup and the drag sticks. */
body.wm-dragging {
    user-select: none;
}
body.wm-dragging iframe {
    pointer-events: none !important;
}
#divider-rails {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 500;
}
#divider-rails .divider-rail {
    position: absolute;
    pointer-events: auto;
    touch-action: none;
    z-index: 500;
}
#divider-rails .divider-rail.col {
    width: 6px;
    top: 0;
    bottom: 0;
    cursor: col-resize;
    transform: translateX(-50%);
}
#divider-rails .divider-rail.row {
    height: 6px;
    left: 0;
    right: 0;
    cursor: row-resize;
    transform: translateY(-50%);
}
#divider-rails .divider-rail::before {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.25);
}
#divider-rails .divider-rail.col::before {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-left: -1px;
}
#divider-rails .divider-rail.row::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    margin-top: -1px;
}
#divider-rails .divider-rail:hover::before,
#divider-rails .divider-rail.dragging::before {
    background: rgba(255, 255, 255, 0.6);
}
@media (pointer: coarse) {
    #divider-rails .divider-rail.col { width: 12px; }
    #divider-rails .divider-rail.row { height: 12px; }
}
.tile-window.maximized {
    border-color: #ffffff;
}
.tile-window.maximized .tile-header {
    cursor: default;
}
#prompt-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}
#prompt-overlay.visible {
    display: flex;
}
.prompt-dialog {
    border: 1px solid #333333;
    background-color: #000000;
    padding: 24px;
    min-width: 300px;
    max-width: 400px;
}
.prompt-title {
    font-size: 14px;
    margin-bottom: 16px;
}
.prompt-buttons {
    display: flex;
    gap: 8px;
}
.prompt-btn {
    flex: 1;
    padding: 10px;
    text-align: center;
    border: 1px solid #333333;
}
.prompt-btn:hover {
    border-color: #ffffff;
    background-color: #111111;
}
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    height: 100%;
}
.calc-btn {
    padding: 16px;
    text-align: center;
    background-color: #0a0a0a;
    border: 1px solid #222222;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.calc-btn:hover {
    background-color: #111111;
    border-color: #444444;
}
.calc-btn.op {
    color: #ffffff;
}
.calc-display {
    padding: 16px;
    font-size: 24px;
    text-align: right;
    border-bottom: 1px solid #222222;
    font-family: inherit;
    grid-column: span 4;
}
.notepad-area {
    width: 100%;
    height: 100%;
    background-color: #000000;
    color: #ffffff;
    border: none;
    resize: none;
    padding: 12px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.browser-bar {
    display: flex;
    padding: 6px;
    gap: 6px;
    border-bottom: 1px solid #222222;
}
.browser-url {
    flex: 1;
    padding: 6px 10px;
}
.browser-frame {
    width: 100%;
    height: calc(100% - 36px);
    border: none;
}
.terminal-output {
    padding: 12px;
    font-size: 12px;
    white-space: pre-wrap;
    word-break: break-all;
}
.terminal-input-line {
    display: flex;
    padding: 6px 12px;
    border-top: 1px solid #222222;
}
.terminal-prompt {
    color: #888888;
    margin-right: 8px;
}
.terminal-input {
    background-color: transparent;
    border: none;
    color: #ffffff;
    flex: 1;
    font-family: inherit;
    outline: none;
}
.settings-panel {
    padding: 16px;
}
.settings-group {
    margin-bottom: 16px;
    border-bottom: 1px solid #111111;
    padding-bottom: 16px;
}
.settings-label {
    font-size: 12px;
    color: #888888;
    margin-bottom: 6px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
}
.video-player-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}
.video-player-container video {
    max-width: 100%;
    max-height: 100%;
}
.image-viewer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000000;
}
.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.explorer-breadcrumb {
    padding: 8px 12px;
    border-bottom: 1px solid #222222;
    font-size: 11px;
    color: #888888;
}
.explorer-breadcrumb span {
    cursor: pointer;
}
.explorer-breadcrumb span:hover {
    color: #ffffff;
}
.explorer-list {
    padding: 8px;
}
.explorer-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-bottom: 1px solid #111111;
}
.explorer-item:hover {
    background-color: #111111;
}
.explorer-item-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}
.explorer-item-name {
    font-size: 12px;
}
.explorer-item-type {
    font-size: 10px;
    color: #444444;
    margin-left: auto;
}
.clock-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    gap: 8px;
    container-type: inline-size;
    box-sizing: border-box;
    padding: 12px;
}
.clock-time {
    font-size: clamp(24px, 14cqw, 72px);
    letter-spacing: 4px;
    text-align: center;
    line-height: 1;
    font-weight: normal;
}
.clock-date {
    font-size: clamp(12px, 5cqw, 24px);
    color: #888888;
    text-align: center;
}
.about-app {
    width: 100%;
    height: 100%;
    max-width: 850px;
    margin: 0 auto;
    padding: clamp(14px, 3vw, 28px);
    overflow-y: auto;
    box-sizing: border-box;
    font-size: clamp(12px, 1.6vw, 15px);
    line-height: 1.75;
    color: #eeeeee;
    text-transform: lowercase;
    scrollbar-width: none;
}
.about-app::-webkit-scrollbar {
    display: none;
}
.about-header {
    font-size: clamp(16px, 2.5vw, 22px);
    font-weight: bold;
    margin-bottom: clamp(12px, 2.5vw, 24px);
    border-bottom: 1px solid #444444;
    padding-bottom: 8px;
    color: #ffffff;
    letter-spacing: 1px;
}
.about-card {
    background: #0a0a0a;
    border: 1px solid #222222;
    padding: clamp(12px, 2vw, 18px);
    margin-bottom: clamp(10px, 2vw, 16px);
}
.about-card.card-1 { border-left: 3px solid #666666; }
.about-card.card-2 { border-left: 3px solid #888888; }
.about-card.card-3 { border-left: 3px solid #aaaaaa; }
.about-card.card-4 { border-left: 3px solid #ffffff; background: #0d0d0d; }
.about-thanks-card {
    font-size: clamp(13px, 1.8vw, 17px);
    font-weight: bold;
    color: #ffffff;
    background: #111111;
    border: 1px solid #444444;
    padding: clamp(14px, 2vw, 20px);
    text-align: center;
    margin-bottom: clamp(10px, 2vw, 16px);
}
.about-footer-note {
    font-size: clamp(11px, 1.2vw, 13px);
    color: #888888;
    text-align: right;
    font-style: italic;
}
@media (max-width: 600px) {
    #top-bar {
        height: 34px;
        padding: 0 4px;
        gap: 4px;
    }
    #main-menu {
        top: 34px;
        height: calc(100% - 34px);
        max-height: calc(100% - 34px);
    }
    .top-bar-section {
        gap: 3px;
    }
    .top-bar-btn {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }
    .top-bar-clock {
        font-size: 11px;
        letter-spacing: 0;
    }
    .top-bar-date {
        font-size: 9px;
        margin-left: 2px;
    }
    .top-bar-tiles {
        gap: 3px;
        max-width: 100%;
    }
    .top-bar-tile-tab {
        max-width: 105px;
        padding: 2px 5px;
        font-size: 10px;
        height: 26px;
        gap: 4px;
    }
    .top-bar-tile-tab .tab-close-btn {
        width: 22px;
        height: 22px;
        font-size: 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
    }
    .top-bar-tile-tab .tab-close-btn:active {
        background: rgba(255,50,50,0.3);
        color: #ff4444;
    }
    .menu-content {
        padding: 8px 6px;
    }
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
        gap: 6px;
        padding: 4px 0;
        width: 100%;
    }
    .app-grid-item {
        padding: 14px 6px;
        gap: 8px;
    }
    .app-grid-item .app-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    .app-name, .app-grid-item .app-name {
        font-size: 11px;
        line-height: 1.2;
    }
    .file-tree-item {
        padding: 10px 8px;
        gap: 8px;
        font-size: 12px;
    }
    .file-tree-folder {
        padding: 10px 6px 4px;
        font-size: 11px;
    }
    .file-tree-children {
        padding-left: 8px;
    }
    #tile-container {
        top: 34px !important;
        padding: 0 !important;
    }
    .tile-header {
        height: 36px;
        padding: 0 6px;
    }
    .tile-title {
        font-size: 11px;
    }
    .tile-controls {
        gap: 4px;
    }
    .tile-control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 6px;
    }
    .tile-control-btn.close {
        background: rgba(255,50,50,0.15);
        color: #ff4444;
        margin-left: 4px;
    }
    .tile-control-btn.close:active {
        background: rgba(255,50,50,0.4);
    }
    .tile-control-btn.mute,
    .tile-control-btn.float {
        display: none;
    }
    .tile-control-btn.more-btn {
        display: flex;
    }
    .tile-grip { display: none; }
    .tile-header.swiping-down .tile-title {
        color: #ff4444;
        transition: color 0.15s;
    }
    .menu-footer {
        padding: 8px 10px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 6px;
        flex-wrap: nowrap;
    }
    .menu-clock {
        font-size: clamp(16px, 5vw, 22px);
        letter-spacing: 0.5px;
    }
    .menu-clock-date {
        font-size: 10px;
    }
    .os-link {
        align-self: center;
        padding: 4px 8px;
        font-size: 10px;
        margin-left: auto;
    }
    .top-bar-player {
        max-width: 85px;
        padding: 0 4px;
        gap: 2px;
        height: 22px;
        font-size: 10px;
    }
    .top-bar-player .prev-btn, .top-bar-player .next-btn {
        display: none;
    }
    .top-bar-track-name {
        max-width: 50px;
        font-size: 9px;
    }
    .mobile-task-switcher {
        position: relative;
        display: inline-block;
    }
    .mobile-task-btn {
        background-color: #050505;
        border: 1px solid #333333;
        color: #ffffff;
        font-family: inherit;
        font-size: 10px;
        padding: 2px 6px;
        height: 24px;
        display: flex;
        align-items: center;
        gap: 4px;
        cursor: pointer;
        max-width: 110px;
        white-space: nowrap;
        box-sizing: border-box;
    }
    .mobile-task-btn .active-task-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #3399ff;
    }
    .mobile-task-dropdown-menu {
        position: absolute;
        top: 28px;
        left: 0;
        background-color: #050505;
        border: 1px solid #333333;
        min-width: 140px;
        z-index: 2000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.9);
        display: flex;
        flex-direction: column;
    }
    .mobile-task-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 10px;
        border-bottom: 1px solid #111111;
        font-size: 11px;
        color: #888888;
        cursor: pointer;
    }
    .mobile-task-item.active {
        color: #ffffff;
        background-color: #111111;
        border-left: 2px solid #ff3333;
    }
    .mobile-task-item .item-close {
        color: #666666;
        padding: 6px 8px;
        font-size: 16px;
        min-width: 32px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }
    .mobile-task-item .item-close:active {
        background: rgba(255,50,50,0.3);
        color: #ff3333;
    }
    .top-bar-clock {
        font-size: 12px;
    }
    .top-bar-date {
        font-size: 9.5px;
    }
    .menu-tab-bar {
        height: 44px;
    }
    .menu-tab {
        padding: 12px 6px;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .menu-clock {
        font-size: clamp(32px, 9vw, 54px);
    }
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
        padding: 4px;
    }
    .app-grid-item {
        padding: 14px 6px;
    }
    .app-grid-item .app-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .app-grid-item .app-name {
        font-size: 11px;
    }
    .file-tree-item, .explorer-item {
        padding: 12px 10px;
        min-height: 42px;
    }
    #tile-container {
        top: 38px;
    }
    .tile-header {
        height: 36px;
        padding: 0 10px;
    }
    .tile-title {
        font-size: 12px;
    }
    .tile-control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .tile-control-btn.close {
        background: rgba(255,50,50,0.15);
        color: #ff4444;
    }
    .tile-control-btn.close:active {
        background: rgba(255,50,50,0.4);
    }
    .tile-window.floating {
        max-width: 94vw !important;
        max-height: 82vh !important;
    }
    .tile-window.floating.maximized {
        max-width: none !important;
        max-height: none !important;
        left: 0 !important;
    }
    .prompt-dialog {
        width: 90vw;
        max-width: 360px;
        padding: 18px;
    }
    .prompt-btn {
        padding: 12px;
        font-size: 13px;
    }
    .calc-btn {
        padding: 18px 10px;
        font-size: 18px;
        min-height: 48px;
    }
}
@media (min-width: 1400px) {
    .menu-clock {
        font-size: 72px;
    }
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
}
@media (min-width: 601px) {
    #split-handle-overlay {
        display: none !important;
    }
}
#split-handle-overlay {
    position: fixed;
    z-index: 9999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    touch-action: none;
}
#split-handle-trigger {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    background-color: #000000;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    font-size: 16px;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.9);
    font-family: inherit;
    touch-action: none;
    user-select: none;
}
#split-handle-trigger:active {
    cursor: grabbing;
    background-color: #111111;
    border-color: #ffffff !important;
}
#split-popup-menu {
    position: absolute;
    top: 38px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000000;
    border: 1px solid #ffffff;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.95);
    min-width: 140px;
    font-family: 'Share Tech Mono', monospace;
}
.split-popup-btn {
    background-color: #050505;
    border: 1px solid #222222;
    color: #ffffff;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    text-align: left;
    text-transform: lowercase;
}
.split-popup-btn:hover {
    border-color: #ffffff;
    background-color: #111111;
}
.chat-app {
    height: 100%;
    background-color: #000000;
}

/* Roll-in animation for Account & My Stuff */
@keyframes rollIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.roll-in-item {
    opacity: 0;
    animation: rollIn 0.3s ease-out forwards;
}

/* ===== MOBILE BOTTOM TASKBAR ===== */
#bottom-taskbar {
    display: none;
}
@media (max-width: 600px) and (pointer: coarse) {
    :root { --kb-h: calc(52px + env(safe-area-inset-bottom, 0px)); }
    #top-bar {
        display: none !important;
    }
    #bottom-taskbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: var(--kb-h);
        background: #000;
        border-top: 1px solid #333;
        z-index: 1000;
        align-items: center;
        padding: 0 6px;
        gap: 2px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .bottom-bar-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid transparent;
        background: none;
        color: #ccc;
        font-size: 14px;
        flex-shrink: 0;
        padding: 2px 4px;
        border-radius: 8px;
    }
    .bottom-bar-btn:active {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.15);
    }
    .bottom-bar-btn.active {
        color: #fff;
        border-color: rgba(255,255,255,0.2);
    }
    .bottom-bar-tabs {
        flex: 1;
        display: flex;
        gap: 2px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        align-items: center;
        height: 100%;
    }
    .bottom-bar-tabs::-webkit-scrollbar { display: none; }
    .bottom-bar-tab {
        min-width: 44px;
        min-height: 44px;
        max-width: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 4px 6px;
        font-size: 9px;
        color: #999;
        border: none;
        background: none;
        flex-shrink: 0;
        cursor: pointer;
        border-radius: 8px;
        overflow: hidden;
    }
    .bottom-bar-tab.active {
        color: #fff;
        background: rgba(255,255,255,0.08);
    }
    .bottom-bar-tab:active {
        background: rgba(255,255,255,0.12);
    }
    .bottom-bar-tab .tab-icon {
        font-size: 16px;
        line-height: 1;
    }
    .bottom-bar-tab .tab-label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60px;
        font-size: 9px;
    }
    #tile-container {
        top: 0 !important;
        bottom: var(--kb-h) !important;
    }
    .tile-window.floating {
        max-height: calc(100vh - var(--kb-h) - 20px) !important;
    }
    #main-menu {
        top: 0 !important;
        bottom: var(--kb-h) !important;
        height: auto !important;
        max-height: none !important;
    }
    .menu-footer {
        padding-bottom: 8px !important;
    }
    /* the max-width:600px rule above forces top:34px on #tile-container
       even though #top-bar is hidden on mobile — keep tiles clear of the
       taskbar instead */
    @media (max-width: 600px) {
        #tile-container { top: 0 !important; }
    }
}

/* ===== MOBILE: BIGGER APP ICONS ===== */
@media (pointer: coarse) {
    .app-grid-item {
        min-height: 48px;
        padding: 14px 6px;
    }
    .app-grid-item .app-icon {
        min-width: 44px;
        min-height: 44px;
    }
    .app-grid-item .app-name {
        font-size: 11px;
    }
    .file-tree-item, .explorer-item {
        min-height: 48px;
    }
}

/* ===== MOBILE: LONG-PRESS CONTEXT MENU ===== */
.ctx-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ctx-menu {
    background: #111;
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    min-width: 180px;
    max-width: 260px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.9);
    animation: ctxMenuIn 0.15s ease-out;
}
@keyframes ctxMenuIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.ctx-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #ddd;
    background: none;
    border: none;
    border-bottom: 1px solid #222;
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    min-height: 48px;
}
.ctx-menu-item:last-child {
    border-bottom: none;
}
.ctx-menu-item:active {
    background: rgba(255,255,255,0.1);
}
.ctx-menu-item.danger {
    color: #ff4444;
}
.ctx-menu-item .ctx-icon {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* ===== MOBILE: PULL-TO-REFRESH ===== */
.ptr-indicator {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    color: #666;
    transition: transform 0.2s, color 0.2s;
    pointer-events: none;
    z-index: 5;
}
.ptr-indicator.active {
    color: #fff;
}
.ptr-indicator.refreshing {
    animation: ptrSpin 0.8s linear infinite;
}
@keyframes ptrSpin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* ===== MOBILE: KEYBOARD SHIFT ===== */
.tile-window.keyboard-shifted {
    transition: top 0.2s ease;
}

/* ===== MOBILE: PULL-TO-REFRESH SHIMMER ===== */
.pull-to-refresh-area {
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}
.ptr-shimmer {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    transition: height 0.3s ease;
}
.ptr-shimmer.loading {
    height: 40px;
}

/* ===== MOBILE: TOOLTIP HIDE ===== */
@media (pointer: coarse) {
    [title] {
        cursor: pointer;
    }
}
