:root {
    --hub-nav-width: 286px;
    --hub-people-width: 326px;
    --hub-nav-collapsed: 64px;
    --hub-gap: 14px;
    --hub-page: #071426;
    --hub-panel: #0c1d33;
    --hub-panel-strong: #102641;
    --hub-panel-soft: #142d49;
    --hub-line: rgba(135, 169, 202, .18);
    --hub-line-strong: rgba(76, 194, 210, .42);
    --hub-accent: #4cc2d2;
    --hub-green: #39c982;
    --hub-danger: #ef6a72;
    --workspace-left: calc(var(--hub-nav-width) + var(--hub-people-width));
}

/* Pilvory identity, photographic application covers, and image-based account fallbacks. */
.brand-cloud-mark {
    display: grid;
    place-items: center;
    border-radius: 13px !important;
}

.brand-cloud-mark svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.workspace-shell .notes-cover,
body.workspace-shell .drive-cover,
body.workspace-shell .assistant-cover,
body.workspace-shell .messenger-cover,
body.workspace-shell .admin-cover {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

body.workspace-shell .notes-cover {
    background-image: linear-gradient(180deg, rgba(4, 18, 35, .06), rgba(4, 18, 35, .72)), url('https://images.unsplash.com/photo-1517842645767-c639042777db?auto=format&fit=crop&w=1200&q=84') !important;
}

body.workspace-shell .drive-cover {
    background-image: linear-gradient(180deg, rgba(4, 18, 35, .04), rgba(4, 18, 35, .72)), url('https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1200&q=84') !important;
}

body.workspace-shell .assistant-cover {
    background-image: linear-gradient(180deg, rgba(4, 18, 35, .05), rgba(4, 18, 35, .74)), url('https://images.unsplash.com/photo-1677442136019-21780ecad995?auto=format&fit=crop&w=1200&q=84') !important;
}

body.workspace-shell .messenger-cover {
    background-image: linear-gradient(180deg, rgba(4, 18, 35, .04), rgba(4, 18, 35, .76)), url('https://images.unsplash.com/photo-1611746872915-64382b5c76da?auto=format&fit=crop&w=1200&q=84') !important;
}

body.workspace-shell .admin-cover {
    background-image: linear-gradient(180deg, rgba(4, 18, 35, .04), rgba(4, 18, 35, .76)), url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1200&q=84') !important;
}

.drawer-nav-mark {
    border-radius: 10px !important;
}

.drawer-nav-mark svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drawer-account-avatar {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 15px;
    background: var(--avatar-color, #3777d6);
    box-shadow: 0 8px 22px color-mix(in srgb, var(--avatar-color, #3777d6) 35%, transparent);
}

.drawer-account-avatar img,
.hub-messenger-avatar.default-account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hub-messenger-avatar.default-account-avatar {
    background: var(--avatar-color, #3777d6);
}

.default-account-image {
    background: #3777d6;
    object-fit: contain !important;
}

html {
    scrollbar-gutter: stable;
}

html.workspace-scroll-locked {
    overflow: hidden;
    overscroll-behavior: none;
}

body.workspace-shell {
    min-height: 100vh;
    padding: var(--hub-gap) var(--hub-gap) 24px calc(var(--hub-nav-width) + var(--hub-people-width) + var(--hub-gap));
    background: var(--hub-page);
    transition: padding-left .22s ease;
}

body.workspace-shell.custom-page-background {
    background-image: none;
}

body.workspace-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 27000;
    background: rgba(2, 8, 23, .58);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}

body.workspace-shell.window-focus-mode {
    overflow: hidden;
    overscroll-behavior: none;
}

body.workspace-shell.window-focus-mode::before {
    opacity: 1;
    pointer-events: auto;
}

body.workspace-shell.window-focus-mode .inner-modal-overlay,
body.workspace-shell.window-focus-mode .presence-menu-backdrop {
    z-index: 70000;
}

body.workspace-shell.nav-collapsed {
    --workspace-left: var(--hub-people-width);
    padding-left: calc(var(--hub-people-width) + var(--hub-gap));
}

body.workspace-shell > header {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    z-index: 120;
    width: 100%;
    max-width: none;
    min-height: 68px;
    margin: 0 0 var(--hub-gap);
    padding: 12px 16px;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-panel);
    box-shadow: 0 12px 30px rgba(0, 7, 18, .24);
    backdrop-filter: none;
}

body.workspace-shell .logo {
    font-size: 22px;
    letter-spacing: 0;
}

body.workspace-shell .language-switcher {
    position: static;
    flex: 0 0 auto;
}

body.workspace-shell .language-select,
body.workspace-shell .btn-auth-open,
body.workspace-shell .user-profile-badge {
    min-height: 42px;
    border-radius: 7px;
    box-shadow: none;
}

body.workspace-shell .btn-drawer-toggle {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: var(--hub-panel-soft);
    border-color: var(--hub-line);
}

body.workspace-shell .windows-grid {
    width: 100%;
    max-width: none;
    margin: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--hub-gap);
}

body.workspace-shell .window-card {
    height: 310px;
    border-radius: 8px;
    border-color: var(--hub-line);
    background: var(--hub-panel-strong);
    box-shadow: none;
    backdrop-filter: none;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

body.workspace-shell .window-card:not(.restricted):hover {
    transform: translateY(-2px);
    border-color: var(--hub-line-strong);
    background: #14304d;
    box-shadow: 0 12px 28px rgba(0, 7, 18, .24);
}

body.workspace-shell .card-cover {
    height: 142px;
}

body.workspace-shell .card-info {
    flex: 1;
    padding: 18px;
    background: var(--hub-panel-strong);
}

body.workspace-shell .card-title {
    font-size: 17px;
}

body.workspace-shell .card-desc {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.55;
}

body.workspace-shell .card-badge {
    border-radius: 6px;
}

body.workspace-shell .side-drawer {
    left: 0;
    width: var(--hub-nav-width);
    height: 100dvh;
    background: #09182b;
    border-right: 1px solid var(--hub-line);
    box-shadow: none;
    backdrop-filter: none;
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow: hidden;
}

body.workspace-shell .side-drawer.active {
    left: 0;
    width: var(--hub-nav-width);
    transform: translateX(0);
}

@media (min-width: 901px) {
    body.workspace-shell.nav-collapsed .workspace-people-panel {
        left: 0;
    }
}

body.workspace-shell .side-drawer-header {
    min-height: 68px;
    padding: 12px;
    border-color: var(--hub-line);
}

body.workspace-shell .side-drawer-title {
    min-width: 0;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity .14s ease;
}

body.workspace-shell .side-drawer:not(.active) .side-drawer-title {
    width: 0;
    opacity: 0;
}

body.workspace-shell .side-drawer-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
}

body.workspace-shell .side-drawer-close:hover {
    color: var(--hub-accent);
    border-color: var(--hub-line-strong);
    background: var(--hub-panel-soft);
}

body.workspace-shell .side-drawer:not(.active) .side-drawer-header {
    justify-content: center;
}

body.workspace-shell .side-drawer:not(.active) #sidebar-clock-widget,
body.workspace-shell .side-drawer:not(.active) .side-drawer-body {
    display: none;
}

body.workspace-shell #sidebar-clock-widget {
    padding: 18px 12px !important;
    border-color: var(--hub-line) !important;
    background: var(--hub-panel);
}

body.workspace-shell #popup-time {
    font-size: 30px !important;
}

body.workspace-shell .side-drawer-body {
    gap: 14px;
    padding: 14px 12px 24px;
}

body.workspace-shell .side-drawer.active .side-drawer-body {
    display: flex !important;
}

body.workspace-shell .side-drawer-body .drawer-menu-btn {
    color: var(--text);
    text-decoration: none;
}

body.workspace-shell .drawer-section {
    gap: 7px;
}

body.workspace-shell .drawer-section-title {
    padding: 0 6px;
    letter-spacing: 0;
    font-size: 10px;
}

body.workspace-shell .drawer-menu-btn,
body.workspace-shell .menu-item,
body.workspace-shell #snap-toggle-btn,
body.workspace-shell .music-tab-btn {
    min-height: 42px;
    padding: 10px 12px;
    border-radius: 7px;
    border-color: var(--hub-line);
    background: var(--hub-panel-strong);
    transform: none;
}

body.workspace-shell .drawer-menu-btn:hover,
body.workspace-shell .drawer-menu-btn.is-active,
body.workspace-shell .menu-item:hover,
body.workspace-shell .music-tab-btn:hover {
    transform: none;
    border-color: var(--hub-line-strong);
    background: rgba(76, 194, 210, .12);
    color: #dffbff !important;
}

body.workspace-shell .drawer-profile-box,
body.workspace-shell .drawer-section[style*="background"] {
    border-radius: 8px !important;
    border-color: var(--hub-line) !important;
    background: var(--hub-panel) !important;
}

body.workspace-shell .sidebar-overlay {
    display: none;
}

body.workspace-shell #taskbarRight,
body.workspace-shell #taskbarAppsModal {
    display: none !important;
}

/* Floating windows stay inside the workspace while the navigation is open. */
body.workspace-shell .app-window {
    position: fixed;
    inset: auto;
    top: 74px;
    left: calc(var(--workspace-left) + 24px);
    width: min(820px, calc(100vw - var(--workspace-left) - 48px));
    height: min(640px, calc(100vh - 96px));
    min-width: 320px;
    min-height: 240px;
    max-width: calc(100vw - var(--workspace-left));
    max-height: 100vh;
    margin: 0;
    resize: both;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-panel);
    box-shadow: 0 18px 42px rgba(0, 7, 18, .42);
    transform: none;
    z-index: 1100;
    container-type: inline-size;
}

/* Keep embedded media alive while the window is parked off screen. */
body.workspace-shell .app-window.minimized {
    display: flex !important;
    position: fixed !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.workspace-shell .hub-messenger-window {
    width: calc(100vw - var(--workspace-left) - (var(--hub-gap) * 2));
    height: calc(100dvh - (var(--hub-gap) * 2));
}

body.workspace-shell .app-window .window-header {
    min-height: 52px;
    padding: 9px 14px;
    border-color: var(--hub-line);
    background: #0d2139;
    cursor: grab;
}

body.workspace-shell .app-window .btn-minimize,
body.workspace-shell .app-window .btn-maximize {
    display: grid;
}

body.workspace-shell .app-window .ctrl-btn {
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text) !important;
    font-size: 12px;
    line-height: 1;
}

body.workspace-shell .app-window .btn-minimize {
    background: rgba(245, 180, 65, .13);
    color: #ffd37a !important;
}

body.workspace-shell .app-window .btn-maximize {
    background: rgba(57, 201, 130, .13);
    color: #83e7b5 !important;
}

body.workspace-shell .app-window .btn-close {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(239, 106, 114, .14);
    color: #ffb5ba !important;
}

body.workspace-shell .app-window .btn-close:hover {
    background: var(--hub-danger);
    color: #fff !important;
}

body.workspace-shell .app-window .btn-minimize:hover {
    background: #e0a630;
    color: #111827 !important;
}

body.workspace-shell .app-window .btn-maximize:hover {
    background: var(--hub-green);
    color: #04170f !important;
}

.minimized-window-button {
    min-height: 34px;
    max-width: 190px;
    overflow: hidden;
    padding: 6px 10px;
    border: 1px solid var(--hub-line);
    border-radius: 6px;
    background: var(--hub-panel-soft);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.minimized-window-button:hover {
    border-color: var(--hub-line-strong);
    background: rgba(76, 194, 210, .12);
}

#snap-preview-overlay {
    position: fixed;
    display: block;
    opacity: 0;
    border: 1px solid rgba(119, 226, 239, .75);
    background: rgba(76, 194, 210, .16);
    box-shadow: inset 0 0 0 3px rgba(76, 194, 210, .08);
    pointer-events: none;
    z-index: 99998;
    transition: left .12s ease, width .12s ease, opacity .12s ease;
}

#snap-preview-overlay.visible {
    opacity: 1;
}

body.workspace-shell #snap-toggle-btn.snap-toggle {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    padding: 7px 9px;
    border: 1px solid var(--hub-line);
    border-radius: 7px;
    background: var(--hub-panel-strong) !important;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.snap-toggle-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(76, 194, 210, .12);
    color: var(--hub-accent);
    font-size: 17px;
}

.snap-toggle-switch {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 999px;
    background: #405064;
    transition: background-color .16s ease;
}

.snap-toggle-switch span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform .16s ease;
}

.snap-toggle.is-on .snap-toggle-switch {
    background: var(--hub-green);
}

.snap-toggle.is-on .snap-toggle-switch span {
    transform: translateX(14px);
}

.snap-toggle.is-on {
    border-color: rgba(57, 201, 130, .38) !important;
}

@container (max-width: 720px) {
    body.workspace-shell .app-window .app-layout,
    body.workspace-shell .app-window .drive-layout {
        grid-template-columns: 1fr;
    }

    body.workspace-shell .app-window .drive-sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

body.workspace-shell .app-window .window-content-body {
    min-height: 0;
    padding: 20px;
}

body.workspace-shell .app-window .app-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
}

body.workspace-shell .app-window .drive-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
}

body.workspace-shell .app-window .drive-sidebar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

body.workspace-shell .hub-messenger-window .window-content-body {
    padding: 0;
}

body.workspace-shell .hub-messenger-shell {
    grid-template-columns: 226px 286px minmax(0, 1fr);
    background: var(--hub-panel);
}

body.workspace-shell .hub-messenger-shell.hub-messenger-chat-only {
    display: block;
}

body.workspace-shell .hub-messenger-chat-only .hub-messenger-chat {
    height: 100%;
}

body.workspace-shell .hub-messenger-rail {
    background: #09182b;
}

body.workspace-shell .hub-messenger-list {
    background: #0b1b30;
}

body.workspace-shell .hub-messenger-rail,
body.workspace-shell .hub-messenger-list,
body.workspace-shell .hub-messenger-brand,
body.workspace-shell .hub-messenger-list-header,
body.workspace-shell .hub-messenger-chat-header {
    border-color: var(--hub-line);
}

body.workspace-shell .hub-messenger-action,
body.workspace-shell .hub-messenger-tab,
body.workspace-shell .hub-messenger-conversation,
body.workspace-shell .hub-messenger-person,
body.workspace-shell .hub-messenger-request,
body.workspace-shell .hub-messenger-icon-button,
body.workspace-shell .hub-messenger-link-button,
body.workspace-shell .hub-messenger-friend-picker {
    border-radius: 7px;
}

body.workspace-shell .hub-messenger-conversation.active {
    background: rgba(76, 194, 210, .12);
    border-color: var(--hub-line-strong);
}

body.workspace-shell .hub-messenger-avatar {
    border-radius: 8px;
}

body.workspace-shell .hub-messenger-badge {
    background: var(--hub-green);
    color: #04170f;
}

/* Permanent communication column between the navigation and workspace. */
body.workspace-shell .workspace-people-panel {
    position: fixed;
    inset: 0 auto 0 var(--hub-nav-width);
    z-index: 25000;
    display: flex;
    width: var(--hub-people-width);
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--hub-line);
    background:
        linear-gradient(180deg, rgba(76, 194, 210, .07), transparent 180px),
        #0b1b30;
    color: var(--text);
    box-shadow: 18px 0 40px rgba(0, 7, 18, .18);
    transition: left .22s ease;
}

.workspace-people-heading {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 18px 14px;
}

.workspace-people-heading > div {
    min-width: 0;
}

.workspace-people-heading strong,
.workspace-people-kicker {
    display: block;
}

.workspace-people-heading strong {
    margin-top: 4px;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.workspace-people-kicker {
    color: var(--hub-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.workspace-live-mark {
    width: 11px;
    height: 11px;
    flex: 0 0 11px;
    border: 3px solid rgba(57, 201, 130, .2);
    border-radius: 50%;
    background: var(--hub-green);
    box-sizing: content-box;
}

.workspace-people-search-wrap {
    position: relative;
    margin: 0 14px 12px;
}

.workspace-people-search-wrap > span {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: var(--muted);
    font-size: 18px;
    transform: translateY(-54%);
    pointer-events: none;
}

body.workspace-shell .workspace-people-search-wrap .hub-messenger-search {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px 10px 36px;
    border: 1px solid var(--hub-line);
    border-radius: 9px;
    background: rgba(4, 15, 29, .72);
    font-size: 14px;
}

.workspace-people-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 0 14px 12px;
}

.workspace-people-tab {
    min-width: 0;
    min-height: 34px;
    padding: 6px 5px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    cursor: pointer;
}

.workspace-people-tab:hover,
.workspace-people-tab.active {
    border-color: var(--hub-line-strong);
    background: rgba(76, 194, 210, .12);
    color: #dffbff;
}

.workspace-people-overview {
    display: flex;
    min-height: 35px;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 7px 14px;
    border-block: 1px solid var(--hub-line);
    color: var(--muted);
    font-size: 12px;
    scrollbar-width: none;
    white-space: nowrap;
}

.workspace-people-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 700;
}

.workspace-people-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hub-green);
}

.workspace-request-pill {
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(245, 180, 65, .14);
    color: #ffd37a;
}

.workspace-people-list-heading {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px 5px 18px;
}

.workspace-people-list-heading strong {
    overflow: hidden;
    font-size: 12px;
    letter-spacing: .02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-people-refresh {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border: 1px solid var(--hub-line);
    border-radius: 7px;
    background: var(--hub-panel-strong);
    color: var(--muted);
    font: inherit;
    cursor: pointer;
}

.workspace-people-refresh:hover {
    border-color: var(--hub-line-strong);
    color: var(--hub-accent);
}

.workspace-people-list {
    flex: 1;
    padding: 0 6px 8px;
}

body.workspace-shell .workspace-people-panel .hub-messenger-conversation,
body.workspace-shell .workspace-people-panel .hub-messenger-person {
    width: calc(100% - 8px);
    min-height: 62px;
    margin: 3px 4px;
    padding: 9px;
}

body.workspace-shell .workspace-people-panel .hub-messenger-avatar {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(145deg, #16637a, #3843a9);
}

body.workspace-shell .workspace-people-panel .hub-messenger-copy strong {
    font-size: 14px;
}

body.workspace-shell .workspace-people-panel .hub-messenger-copy small {
    margin-top: 3px;
    font-size: 12px;
}

.workspace-people-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--hub-line);
    background: rgba(4, 15, 29, .72);
}

.workspace-people-actions button,
.workspace-people-signed-out button {
    min-height: 42px;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-panel-strong);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-people-actions button:hover,
.workspace-people-signed-out button:hover {
    border-color: var(--hub-line-strong);
    background: rgba(76, 194, 210, .13);
}

.workspace-people-actions span {
    display: block;
    margin-bottom: 2px;
    color: var(--hub-accent);
    font-size: 16px;
}

body.workspace-shell .workspace-people-signed-out {
    min-height: 260px;
    padding: 28px 22px;
    gap: 8px;
    text-align: center;
}

.workspace-people-signed-out > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 6px;
    place-items: center;
    border: 1px solid var(--hub-line-strong);
    border-radius: 50%;
    color: var(--hub-accent);
    font-size: 25px;
}

.workspace-people-signed-out strong,
.workspace-people-signed-out small {
    display: block;
}

.workspace-people-signed-out strong {
    color: var(--text);
    font-size: 14px;
}

.workspace-people-signed-out small {
    max-width: 220px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.workspace-people-signed-out button {
    min-width: 112px;
    margin-top: 8px;
    padding: 8px 16px;
}

body.workspace-shell .app-window.maximized {
    top: 0 !important;
    left: var(--workspace-left) !important;
    width: calc(100vw - var(--workspace-left)) !important;
    max-width: calc(100vw - var(--workspace-left)) !important;
}

body.workspace-shell .app-window.snap-left,
body.workspace-shell .app-window.snap-right {
    width: calc((100vw - var(--workspace-left)) / 2) !important;
    max-width: none !important;
}

body.workspace-shell .app-window.snap-left {
    left: var(--workspace-left) !important;
}

body.workspace-shell .app-window.snap-right {
    right: 0 !important;
    left: auto !important;
}

.music-workspace {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 14px;
    height: 100%;
    min-height: 0;
}

.music-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
    gap: 14px;
    min-height: 0;
}

.music-player-column {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    min-height: 0;
}

.music-service-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.music-service-tab {
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--hub-line);
    border-radius: 7px;
    background: var(--hub-panel-strong);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.music-service-tab:hover,
.music-service-tab.active {
    border-color: var(--hub-line-strong);
    background: rgba(76, 194, 210, .14);
    color: var(--hub-accent);
}

.music-link-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto auto;
    gap: 8px;
}

.music-link-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--hub-line);
    border-radius: 7px;
    background: var(--field-bg);
    color: var(--text);
    outline: none;
}

.music-link-form input:focus {
    border-color: var(--hub-accent);
    box-shadow: 0 0 0 3px rgba(76, 194, 210, .12);
}

.music-link-form .btn-primary,
.music-secondary-button {
    min-height: 44px;
    margin: 0;
    padding: 8px 18px;
    border-radius: 7px;
    box-shadow: none;
}

.music-secondary-button {
    border: 1px solid var(--hub-line-strong);
    background: var(--hub-panel-strong);
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.music-secondary-button:hover {
    border-color: var(--hub-accent);
    color: var(--hub-accent);
}

.music-file-picker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--hub-line-strong);
    border-radius: 7px;
    background: rgba(76, 194, 210, .12);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.music-file-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.music-player-status {
    min-height: 38px;
    padding: 9px 11px;
    border: 1px solid var(--hub-line);
    border-radius: 7px;
    color: var(--muted);
    font-size: 12px;
}

.music-player-status[data-type="error"] {
    border-color: rgba(239, 106, 114, .42);
    background: rgba(239, 106, 114, .1);
    color: #ffb5ba;
}

.music-player-status[data-type="success"] {
    border-color: rgba(76, 194, 210, .42);
    background: rgba(76, 194, 210, .1);
    color: var(--hub-accent);
}

.music-library-panel {
    display: grid;
    grid-template-rows: minmax(180px, 1fr) minmax(180px, 1fr);
    gap: 12px;
    min-height: 0;
}

.music-library-section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: var(--hub-panel);
}

.music-library-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hub-line);
}

.music-library-heading h3 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
}

.music-library-heading h3 span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: 4px;
    border-radius: 11px;
    background: rgba(76, 194, 210, .14);
    color: var(--hub-accent);
    font-size: 11px;
}

.music-library-heading > div,
.music-library-actions {
    display: flex;
    gap: 4px;
}

.music-library-heading button,
.music-library-actions button {
    min-width: 28px;
    min-height: 28px;
    padding: 4px 7px;
    border: 1px solid var(--hub-line);
    border-radius: 6px;
    background: var(--hub-panel-strong);
    color: var(--muted);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.music-library-heading button:hover,
.music-library-actions button:hover {
    border-color: var(--hub-line-strong);
    color: var(--hub-accent);
}

.music-library-actions button:disabled {
    opacity: .35;
    cursor: default;
}

.music-library-list {
    min-height: 0;
    overflow: auto;
    padding: 6px;
}

.music-library-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 7px;
}

.music-library-item + .music-library-item {
    border-top: 1px solid var(--hub-line);
}

.music-library-item:hover {
    background: rgba(76, 194, 210, .07);
}

.music-library-play {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.music-library-play > span:last-child {
    min-width: 0;
}

.music-library-play strong,
.music-library-play small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-library-play strong {
    font-size: 11px;
}

.music-library-play small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.music-library-index {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--hub-line-strong);
    border-radius: 6px;
    color: var(--hub-accent);
    font-size: 11px;
}

.music-library-empty {
    margin: auto;
    padding: 18px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.music-embed-host {
    min-height: 260px;
    overflow: hidden;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    background: #071426;
}

.music-embed {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 0;
    background: #071426;
}

.music-embed-spotify {
    min-height: 352px;
}

.music-empty-state,
.music-local-player {
    display: flex;
    height: 100%;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    color: var(--muted);
}

.music-empty-state span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border: 1px solid var(--hub-line-strong);
    border-radius: 8px;
    color: var(--hub-accent);
    font-size: 32px;
}

.music-local-title {
    max-width: min(680px, 90%);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-local-audio {
    width: min(680px, 90%);
}

body[data-theme="light"].workspace-shell {
    --hub-page: #eaf1f7;
    --hub-panel: #f7fafc;
    --hub-panel-strong: #edf4f8;
    --hub-panel-soft: #e1edf3;
    --hub-line: rgba(45, 83, 108, .18);
    --hub-line-strong: rgba(20, 130, 145, .42);
    background: var(--hub-page);
}

body[data-theme="light"].workspace-shell .side-drawer,
body[data-theme="light"].workspace-shell .hub-messenger-rail {
    background: #dce8ef;
}

body[data-theme="light"].workspace-shell .workspace-people-panel {
    background: linear-gradient(180deg, rgba(20, 130, 145, .08), transparent 180px), #e8f0f5;
}

body[data-theme="light"].workspace-shell .hub-messenger-list {
    background: #e8f0f5;
}

body[data-theme="light"].workspace-shell .app-window .window-header {
    background: #e3edf3;
}

@media (max-width: 1180px) {
    :root {
        --hub-nav-width: 244px;
        --hub-people-width: 292px;
    }

    body.workspace-shell .windows-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.workspace-shell .hub-messenger-shell {
        grid-template-columns: 82px 244px minmax(0, 1fr);
    }

    body.workspace-shell .hub-messenger-brand strong,
    body.workspace-shell .hub-messenger-actions span,
    body.workspace-shell .hub-messenger-tab span {
        display: none;
    }

    body.workspace-shell .hub-messenger-actions {
        grid-template-columns: 1fr;
    }

    .music-content-grid {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .music-player-column {
        min-height: 420px;
    }

    .music-library-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: minmax(240px, auto);
    }
}

@media (max-width: 900px) {
    :root {
        --hub-nav-width: min(286px, calc(100vw - 54px));
        --hub-people-width: 100%;
        --hub-nav-collapsed: 54px;
        --hub-gap: 8px;
        --workspace-left: 0px;
    }

    body.workspace-shell,
    body.workspace-shell.nav-collapsed {
        --workspace-left: 0px;
        padding: var(--hub-gap) var(--hub-gap) 18px;
    }

    body.workspace-shell .workspace-people-panel {
        position: relative;
        inset: auto;
        z-index: 1;
        width: 100%;
        height: min(480px, 62dvh);
        margin-bottom: var(--hub-gap);
        border: 1px solid var(--hub-line);
        border-radius: 10px;
        box-shadow: none;
    }

    body.workspace-shell .workspace-people-heading {
        min-height: 68px;
        padding-block: 12px;
    }

    body.workspace-shell #headerDrawerToggle,
    body.workspace-shell .side-drawer-close {
        display: grid;
    }

    body.workspace-shell .side-drawer.active {
        box-shadow: 18px 0 44px rgba(0, 7, 18, .58);
    }

    body.workspace-shell .side-drawer.active + * {
        pointer-events: none;
    }

    body.workspace-shell > header {
        top: auto;
        right: auto;
        left: auto;
        min-height: 58px;
        padding: 8px 10px;
    }

    body.workspace-shell .logo {
        font-size: 17px;
    }

    body.workspace-shell .header-right .user-profile-badge > span:not(.avatar-presence-wrap),
    body.workspace-shell .language-switcher {
        display: none !important;
    }

    body.workspace-shell #minimized-container {
        max-width: 38vw !important;
    }

    body.workspace-shell .windows-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.workspace-shell .window-card {
        height: 286px;
    }

    body.workspace-shell .app-window {
        min-width: 280px;
        min-height: 240px;
        max-width: 100vw;
        max-height: 100vh;
    }

    body.workspace-shell .hub-messenger-shell {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    body.workspace-shell .hub-messenger-shell.hub-messenger-chat-only,
    body.workspace-shell .hub-messenger-chat-only .hub-messenger-chat {
        display: flex;
    }

    body.workspace-shell .hub-messenger-chat-only .hub-messenger-chat-header > .hub-messenger-icon-button:first-child {
        display: none !important;
    }

    body.workspace-shell .app-window.maximized {
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }

    body.workspace-shell .app-window .app-layout,
    body.workspace-shell .app-window .drive-layout {
        grid-template-columns: 1fr;
    }

    .music-link-form {
        grid-template-columns: 1fr;
    }

    .music-link-form .btn-primary,
    .music-secondary-button {
        width: 100%;
    }

    .music-content-grid {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .music-player-column {
        min-height: 420px;
    }

    .music-library-panel {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(220px, auto) minmax(220px, auto);
    }

}

/* Calm, continuous motion for opening, moving, resizing, and snapping windows. */
body.workspace-shell .app-window {
    transition:
        left .24s cubic-bezier(.22, 1, .36, 1),
        top .24s cubic-bezier(.22, 1, .36, 1),
        width .24s cubic-bezier(.22, 1, .36, 1),
        height .24s cubic-bezier(.22, 1, .36, 1),
        max-width .24s cubic-bezier(.22, 1, .36, 1),
        max-height .24s cubic-bezier(.22, 1, .36, 1),
        border-radius .2s ease,
        opacity .18s ease,
        box-shadow .2s ease;
}

body.workspace-shell .app-window.active:not(.minimized) {
    animation: pilvory-window-arrive .22s cubic-bezier(.22, 1, .36, 1);
}

body.workspace-shell .app-window.is-dragging {
    transition: box-shadow .16s ease !important;
    animation: none !important;
    box-shadow: 0 34px 82px rgba(0, 7, 18, .56), inset 0 1px 0 rgba(255, 255, 255, .07);
    will-change: left, top;
}

body.workspace-shell .app-window.is-dragging .window-header { cursor: grabbing; }

body.workspace-shell :is(.window-card, .drawer-menu-btn, .minimized-window-button, .workspace-people-person) {
    transition-duration: .22s;
    transition-timing-function: cubic-bezier(.22, 1, .36, 1);
}

@keyframes pilvory-window-arrive {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    body.workspace-shell .app-window,
    body.workspace-shell .app-window.active:not(.minimized),
    body.workspace-shell :is(.window-card, .drawer-menu-btn, .minimized-window-button, .workspace-people-person) {
        transition: none !important;
        animation: none !important;
    }
}

/* Dedicated application pages. */
.app-page-header {
    display: none;
}

body.app-route-mode {
    min-height: 100dvh;
    padding: 0;
    overflow: auto;
    background-color: var(--page-background, var(--hub-page));
}

body.app-route-mode::before,
body.app-route-mode > header:not(.app-page-header),
body.app-route-mode > .windows-grid,
body.app-route-mode > .side-drawer,
body.app-route-mode > .sidebar-overlay,
body.app-route-mode > #taskbarRight,
body.app-route-mode > #taskbarAppsModal,
body.app-route-mode > .workspace-people-panel {
    display: none !important;
}

body.app-route-mode .app-page-header {
    position: sticky;
    top: 0;
    z-index: 80000;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
    width: 100%;
    min-height: 76px;
    align-items: center;
    gap: 22px;
    padding: 12px 24px;
    border: 0;
    border-bottom: 1px solid var(--hub-line);
    border-radius: 0;
    background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
    box-shadow: 0 10px 32px rgba(0, 7, 18, .18);
}

.app-page-brand,
.app-page-heading {
    display: flex;
    align-items: center;
}

.app-page-brand {
    justify-self: start;
    gap: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.app-page-monogram {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--hub-line-strong);
    border-radius: 50%;
    background: var(--accent-strong);
    color: #fff;
    font-size: 11px;
    letter-spacing: .06em;
}

.app-page-heading {
    min-width: 0;
    flex-direction: column;
    justify-self: center;
    line-height: 1.2;
    text-align: center;
}

.app-page-kicker {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.app-page-heading strong {
    margin-top: 3px;
    color: var(--text);
    font-size: 18px;
}

.app-page-back {
    justify-self: end;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.app-page-back:hover,
.app-page-brand:hover {
    border-color: var(--hub-line-strong);
    color: var(--accent);
}

body.app-route-mode .app-window.active.route-fullscreen {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: min(1440px, calc(100vw - 48px)) !important;
    height: calc(100dvh - 124px) !important;
    min-width: 0 !important;
    min-height: 560px !important;
    max-width: none !important;
    max-height: none !important;
    margin: 24px auto !important;
    resize: none !important;
    border-radius: 28px;
    box-shadow: 0 22px 60px rgba(0, 7, 18, .28);
}

body.app-route-mode .app-window .window-header {
    min-height: 62px;
    padding: 14px 24px;
    border-radius: 27px 27px 0 0;
    cursor: default;
}

body.app-route-mode .app-window .window-header:active {
    cursor: default;
}

body.app-route-mode .app-window .window-title {
    font-size: 17px;
    letter-spacing: -.01em;
}

body.app-route-mode .app-window .window-controls {
    display: none;
}

body.app-route-mode .app-window .window-content-body,
body.app-route-mode .app-window .fullscreen-body {
    padding: 28px;
    font-size: 14px;
}

body.app-route-mode[data-app-route="settings"] #settingsWindow.active.route-fullscreen,
body.app-route-mode[data-app-route="weather"] #win-weather.active.route-fullscreen {
    width: min(960px, calc(100vw - 48px)) !important;
}

body.app-route-mode[data-app-route="profile"] #profileWindow.active.route-fullscreen,
body.app-route-mode[data-app-route="assistant"] #win-3.active.route-fullscreen {
    width: min(1180px, calc(100vw - 48px)) !important;
}

body.app-route-mode .app-window .note-box textarea {
    height: 220px !important;
}

body.app-route-mode[data-app-route="messenger"] > .workspace-people-panel {
    position: fixed;
    inset: 100px auto 24px 24px;
    z-index: 5;
    display: flex !important;
    width: 318px;
    height: auto;
    border: 1px solid var(--hub-line);
    border-radius: 24px;
}

body.app-route-mode[data-app-route="messenger"] .hub-messenger-window.active.route-fullscreen {
    width: calc(100vw - 390px) !important;
    margin-right: 24px !important;
    margin-left: auto !important;
}

.app-cover-label {
    position: absolute;
    left: 22px;
    bottom: 18px;
    z-index: 1;
    color: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
}

body.workspace-shell .notes-cover,
body.workspace-shell .drive-cover,
body.workspace-shell .window-cover-placeholder {
    background-image: none;
}

body.workspace-shell .notes-cover {
    background-color: #165f8d;
}

body.workspace-shell .drive-cover {
    background-color: #214f87;
}

body.workspace-shell .window-cover-placeholder {
    background-color: #163a5c;
    color: transparent;
}

body.workspace-shell .logo-cloud-mark {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
}

body.workspace-shell .settings-section-icon {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
}

.custom-alert-icon,
.status-icon-wrapper {
    display: none !important;
}

body.workspace-shell .file-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid var(--hub-line-strong);
    border-radius: 16px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
}

@media (max-width: 900px) {
    body.app-route-mode .app-page-header {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 66px;
        padding: 10px 14px;
    }

    .app-page-heading {
        display: none;
    }

    .app-page-brand {
        font-size: 14px;
    }

    .app-page-back {
        min-height: 38px;
        padding-inline: 13px;
    }

    body.app-route-mode .app-window.active.route-fullscreen,
    body.app-route-mode[data-app-route="messenger"] .hub-messenger-window.active.route-fullscreen {
        width: calc(100vw - 24px) !important;
        height: auto !important;
        min-height: calc(100dvh - 102px) !important;
        margin: 12px auto !important;
        border-radius: 22px;
    }

    body.app-route-mode[data-app-route="settings"] #settingsWindow.active.route-fullscreen,
    body.app-route-mode[data-app-route="weather"] #win-weather.active.route-fullscreen,
    body.app-route-mode[data-app-route="profile"] #profileWindow.active.route-fullscreen,
    body.app-route-mode[data-app-route="assistant"] #win-3.active.route-fullscreen {
        width: calc(100vw - 24px) !important;
    }

    body.app-route-mode .app-window .window-header {
        border-radius: 21px 21px 0 0;
    }

    body.app-route-mode .app-window .window-content-body,
    body.app-route-mode .app-window .fullscreen-body {
        padding: 18px;
    }

    body.app-route-mode[data-app-route="messenger"] > .workspace-people-panel {
        position: relative;
        inset: auto;
        width: calc(100vw - 24px);
        height: min(360px, 42dvh);
        margin: 12px auto;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.workspace-shell,
    body.workspace-shell .side-drawer,
    body.workspace-shell .app-window {
        transition: none;
    }
}

/* Cloud identity: soft, buoyant shapes across the workspace. */
:root {
    --cloud-radius-xl: 32px;
    --cloud-radius-lg: 24px;
    --cloud-radius-md: 18px;
    --cloud-radius-sm: 14px;
    --cloud-shadow: 0 18px 44px rgba(0, 7, 18, .25), inset 0 1px 0 rgba(255, 255, 255, .055);
}

body.workspace-shell {
    background-color: var(--page-background, var(--hub-page));
    background-image:
        radial-gradient(circle at 78% -8%, rgba(76, 194, 210, .13), transparent 34%),
        radial-gradient(circle at 34% 108%, rgba(70, 110, 220, .1), transparent 36%);
    background-attachment: fixed;
}

body.workspace-shell > header {
    border-radius: var(--cloud-radius-xl);
    background: color-mix(in srgb, var(--hub-panel) 92%, #4cc2d2 8%);
    box-shadow: var(--cloud-shadow);
}

body.workspace-shell .logo {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    gap: 11px;
    padding: 5px 18px 5px 6px;
    border: 1px solid rgba(126, 225, 238, .28);
    border-radius: 999px;
    background: rgba(76, 194, 210, .09);
    color: #f4fdff;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
}

.logo-cloud-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #ecfeff, #9eeaf3);
    color: #167284;
    font-size: 23px;
    filter: drop-shadow(0 6px 10px rgba(1, 10, 25, .22));
}

.logo-wordmark {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -.02em;
    white-space: nowrap;
}

body.workspace-shell .language-select,
body.workspace-shell .btn-auth-open,
body.workspace-shell .user-profile-badge,
body.workspace-shell .btn-drawer-toggle,
.minimized-window-button {
    border-radius: 999px;
}

body.workspace-shell .window-card {
    border-radius: var(--cloud-radius-xl);
    box-shadow: var(--cloud-shadow);
    color: inherit;
    text-decoration: none;
}

body.workspace-shell .window-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(255, 255, 255, .055), transparent 38%);
    pointer-events: none;
}

body.workspace-shell .window-card:not(.restricted):hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 50px rgba(0, 7, 18, .34), 0 0 0 1px rgba(126, 225, 238, .08);
}

body.workspace-shell .card-cover {
    border-radius: calc(var(--cloud-radius-xl) - 2px) calc(var(--cloud-radius-xl) - 2px) var(--cloud-radius-lg) var(--cloud-radius-lg);
}

body.workspace-shell .card-info {
    border-radius: 0 0 calc(var(--cloud-radius-xl) - 2px) calc(var(--cloud-radius-xl) - 2px);
}

body.workspace-shell .card-badge,
body.workspace-shell .web-card-action,
.workspace-request-pill,
.user-role-tag,
.team-tag-badge {
    border-radius: 999px;
}

body.workspace-shell .app-window {
    border-radius: var(--cloud-radius-lg);
    box-shadow: 0 26px 70px rgba(0, 7, 18, .48), inset 0 1px 0 rgba(255, 255, 255, .06);
}

body.workspace-shell .app-window .window-header {
    border-radius: calc(var(--cloud-radius-lg) - 1px) calc(var(--cloud-radius-lg) - 1px) var(--cloud-radius-md) var(--cloud-radius-md);
}

body.workspace-shell .app-window .ctrl-btn,
body.workspace-shell .app-window .btn-close,
.workspace-people-refresh,
.snap-toggle-icon {
    border-radius: 50%;
}

body.workspace-shell :is(
    .note-box, .sidebar-notes, .drive-sidebar, .drive-toolbar, .file-card,
    .admin-table-container, .inner-modal-content, .auth-card, .status-modal-card,
    .top-search-panel, .chat-messages, .drawer-profile-box, .theme-picker,
    .storage-info, .public-profile-shell, .profile-status-card, .team-form,
    .weather-result-card, .music-library-panel, .music-player-panel
) {
    border-radius: var(--cloud-radius-lg);
}

body.workspace-shell :is(
    button, input, textarea, select, .drawer-menu-btn, .menu-item,
    .taskbar-icon-btn, .taskbar-app-row, .settings-toggle-row, .note-btn,
    .music-service-tab, .music-secondary-button, .hub-messenger-action,
    .hub-messenger-tab, .hub-messenger-conversation, .hub-messenger-person,
    .hub-messenger-request, .hub-messenger-icon-button, .hub-messenger-link-button,
    .hub-messenger-friend-picker, .workspace-people-tab
) {
    border-radius: var(--cloud-radius-sm);
}

body.workspace-shell :is(.btn-primary, .btn-auth-open, .btn-secondary, .btn-pin, .btn-danger, .close-btn) {
    border-radius: 999px;
}

body.workspace-shell :is(input, textarea, select):focus {
    box-shadow: 0 0 0 4px rgba(76, 194, 210, .12);
}

body.workspace-shell .side-drawer {
    border-radius: 0 var(--cloud-radius-xl) var(--cloud-radius-xl) 0;
    box-shadow: 16px 0 44px rgba(0, 7, 18, .18);
}

body.workspace-shell .side-drawer:not(.active) {
    border-radius: 0 var(--cloud-radius-lg) var(--cloud-radius-lg) 0;
}

body.workspace-shell .drawer-profile-box,
body.workspace-shell .drawer-section[style*="background"] {
    border-radius: var(--cloud-radius-lg) !important;
}

body.workspace-shell .workspace-people-panel {
    border-radius: 0 var(--cloud-radius-xl) var(--cloud-radius-xl) 0;
    box-shadow: 18px 0 46px rgba(0, 7, 18, .23);
}

body.workspace-shell .workspace-people-search-wrap .hub-messenger-search {
    border-radius: 999px;
}

body.workspace-shell .workspace-people-panel :is(.hub-messenger-conversation, .hub-messenger-person) {
    border-radius: var(--cloud-radius-md);
}

body.workspace-shell .workspace-people-actions {
    border-radius: var(--cloud-radius-lg) var(--cloud-radius-lg) 0 0;
}

body.workspace-shell .workspace-people-actions button,
body.workspace-shell .workspace-people-signed-out button,
body.workspace-shell #snap-toggle-btn.snap-toggle,
.music-link-form input,
.music-link-form .btn-primary,
.music-secondary-button {
    border-radius: 999px;
}

body.workspace-shell .hub-messenger-avatar {
    border-radius: 50%;
}

body[data-theme="light"].workspace-shell {
    --cloud-shadow: 0 18px 44px rgba(31, 83, 128, .13), inset 0 1px 0 rgba(255, 255, 255, .8);
    background-image:
        radial-gradient(circle at 78% -8%, rgba(68, 190, 218, .17), transparent 35%),
        radial-gradient(circle at 32% 108%, rgba(93, 139, 224, .11), transparent 36%);
}

body[data-theme="light"].workspace-shell > header {
    background: color-mix(in srgb, var(--surface) 92%, #bceff5 8%);
}

body[data-theme="light"] .logo-cloud-mark {
    background: linear-gradient(145deg, #ffffff, #c9f5fa);
    color: #176d84;
}

@media (max-width: 900px) {
    body.workspace-shell > header {
        border-radius: var(--cloud-radius-lg);
    }

    body.workspace-shell .logo {
        min-height: 40px;
        padding: 3px 12px 3px 4px;
    }

    .logo-cloud-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 20px;
    }

    .logo-wordmark {
        font-size: 16px;
    }

    body.workspace-shell .window-card {
        border-radius: var(--cloud-radius-lg);
    }
}

/* Refined left navigation: compact cloud-shaped workspace console. */
body.workspace-shell .side-drawer {
    background:
        radial-gradient(circle at 12% 2%, rgba(76, 194, 210, .15), transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--hub-panel) 92%, #112f4c 8%), var(--hub-page));
    border-right: 1px solid color-mix(in srgb, var(--hub-line-strong) 52%, var(--hub-line));
    box-shadow: 18px 0 52px rgba(0, 7, 18, .32);
}

body.workspace-shell .side-drawer-header {
    min-height: 78px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--hub-line);
    background: color-mix(in srgb, var(--hub-panel) 84%, transparent);
}

.side-drawer-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
}

.side-drawer-brand-mark {
    display: grid;
    width: 42px;
    height: 36px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 55% 45% 52% 48% / 62% 58% 42% 38%;
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 88%, #fff 12%), var(--accent-strong));
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    box-shadow: 0 10px 25px rgba(36, 127, 212, .3);
}

body.workspace-shell .side-drawer-title {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
}

body.workspace-shell .side-drawer-title strong {
    overflow: hidden;
    color: var(--text);
    font-size: 15px;
    font-weight: 780;
    letter-spacing: -.015em;
    text-overflow: ellipsis;
}

body.workspace-shell .side-drawer-title small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
}

body.workspace-shell .side-drawer-close {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border-color: var(--hub-line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--hub-panel-soft) 78%, transparent);
    font-size: 13px;
}

body.workspace-shell #sidebar-clock-widget {
    margin: 12px 12px 0;
    padding: 16px 14px 13px !important;
    border: 1px solid var(--hub-line) !important;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(76, 194, 210, .1), transparent 58%),
        color-mix(in srgb, var(--hub-panel-strong) 88%, transparent) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

body.workspace-shell #popup-time {
    color: var(--text) !important;
    font-size: 31px !important;
    font-weight: 760 !important;
    letter-spacing: -.045em;
    line-height: 1;
}

body.workspace-shell #popup-date {
    margin: 6px 0 13px !important;
    color: var(--muted) !important;
    font-size: 11px !important;
}

body.workspace-shell #sidebar-clock-widget > div:nth-of-type(3) {
    gap: 5px !important;
    margin-bottom: 9px !important;
    padding: 4px;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: rgba(0, 0, 0, .12);
}

body.workspace-shell #sidebar-clock-widget .clock-tab-btn {
    min-width: 0;
    min-height: 28px;
    flex: 1;
    padding: 4px 5px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
}

body.workspace-shell .side-drawer-body {
    gap: 11px;
    padding: 12px 12px 24px;
    scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
    scrollbar-width: thin;
}

body.workspace-shell .drawer-surface-card,
body.workspace-shell .side-drawer-body > .drawer-section {
    gap: 7px;
    padding: 11px;
    border: 1px solid var(--hub-line);
    border-radius: 22px;
    background: color-mix(in srgb, var(--hub-panel-strong) 72%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

body.workspace-shell .drawer-section-title {
    padding: 0 5px 4px;
    color: var(--muted) !important;
    font-size: 11px;
    font-weight: 780;
    letter-spacing: .065em;
}

.drawer-account-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 2px 8px;
}

.drawer-account-monogram {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--hub-line));
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 15%, var(--hub-panel-soft));
    color: var(--accent);
    font-size: 12px;
    font-weight: 850;
}

.drawer-account-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.drawer-account-copy small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 650;
}

.drawer-account-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
}

.drawer-account-button {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: var(--hub-panel-soft);
    color: var(--text);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.drawer-account-button:hover,
.drawer-account-button.is-primary {
    border-color: var(--hub-line-strong);
    background: color-mix(in srgb, var(--accent) 16%, var(--hub-panel-soft));
    color: var(--accent);
}

.drawer-account-button.is-muted {
    color: var(--muted);
}

body.workspace-shell .drawer-menu-btn,
body.workspace-shell #snap-toggle-btn {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 46px;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 680;
    text-align: left;
}

body.workspace-shell .drawer-menu-btn:hover,
body.workspace-shell .drawer-menu-btn.is-active {
    transform: translateX(2px);
    border-color: color-mix(in srgb, var(--accent) 40%, var(--hub-line));
    background: color-mix(in srgb, var(--accent) 12%, var(--hub-panel-soft));
    color: var(--text) !important;
}

body.workspace-shell .drawer-menu-btn.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.drawer-nav-mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--hub-line);
    border-radius: 50%;
    background: color-mix(in srgb, var(--hub-panel-soft) 86%, transparent);
    color: var(--muted);
    font-size: 10px;
    font-weight: 850;
}

.drawer-menu-btn:hover .drawer-nav-mark,
.drawer-menu-btn.is-active .drawer-nav-mark {
    border-color: color-mix(in srgb, var(--accent) 52%, var(--hub-line));
    background: color-mix(in srgb, var(--accent) 18%, var(--hub-panel-soft));
    color: var(--accent);
}

.drawer-nav-arrow {
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
}

body.workspace-shell #snap-toggle-btn .snap-toggle-switch {
    justify-self: end;
}

body[data-theme="light"].workspace-shell .side-drawer {
    background:
        radial-gradient(circle at 12% 2%, rgba(46, 166, 183, .14), transparent 28%),
        linear-gradient(180deg, #edf7fa, #dceaf1);
    box-shadow: 18px 0 48px rgba(31, 83, 128, .16);
}

body[data-theme="light"].workspace-shell #sidebar-clock-widget,
body[data-theme="light"].workspace-shell .drawer-surface-card,
body[data-theme="light"].workspace-shell .side-drawer-body > .drawer-section {
    background-color: rgba(255, 255, 255, .58) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

@media (max-width: 900px) {
    body.workspace-shell .side-drawer {
        width: min(304px, calc(100vw - 36px));
    }

    body.workspace-shell .side-drawer.active {
        width: min(304px, calc(100vw - 36px));
    }
}

/* Full-screen application workspace with persistent background apps. */
body.app-route-mode {
    --app-route-header-height: 72px;
    --app-route-dock-height: 64px;
    overflow: hidden;
}

body.app-route-mode .app-page-header {
    position: fixed;
    inset: 0 0 auto;
    grid-template-columns: auto auto minmax(160px, 1fr) auto;
    min-height: var(--app-route-header-height);
    padding: 10px 16px;
    gap: 14px;
    border-radius: 0;
}

.app-page-menu,
.workspace-dock-menu,
.workspace-dock-home {
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.app-page-menu {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.app-page-menu:hover,
.workspace-dock-menu:hover,
.workspace-dock-home:hover {
    border-color: var(--hub-line-strong);
    color: var(--accent);
}

body.app-route-mode > .side-drawer {
    z-index: 90020;
    display: flex !important;
    transform: translateX(-105%);
    box-shadow: 20px 0 52px rgba(0, 7, 18, .44);
}

body.app-route-mode > .side-drawer.active {
    transform: translateX(0);
}

body.app-route-mode > .sidebar-overlay {
    z-index: 90010;
    display: block !important;
}

body.app-route-mode .app-window.active.route-fullscreen,
body.app-route-mode[data-app-route="messenger"] .hub-messenger-window.active.route-fullscreen,
body.app-route-mode[data-app-route="settings"] #settingsWindow.active.route-fullscreen,
body.app-route-mode[data-app-route="weather"] #win-weather.active.route-fullscreen,
body.app-route-mode[data-app-route="profile"] #profileWindow.active.route-fullscreen,
body.app-route-mode[data-app-route="assistant"] #win-3.active.route-fullscreen {
    position: fixed !important;
    inset: var(--app-route-header-height) 0 var(--app-route-dock-height) 0 !important;
    z-index: 1 !important;
    width: 100vw !important;
    height: calc(100dvh - var(--app-route-header-height) - var(--app-route-dock-height)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-width: 0 !important;
    border-radius: 0 !important;
    box-shadow: none;
    resize: none !important;
}

body.app-route-mode .app-window.active.route-windowed {
    position: fixed;
    inset: auto;
    min-width: min(420px, 100vw);
    min-height: 280px;
    max-width: 100vw;
    max-height: calc(100dvh - var(--app-route-header-height) - var(--app-route-dock-height));
    margin: 0;
    border: 1px solid var(--hub-line);
    border-radius: var(--cloud-radius-lg);
    box-shadow: 0 22px 58px rgba(0, 7, 18, .42);
    resize: both;
    overflow: hidden;
}

body.app-route-mode .app-window.active.route-windowed .window-header {
    border-radius: calc(var(--cloud-radius-lg) - 1px) calc(var(--cloud-radius-lg) - 1px) 0 0;
    cursor: grab;
}

body.app-route-mode .app-window.active.route-windowed .window-header:active {
    cursor: grabbing;
}

body.app-route-mode .app-window.active.route-windowed::after {
    content: '';
    position: absolute;
    right: 5px;
    bottom: 5px;
    width: 13px;
    height: 13px;
    border-right: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
    border-bottom: 2px solid color-mix(in srgb, var(--accent) 72%, transparent);
    border-radius: 0 0 4px 0;
    pointer-events: none;
}

body.app-route-mode .app-window .window-header {
    min-height: 56px;
    padding: 10px 18px;
    border-radius: 0;
}

body.app-route-mode .app-window .window-controls {
    display: flex;
}

body.app-route-mode .app-window .ctrl-btn {
    width: 30px;
    height: 30px;
    font-size: 12px;
}

body.app-route-mode[data-app-route="messenger"] > .workspace-people-panel {
    display: none !important;
}

.workspace-dock {
    position: fixed;
    inset: auto 0 0;
    z-index: 80000;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    min-height: var(--app-route-dock-height, 64px);
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-top: 1px solid var(--hub-line);
    background: color-mix(in srgb, var(--surface) 96%, var(--accent) 4%);
    box-shadow: 0 -12px 34px rgba(0, 7, 18, .24);
}

.workspace-dock[hidden] {
    display: none !important;
}

.custom-alert-icon {
    display: none !important;
}

.workspace-dock-running {
    display: none;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.workspace-dock-running.has-items {
    display: flex;
}

.workspace-dock-label {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.workspace-minimized-container {
    display: flex;
    min-width: 0;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.workspace-minimized-container .minimized-window-button {
    min-height: 38px;
    max-width: 220px;
    flex: 0 0 auto;
    padding-inline: 14px;
    border-radius: 999px;
}

.workspace-minimized-container .minimized-window-button::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--hub-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hub-green) 18%, transparent);
}

.app-route-empty-state {
    position: fixed;
    inset: var(--app-route-header-height, 72px) 0 var(--app-route-dock-height, 64px);
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
}

.app-route-empty-state[hidden] {
    display: none !important;
}

.app-route-empty-state strong {
    margin-top: 18px;
    color: var(--text);
    font-size: clamp(24px, 3vw, 38px);
}

.app-route-empty-state p {
    max-width: 570px;
    margin: 10px 0 20px;
    color: var(--muted);
    line-height: 1.6;
}

.app-route-empty-mark {
    display: grid;
    width: 82px;
    height: 62px;
    place-items: center;
    border: 1px solid var(--hub-line-strong);
    border-radius: 55% 45% 52% 48% / 62% 58% 42% 38%;
    background: var(--accent-strong);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .06em;
    box-shadow: 0 18px 46px rgba(36, 127, 212, .25);
}

@media (max-width: 900px) {
    body.app-route-mode {
        --app-route-header-height: 62px;
        --app-route-dock-height: 58px;
    }

    body.app-route-mode .app-page-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        min-height: var(--app-route-header-height);
        padding: 8px 10px;
        gap: 8px;
    }

    .app-page-menu {
        width: 42px;
        min-height: 42px;
        justify-content: center;
        padding: 0;
    }

    .app-page-menu span:last-child,
    .app-page-brand span:last-child,
    .workspace-dock-label {
        display: none;
    }

    .app-page-monogram {
        width: 36px;
        height: 36px;
    }

    .app-page-back {
        min-height: 40px;
        padding-inline: 11px;
        font-size: 12px;
    }

    body.app-route-mode .app-window.active.route-fullscreen,
    body.app-route-mode[data-app-route="messenger"] .hub-messenger-window.active.route-fullscreen,
    body.app-route-mode[data-app-route="settings"] #settingsWindow.active.route-fullscreen,
    body.app-route-mode[data-app-route="weather"] #win-weather.active.route-fullscreen,
    body.app-route-mode[data-app-route="profile"] #profileWindow.active.route-fullscreen,
    body.app-route-mode[data-app-route="assistant"] #win-3.active.route-fullscreen {
        inset: var(--app-route-header-height) 0 var(--app-route-dock-height) 0 !important;
        width: 100vw !important;
        height: calc(100dvh - var(--app-route-header-height) - var(--app-route-dock-height)) !important;
        min-height: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .workspace-dock {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
        padding: 7px 9px;
    }

    .workspace-dock-menu,
    .workspace-dock-home {
        min-height: 40px;
        padding-inline: 11px;
        font-size: 12px;
    }

    .workspace-dock-running.has-items {
        gap: 6px;
    }

    .workspace-minimized-container .minimized-window-button {
        max-width: 150px;
        min-height: 38px;
        padding-inline: 11px;
    }

    body.app-route-mode .app-window .window-header {
        min-height: 52px;
        padding: 8px 12px;
        border-radius: 0;
    }

    body.app-route-mode .app-window .window-content-body,
    body.app-route-mode .app-window .fullscreen-body {
        padding: 16px;
    }
}

/* Keep presence controls clear of the permanent navigation columns. */
body.workspace-shell .presence-menu-backdrop {
    z-index: 100500;
    padding: 24px 24px 24px calc(var(--workspace-left) + 24px);
}

body.workspace-shell .presence-menu {
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
}

/* The cloud itself sits directly on the interface without a filled tile. */
body.workspace-shell .logo-cloud-mark,
body.workspace-shell .side-drawer-brand-mark {
    border-color: transparent !important;
    background: transparent !important;
    color: #b9f5fb;
    box-shadow: none !important;
    filter: none;
}

@media (max-width: 900px) {
    body.workspace-shell .presence-menu-backdrop {
        padding: 16px;
    }
}

html.welcome-locked,
html.welcome-locked body {
    overflow: hidden !important;
}

.welcome-gate {
    position: fixed;
    inset: 0;
    z-index: 110000;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: clamp(16px, 3vw, 42px);
    background:
        radial-gradient(circle at 14% 12%, rgba(76, 194, 210, .22), transparent 34%),
        radial-gradient(circle at 86% 86%, rgba(48, 104, 198, .2), transparent 38%),
        #061426;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .28s ease, visibility .28s ease;
}

.welcome-gate.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.welcome-ambient {
    position: fixed;
    width: 36vw;
    height: 36vw;
    border: 1px solid rgba(126, 225, 238, .13);
    border-radius: 50%;
    filter: blur(.2px);
    pointer-events: none;
}

.welcome-ambient-one { top: -22vw; right: 7vw; }
.welcome-ambient-two { bottom: -25vw; left: -8vw; }

.welcome-panel {
    position: relative;
    width: min(1120px, 100%);
    overflow: hidden;
    border: 1px solid rgba(126, 225, 238, .22);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(16, 38, 65, .96), rgba(7, 23, 41, .98));
    box-shadow: 0 38px 100px rgba(0, 6, 18, .56), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.welcome-topbar,
.welcome-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 26px;
}

.welcome-topbar { border-bottom: 1px solid rgba(135, 169, 202, .16); }
.welcome-footer { border-top: 1px solid rgba(135, 169, 202, .16); color: #8fa8c1; font-size: 11px; }

.welcome-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f4fdff;
}

.welcome-brand > span:last-child { display: grid; gap: 3px; }
.welcome-brand strong { font-size: 20px; line-height: 1; letter-spacing: -.03em; }
.welcome-brand small { color: #8fa8c1; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }

.welcome-brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #b9f5fb;
}

.welcome-brand-mark svg { width: 29px; height: 29px; }

.welcome-language-select {
    min-width: 78px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(126, 225, 238, .26);
    border-radius: 12px;
    background: rgba(8, 28, 49, .78);
    color: #f4fdff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.welcome-content {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
    padding: clamp(42px, 7vw, 88px);
}

.welcome-copy h1 {
    max-width: 720px;
    margin: 14px 0 20px;
    color: #f7fdff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: .98;
    letter-spacing: -.055em;
}

.welcome-copy > p {
    max-width: 650px;
    color: #a9bdd1;
    font-size: clamp(15px, 1.7vw, 19px);
    line-height: 1.65;
}

.welcome-eyebrow,
.welcome-action-kicker {
    color: #53cce0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.welcome-points { display: grid; gap: 11px; margin-top: 30px; }
.welcome-points span { display: flex; align-items: center; gap: 12px; color: #d9e8f4; font-size: 13px; }
.welcome-points b { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(83, 204, 224, .3); border-radius: 10px; color: #53cce0; font-size: 10px; }

.welcome-action-card {
    padding: 28px;
    border: 1px solid rgba(126, 225, 238, .18);
    border-radius: 26px;
    background: rgba(9, 30, 52, .72);
    box-shadow: 0 24px 55px rgba(0, 7, 18, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.welcome-action-card h2 { margin: 8px 0 8px; color: #f4fdff; font-size: 25px; letter-spacing: -.03em; }
.welcome-action-card > p { color: #91a9c0; font-size: 13px; line-height: 1.55; }
.welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 18px; }

.welcome-primary,
.welcome-secondary {
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.welcome-primary { border: 1px solid #45bdd0; background: #45bdd0; color: #04202a; }
.welcome-secondary { border: 1px solid rgba(126, 225, 238, .25); background: rgba(126, 225, 238, .07); color: #e9fbff; }
.welcome-primary:hover, .welcome-secondary:hover { transform: translateY(-2px); }
.welcome-secondary:hover { border-color: rgba(126, 225, 238, .55); background: rgba(126, 225, 238, .12); }

.welcome-action-card .welcome-privacy-note { padding-top: 17px; border-top: 1px solid rgba(135, 169, 202, .14); font-size: 11px; }
.welcome-policy-link,
.auth-policy-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #69d7e7;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.welcome-policy-link { margin-top: 10px; font-size: 12px; }
.auth-social-privacy { margin: -8px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }

.privacy-policy-overlay {
    position: fixed;
    inset: 0;
    z-index: 140000;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 34px);
    background: rgba(2, 9, 20, .78);
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}

.privacy-policy-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.privacy-policy-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(940px, 100%);
    max-height: min(880px, calc(100dvh - 28px));
    overflow: hidden;
    border: 1px solid rgba(126, 225, 238, .24);
    border-radius: 28px;
    background: #0a1d33;
    color: #e9f4fc;
    box-shadow: 0 35px 100px rgba(0, 4, 14, .68);
}

.privacy-policy-header,
.privacy-policy-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    background: #0d243d;
}

.privacy-policy-header {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(135, 169, 202, .17);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
}
.privacy-policy-footer { border-top: 1px solid rgba(135, 169, 202, .17); }
.privacy-policy-header h2 { margin: 5px 0 2px; font-size: 25px; }
.privacy-policy-header p { color: #91a9c0; font-size: 11px; }
.privacy-policy-close { width: 40px; height: 40px; border: 1px solid rgba(135, 169, 202, .2); border-radius: 50%; background: transparent; color: #c6d8e8; cursor: pointer; }
.privacy-policy-body { overflow-y: auto; padding: 26px clamp(20px, 4vw, 44px); }
.privacy-policy-body section + section { margin-top: 28px; padding-top: 25px; border-top: 1px solid rgba(135, 169, 202, .12); }
.privacy-policy-body h3 { margin: 0 0 10px; color: #f1fbff; font-size: 17px; }
.privacy-policy-body p,
.privacy-policy-body li { color: #adc0d1; font-size: 13px; line-height: 1.72; }
.privacy-policy-body ul { display: grid; gap: 8px; padding-left: 20px; }
.privacy-policy-body p + p { margin-top: 10px; }
.privacy-policy-body strong { color: #dff8fc; }
.privacy-policy-sources,
.privacy-policy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.privacy-policy-sources a { color: #74ddeb; font-size: 11px; text-decoration: none; }
.privacy-policy-footer .welcome-primary,
.privacy-policy-footer .welcome-secondary { min-height: 40px; padding: 8px 13px; font-size: 11px; }

body.workspace-shell .auth-overlay { z-index: 125000; }
body.workspace-shell .status-modal-overlay { z-index: 135000; }
body.workspace-shell .custom-alert { z-index: 150000; }

@media (max-width: 760px) {
    .welcome-gate { place-items: start center; padding: 10px; }
    .welcome-panel { border-radius: 24px; }
    .welcome-topbar, .welcome-footer { padding: 15px 17px; }
    .welcome-content { grid-template-columns: 1fr; padding: 34px 20px; }
    .welcome-copy h1 { font-size: clamp(40px, 14vw, 60px); }
    .welcome-points { margin-top: 22px; }
    .welcome-action-card { padding: 22px; }
    .welcome-actions { grid-template-columns: 1fr; }
    .welcome-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
    .privacy-policy-header, .privacy-policy-footer { padding: 16px; }
    .privacy-policy-footer { align-items: stretch; flex-direction: column; }
    .privacy-policy-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .privacy-policy-sources { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
    .welcome-gate,
    .privacy-policy-overlay,
    .welcome-primary,
    .welcome-secondary { transition: none !important; }
}

/* Shared interface language: controls, windows, states, and setup flow. */
body.workspace-shell {
    --ui-space-1: 6px;
    --ui-space-2: 10px;
    --ui-space-3: 14px;
    --ui-space-4: 18px;
    --ui-space-5: 24px;
    --ui-radius-sm: 8px;
    --ui-radius-md: 12px;
    --ui-radius-lg: 18px;
    --ui-control-height: 42px;
    --ui-transition: 160ms ease;
    --ui-focus: 0 0 0 3px color-mix(in srgb, var(--accent, #4cc2d2) 28%, transparent);
}

body.workspace-shell :where(button, input, textarea, select) {
    font: inherit;
}

body.workspace-shell :where(button, [role='button'], input, textarea, select):focus-visible {
    outline: 2px solid color-mix(in srgb, var(--accent, #4cc2d2) 82%, white);
    outline-offset: 2px;
    box-shadow: var(--ui-focus);
}

body.workspace-shell :where(button, [role='button']) {
    transition: background-color var(--ui-transition), border-color var(--ui-transition), color var(--ui-transition), transform var(--ui-transition), opacity var(--ui-transition);
}

body.workspace-shell :where(button, [role='button']):active:not(:disabled) {
    transform: translateY(1px);
}

body.workspace-shell :where(button, input, textarea, select):disabled {
    cursor: not-allowed;
    opacity: .54;
}

body.workspace-shell .app-window {
    overflow: hidden;
    border-radius: var(--ui-radius-lg);
    border-color: var(--hub-line);
    background: var(--hub-panel);
    box-shadow: 0 24px 70px rgba(0, 6, 18, .42);
}

body.workspace-shell .app-window > .window-header {
    min-height: 52px;
    padding: 8px var(--ui-space-3);
    border-bottom: 1px solid var(--hub-line);
    background: color-mix(in srgb, var(--hub-panel-strong) 92%, black);
}

body.workspace-shell .window-title {
    font-size: 13px;
    font-weight: 750;
    letter-spacing: .01em;
}

body.workspace-shell .window-controls {
    gap: var(--ui-space-1);
}

body.workspace-shell .ctrl-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--ui-radius-sm);
    font-size: 13px;
}

body.workspace-shell :where(.auth-form, .settings-window-content, .profile-edit-panel, .weather-search-box, .ai-input-area) :where(input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='range']), textarea, select),
body.workspace-shell :where(.hub-messenger-input, .hub-messenger-search) {
    min-height: var(--ui-control-height);
    border-radius: var(--ui-radius-md);
    border-color: var(--hub-line);
    background: color-mix(in srgb, var(--hub-panel-soft) 78%, transparent);
    transition: border-color var(--ui-transition), background-color var(--ui-transition), box-shadow var(--ui-transition);
}

body.workspace-shell :where(.auth-form, .settings-window-content, .profile-edit-panel, .weather-search-box, .ai-input-area) :where(input:not([type='checkbox']):not([type='radio']):not([type='color']):not([type='range']), textarea, select):focus,
body.workspace-shell :where(.hub-messenger-input, .hub-messenger-search):focus {
    border-color: color-mix(in srgb, var(--accent, #4cc2d2) 74%, white);
    background: var(--hub-panel-soft);
}

.ui-button {
    display: inline-flex;
    min-height: var(--ui-control-height);
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: var(--ui-radius-md);
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.ui-button-primary {
    border-color: color-mix(in srgb, var(--accent, #4cc2d2) 72%, white);
    background: var(--accent, #4cc2d2);
    color: #031820;
}

.ui-button-secondary {
    border-color: var(--hub-line);
    background: var(--hub-panel-soft);
    color: var(--text);
}

.ui-button-success {
    border-color: color-mix(in srgb, var(--hub-green) 48%, transparent);
    background: color-mix(in srgb, var(--hub-green) 16%, var(--hub-panel-soft));
    color: #b9f5d5;
}

.ui-button:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--accent, #4cc2d2) 68%, white);
    transform: translateY(-1px);
}

.ui-state,
body.workspace-shell .hub-messenger-empty {
    display: grid;
    min-height: 160px;
    place-items: center;
    align-content: center;
    gap: var(--ui-space-2);
    padding: var(--ui-space-5);
    color: var(--muted);
    text-align: center;
}

.ui-state strong,
body.workspace-shell .hub-messenger-empty strong {
    color: var(--text);
    font-size: 14px;
}

.ui-state small,
body.workspace-shell .hub-messenger-empty small {
    max-width: 360px;
    line-height: 1.55;
}

.ui-state {
    grid-column: 1 / -1;
    width: 100%;
}

.ui-state-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--hub-line);
    border-radius: 14px;
    background: var(--hub-panel-soft);
    color: var(--accent, #4cc2d2);
    font-size: 20px;
    font-weight: 800;
}

.ui-state-error .ui-state-icon {
    border-color: color-mix(in srgb, var(--hub-danger) 48%, transparent);
    background: color-mix(in srgb, var(--hub-danger) 15%, var(--hub-panel-soft));
    color: #ffb4b9;
}

.ui-state-icon.is-loading {
    animation: pilvory-state-spin .9s linear infinite;
}

@keyframes pilvory-state-spin { to { transform: rotate(360deg); } }

.notification-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ui-space-2);
}

.settings-toggle-row {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: var(--ui-space-3);
    padding: var(--ui-space-3);
    border: 1px solid var(--hub-line);
    border-radius: var(--ui-radius-md);
    background: color-mix(in srgb, var(--hub-panel-soft) 68%, transparent);
    cursor: pointer;
}

.settings-toggle-row span {
    display: grid;
    gap: 4px;
}

.settings-toggle-row strong {
    color: var(--text);
    font-size: 12px;
}

.settings-toggle-row small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.settings-toggle-row input {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    accent-color: var(--accent, #4cc2d2);
}

.notification-settings-actions {
    display: flex;
    align-items: center;
    gap: var(--ui-space-2);
    margin-top: var(--ui-space-3);
}

.notification-settings-actions span {
    margin-left: auto;
}

.onboarding-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 31000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid color-mix(in srgb, var(--accent, #4cc2d2) 55%, transparent);
    border-radius: 15px;
    background: #102a45;
    color: #f1fbff;
    box-shadow: 0 16px 42px rgba(0, 5, 18, .42);
    cursor: pointer;
}

.onboarding-launcher[hidden],
.onboarding-overlay[hidden] {
    display: none !important;
}

.onboarding-launcher > span:last-child {
    display: grid;
    gap: 2px;
    text-align: left;
}

.onboarding-launcher strong { font-size: 12px; }
.onboarding-launcher small { color: #92adbf; font-size: 9px; }

.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 145000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(2, 9, 20, .76);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity .2s ease;
}

.onboarding-overlay.active { opacity: 1; }

.onboarding-card {
    width: min(760px, 100%);
    max-height: min(820px, calc(100dvh - 28px));
    overflow-y: auto;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(126, 225, 238, .23);
    border-radius: 24px;
    background: #0a1d33;
    color: #e9f4fc;
    box-shadow: 0 34px 100px rgba(0, 4, 14, .68);
    transform: translateY(12px) scale(.985);
    transition: transform .2s ease;
}

.onboarding-overlay.active .onboarding-card { transform: none; }

.onboarding-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--ui-space-4);
}

.onboarding-kicker {
    color: var(--accent, #4cc2d2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.onboarding-header h2 { margin: 7px 0; font-size: clamp(24px, 4vw, 34px); letter-spacing: -.035em; }
.onboarding-header p { max-width: 560px; color: #99afc2; font-size: 12px; line-height: 1.55; }
.onboarding-close { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--hub-line); border-radius: 50%; background: var(--hub-panel-soft); color: #d9e8f4; cursor: pointer; }
.onboarding-progress { height: 7px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: #142d49; }
.onboarding-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent, #4cc2d2); transition: width .28s ease; }
.onboarding-progress-copy { display: flex; justify-content: space-between; gap: 10px; margin: 9px 0 18px; color: #8ea8bd; font-size: 10px; }
.onboarding-progress-copy strong { color: #dff8fc; }
.onboarding-steps { display: grid; gap: 9px; }

.onboarding-step {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--ui-space-3);
    padding: 13px;
    border: 1px solid var(--hub-line);
    border-radius: var(--ui-radius-md);
    background: rgba(20, 45, 73, .54);
}

.onboarding-step.is-complete { border-color: color-mix(in srgb, var(--hub-green) 42%, transparent); }
.onboarding-step-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #173957; font-size: 20px; }
.onboarding-step.is-complete .onboarding-step-icon { background: color-mix(in srgb, var(--hub-green) 18%, #173957); color: #91edbc; }
.onboarding-step strong { display: block; font-size: 13px; }
.onboarding-step p { margin-top: 4px; color: #8fa8bc; font-size: 10px; line-height: 1.45; }
.onboarding-footer { display: flex; justify-content: flex-end; gap: var(--ui-space-2); margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--hub-line); }

@media (max-width: 720px) {
    .notification-settings-grid { grid-template-columns: 1fr; }
    .notification-settings-actions { align-items: stretch; flex-direction: column; }
    .notification-settings-actions span { margin-left: 0; }
    .onboarding-step { grid-template-columns: 42px minmax(0, 1fr); }
    .onboarding-step .ui-button { grid-column: 1 / -1; }
    .onboarding-progress-copy { align-items: flex-start; flex-direction: column; }
    .onboarding-footer { display: grid; grid-template-columns: 1fr 1fr; }
    .onboarding-launcher { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .onboarding-overlay,
    .onboarding-card,
    .onboarding-progress span { transition: none !important; }
}
