body {
    margin: 0;
    background: white;
    color: black;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: 50%;
    transform: translateX(-50%);
}

#jumbo {
    width: calc(100% - 10px);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 0 5px;
}

.jumbo-spacer {
    flex: 1;
    min-width: 0;
}

#logo {
    height: 55px;
    width: 55px;
    background-size: 65px;
    display: inline-block;
    background-image: url("/menu-icons/rascal.png");
    background-color: lightgray;
    outline: 5px solid black;
    margin-top: 0;
    flex: none;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

h1 {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 40px;
    line-height: 1.1;
    margin-top: 0;
    margin-bottom: 0;
    flex: none;
}

nav {
    margin-top: 20px !important;
    text-align: center;
    width: calc(100% - 70px) !important;
}
nav > a {
    display: inline-block;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 300;
    width: 15%;
    text-align: center;
}

#login-menu {
    display: flex;
    align-items: center;
    flex: none;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    outline: 5px solid black;
    border-radius: 12px;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
    transition: background-color 0.2s ease-out, color 0.2s ease-out;
}
#login-menu > #profile-picture {
    position: relative;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-image: url("/menu-icons/white-rascal.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
#login-menu > #profile-picture.is-avatar {
    background-image: none;
    box-sizing: border-box;
    padding: 3px;
}
#login-menu > #profile-picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#login-menu .profile-status {
    position: absolute;
    width: 14px;
    height: 14px;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    outline: 2px solid white;
    box-sizing: border-box;
}
#login-menu .profile-status i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 58%;
    filter: invert(1);
}
#login-menu .profile-status.is-ink i {
    filter: none;
}
#login-menu > #profile-name {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 1.2em;
    margin: 0;
    min-width: 0;
}
.login-label-short {
    display: none;
}
#login-menu:hover {
    background-color: lightgray;
    cursor: pointer;
}

#gallery {
    display: flex;
    width: 100%;
    justify-content: space-evenly;
}
#gallery > img {
    width: 30%;
}
#playbutton {
    margin-top: 16px;
}
.b80 {
    width: 70%;
    margin-top: 16px;
    margin-right: 0 !important;
}

#playbanner > button,
.button {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 1.2em;
    background-color: #2f36ff;
    padding: 8px 16px;
    color: white;
    border-radius: 12px;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
    outline: none;
    transition: background-color 0.2s ease-in, transform 0.2s ease-in;
    cursor: pointer;
    margin-right: 12px;
}
#playbanner > button:hover,
.button:hover {
    background-color: rgb(29, 34, 183);
    transform: scale(1.1);
}

#editorbutton {
    background-color: #666 !important;
}

#leaderboard {
    width: 550px;
    min-width: 450px;
}
#iframe-leaderboard {
    width: 100%;
    height: calc(100vh - 260px);
}

.row {
    box-sizing: border-box;
    display: flex;
    width: calc(100% - 70px + 4rem);
    margin-top: 1.5rem;
    gap: 3rem;
}
.row > div {
    flex: 0.5;
}

.title-card {
    width: calc(100% - 4rem);
    background-color: black;
    color: white;
    font-size: 1.5em;
    padding: 1rem 2rem;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    border-radius: 1rem;
    margin: 0;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

#profile-content {
    width: calc(100% - 1rem);
    padding-left: 1rem;
}

.writeable > p {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin: 0;
    margin-bottom: 1rem;
}
.writeable > p > a {
    text-decoration: none;
    color: #2f36ff;
}
.writeable > ul {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}
.writeable > h3 {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin: 0;
    margin-bottom: 1rem;
}

.input {
    padding: 0.5rem 0;
    border: none;
    width: 100%;
    border-bottom: 5px solid #eee;
    font-size: 0.9em;
    background-color: white;
    margin-bottom: 1rem;
}
.input:focus {
    border: none;
    outline: none;
    border-bottom: 5px solid black;
}
.input-label {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    text-align: left;
    font-weight: 600;
    margin: 0;
}

.card {
    width: calc(100% - 4rem - 10px);
    border: 5px solid black;
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
.checker {
    background-image: linear-gradient(45deg, #f9f9f9 25%, transparent 25%), linear-gradient(-45deg, #f9f9f9 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f9f9f9 75%), linear-gradient(-45deg, transparent 75%, #f9f9f9 75%);
    background-size: 50px 50px;
    background-position: 0 0, 0 25px, 25px -25px, -25px 0px;
}

.card > p {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

.lsh-title {
    margin: 0;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 1.3em;
    margin-bottom: 1rem;
    font-weight: 600;
}

#level-select {
    margin-bottom: 3rem;
    flex: 1;
}
#level-select-title {
    width: calc(100% - 4rem) !important;
    margin-bottom: 1rem;
}
.level-row {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    gap: 0.45rem;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 1rem;
    padding: 0.38rem 0.25rem 0.38rem 0.65rem;
}
.community-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
    margin-top: 16px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}
.community-card-copy {
    flex: 1;
    min-width: 0;
}
.community-card p {
    margin: 0;
}
.community-card-flag {
    color: #2e35fd;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.community-card-name {
    font-size: 20px;
    font-weight: 600;
}
.community-card-meta {
    margin-top: 0.2rem;
    color: #666;
}
.community-card-meta a {
    color: #2f36ff;
    text-decoration: none;
}
.community-card > .button {
    margin-left: auto;
    margin-right: 0;
    flex-shrink: 0;
    text-decoration: none;
    display: inline-block;
}
.level-row-odd {
    background-color: #f4f4f4;
    border-radius: 0.55rem;
}
.level-chapter {
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    gap: 0.5rem;
    margin: 0.7rem 0 0.35rem;
    padding: 0.45rem 0.75rem;
    background-color: black;
    color: white;
    border-radius: 1rem;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}
.level-chapter:has(.level-chapter-progress) {
    padding-bottom: 0.62rem;
}
.level-chapter-progress {
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    bottom: 0.28rem;
    height: 2px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.28);
}
.level-chapter-progress > span {
    display: block;
    height: 100%;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.85);
}
.level-chapter-name {
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: white;
}
.level-chapter-span {
    font-size: 0.78rem;
    font-weight: 600;
    color: #ccc;
}
.level-row > p {
    margin: 0;
}
.level-no {
    flex: 0 0 2.5rem;
    font-weight: 700;
    font-size: 0.92rem;
    color: maroon;
}
.level-name {
    color: black;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}
.level-meta {
    display: block;
    margin-top: 0.08rem;
    font-size: 0.78rem;
    color: #666;
    line-height: 1.3;
}
.level-author {
    color: black;
    text-decoration: none;
}
.level-author:hover {
    color: #2e35fe;
}
.level-moves {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}
.level-moves > img {
    width: 15px;
    height: 15px;
    margin-right: 0;
}
.level-play {
    flex-shrink: 0;
    height: auto;
    background-color: #2f36ff;
    color: white;
    padding: 0.22rem 0.7rem;
    border-radius: 0.55rem;
    border: none;
    box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 4px;
    outline: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease-in;
    cursor: pointer;
    margin-right: 0;
}
.level-play:hover {
    background-color: #1d22b7;
}

.ind,
.move-counter {
    cursor: default;
}

.shadow {
    filter: invert(52%) sepia(7%) saturate(0%) hue-rotate(255deg) brightness(96%) contrast(96%);
    opacity: 0.7;
}

.completed {
    filter: invert(0%) sepia(99%) saturate(7466%) hue-rotate(19deg) brightness(96%) contrast(102%);
}

.golden {
    filter: invert(16%) sepia(96%) saturate(6018%) hue-rotate(244deg) brightness(102%) contrast(104%);
}

.level-moves:hover > .ind {
    display: none;
}
.level-moves:hover > .move-counter {
    display: inline-block;
}

.move-counter {
    margin: 0;
    font-size: 0.9rem;
    display: none;
    font-weight: 600;
    white-space: nowrap;
}

#error-login {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    background-color: maroon;
    color: white;
    padding: 0.5rem 1rem;
    display: block;
    width: calc(100% - 2rem);
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
    border-radius: 0.5rem;
    margin-top: 0;
}

#login-note {
    margin-bottom: 0;
    color: #666;
}
#login-note > a {
    color: #2f36ff;
    text-decoration: none;
}

.small-title {
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    min-height: 3rem;
    height: auto;
    width: 100%;
    background-color: black;
    border-radius: 1rem;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
    color: white;
    margin-bottom: 0.5rem;
}

#level-switcher {
    display: flex;
    justify-content: space-around;
}

.small-title > a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: white;
    text-decoration: none;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin-top: 0;
    padding: 0.7rem 0.4rem;
}

.about-sideimage {
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
    width: 240px;
    height: 240px;
    border-radius: 0.5rem;
}

.about-page {
    box-sizing: border-box;
    width: calc(100% - 70px + 4rem);
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.about-page .card {
    width: auto;
    box-sizing: border-box;
}

.about-panel {
    text-align: left;
}

.about-panel > h3 {
    display: inline-block;
    background: black;
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 0.7rem;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 8px 14px;
}

.about-lead,
.about-credits,
.about-policy {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.about-policy {
    grid-template-columns: minmax(0, 1fr) 280px;
}

.about-lead-copy,
.about-policy-copy {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.about-shot {
    box-sizing: border-box;
    width: 100%;
    max-width: 280px;
    margin-inline: auto;
    justify-self: center;
    position: sticky;
    top: 1.25rem;
    padding: 14px;
    border: 5px solid black;
    border-radius: 1.1rem;
    background-image: linear-gradient(45deg, #f3f3f3 25%, transparent 25%), linear-gradient(-45deg, #f3f3f3 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f3f3f3 75%), linear-gradient(-45deg, transparent 75%, #f3f3f3 75%);
    background-size: 28px 28px;
    background-position: 0 0, 0 14px, 14px -14px, -14px 0;
    box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}

.about-shot .about-sideimage {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
    margin: 0;
    border: 4px solid black;
    box-shadow: none;
}

.about-lead .about-shot {
    transform: rotate(-1.5deg);
}

.about-credits .about-shot {
    transform: rotate(1.5deg);
}

.about-policy .about-shot {
    transform: rotate(1.5deg);
}

.about-pair {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 1.5rem;
    align-items: stretch;
}

.about-panel-ink {
    background: black;
    color: white;
    border-color: black;
}

.about-panel-ink > h3 {
    background: white;
    color: black;
}

.about-panel-ink > p > a {
    color: #c5cbff;
}

.about-credits-card > p {
    margin-left: 0.15rem;
    padding-left: 0.95rem;
    border-left: 5px solid black;
}

.about-credits-card > p:last-child {
    margin-bottom: 0;
}

.about-page ul {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.about-page li {
    border: 3px solid black;
    border-radius: 0.7rem;
    padding: 0.5rem 0.75rem;
    background: #f7f7f7;
}

#p-warning {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    text-align: left;
    margin-bottom: 1rem;
}
#p-warning > p {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin: 0;
}
#p-warning > ul {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin: 0;
}

.level-author {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: inherit;
}

.level-clears {
    flex: 0 0 auto;
    min-width: 46px;
    text-align: center;
}

.level-clears b,
.level-clears span {
    display: block;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

.level-clears b {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

.level-clears span {
    color: #666;
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
}

.level-date {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: inherit;
    color: #888;
    white-space: nowrap;
}

.level-pending {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: inherit;
    color: #b42318;
    font-weight: 700;
}

.level-diff {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: inherit;
    color: #2e35fd;
    font-weight: 600;
}

.level-diff-expert {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: inherit;
    color: #800000;
    font-weight: 700;
}

.count-amount {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.row > .level-column {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 15.5rem);
    max-height: calc(100vh - 15.5rem);
    min-height: 0;
}

#level-scroll {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
}

#level-tools {
    box-sizing: border-box;
    flex: none;
    margin-bottom: 0.55rem;
    padding: 0.7rem 0.85rem 0.75rem;
    border: 3px solid black;
    border-radius: 0.85rem;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    background-color: #fff;
    background-image: linear-gradient(45deg, #fafafa 25%, transparent 25%), linear-gradient(-45deg, #fafafa 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #fafafa 75%), linear-gradient(-45deg, transparent 75%, #fafafa 75%);
    background-size: 72px 72px;
    background-position: 0 0, 0 36px, 36px -36px, -36px 0px;
}

#score-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.score-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.32rem 0.6rem 0.32rem 0.45rem;
    border: 2px solid #ddd;
    border-radius: 0.7rem;
    background: white;
    color: black;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.score-chip:hover {
    background: white;
    border-color: #888;
}

.score-chip.is-on,
.score-chip.is-on:hover {
    background: white;
    border-color: black;
}

.score-chip.is-on .count-amount,
.score-chip.is-on .score-label {
    color: maroon;
}

.score-chip.is-empty {
    opacity: 0.4;
    cursor: default;
}

.score-chip.is-empty:hover {
    background: white;
    border-color: #ddd;
}

.score-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
}

.score-icons > img {
    width: 16px;
    height: 16px;
}

.score-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.score-label {
    font-size: 0.68rem;
    color: #333;
}

#level-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem 0.7rem;
    margin-bottom: 0.7rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

#level-query {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 1 1 14rem;
    min-width: 0;
}

#level-search {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 0.95rem;
    appearance: none;
    box-sizing: border-box;
    border: 2px solid #ddd;
    border-radius: 0.7rem;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0.42rem 0.7rem;
    background-color: white;
    color: black;
}

#level-search:focus {
    outline: none;
    border-color: black;
}

#level-search::-webkit-search-decoration,
#level-search::-webkit-search-cancel-button,
#level-search::-webkit-search-results-button,
#level-search::-webkit-search-results-decoration {
    appearance: none;
}

#community-diffs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
}

.diff-chip {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 0.85rem;
    border: none;
    background: #efefef;
    color: #222;
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    cursor: pointer;
}

.diff-chip:hover {
    background: #e2e2e2;
}

.diff-chip.is-on,
.diff-chip.is-on:hover {
    background: black;
    color: white;
    font-weight: 700;
}

#level-filter-count {
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
}

#level-empty {
    margin: 0.75rem 0 0;
    padding-left: 0.65rem;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 0.9rem;
    color: #666;
}

#level-empty[hidden] {
    display: none;
}

#qrender {
    max-height: calc(100vh - 2rem);
    overflow: auto;
}

#qrender-admin {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 3px dotted #ddd;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
}

#qrender-admin[hidden] {
    display: none;
}

#qadmin-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#qrender-admin.is-collapsed {
    gap: 0;
    padding-top: 0;
    border-top: none;
}

#qrender-admin.is-collapsed #qadmin-body {
    display: none;
}

#qrender-admin #qadmin-toggle,
#qrender-admin #qadmin-toggle:hover {
    border: 2px solid black;
    background: white;
    color: black;
    font-weight: 700;
}

.qadmin-actions,
.qadmin-name,
.qadmin-diff,
#qrender-actions {
    display: grid;
    gap: 8px;
    align-items: center;
}

.qadmin-actions,
#qrender-actions {
    grid-template-columns: 1fr 1fr;
}

.qadmin-name {
    grid-template-columns: 1fr auto;
}

.qadmin-diff {
    grid-template-columns: auto 1fr;
}

#qrender-admin button,
#qrender-admin select,
#qrender-admin input {
    box-sizing: border-box;
    height: 36px;
    margin: 0;
    font: inherit;
    font-size: 15px;
    background: white;
    color: black;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 0 10px;
}

#qrender-admin button,
#qrender-admin select {
    cursor: pointer;
}

#qrender-admin button:hover,
#qrender-admin select:hover,
#qrender-admin input:hover {
    border-color: #888;
}

#qrender-admin input,
#qrender-admin select {
    width: 100%;
    min-width: 0;
}

#qrender-admin select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #333 50%), linear-gradient(135deg, #333 50%, transparent 50%);
    background-position: calc(100% - 16px) 15px, calc(100% - 11px) 15px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 26px;
}

.qadmin-diff > span {
    font-size: 15px;
    font-weight: 700;
}

#qadmin-solve:disabled,
#qadmin-author:disabled,
#qadmin-solve:disabled:hover,
#qadmin-author:disabled:hover {
    background: #f3f3f3;
    color: #777;
    border-color: #ddd;
    cursor: default;
}

#qrender-admin #qadmin-approve,
#qrender-admin #qadmin-approve:disabled,
#qrender-admin #qadmin-approve:hover,
#qrender-admin #qadmin-approve:disabled:hover {
    background: #1d7a32;
    color: white;
    border-color: #145624;
}

#qrender-admin #qadmin-disapprove,
#qrender-admin #qadmin-disapprove:disabled,
#qrender-admin #qadmin-disapprove:hover,
#qrender-admin #qadmin-disapprove:disabled:hover {
    background: #b42318;
    color: white;
    border-color: #7f1a12;
}

#qrender-admin #qadmin-approve:disabled,
#qrender-admin #qadmin-disapprove:disabled {
    cursor: default;
}

#qadmin-status {
    margin: 0;
    text-align: center;
    color: #333;
    font-size: 14px;
    font-weight: 700;
}

#qadmin-status[hidden] {
    display: none;
}

#qrender-actions {
    margin-top: 12px;
}

#qrender-actions .button {
    width: 100%;
    margin: 0;
}

#qrender-actions .button:hover {
    transform: none;
}

#qrenderclose {
    background-color: #666;
}

#replay-level-name {
    margin: 0;
}
#replay-level-name > p {
    text-align: center;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    font-size: 30px;
    margin: 0;
    font-weight: 600;
}

#replay-level-stars > .level-moves {
    height: 30px;
    margin: 10px 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 3px dotted #ddd;
}

#replay-level-stars > .level-moves > .ind {
    height: 30px;
    width: 30px;
    margin: 0;
}

#replay-level-stars > .level-moves > .move-counter {
    font-size: 24px;
    text-align: center;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
    margin: 0;
}

@media screen and (max-width: 1200px) {
    .row {
        width: calc(100% - 4rem);
        margin-left: 2rem;
        margin-right: 2rem;
        padding: 0;
        flex-direction: column;
    }
    #leaderboard {
        width: 100%;
        height: 350px;
        min-width: 0;
        margin-bottom: 64px;
    }
    nav > a {
        font-weight: 300 !important;
    }

    #jumbo h1 {
        font-size: 30px;
    }
    #logo {
        height: 45px;
        width: 45px;
        background-size: 55px;
    }
    #login-menu {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 42%;
        gap: 8px;
        padding: 6px 10px 6px 6px;
        outline-width: 4px;
    }
    #profile-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    #jumbo {
        padding: 0 2rem;
        width: calc(100% - 4rem);
    }
    nav {
        border-radius: 0 !important;
    }
    #level-select {
        margin-bottom: 0;
    }
    #level-select-title {
        width: calc(100% - 1rem);
    }

    #profile-content {
        padding-left: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 860px) {
    .about-page {
        width: calc(100% - 2rem);
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .about-lead,
    .about-credits,
    .about-policy,
    .about-pair {
        grid-template-columns: 1fr;
    }

    .about-shot {
        position: static;
        transform: none;
        min-width: 0;
        width: min(100%, 280px);
        max-width: 280px;
        margin: 0 auto;
        justify-self: center;
    }

    .about-credits .about-shot {
        display: none;
    }

    .about-policy .about-shot {
        order: -1;
    }

    .about-sideimage {
        margin: 0 auto;
    }

    #remove-image {
        display: none;
    }

    #show-image {
        display: block !important;
        box-sizing: border-box;
        width: min(100%, 250px);
        height: auto;
        margin: 0 auto;
        border: 5px solid black;
        border-radius: 1rem;
    }
}
@media screen and (max-width: 700px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    #jumbo {
        flex-wrap: nowrap;
        column-gap: 10px;
        box-sizing: border-box;
        width: 100%;
        padding: 0 0.75rem;
    }

    #jumbo h1 {
        white-space: nowrap;
        font-size: clamp(18px, 5.2vw, 22px);
    }

    #logo {
        width: 42px;
        height: 42px;
        background-size: 50px;
        outline-width: 4px;
    }

    #login-menu {
        box-sizing: border-box;
        height: 42px;
        max-width: 46%;
        padding: 3px 10px 3px 3px;
        outline-width: 4px;
    }

    #profile-name {
        font-size: 1rem;
    }

    nav.title-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-sizing: border-box;
        width: 100% !important;
        margin-left: 0;
        margin-right: 0;
        padding: 0.8rem 0.35rem;
        border-radius: 0 !important;
    }

    nav > a {
        width: auto !important;
        flex: 1 1 0;
        min-width: 0;
        font-size: 13px;
        font-weight: 400 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .button,
    #playbanner > button {
        font-size: 15px;
        padding: 7px 12px;
    }

    .row {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 0 0.45rem;
    }

    .row,
    .card,
    .level-row,
    #level-select-title,
    #error-login,
    .small-title {
        box-sizing: border-box;
        max-width: 100%;
    }

    .card,
    .level-row,
    #level-select-title,
    #error-login,
    .small-title {
        width: 100% !important;
    }

    .card {
        padding: 0.9rem 0.7rem;
    }

    #p-warning > ul,
    .writeable > ul,
    .card > ul {
        padding-left: 1.15rem;
        margin-top: 0.4rem;
        margin-bottom: 0;
    }

    .card > p,
    .writeable > p,
    #p-warning > p,
    #p-warning > ul,
    .writeable > ul {
        font-size: 14px;
        line-height: 1.35;
    }

    .lsh-title,
    .writeable > h3,
    .card > p.lsh-title {
        font-size: 16px;
    }

    .community-card-name {
        font-size: 16px;
    }

    .input {
        font-size: 16px;
    }

    .small-title {
        min-height: 3rem;
        border-radius: 0.75rem;
    }

    .small-title > a {
        font-size: 14px;
        padding: 0.5rem 0.2rem;
    }

    .level-chapter-name {
        font-size: 0.78rem;
    }

    .level-chapter-span {
        font-size: 0.7rem;
    }

    .level-row {
        font-size: 13px;
        padding: 0.35rem 0.05rem 0.35rem 0.2rem;
        gap: 0.3rem;
    }

    .level-chapter {
        margin-top: 0.6rem;
        padding: 0.4rem 0.55rem;
        border-radius: 0.75rem;
    }

    .level-no {
        flex: 0 0 1.85rem;
        font-size: 12px;
    }

    .level-name {
        min-width: 0;
        overflow: hidden;
        line-height: 1.25;
        white-space: normal;
    }

    .level-meta,
    .level-diff,
    .level-diff-expert,
    .level-author,
    .level-date {
        font-size: 11px;
    }

    .level-clears b {
        font-size: 13px;
    }

    .level-clears span {
        font-size: 10px;
    }

    .level-moves {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
    }

    .level-moves > img {
        width: 16px;
        height: 16px;
    }

    .level-play {
        padding: 0.2rem 0.5rem;
        font-size: 13px;
    }

    .row > .level-column {
        height: auto;
        max-height: none;
    }

    #level-scroll {
        flex: none;
        height: auto;
        max-height: calc(100vh - 12rem);
        min-height: 10rem;
    }

    #level-tools {
        padding: 0.65rem 0.6rem 0.7rem;
    }

    .score-label {
        font-size: 12px;
    }

    #level-bar {
        align-items: center;
    }

    #level-query {
        flex: 1 1 100%;
    }

    #level-search {
        font-size: 16px;
    }

    #community-diffs {
        flex: 1 1 100%;
        justify-content: flex-start;
        gap: 0.3rem;
    }


    .diff-chip {
        font-size: 12px;
        padding: 0.16rem 0.42rem;
    }

    #replay-level-name > p {
        font-size: 20px;
    }

    .about-page {
        width: calc(100% - 1.5rem);
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }

    dialog {
        max-width: calc(100vw - 2rem);
        box-sizing: border-box;
    }

    #qrender {
        padding: 16px !important;
    }

    dialog iframe {
        width: 100% !important;
        max-width: 440px;
    }
}

@media screen and (max-width: 540px) {
    #jumbo {
        column-gap: 8px;
        padding: 0 0.65rem;
    }

    #jumbo h1 {
        font-size: clamp(17px, 5.2vw, 20px);
    }

    #logo {
        width: 40px;
        height: 40px;
        background-size: 48px;
    }

    #login-menu {
        flex: none;
        width: 40px;
        height: 40px;
        max-width: none;
        padding: 0;
        gap: 0;
        justify-content: center;
    }

    #login-menu.is-guest {
        width: auto;
        height: 40px;
        padding: 0 12px;
        gap: 0;
        background-color: #2f36ff;
        color: white;
    }

    #login-menu.is-guest:hover {
        background-color: rgb(29, 34, 183);
    }

    #login-menu.is-guest > #profile-picture {
        display: none;
    }

    #profile-name {
        display: none;
    }

    #login-menu.is-guest #profile-name {
        display: block;
        color: white;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
    }

    #login-menu.is-guest .login-label-full {
        display: none;
    }

    #login-menu.is-guest .login-label-short {
        display: inline;
    }

    #login-menu > #profile-picture {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background-size: 48px;
    }

    #login-menu > #profile-picture.is-avatar {
        padding: 4px;
    }

    #login-menu .profile-status {
        width: 14px;
        height: 14px;
        right: 3px;
        bottom: 3px;
        outline-width: 2px;
    }
}
