body {
    margin: calc(1.5em + 1.8ch + 1px) 1.3ch 1.3ch 1.3ch;
    font-family: monospace;
}

a, a:visited {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    padding: 0.25ch 1.5ch;
    width: 100%;
    line-height: 1.5;
}

nav:not(:hover):not(:focus-within) {
    white-space: nowrap;
}

nav a[accesskey] {
    font-weight: bold;
}

.logged-in-notification {
    float: right;
    margin-right: 3ch;
}

.banner {
    display: block;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 5px;
}

.header {
    margin-top: 0;
    margin-bottom: 0;
    text-align: center;
}

.header a {
    color: inherit;
}

.subheader {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
    font-weight: normal;
    font-size: 10pt;
}

.announcement {
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 13pt;
}

.container {
    margin: auto;
    border-width: 1px;
    border-style: solid;
    padding: 10px;
}

.container.narrow {
    max-width: 650px;
}

.container.wide {
    max-width: 1150px;
}

.barheader {
    margin-right: -10px;
    margin-left: -10px;
    padding-left: 10px;
    font-size: 12pt;
}

ul {
    padding-left: 16px;
    list-style: none;
}

ul > li::before {
    padding-right: 8px;
    content: "*";
}

table {
    width: 100%;
    border-spacing: 2px;
}

th {
    text-align: left;
    font-weight: bold;
}

th, td {
    padding: 3px 5px;
}

hr {
    clear: both;
    margin-top: 1.3ch;
    margin-bottom: 1.3ch;
    border: none;
    border-bottom-width: 1px;
    border-bottom-style: solid;
}

form label {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 3px 5px;
    min-width: 18ch;
    vertical-align: top;
}

form input,
form input[type=file]::file-selector-button {
    font-family: inherit;
}

form input[type=text],
form input[type=password],
form input[type=number],
form input[type=checkbox],
form input[type=submit],
form input[type=file]::file-selector-button,
form select,
form textarea {
    border-width: 1px;
    border-style: solid;
}

form textarea {
    resize: both;
}

form input[type=radio] {
    margin-left: 18ch;
    vertical-align: middle;
}

form input[type=radio] + label {
    margin-bottom: 8px;
    padding: 8px;
    vertical-align: middle;
}

form input[type=radio] + label > img {
    display: block;
    max-height: 100px;
}

.post-container + form {
    margin-top: 5px;
}

#postform {
    display: none;
    position: fixed;
    top: calc(1.5em + 1.8ch + 1px);
    right: 1.3ch;
    border-width: 1px;
    border-style: solid;
    padding: 5px;
    max-width: calc(100% - 3.9ch - 3px);
}

#postform:target {
    display: block;
}

#postform a[href='##'] {
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
}

#postform label {
    width: 7ch;
    min-width: min-content;
}

#postform textarea {
    margin: 0 0 5px 0;
    width: calc(100% - 7ch - 25px);
    min-width: calc(100% - 7ch - 25px);
    max-width: calc(100% - 7ch - 25px);
}

#postform input[type=submit] {
    margin-left: 5px;
}

#postform input[type=file] {
    margin-right: 5px;
    max-width: 300px;
    vertical-align: top;
}

.new-post {
    display: block;
    text-align: center;
    font-weight: bold;
    font-size: 15pt;
}

.catalog-container {
    text-align: center;
}

.catalog-thread {
    display: inline-block;
    margin-right: 1.3ch;
    margin-bottom: calc(1.3ch - 4px);
    border-width: 1px;
    border-style: solid;
    padding: 10px;
    width: 150px;
    height: 200px;
    overflow: auto;
    scrollbar-width: thin;
}

.catalog-thread-info, .catalog-thread-subject {
    font-weight: bold;
}

.catalog-thread-lastbumpdate {
    font-size: 7.5pt;
}

.index-thread-summary {
    margin-left: 1.3ch;
}

.post-container {
    scroll-margin-top: calc(1.5em + 1.8ch + 1px);
}

.post {
    display: table;
    margin-top: 1.3ch;
    border-width: 1px;
    border-style: solid;
    padding: 1.3ch;
}

.thread {
    display: block;
    background: none !important;
    margin-top: 0;
    border: none;
}

.post-container:target .thread {
    display: table;
    margin-top: 1.3ch;
}

.post-thread-link, .post-subject, .post-name {
    font-weight: bold;
}

.post-number a {
    text-decoration: none;
}

.referrer, .post-attachment-info {
    font-size: 7.5pt;
}

.post-attachment {
    display: inline-block;
    margin-right: 1.3ch;
    margin-bottom: 1.3ch;
}

.post-attachment-info {
    margin-bottom: 1.3ch;
}

.post-attachment-info > a:first-child {
    display: inline-block;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-attachment-info > a:first-child:hover {
    max-width: 100%;
}

.post-thumbnail, :not(img).post-file, .post-attachment-single img.post-file {
    float: left;
}

.post-thumbnail, .post-file {
    margin-right: 1.3ch;
    margin-bottom: 1.3ch;
}

.post-thumbnail {
    cursor: pointer;
}

img.post-file {
    display: none;
    max-width: 100%;
    cursor: pointer;
}

input[type=checkbox]:checked + .post-thumbnail {
    display: none;
}

input[type=checkbox]:checked + .post-thumbnail + img.post-file {
    display: block;
}

video.post-file {
    max-width: 320px;
    max-height: 240px;
}

.post-comment, .catalog-thread-comment {
    display: block;
    margin: 1.3ch 1.3ch 0.7ch 1.3ch;
    max-width: 150ch;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.post-comment a, .catalog-thread-comment a {
    text-decoration: underline;
}

.redtext {
    letter-spacing: -0.7px;
    font-weight: bolder;
    font-size: 11pt;
}

.spoiler {
    cursor: none;
}

code, .code {
    display: inline-block;
    max-width: max-content;
}

code {
    margin-top: 1ch;
    margin-bottom: 1ch;
    border-width: 1px;
    border-style: solid;
    padding: 1ch;
}

.code {
    padding-right: 0.5ch;
    padding-left: 0.5ch;
}

.page-switcher {
    text-align: center;
}

.invisible {
    display: none;
}

.float-right {
    float: right;
}
