:root {
    --game-panel-width: clamp(520px, 34vw, 800px);
}

html,
body {
    width: 100%;
    height: 100%;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

div,
input,
button {
    border: none;
    font-family: "PingFang SC", Helvetica, sans-serif, Arial;
    font-size: 12px;
    letter-spacing: 0;
}

button,
input:focus {
    outline: none;
}

#site {
    position: fixed;
    inset: 0 var(--game-panel-width) 0 0;
    width: calc(100vw - var(--game-panel-width));
    height: 100dvh;
    border: 0;
    background: #fff;
    transition: width 180ms ease, right 180ms ease;
}

#defaultSiteButton {
    position: fixed;
    top: 12px;
    right: calc(var(--game-panel-width) + 12px);
    z-index: 998;
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #c9cdd3;
    border-radius: 6px;
    color: #fff;
    background: #2877d2;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font-size: 18px;
    transition: right 180ms ease, background 120ms ease, box-shadow 120ms ease;
}

#defaultSiteButton:hover,
#defaultSiteButton:focus-visible {
    background: #2162ac;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.24);
}

body.game-panel-collapsed #defaultSiteButton {
    right: 12px;
}

#terminal {
    position: relative;
    width: 100%;
    height: calc(100dvh - 82px);
    margin: 0;
    padding: 10px 20px 16px;
    overflow: hidden;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 15px;
}

#bar {
    min-height: 22px;
    font-weight: 600;
}

#contains {
    width: 100%;
    height: calc(100% - 22px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
}

#content {
    width: 100%;
    max-height: calc(100dvh - 170px);
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
}

#content::-webkit-scrollbar {
    width: 8px;
}

.inputBox {
    display: flex;
    width: 100%;
    min-height: 32px;
    align-items: center;
}

#prefix {
    flex: 0 0 auto;
    height: 32px;
    line-height: 32px;
    color: #2877d2;
    padding-right: 5px;
    font-weight: 700;
}

#input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 32px;
    background: transparent;
}

.poker-suit-red,
span.poker-suit-red {
    color: #f00 !important;
    font-weight: 700;
}

.poker-suit-green,
span.poker-suit-green {
    color: #008f2d !important;
    font-weight: 700;
}

@media (max-width: 960px) {
    :root {
        --game-panel-width: 100vw;
    }

    #site {
        right: 0;
        width: 100vw;
    }

    #defaultSiteButton {
        right: 12px;
        width: 40px;
        height: 40px;
    }

    #terminal {
        height: 100dvh;
        padding: 42px 16px 12px;
    }

    #content {
        max-height: calc(100dvh - 110px);
    }
}
