:root {
    /* Match FlexSystem's default parchment palette. */
    --app-paper: #f2e6cc;
    --app-ink: #76583c;
    --app-tile: color-mix(in srgb, var(--app-paper) 88%, var(--app-ink));
    --app-line: color-mix(in srgb, var(--app-ink) 24%, transparent);
    --app-sidebar: color-mix(in srgb, var(--app-paper) 94%, var(--app-ink));
    --app-subsidebar: color-mix(in srgb, var(--app-paper) 97%, var(--app-ink));
}

.black-side {
    position: absolute;
    top: 0;
    left: -100vw;
    width: 100vw;
    height: 100vh;
    background-color: var(--app-ink);
    z-index: 15;
    transition: all 1s ease-out;
}

.work {
    --sidebar-width: 170px;
    --subsidebar-width: 0px;
    --subsidebar-height: 0px;
    position: absolute;
    top: 0;
    left: -100vw;
    width: 100vw;
    height: 100vh;
    background-color: var(--app-paper);
    color: var(--app-ink);
    z-index: 16;
    transition: all 1s ease-out;
}

.side-bar {
    margin: 0;
    width: var(--sidebar-width);
    height: 100vh;
    float: left;
    transition: all .5s ease-in-out;
    background: var(--app-sidebar);
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.side-bar-item {
    width: 100%;
    height: 50px;
    color: var(--app-ink);
    display: flex;
    align-items: center;
    font-family: "Microsoft Yahei";
    transition: all .5s ease-in-out;
    cursor: pointer;
    overflow: hidden;
}

.side-bar-item:hover {
    background-color: var(--app-tile);
}

.side-bar-icon {
    width: 35px;
    height: 35px;
    margin: 0 10px;
}

.side-bar-icon svg {
    display: block;
    width: 35px;
    height: 35px;
    transition: transform 0.3s ease;
}

.side-bar-icon.rotate svg {
    transform: rotate(180deg);
}

.side-bar-icon svg [fill]:not([fill="none"]) { fill: currentColor; }

.side-bar-text {
    width: 120px;
    overflow: hidden;
    height: 35px;
    line-height: 35px;
    font-family: "Microsoft Yahei";
    font-size: 18px;
    white-space: nowrap;  
    /* text-overflow: ellipsis; */
    transition: all .5s ease-in-out;
    
}

.side-bar-switch {
    position: absolute;
    bottom: 20px;
    width: 100%;
    height: 55px;
    color: var(--app-ink);
    display: flex;
    font-family: "Microsoft Yahei";
    transition: all .5s ease-in-out;
    cursor: pointer;
}

.work-content {
    left: calc(var(--sidebar-width) + var(--subsidebar-width));
    top: var(--subsidebar-height);
    position: absolute;
    width: calc(100% - var(--sidebar-width) - var(--subsidebar-width));
    height: calc(100% - var(--subsidebar-height));
    transition: left .5s ease-in-out, width .5s ease-in-out;
}

.work.has-subsidebar { --subsidebar-width: 190px; }
.work.sidebar-collapsed { --sidebar-width: 60px; }
.work.sidebar-collapsed.has-subsidebar { --subsidebar-width: 60px; }
.sidebar-collapsed .side-bar-text { width: 0; }

@media (max-width: 849px) {
    .work, .work.sidebar-collapsed { --sidebar-width: 60px; }
    .work.has-subsidebar, .work.sidebar-collapsed.has-subsidebar { --subsidebar-width: 0px; --subsidebar-height: 64px; }
    .side-bar-text { width: 0; }
    .side-bar-switch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .side-bar, .work-content { transition: none; }
}
