@font-face {
    font-family: "HP_150";
    src: url('../fonts/Web437_HP_150_re.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "SperryPC";
    src: url('../fonts/Web437_SperryPC_8x16.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "IBM_VGA";
    src: url('../fonts/Web437_IBM_VGA_9x16.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "JPN12";
    src: url('../fonts/Web437_DOS-V_re_JPN12.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: "PRC19";
    src: url('../fonts/Web437_DOS-V_re_PRC19.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
  --body-text-shadow: 0 0 20px #ffffff4a, 0 0 20px #00ffab45;
  --green-text-shadow: 0 0 20px #08bd9882;
  --letter-shadow: drop-shadow(0 0 0.75rem rgba(20, 220, 187, 0.35));
  --firefox-body-shadow: 0 0 20px #ffffff31, 0 0 20px #00ffab45;
  --firefox-green-shadow: 0 0 20px #08bd994f;

  --fg: rgb(100, 255, 100);
  --fg-bright: rgb(180, 255, 180);
  --fg-dim: rgb(64, 128, 64);

  --fs-12: 12px;
  --fs-24: 24px;
  --fs-36: 36px;
  --fs-14: 14px;
  --fs-28: 28px;
  --fs-42: 42px;
  --fs-16: 16px;
  --fs-32: 32px;
  --fs-48: 48px;
  --fs-19: 19px;
  --fs-38: 38px;
  --fs-57: 57px;
}

* {
    font-synthesis: none;
}

.t12, .t24, .t36 { font-family: "JPN12", monospace; }
.t14, .t28, .t42 { font-family: "HP_150", monospace; }
.t16, .t32, .t48 { font-family: "SperryPC", monospace; }
.t19, .t38, .t57 { font-family: "PRC19", monospace; }

.t12 { font-size: var(--fs-12); line-height: var(--fs-12); }
.t24 { font-size: var(--fs-24); line-height: var(--fs-24); }
.t36 { font-size: var(--fs-36); line-height: var(--fs-36); }
.t14 { font-size: var(--fs-14); line-height: var(--fs-14); }
.t28 { font-size: var(--fs-28); line-height: var(--fs-28); }
.t42 { font-size: var(--fs-42); line-height: var(--fs-42); }
.t16 { font-size: var(--fs-16); line-height: var(--fs-16); }
.t32 { font-size: var(--fs-32); line-height: var(--fs-32); }
.t48 { font-size: var(--fs-48); line-height: var(--fs-48); }
.t19 { font-size: var(--fs-19); line-height: var(--fs-19); }
.t38 { font-size: var(--fs-38); line-height: var(--fs-38); }
.t57 { font-size: var(--fs-57); line-height: var(--fs-57); }

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    color: var(--fg-bright);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "PRC19", monospace;
    text-shadow: 1px 0 currentColor, var(--body-text-shadow);
}

.bold {
    color: var(--fg-bright);
    text-shadow: 1px 0 currentColor, var(--body-text-shadow);
}

h1 {
    font-size: var(--fs-38);
    line-height: var(--fs-38);
}

h2, h3, h4, h5, h6 {
    font-size: var(--fs-19);
    line-height: var(--fs-19);
}

.head-meta {
    font-family: "SperryPC", monospace;
    font-size: var(--fs-16);
    line-height: var(--fs-16);
    text-shadow: var(--body-text-shadow);
    white-space: nowrap;

    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.admin-mode .head-meta.admin {
    display: inline-flex !important;
}

body.admin-mode .head-meta .admin {
    display: contents !important;
}

b, strong, th {
    font-weight: normal;
    color: var(--fg-bright);
}

.dimmed {
    color: var(--fg-dim);
}

@media screen and (min-width: 601px) {
    @supports (-moz-appearance:none) {
        body {
            text-shadow: var(--firefox-body-shadow) !important;
        }

        h1, h2, h3, h4, h5, h6, .bold {
            text-shadow: 1px 0 currentColor, var(--firefox-body-shadow) !important;
        }
    }
}

::-webkit-scrollbar {
    width: 10px;
    height: 90%;
}

::-webkit-scrollbar-track {
    background: rgb(0, 20, 0); 
}

::-webkit-scrollbar-thumb {
    background: rgb(32, 128, 32);
}
  
::-webkit-scrollbar-thumb:hover {
    background: rgb(100, 255, 100); 
}

.cinfo {
    font-family: "HP_150", monospace;
    font-size: var(--fs-14);
    line-height: var(--fs-14);

    position: fixed;
    top: 10px;
    left: 10px;
    max-height: 95vh;
    overflow-y: auto;

    user-select:none;
}

#simdetails-title {
    cursor: pointer;
}

.cinfo ul {
    padding: 0 !important;
    margin: 0 !important;
}

#simdetails {
    line-height: var(--fs-14);
}

#simdetails.collapsed {
    display: none;
}

#bring-moon {
    color: rgb(222, 222, 252);
}

.section {
    background-color: rgb(12, 12, 12);
    border-color:rgb(0, 128, 0);

    border: solid 1px;

    margin: 5px;
    padding: 5px;

    text-align: center;
}

body {
    background-color: black;

    margin: 0px; 
    width: 100%;
    height: 100%;

    /* background-image:
        linear-gradient(to right, rgb(15, 15, 15) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(15, 15, 15) 1px, transparent 1px); */

    background-size: 20px 20px;

    z-index: -1;

    animation: gridScroll 78s linear infinite;

    font-family: "SperryPC", monospace;
    color: rgb(100, 255, 100);

    text-shadow: var(--body-text-shadow);

    height: 100%;
}

#moonphase {
    width: 64px;
    height: 64px;
}

.orbitview {
    font-family: "HP_150", monospace;
    font-size: var(--fs-14);
    line-height: var(--fs-14);

    position: fixed;
    left: 10px;
    bottom: 10px;

    user-select: none;
}

#orbitview-title {
    cursor: pointer;
}

#orbitview-body.collapsed {
    display: none;
}

#orbitdiagram {
    position: static;
    display: block;
    width: 260px;
    height: 220px;
    margin: 6px 0;

    background-color: rgb(4, 4, 4);
    border: 1px solid rgb(0, 128, 0);
    image-rendering: pixelated;
}

#orbitdiagram.draggable {
    cursor: grab;
    touch-action: none;
}

#ui-hint {
    display: none;
}

body.ui-hidden #ui-hint {
    display: inline;
}

body.ui-hidden .header,
body.ui-hidden .wrapper,
body.ui-hidden footer,
body.ui-hidden #inspector,
body.ui-hidden #connections {
    display: none !important;
}

body.ui-hidden #globe {
    z-index: 0;
    cursor: grab;
}
/* 
.grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    
    height: 100%;
    min-height: 100%;

    pointer-events: none;

    background-image:
        linear-gradient(to right, rgb(15, 15, 15) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(15, 15, 15) 1px, transparent 1px);

    background-size: 20px 20px;

    z-index: -1;

    animation: gridScroll 78s linear infinite;
} */

@keyframes gridScroll {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 0 100%;
    }
}

.navbar {
    position: relative;
    margin-top: 5px;
    left: 95%;

    width: 0px;
}

.navbutton {
    font-family: "SperryPC";

    border: 1px solid green;
    margin: 5px;

    width: 40px;
    height: 40px;

    background-color: black;
    color: rgb(0, 255, 0);
}

.navbutton:hover {
    background-color: rgb(0, 20, 0);
}

.header {
    display: flex;
    height: 311px;
    width: 900px;
    margin:auto;
    font-size: var(--fs-48);
    line-height: var(--fs-48);
    font-family: "IBM_VGA", monospace;
    justify-content: left;
    padding: 0px;

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;
}

#girl {
    position: relative;

    width: 300px;
    height: 311px;
    top: 5px;
    left: 580px;
    
    opacity: 1;
    filter: brightness(0.6);

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;
}

#pc {
    position: absolute;

    width: 17em;
    
    left: 50%;
    transform: translate(-50%, -50%);

    opacity: 1;
    filter: brightness(0.5);
    z-index: -1;
}

a {
    color: greenyellow;
}

#disword {
    filter: hue-rotate(30deg);
    margin-left: 25%;
}

#titlebox {
    margin-top: 250px;
    position: absolute;
    margin-left: 25px;

    width: 500px;
    height: 50px;
    overflow: hidden;
    white-space: nowrap;

    border: 1px solid rgb(0, 64, 0);

    padding: 7px;
    padding-bottom: 0px;

    z-index: 1;

    background-color: rgb(5, 5, 5);
}

.subtitle {
    border-bottom: 1px solid rgb(0, 128, 0);
    
    padding: 5px;
    margin: 3px;

    color: var(--fg-bright);
}

.wrapper {
    display: flex;
    flex-direction: row;

    align-items: top;

    width: 900px;

    margin: auto;
}

.main {
    box-sizing: border-box;

    border: 3px solid rgb(0, 128, 0);
    padding: 10px;

    width: 100%;

    margin: 5px;
}

.sub {
    display: flex;
    flex-direction: column;

    align-items: center;
    padding: 5px;
    padding-top: 0px;

    width: 75%;
}

.sub > div {
    background-color: black;
    display: fixed;
    box-sizing: border-box;

    border: 3px solid rgb(0, 128, 0);
    padding: 5px;
    
    margin: 5px;
    width: 100%;
}

#form {
    position: relative;

    padding-left: 5px;
}

#chatwindow {
    width: 97%;
    height: 70%;
    padding: 5px;
    margin-top: 10px;

    overflow-y: auto;
    overflow-x: hidden;
    margin-right: 1000px;
    margin-left: 5px;
}

#chatwindow > div {
    word-break: break-all;
}

.message {
    width: 90%;
    word-wrap: break-word;

    margin-right: 0px;
}

input {
    position: inherit;
    margin-left: 5px;

    background-color: black;
    color: rgb(100, 255, 100);

    width: 93%;
    font-family: "SperryPC";

    border: none;
}

input:focus {
    outline: none;
}

#chat {
    height: 300px;
    width: 100%;
}

.msg-username {
    color:rgb(64, 128, 64);
}

.msg-content {
    color: rgb(100, 255, 100);
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.msg-body {
    flex: 1;
    min-width: 0;
}

.msg-date {
    flex-shrink: 0;
    white-space: nowrap;
    color: rgb(0, 64, 0);
    font-family: "JPN12", monospace;
    font-size: var(--fs-12);
    line-height: var(--fs-12);
    padding-right: 5px;
}

.msg-actions {
    display: none;
    flex-shrink: 0;
}

body.admin-mode .chat-message:hover .msg-actions {
    display: flex;
}

.msg-action {
    color: rgb(153, 64, 29);
    font-size: var(--fs-12);
    line-height: var(--fs-12);
    font-family: "JPN12", monospace;
    margin-right: 5px;
    padding: 0;
    background-color: inherit;
    cursor: pointer;

    border: none;
}

.msg-action:hover {
    color: rgb(197, 78, 31);
}

#inspector {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    width: min(520px, calc(100vw - 32px));
    max-height: 80vh;
    overflow-y: auto;

    background-color: rgb(12, 12, 12);
    border: solid 1px rgb(0, 128, 0);
    padding: 10px;

    font-family: "HP_150", monospace;
    font-size: var(--fs-14);
    line-height: var(--fs-14);
    color: var(--fg);
}

#inspector .inspector-row {
    display: flex;
    gap: 10px;
    word-break: break-all;
}

#inspector .inspector-label {
    flex-shrink: 0;
    width: 110px;
    color: rgb(64, 128, 64);
}

#inspector .inspector-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

#inspector .inspector-actions .msg-action {
    font-family: "HP_150", monospace;
    font-size: var(--fs-14);
    line-height: var(--fs-14);
}

#connections {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    width: min(760px, calc(100vw - 32px));
    max-height: 80vh;
    display: flex;
    flex-direction: column;

    background-color: rgb(8, 10, 8);
    border: solid 1px rgb(0, 160, 0);
    padding: 14px 16px;

    font-family: "HP_150", monospace;
    font-size: var(--fs-16);
    line-height: 1.6;
    color: var(--fg);
}

#connections .msg-action {
    font-family: "HP_150", monospace;
    font-size: var(--fs-16);
    line-height: var(--fs-16);
    color: rgb(214, 110, 58);
}

#connections .msg-action:hover {
    color: rgb(255, 150, 90);
}

#connections .connection-tabs {
    display: flex;
    gap: 16px;

    border-bottom: 1px solid rgb(0, 128, 0);
    padding-bottom: 8px;
}

#connections .connection-tab-active {
    color: var(--fg-bright) !important;
}

#connections .connection-summary {
    color: rgb(140, 215, 140);
    padding: 8px 0 4px;
}

#connections .connection-list {
    overflow-y: auto;
    flex: 1;
}

#connections .connection {
    border-top: 1px solid rgb(0, 72, 0);
    padding: 8px 0;
    word-break: break-all;
}

#connections .connection-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

#connections .connection-head .msg-username {
    color: var(--fg-bright);
}

#connections .connection-head .noa-username {
    color: rgb(190, 190, 245);
}

#connections .connection-when {
    margin-left: auto;
    flex-shrink: 0;

    color: rgb(130, 205, 130);
}

#connections .connection-tag {
    color: rgb(255, 110, 60);
}

#connections .connection-line {
    color: var(--fg);
}

#connections .connection-dim {
    color: rgb(120, 180, 120);
}

#connections .connection-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    border-top: 1px solid rgb(0, 128, 0);
    padding-top: 10px;
    margin-top: 4px;

    color: rgb(140, 215, 140);
}

#connections .connection-pager .msg-action {
    margin-right: 0;
}

#connections .inspector-actions {
    border-top: 1px solid rgb(0, 128, 0);
    padding-top: 10px;
    margin-top: 8px;
}

.sys-username {
    color: rgb(48, 48, 48);
}

.sys-content {
    color: rgb(64, 64, 64);
}

.noa-username {
    color: #83839E;
}

.noa-content {
    color: #D3D3FF;
}

.ptext {
    padding-left: 10px;
    padding-right: 5px;
}

.ptext > div[id^="post-"]:last-child {
    margin-bottom: 0 !important;
}

table, th, td {
    border: 1px solid rgb(0, 64, 0);
    border-collapse: collapse;

    padding: 5px;
    margin-top: 15px;
}

footer {
    margin: auto;
    text-align: center;
    padding: 16px;
    padding-bottom: 48px;
}

li {
    margin: 4px;
}

.admin {
    display: none !important;
}

body.admin-mode .admin {
    display: inline-block !important;
}

.ptext blockquote {
    border-left: 2px solid rgb(0, 128, 0);
    margin: 8px 0;
    padding-left: 10px;
    opacity: 0.8;
}

.ptext pre {
    background-color: rgb(8, 12, 8);
    border: 1px solid rgb(0, 80, 0);
    padding: 8px;
    overflow-x: auto;
}

.ptext code {
    background-color: rgb(8, 12, 8);
    padding: 1px 4px;
}

.ptext img {
    max-width: 100%;
}
.header,
.wrapper {
    margin-left: var(--gutter, auto);
    margin-right: auto;
}

.wl-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgb(0, 128, 0);
}

.wl-tab {
    background-color: black;
    border: 1px solid rgb(0, 64, 0);
    color: rgb(100, 255, 100);
    font-family: inherit;
    font-size: var(--fs-16);
    line-height: var(--fs-16);
    padding: 5px 10px;
    cursor: pointer;
    text-decoration: none;
}

.wl-tab:hover {
    border-color: rgb(0, 200, 0);
    background-color: rgb(0, 20, 0);
}

.wl-tab-active {
    border-color: rgb(0, 200, 0);
    color: var(--fg-bright);
    text-shadow: 1px 0 currentColor, var(--body-text-shadow);
}

.wl-tab-new {
    color: rgb(64, 128, 64);
}

.wl-desc {
    opacity: 0.7;
    white-space: pre-line;
}

.wl-row-actions {
    white-space: nowrap;
}

.wl-row-actions a {
    color: rgb(153, 64, 29);
    margin-right: 5px;
}

.wl-row-actions a:hover {
    color: rgb(197, 78, 31);
}

#watchlist {
    width: 100%;
    table-layout: auto;
}

.wl-form {
    border: 1px solid rgb(0, 64, 0);
    padding: 10px;
    margin-top: 10px;
    box-sizing: border-box;
    width: 100%;
}

.wl-form-title {
    color: rgb(64, 128, 64);
    margin-bottom: 10px;
}

.wl-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.wl-form input,
.wl-form select {
    background-color: black;
    color: rgb(100, 255, 100);
    border: 1px solid rgb(0, 128, 0);
    font-family: inherit;
    font-size: var(--fs-16);
    height: 32px;
    line-height: 30px;
    padding: 0 6px;
    margin-left: 0;
    width: auto;
    flex: 1;
    min-width: 120px;
    box-sizing: border-box;
}

.wl-form input.wl-narrow {
    flex: 0 0 80px;
    min-width: 80px;
}

.wl-form button {
    background-color: black;
    color: rgb(0, 255, 0);
    border: 1px solid rgb(0, 128, 0);
    font-family: inherit;
    font-size: var(--fs-16);
    height: 32px;
    line-height: 30px;
    padding: 0 12px;
    cursor: pointer;
    box-sizing: border-box;
}

.wl-form button:hover {
    background-color: rgb(0, 20, 0);
}

.wl-error {
    color: rgb(197, 78, 31);
    margin-top: 5px;
}

.wl-error:empty {
    display: none;
}

.owner-online {
    color: var(--fg-bright);
    text-shadow: 1px 0 currentColor, var(--body-text-shadow);
}

.owner-offline {
    color: rgb(255, 100, 100);
}

@media (max-width: 959px) and (hover: none) and (pointer: coarse) {
    .cinfo,
    .orbitview {
        position: relative;
        top: auto;
        left: auto;
        bottom: auto;
        max-height: none;
        overflow: visible;
        padding: 10px 10px 0;
    }

    #moonphase {
        position: static;
        display: block;
    }

    body.ui-hidden #globe {
        touch-action: none;
    }

    .header {
        width: auto;
        height: auto;
        margin: 0;
        padding: 10px;
        font-size: var(--fs-32);
        line-height: var(--fs-32);
    }

    #titlebox {
        position: relative;
        flex: 1;
        min-width: 0;
        margin: 0;
        width: auto;
        height: 34px;
    }

    .wrapper {
        flex-direction: column;
        width: auto;
        margin: 0;
    }

    .navbar {
        display: flex;
        left: auto;
        width: auto;
        margin-top: 0;
        padding: 0 5px;
    }

    .navbutton {
        flex: 1;
    }

    .wrapper > .sub {
        width: auto !important;
    }

    .subtitle {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .head-meta {
        white-space: normal;
        flex-wrap: wrap;
    }

    .subtitle .post-title-tooltip:hover::after {
        content: none;
    }

    input,
    select,
    textarea {
        font-size: var(--fs-16);
        max-width: 100%;
    }

    #form {
        display: flex;
        align-items: center;
    }

    #form input {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    .ptext:has(> table) {
        overflow-x: auto;
    }

    td {
        overflow-wrap: break-word;
    }
}

.dr-grid {
    --dr-cols: 2;
    display: grid;
    grid-template-columns: repeat(var(--dr-cols), 1fr);
    gap: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.dr-item {
    margin: 0;
    border: 1px solid rgb(0, 64, 0);
    display: flex;
    flex-direction: column;
}

.dr-item:hover {
    border-color: rgb(0, 200, 0);
}

.dr-thumb {
    display: block;
    aspect-ratio: 1;
    background-color: rgb(5, 10, 5);
    overflow: hidden;
}

.dr-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dr-item figcaption {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px;
    border-top: 1px solid rgb(0, 64, 0);
    overflow-wrap: anywhere;
}

.dr-title {
    color: var(--fg-bright);
}

.dr-author {
    opacity: 0.8;
}

.dr-date {
    opacity: 0.5;
}

.wl-form input[type="date"] {
    flex: 0 0 auto;
    color-scheme: dark;
}

.dr-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    box-sizing: border-box;
    cursor: zoom-out;
}

.dr-lightbox[hidden] {
    display: none;
}

.dr-lightbox img {
    max-width: 100%;
    max-height: calc(100% - 40px);
    object-fit: contain;
    border: 1px solid rgb(0, 128, 0);
}

.dr-lightbox-caption {
    text-align: center;
}

.wl-form input[type="file"] {
    line-height: normal;
    padding: 5px 6px;
}
