html[data-layout="pc"] {
    overflow-y: scroll;
}

@media (hover: hover) and (pointer: fine) {
    html[data-layout="auto"] {
        overflow-y: scroll;
    }
}

.app-shell {
    display: flex;
    flex-direction: column;
}

.topbar {
    display: grid;
    grid-template-areas: "brand games account";
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-content: center;
    gap: 0 clamp(14px, 3.8vw, 56px);
    height: auto;
    min-height: 84px;
}

.topbar > .brand {
    grid-area: brand;
    min-width: 0;
}

.topbar > .dx2-brand {
    width: 204px;
    max-width: 100%;
}

.topbar > .account {
    grid-area: account;
    justify-self: end;
    align-items: center;
    gap: 7px;
    min-width: 0;
    transform: translateY(2px);
}

.topbar .account > .account-name,
.topbar .account > .account-balance,
.topbar #logout-button {
    box-sizing: border-box;

    height: 29px;
    padding: 0 10px;
    border: 1px solid;
    border-radius: 8px;
    font-size: 12px;
    line-height: 27px;
    text-align: center;
    white-space: nowrap;
}

.topbar .account > .account-name {
    min-width: 85px;
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    border-color: #2e453b;
    border-radius: 6px;
    background-color: #162722;
}

.topbar .account > .account-balance {
    padding: 0 2px;
    border-color: #97c981;
    background-color: #1c3024;
}

.topbar .account-balance > small {
    display: none;
}

.topbar #balance {
    position: relative;
    top: -1px;
    font-size: 14px;
    padding: 0 10px;
    line-height: inherit;
}

.topbar #logout-button {
    margin-left: 0;
    border-color: #c9818e;
    background-color: #30271c;
    color: #f0d6da;
    font-weight: 700;
}

.topbar #logout-button:hover {
    background-color: #42332b;
}

.top-game-nav {
    grid-area: games;
    min-width: 0;
}

.top-game-list {
    display: flex;
    align-items: center;
    gap: clamp(3px, .8vw, 12px);
    flex-wrap: nowrap;
    max-width: 560px;
    padding: 8px 0 4px;
}

.top-game-link {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8d9d9a;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-game-link:hover {
    background: var(--panel);
    color: #eff7f2;
}

.top-game-link[aria-pressed="true"] {
    background: var(--panel);
    color: var(--green);
    box-shadow: inset 0 -2px 0 var(--green);
}

.top-game-link:focus-visible {
    outline-offset: -2px;
}

.workspace {
    display: block;
    flex: 1;
    min-height: 0;
}

.footer {
    height: auto;
    min-height: 61px;
    padding: 12px 0;
    row-gap: 8px;
    flex-wrap: wrap;
}

.app-shell .footer > .layout-links {
    position: static;
    margin: 0;
}

.footer .layout-links a:last-child {
    display: inline;
}

@media (max-width: 1120px) {
    .topbar {
        grid-template-areas: "brand account" "games games";
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 12px;
        padding-top: 10px;
        padding-bottom: 4px;
    }
}

html[data-layout="mobile"] .topbar {
    grid-template-areas: "brand account" "games games";
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    padding-top: 10px;
    padding-bottom: 4px;
}

html[data-layout="mobile"] .topbar > .dx2-brand {
    width: 140px;
    transform: translateY(1px);
}

html[data-layout="mobile"] .top-game-link {
    font-size: 14px;
}

@media (max-width: 700px) {
    .topbar {
        min-height: 66px;
    }

    .topbar > .dx2-brand {
        width: 140px;
        transform: translateY(1px);
    }

    .top-game-link {
        font-size: 14px;
    }

    .footer {
        min-height: 52px;
    }
}

.topbar .account > .connection {
    display: none;
}

.topbar .account > .connection.offline {
    display: inline-flex;
}
