:root {
    color-scheme: light dark;
    --background: light-dark(#fff, #222);
    --alt-background: light-dark(#fbfaf9, #1c1c1c);
}

html {
    padding-left: 30px;
    padding-right: 30px;
}

body {
    line-height: 1.3;
    font-family: sans-serif;
    font-size: 18px;
    max-width: 1200px;
    margin: 30px auto;
    background-color: var(--background);
    color: light-dark(#333, #fbfbfb);
    tab-size: 4;
}

small {
    font-size: 13px;
}

p + ul {
    margin-top: -10px;
}

pre:not(.highlight pre), :not(pre) > code {
    background-color: light-dark(#eee, #393939);
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

.highlight pre {
    font-size: 12px;
    margin: 8px 2px;
}

code {
    font-size: 14px;
}

:not(pre) > code {
    white-space: nowrap;
    display: inline-block;
}

h1, h2, h3 {
    line-height: 1.2;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

th {
    background-clip: padding-box;
    background-color: var(--background);
    position: sticky;
    top: 0;
}

time {
    font-weight: bold;
}

table {
    border-collapse: collapse;
}

table:not(.highlighttable) :is(th, td) {
    border: 1px solid;
    padding: 4px;
}

.linenos {
    background-color: #272822;
    border-right: 1px solid #515151;
    color: #6e6e6e;
}

.linenos .normal {
    padding-left: 4px !important;
    padding-right: 4px !important;
}

input[type="number"] {
    width: 3em;
}

#guess-panel {
    float: right;
    top: 10px;
    padding: 8px;
    background-color: var(--background);
    position: sticky;
    margin-bottom: -10000px;
    margin-right: -20px;
    border-radius: 10px;
    border: 2px solid #333;
    overflow-y: auto;
    max-height: 75vh;
}

.sticky > :not(#sticky-button) {
    display: none;
}

#sticky-button {
    float: right;
}

.lock-button {
    float: right;
    margin-left: 5px;
}

[toggleValue=""] {
    border-radius: 10px;
    border-color: #ff5800;
    background-color: var(--background);
}

.highlight {
    color: #f7a8b8;
}

.player::marker {
    color: LinkText;
}

.player {
    border: 1px solid #000;
    padding: 10px;
}

.locked {
    background-color: var(--alt-background);
}

.you {
    animation: blink 2s infinite;
}

@keyframes blink {
    0% {
        color: #55CDFC;
    }
    50% {
        color: #55FCAB;
    }
    100% {
        color: #55CDFC;
    }
}

:has([alt="finish"]) + #players .finished::before {
    content: "✔ ";
    color: #68c23a;
}

:has([alt="finish"]) + #players .player:not(.finished)::before {
    content: "✘ ";
    color: #c2433a;
}

:target {
   background-color: light-dark(#ffa, #4f4624);
}

.hidden {
    display: none;
}

.comments {
    background-color: var(--alt-background);
    padding: 0.5em 1em;
    border-left: 2px solid #333;
}

.comments>:first-child {
    margin-top: 8px;
}

.comments>:last-child {
    margin-bottom: 8px;
}

.comment p {
    margin-top: 8px;
}

.comment-content {
    height: 18px;
    width: 100%;
    overflow: hidden;
    font-family: sans-serif;
    resize: none;
}

.delete-button {
    display: inline;
}

.tooltip::before {
    visibility: visible;
    content: "*";
    font-size: 20px;
    color: light-dark(#a83513, #fa431e);
    cursor: default;
}

.tooltip-inner {
    visibility: hidden;
    background-color: var(--alt-background);
    border: 1px solid light-dark(#000, #fff);
    text-align: center;
    cursor: auto;
    padding: 5px;
    border-radius: 4px;
    position: absolute;
    z-index: 1;
}

:is(.tooltip:hover, .tooltip:active) .tooltip-inner {
    visibility: visible;
}

.hidden-submit {
    position: absolute;
    left: -9999px;
}

.verified {
    background: url("/verified.png");
    background-size: 1rem;
    height: 1rem;
    width: 1rem;
    display: inline-block;
    background-repeat: no-repeat;
    position: relative;
    bottom: -1px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

header > a {
    flex-grow: 1;
    flex-basis: 0;
    text-align: center;
}
