:root {
    color-scheme: dark;
    --text: #f4f6fb;
    --muted: rgba(244, 246, 251, 0.62);
    --line: rgba(255, 255, 255, 0.12);
    --card: rgba(255, 255, 255, 0.06);
    --card-2: rgba(255, 255, 255, 0.1);
    --accent: #9eb0ef;
    --danger: #ffb4b4;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: linear-gradient(165deg, #24315f, #12141c 58%);
    color: var(--text);
    font: 16px/1.45 "Segoe UI", sans-serif;
}

button, input, a { font: inherit; color: inherit; }

button { cursor: pointer; }

.bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 78px 8px 22px;
}

.add-wrap { position: relative; flex: 0 0 auto; }

.add {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(158, 176, 239, 0.5);
    background: rgba(158, 176, 239, 0.18);
    color: #fff;
    font-size: 28px;
    line-height: 1;
}

.add:hover, .add.open { background: rgba(158, 176, 239, 0.32); }

.add-menu {
    position: absolute;
    top: 50px;
    left: 0;
    z-index: 30;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #1c2233;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.add-menu button {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: transparent;
    padding: 9px 12px;
}

.add-menu button:hover { background: var(--card-2); }

.bar .crumbs {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.crumbs { display: flex; align-items: center; gap: 12px; }

.modal button, .menu button, .menu a {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 10px;
    padding: 8px 12px;
}

.modal button:hover, .menu button:hover, .menu a:hover { background: var(--card-2); }

.crumbs a, .crumbs button {
    border: 0;
    background: transparent;
    color: var(--accent);
    padding: 0;
}

.crumbs span { color: var(--muted); }

.pane {
    margin: 8px 22px 28px;
    min-height: 420px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
    position: relative;
}

.pane.drag { outline: 2px dashed var(--accent); }

.columns, .item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px 180px 90px;
    gap: 8px;
    align-items: center;
}

.columns {
    padding: 12px 14px 6px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.item {
    width: calc(100% - 12px);
    margin: 2px 6px;
    padding: 10px 8px;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: transparent;
}

.item:hover, .item.selected, .item.drop-target { background: var(--card-2); }

a.item { text-decoration: none; }

.item b { font-weight: 650; }

.kind { white-space: nowrap; }

.item small, .columns span:nth-child(n+2), .item span { color: var(--muted); }

.item small { display: block; font-weight: 400; }

.badge { color: var(--accent); }

.empty {
    margin: 28px 16px;
    color: var(--muted);
}

.menu {
    position: fixed;
    z-index: 20;
    min-width: 220px;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #1c2233;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.menu button, .menu a {
    display: flex;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    border-radius: 8px;
    text-decoration: none;
}

.menu button[aria-checked="true"]::before { content: "✓  "; color: var(--accent); }

.menu button.danger { color: var(--danger); }

.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

.menu-note {
    margin: 6px 10px 0;
    color: var(--muted);
    font-size: 12px;
}

.modal-back {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal {
    width: min(560px, 100%);
    padding: 18px;
    border-radius: 16px;
    background: #1c2233;
    border: 1px solid var(--line);
}

.modal h2 { margin: 0 0 8px; font-size: 18px; }

.modal p { color: var(--muted); }

.modal-label { margin: 12px 0 0; font-size: 13px; }

.alias-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
}

.alias-prefix { color: var(--muted); font-size: 14px; white-space: nowrap; }

.modal input {
    width: 100%;
    margin: 8px 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
}

.modal .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

.modal .alias-row input { flex: 1; width: auto; margin: 0; }

.toast {
    position: fixed;
    left: 22px;
    bottom: 18px;
    z-index: 40;
    max-width: min(420px, calc(100% - 44px));
    padding: 12px 14px;
    border-radius: 12px;
    background: #1c2233;
    border: 1px solid var(--line);
}

.share-list { max-width: 760px; margin: 0 auto; padding: 28px 18px 48px; }

.share-list .item { width: 100%; margin: 4px 0; text-decoration: none; }

@media (max-width: 720px) {
    .columns span:nth-child(n+3), .item > span:nth-child(n+3) { display: none; }
    .columns, .item { grid-template-columns: minmax(0, 1fr) auto; }
}

body.cloud-gate {
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at 50% 46%, rgba(70, 120, 210, 0.18), transparent 70%),
        #071433;
}

.gate-auth {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    width: min(280px, calc(100vw - 32px));
    padding: 16px 16px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(8, 16, 40, 0.72);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.gate-auth label {
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.gate-auth input[type="text"],
.gate-auth input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
}

.gate-auth .gate-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    color: var(--muted);
}

.gate-auth button,
.gate-auth .gate-out {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #d7e6ff;
    color: #10203f;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.gate-hello {
    margin: 0 0 12px;
}

.gate-error {
    margin: 0 0 8px;
    color: var(--danger);
    font-size: 14px;
}

.gate-stage {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 88px 24px 72px;
}

.gate-mark {
    position: absolute;
    left: 50%;
    top: 46%;
    width: min(420px, 58vw);
    height: auto;
    color: #d5e4ff;
    opacity: 0.3;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.gate-mark path:first-child {
    fill-opacity: 0.14;
}

@media (max-width: 720px) {
    .gate-auth {
        position: static;
        margin: 16px auto 0;
    }

    .gate-stage {
        min-height: auto;
        padding-top: 28px;
        padding-bottom: 32px;
    }

    .repo-board h1 { font-size: 32px; }
    .repo-card h2 { font-size: 22px; }
    .repo-list { flex-direction: column; align-items: center; }
    .repo-card { width: min(420px, 100%); }
}

.repo-board {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    margin: 0 auto;
}

.repo-empty {
    margin: 0;
    color: var(--muted);
}

.repo-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.repo-card {
    display: flex;
    flex: 0 1 420px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-height: 250px;
    padding: 22px 20px 16px;
    border: 1px solid rgba(240, 246, 252, 0.18);
    border-radius: 16px;
    background: rgba(10, 18, 40, 0.34);
    backdrop-filter: blur(14px);
    color: inherit;
    text-decoration: none;
}

.repo-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
}

.repo-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.repo-action {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #e8eaed;
    text-decoration: none;
    font: inherit;
}

a.repo-action:hover { background: rgba(255, 255, 255, 0.16); }

.repo-action:disabled {
    opacity: 0.38;
    cursor: default;
}

.repo-card[hidden] { display: none; }

.repo-card:not(a) { cursor: default; }

.repo-open {
    display: inline-block;
    margin-top: 10px;
    color: #d5e4ff;
    font-size: 13px;
}

.guest-work { padding: 0 16px; }

.guest-work .work { border-radius: 16px; }

.guest-work .pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.guest-head {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 8px 20px;
    color: #f4f7ff;
    font-size: 20px;
    font-weight: 650;
}

a.repo-card:hover {
    background: rgba(10, 18, 40, 0.52);
    border-color: rgba(213, 228, 255, 0.5);
}

.repo-card.ghost {
    background: rgba(213, 228, 255, 0.045);
    border: 1px solid rgba(213, 228, 255, 0.28);
    pointer-events: none;
}

.repo-folder {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-top: 2px;
    color: #d5e4ff;
}

.repo-kind {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.repo-card h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.repo-card p {
    margin: 8px 0 0;
    color: rgba(244, 246, 251, 0.86);
    font-size: 15px;
}

.repo-place {
    color: rgba(244, 246, 251, 0.55) !important;
    font-size: 12px !important;
    font-family: Consolas, "Cascadia Mono", monospace;
    word-break: break-word;
}

.avatar {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 40;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    overflow: hidden;
    background: #1a2748;
}

.avatar img,
.avatar svg {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.account-pop {
    position: fixed;
    top: 66px;
    right: 16px;
    z-index: 40;
    width: min(280px, calc(100vw - 32px));
    padding: 16px 16px 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(8, 16, 40, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.account-pop[hidden] { display: none; }

.account-pop label {
    display: block;
    margin: 10px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.account-pop input[type="text"],
.account-pop input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
    color: var(--text);
}

.account-pop .gate-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    color: var(--muted);
}

.account-pop button,
.account-pop .gate-out {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #d7e6ff;
    color: #10203f;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.account-name { margin: 0 0 6px; font-weight: 650; }

.account-meta { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

.account-pop .gate-out { margin-top: 12px; }

.account-pop button.account-settings {
    margin-top: 12px;
    background: transparent;
    color: #e7eefc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.account-pop label.via-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

.account-pop label.via-check input { margin-top: 2px; }

.player {
    position: fixed;
    z-index: 25;
    top: 18px;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #10182e;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.player-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.player-bar h2 {
    margin: 0 auto 0 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 650;
}

.player-bar button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    background: transparent;
    border-radius: 10px;
}

.player-bar button svg { width: 20px; height: 20px; }

.player-bar button.on { background: var(--card-2); }

.player-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px 24px;
    display: flex;
    flex-direction: column;
}

.player-body.photo {
    overflow: hidden;
    padding: 12px;
}

.player-photo {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-photo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.player-dock {
    flex: 0 0 34%;
    min-height: 160px;
    display: flex;
    padding: 0 18px 16px;
}

.player-body .player-editor {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0c1224;
    color: var(--text);
    resize: none;
    font: 14px/1.55 Consolas, "Cascadia Mono", monospace;
}

body.cloud-shell .player-body iframe {
    min-height: 0;
    flex: 1;
}

.player-body iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    border-radius: 12px;
    background: #fff;
}

.player-body h2,
.player-body h3 { margin: 0.6em 0 0.3em; }

.player-body p,
.player-body ul { margin: 0.4em 0; }

.player-body a { color: var(--accent); }

.player-text,
.player-code {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: 14px/1.55 Consolas, "Cascadia Mono", monospace;
}

.tok-t { color: #9ecbff; }
.tok-a { color: #e3c48a; }
.tok-s { color: #b7d7b0; }
.tok-c { color: rgba(244, 246, 251, 0.45); }
.tok-h { color: #d5e4ff; }
.tok-code { color: #e7d0a8; }

body.cloud-shell {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #4853cd, #7894d5, #000000);
    background-size: 200% 200%;
    background-attachment: fixed;
    animation: cloud-gradient 15s ease infinite;
    color: #e8eaed;
}

@keyframes cloud-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.topbar,
.site-header-fixed {
    position: relative;
    z-index: 40;
    flex: 0 0 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 50px;
    padding: 0 15px;
    box-sizing: border-box;
    color: #fff;
    background: rgba(33, 33, 33, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-left-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    flex: 0 0 auto;
}

.site-header-fixed .menu-icon {
    position: static;
    width: 30px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    flex: 0 0 auto;
}

.site-header-fixed .menu-icon span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

html.cloud-menu-open .site-header-fixed .menu-icon span:nth-child(1),
.site-header-fixed .menu-icon.open span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

html.cloud-menu-open .site-header-fixed .menu-icon span:nth-child(2),
.site-header-fixed .menu-icon.open span:nth-child(2) {
    opacity: 0;
}

html.cloud-menu-open .site-header-fixed .menu-icon span:nth-child(3),
.site-header-fixed .menu-icon.open span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.site-title-header a {
    color: #fff;
    text-decoration: none;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0;
}

.header-right-icons {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
}

.header-right-icons .header-icon-link {
    color: #b0b3b8;
    font-size: 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.header-right-icons .header-icon-link:hover,
.header-right-icons .js-toggle-apps.is-active,
.header-right-icons .js-toggle-cloud-activity.is-active {
    color: #fff;
}

.header-right-icons .js-toggle-apps,
.header-right-icons .js-toggle-cloud-activity {
    width: 36px;
    height: 36px;
    margin: 0 -8px;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
}

.header-right-icons .js-toggle-apps:hover,
.header-right-icons .js-toggle-apps.is-active,
.header-right-icons .js-toggle-cloud-activity:hover,
.header-right-icons .js-toggle-cloud-activity.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.apps-launcher-waffle { display: block; }

.header-right-icons .header-icon-link img.avatar,
body.cloud-shell .header-right-icons .avatar {
    position: static;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 1px solid #555;
    overflow: hidden;
    background: #1a2748;
    flex: 0 0 auto;
}

body.cloud-shell .header-right-icons .avatar img,
body.cloud-shell .header-right-icons .avatar svg {
    position: static;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html.cloud-menu-closed .side { display: none; }

.search {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(720px, 100%);
    max-width: 720px;
    height: 34px;
    margin: 0 auto;
    padding: 0 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #d5e4ff;
}

.search svg { width: 20px; height: 20px; flex: 0 0 auto; }

.search input {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: #e8eaed;
    font: 16px/1.4 "Segoe UI", sans-serif;
    pointer-events: auto;
}

.search input::placeholder { color: #9aa0a6; }

.search:focus-within {
    background: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 0 1px rgba(213, 228, 255, 0.35);
}

.account {
    position: relative;
    justify-self: end;
    width: max-content;
}

body.cloud-shell .avatar {
    position: static;
    width: 36px;
    height: 36px;
}

body.cloud-shell .account-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(12, 18, 42, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
}

.workspace {
    flex: 1;
    min-height: 0;
    display: flex;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.side {
    flex: 0 0 248px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 12px 12px;
    background: rgba(8, 16, 40, 0.34);
    backdrop-filter: blur(18px);
}

.side-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 0 4px 8px;
}

.side-upload,
.side-new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px 0 14px;
    border: 0;
    border-radius: 22px;
    font-weight: 650;
}

.side-upload {
    background: #fff;
    color: #202124;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.side-upload:hover { background: #f1f3f4; }

.side-new {
    background: rgba(255, 255, 255, 0.14);
    color: #e8eaed;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.side-new:hover,
.side-new.open { background: #4a4d51; }

.side-upload svg,
.side-new svg,
.side-nav svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.side-create { position: relative; }

.side-menu {
    position: absolute;
    top: 48px;
    left: 0;
    z-index: 30;
    min-width: 180px;
    padding: 6px;
    border-radius: 12px;
    background: rgba(12, 18, 42, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.side-menu[hidden] { display: none; }

.side-menu button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
}

.side-menu button:hover { background: rgba(255, 255, 255, 0.08); }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    border-radius: 0 22px 22px 0;
    background: transparent;
    color: #e8eaed;
    text-align: left;
}

.side-nav button:hover { background: rgba(255, 255, 255, 0.06); }

.side-nav button.on {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.work {
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: rgba(8, 16, 40, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
    border-radius: 16px 0 0 0;
}

.work-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 8px 8px 8px 20px;
}

.work-head .crumbs {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.work-head .crumbs button {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9aa0a6;
    font-size: 20px;
    font-weight: 500;
}

.work-head .crumbs button.current { color: #e8eaed; }

.tools { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }

.tool { position: relative; }

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #e8eaed;
}

.tool-btn svg { width: 20px; height: 20px; }

.tool-btn:hover,
.tool-btn.open { background: rgba(255, 255, 255, 0.08); }

.tool-menu {
    position: absolute;
    top: 44px;
    right: 0;
    z-index: 35;
    min-width: 228px;
    padding: 8px 0;
    border-radius: 12px;
    background: rgba(12, 18, 42, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.tool-menu[hidden] { display: none; }

.tool-menu button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    text-align: left;
}

.tool-menu button:hover { background: rgba(255, 255, 255, 0.06); }

.tool-menu button[aria-checked="true"]::after { content: "✓"; }

.tool-menu hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

body.cloud-shell .pane {
    flex: 1;
    min-height: 0;
    margin: 0;
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.cloud-shell .columns {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0;
    padding: 10px 18px 10px 22px;
    background: rgba(255, 255, 255, 0.16);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: #f7f9ff;
}

body.cloud-shell .columns span {
    color: #f7f9ff;
}

body.cloud-shell .item {
    width: calc(100% - 16px);
    margin: 1px 8px;
    border-radius: 12px;
}

body.cloud-shell .title-line {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.cloud-shell .title-line b {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.cloud-shell .glyph { display: block; flex: 0 0 auto; }

.title-line .glyph { width: 28px; height: 22px; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 4px;
    padding: 8px 16px 28px;
}

.tiles.large { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 132px;
    padding: 16px 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: center;
    text-decoration: none;
}

.tiles.large .tile { min-height: 180px; padding-top: 22px; }

.tile .glyph { width: 72px; height: 56px; }

.tiles.large .glyph { width: 104px; height: 80px; }

.tiles.large .shot {
    width: 168px;
    height: 112px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(8, 16, 36, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tiles.large .shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile b {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-weight: 500;
    font-size: 14px;
}

.tile small { color: var(--muted); font-size: 12px; }

.tile:hover,
.tile.selected { background: rgba(255, 255, 255, 0.08); }

.foot {
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(8, 16, 40, 0.38);
    backdrop-filter: blur(18px);
    color: rgba(232, 234, 237, 0.45);
    font-size: 12px;
}

body.cloud-shell .player {
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    border-radius: inherit;
    box-shadow: none;
    background: rgba(10, 16, 34, 0.94);
}

body.cloud-shell .toast { bottom: 40px; }

@media (max-width: 800px) {
    body.cloud-shell { height: auto; min-height: 100vh; overflow: auto; }
    .site-header-fixed { height: auto; min-height: 50px; flex-wrap: wrap; }
    .site-title-header a { font-size: 22px; }
    .search { order: 3; flex: 1 1 100%; width: 100%; max-width: none; margin: 6px 0; }
    .workspace { flex-direction: column; }
    .side { flex-basis: auto; width: auto; }
    .side-nav { flex-direction: row; overflow: auto; }
    .side-nav button { width: auto; border-radius: 22px; white-space: nowrap; }
    .work { min-height: 70vh; border-radius: 0; }
}

.apps-launcher {
    position: fixed;
    z-index: 1100;
    width: 332px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 6px 6px 10px;
    border-radius: 28px;
    color: #f4f2ff;
    font-family: inherit;
    background: linear-gradient(165deg, rgba(38, 34, 78, 0.96) 0%, rgba(16, 20, 46, 0.97) 100%);
    border: 1px solid rgba(176, 164, 255, 0.28);
    box-shadow: 0 18px 48px rgba(10, 8, 28, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px) saturate(1.35);
    -webkit-backdrop-filter: blur(22px) saturate(1.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.apps-launcher.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.apps-launcher__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.apps-launcher__head { padding: 12px 16px 2px; }
.apps-launcher__title { font-size: 18px; font-weight: 600; color: #f7f5ff; }
.apps-launcher__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; padding: 6px 4px 4px; }
.apps-launcher__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-height: 104px;
    padding: 12px 6px 10px;
    border-radius: 16px;
    text-decoration: none;
    color: #e8e6f4;
}
.apps-launcher__item:hover,
.apps-launcher__item:focus-visible { background: rgba(124, 110, 255, 0.2); color: #fff; outline: none; }
.apps-launcher__icon { width: 48px; height: 48px; display: block; }
.apps-launcher__icon svg { display: block; width: 48px; height: 48px; }
.apps-launcher__label { max-width: 92px; font-size: 12px; font-weight: 500; line-height: 1.25; text-align: center; }

.cloud-activity {
    position: fixed;
    z-index: 1100;
    right: 12px;
    width: 320px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    padding: 14px 16px 16px;
    border-radius: 16px;
    color: #f4f2ff;
    background: linear-gradient(165deg, rgba(38, 34, 78, 0.96) 0%, rgba(16, 20, 46, 0.97) 100%);
    border: 1px solid rgba(176, 164, 255, 0.28);
    box-shadow: 0 18px 48px rgba(10, 8, 28, 0.48);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.cloud-activity.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.cloud-activity__title { font-size: 16px; font-weight: 650; }
.cloud-activity__empty { margin: 10px 0 0; color: rgba(244, 242, 255, 0.62); font-size: 14px; }

