:root {
    --bg: #e7edf3;
    --panel: #ffffff;
    --row: #e9f3fa;
    --row-alt: #dcebf5;
    --line: #b9ccd9;
    --line-dark: #83adca;
    --ink: #243447;
    --muted: #5f7182;
    --blue: #0a6fa8;
    --blue-2: #12a8d8;
    --gold: #d8b451;
    --danger: #7f1d1d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    line-height: 1.32;
}

a {
    color: #173f73;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 10px;
}

.top {
    background: transparent;
    color: white;
    padding-top: 12px;
}

.top .wrap {
    padding-top: 11px;
    padding-bottom: 10px;
    background: linear-gradient(#15bfe8, #087fb5);
    border: 1px solid #7bb9d2;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
}

.brand {
    color: white;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
}

.tagline {
    margin: 2px 0 0;
    color: #eefbff;
}

.nav {
    background: transparent;
    border: 0;
}

.nav-inner {
    display: flex;
    gap: 8px;
    align-items: center;
    min-height: 27px;
    flex-wrap: wrap;
    background: #c8ddec;
    border: 1px solid #9bbbd0;
    border-top: 0;
    padding-top: 5px;
    padding-bottom: 5px;
}

.nav-user {
    margin-left: auto;
    color: var(--muted);
}

main.wrap {
    background: white;
    border-left: 1px solid #b7c9d6;
    border-right: 1px solid #b7c9d6;
    padding-top: 8px;
    padding-bottom: 14px;
}

h1, h2 {
    color: #115681;
    line-height: 1.2;
}

h1 {
    font-size: 17px;
    margin: 8px 0 4px;
}

h2 {
    font-size: 13px;
}

.table-title {
    margin: 10px 0 0;
    padding: 5px 8px;
    background: linear-gradient(#42cfff, #0a8fc3);
    border: 1px solid #087aa9;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
}

.welcome,
.panel,
.flash,
.notice {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 10px;
    margin-bottom: 10px;
}

.welcome h1 {
    margin-top: 0;
}

.flash {
    border-color: var(--gold);
    background: #fff7d7;
}

.message-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 460px;
    width: calc(100% - 32px);
}

.message-dialog::backdrop {
    background: rgba(20, 38, 55, 0.48);
}

.message-box,
.preview-box,
.report-box {
    background: #fffdf1;
    border: 1px solid #c7a642;
    padding: 10px;
    margin-bottom: 10px;
}

.message-box h2,
.preview-box h2 {
    margin-top: 0;
}

.forum-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line-dark);
    margin-bottom: 12px;
}

.forum-table th {
    background: linear-gradient(#37c9f5, #0789bd);
    color: white;
    text-align: left;
    font-size: 11px;
    padding: 5px 6px;
    border: 1px solid #087aa9;
}

.forum-table td {
    padding: 5px 6px;
    border: 1px solid var(--line);
    vertical-align: top;
    background: var(--row);
}

.forum-table tr:nth-child(even) td {
    background: var(--row-alt);
}

.forum-title {
    font-weight: 700;
    font-size: 13px;
}

.forum-desc {
    color: var(--muted);
    margin-top: 3px;
}

.topic-icon-cell {
    width: 34px;
    text-align: center;
}

.topic-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #3f8ebd;
    border-radius: 50%;
    background: linear-gradient(#fefefe, #bfe8fb);
    color: #0a6fa8;
    font-weight: 700;
    line-height: 18px;
}

.locked-icon {
    background: linear-gradient(#f2f2f2, #cdd4da);
}

.topic-cell {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.topic-meta {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.mini-pages {
    margin-left: 6px;
    white-space: nowrap;
}

.mini-pages a,
.mini-pages span {
    display: inline-block;
    min-width: 15px;
    margin-left: 2px;
    padding: 0 3px;
    border: 1px solid #88b6d4;
    background: white;
    color: #0a5d91;
    font-size: 10px;
    text-align: center;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
}

input,
textarea,
select {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid var(--line-dark);
    border-radius: 2px;
    font: inherit;
    background: white;
}

button {
    background: linear-gradient(#fefefe, #d6e9f8);
    color: #0a527f;
    border: 1px solid #6ca6c9;
    padding: 3px 7px;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: linear-gradient(#ffffff, #c3def2);
}

.button-link {
    display: inline-block;
    background: linear-gradient(#fefefe, #d6e9f8);
    color: #0a527f;
    border: 1px solid #6ca6c9;
    padding: 3px 7px;
    font-weight: 700;
}

.button-link:hover {
    color: #0a527f;
}

button.selected-reaction {
    background: linear-gradient(#fff3bc, #e2c051);
    color: #233;
}

button,
.button-link {
    border-radius: 2px;
}

.form-narrow {
    max-width: 460px;
}

.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 4px;
}

.breadcrumbs {
    color: var(--muted);
    margin-bottom: 6px;
    padding: 4px 7px;
    border: 1px solid #b7c9d6;
    background: #e5f0f8;
}

.deleted-toggle {
    display: inline-block;
    margin: 0;
}

.post {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    background: var(--row);
    border: 1px solid var(--line);
    margin-bottom: 4px;
}

.post:nth-of-type(even) {
    background: var(--row-alt);
}

.post aside {
    background: rgba(214, 234, 247, 0.72);
    border-left: 1px solid var(--line);
    padding: 7px;
    font-size: 10px;
}

.post aside strong,
.post aside span,
.post aside time {
    display: block;
}

.post aside span,
.post aside time {
    color: var(--muted);
    font-size: 10px;
    margin-top: 4px;
}

.post-body {
    padding: 7px 8px 8px;
    min-height: 76px;
    white-space: normal;
}

.post-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    padding-bottom: 4px;
    margin-bottom: 7px;
}

.post-head h3 {
    margin: 0;
    color: #0b6090;
    font-size: 12px;
}

.post-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.post-action-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    justify-content: flex-end;
    align-items: flex-start;
}

.post-action-strip button,
.post-action-strip .button-link,
.post-action-strip summary,
.mini-action {
    font-size: 10px;
    line-height: 1.2;
}

.post-content {
    font-size: 11px;
}

.post-link {
    color: #0088cc;
    font-weight: 700;
}

.bbcode-underline {
    text-decoration: underline;
}

.bbcode-list {
    margin: 8px 0 8px 20px;
    padding: 0;
}

.code-block {
    margin: 8px 0;
    padding: 8px;
    overflow-x: auto;
    background: #f7fbfe;
    border: 1px solid #9abed8;
    font-family: Consolas, "Courier New", monospace;
    white-space: pre-wrap;
}

.avatar {
    display: inline-block;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    border: 1px solid #7da6bf;
    background:
        radial-gradient(circle at 50% 34%, #ffffff 0 22%, transparent 23%),
        radial-gradient(circle at 50% 92%, #ffffff 0 34%, transparent 35%),
        linear-gradient(#9fd8f1, #4c9dcc);
}

.large-avatar {
    width: 48px;
    height: 48px;
    margin: 0 0 5px;
}

.badge,
.deleted-label {
    display: inline-block;
    margin-top: 4px;
    padding: 1px 4px;
    border: 1px solid var(--line);
    background: #eef2f7;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
}

.deleted-label {
    color: var(--danger);
    border-color: #c58b8b;
    background: #f8e6e6;
}

.quote {
    margin: 7px 0 9px;
    padding: 6px 8px;
    border: 1px solid #d0c8aa;
    background: #f4f0dc;
}

.quote div {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 6px;
}

.quote-button,
.multiquote-button {
    padding: 2px 6px;
    font-size: 10px;
}

.multiquote-button.selected {
    background: linear-gradient(#d8b451, #b78f2d);
    color: #1f2937;
}

.signature {
    border-top: 1px dashed var(--line);
    margin-top: 10px;
    padding-top: 7px;
    color: var(--muted);
    font-size: 10px;
}

.reactions {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.reaction-actions,
.reaction-actions form {
    display: inline-flex;
    margin: 0;
}

.reaction-static,
.reaction-actions button {
    min-width: 34px;
    padding: 1px 5px;
    border: 1px solid #b7c9d6;
    background: #f8fbfd;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.15;
}

.zero-reaction {
    opacity: 0.62;
}

.editor-tools,
.smilie-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0;
    padding: 5px;
    border: 1px solid #b7c9d6;
    background: #eef6fc;
}

.editor-tools button,
.smilie-picker button {
    padding: 3px 7px;
    min-width: 26px;
}

.smilie-picker button {
    font-size: 15px;
}

.draft-notice {
    display: inline-block;
    margin: 0 0 6px;
    padding: 3px 6px;
    border: 1px solid #b7c9d6;
    background: #eef6fc;
}

.draft-notice[hidden] {
    display: none;
}

.preview-box {
    background: #eef8fd;
    border-color: #0a8fc3;
}

.report-box {
    position: relative;
    margin: 0;
    background: #fffdf1;
    border: 0;
    padding: 0;
}

.report-box summary {
    cursor: pointer;
    color: #0a527f;
    font-weight: 700;
    list-style: none;
    border: 1px solid #c7a642;
    background: #fffdf1;
    padding: 2px 6px;
}

.report-box form {
    min-width: 220px;
    margin-top: 4px;
    padding: 7px;
    border: 1px solid #c7a642;
    background: #fffdf1;
}

.edit-note {
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 8px;
}

.moderation-controls,
.thread-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

.moderation-controls {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 6px;
    background: rgba(255, 253, 241, 0.72);
}

.moderation-controls form,
.thread-actions form {
    margin: 0;
}

.reason-form input {
    width: 150px;
    display: inline-block;
    margin: 0 4px 0 0;
    padding: 4px;
}

.pending {
    border-color: var(--gold);
}

.deleted-post,
.deleted-row td {
    opacity: 0.78;
    background: #f3e7e7;
}

.pinned-post {
    border-color: var(--gold);
    box-shadow: inset 3px 0 0 var(--gold);
}

.flagship-post {
    border-color: #0a8fc3;
    box-shadow: inset 3px 0 0 #42cfff;
}

.flagship-details {
    margin-bottom: 5px;
    border: 1px solid var(--line);
    background: #e5f0f8;
}

.flagship-details summary {
    cursor: pointer;
    padding: 4px 7px;
    color: #0a527f;
    font-weight: 700;
}

.pending-note {
    color: var(--danger);
    font-weight: 700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stats div {
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px;
}

.stats strong {
    display: block;
    font-size: 28px;
    color: var(--blue);
}

.stats span {
    color: var(--muted);
}

.inline-form {
    margin-top: 14px;
}

.inline-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
}

.pagination a,
.pagination strong {
    display: inline-block;
    padding: 1px 5px;
    margin-right: 0;
    border: 1px solid var(--line);
    background: white;
}

.pagination strong {
    background: #2d9fd1;
    border-color: #087aa9;
    color: white;
}

.topic-action-bar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding: 4px 5px;
    margin: 5px 0;
    border: 1px solid var(--line);
    background: #e5f0f8;
}

.topic-action-left,
.topic-action-right,
.staff-tool-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.topic-action-right {
    justify-content: flex-end;
}

.post-reply-button {
    color: #b31942;
}

.return-link {
    color: var(--muted);
}

.thread-tools {
    position: relative;
}

.thread-tools summary {
    cursor: pointer;
    padding: 2px 7px;
    border: 1px solid #6ca6c9;
    background: linear-gradient(#fefefe, #d6e9f8);
    color: #0a527f;
    font-weight: 700;
}

.thread-tools[open] {
    background: #fffdf1;
}

.moderation-toggle.active {
    background: linear-gradient(#fff3bc, #e2c051);
}

.online-box {
    background: #f7fbfe;
    border: 1px solid var(--line);
    padding: 7px 9px;
}

.online-box h2 {
    margin-top: 0;
    margin-bottom: 4px;
}

.small-note {
    color: var(--muted);
    font-size: 12px;
}

.lock {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 4px;
    background: #dce4ef;
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.error-panel {
    max-width: 640px;
}

.foot {
    background: transparent;
    border-top: 1px solid #b7c9d6;
    color: var(--muted);
    padding: 8px 0 12px;
    font-size: 10px;
}

.foot .wrap {
    background: white;
    border-left: 1px solid #b7c9d6;
    border-right: 1px solid #b7c9d6;
    padding-top: 8px;
    padding-bottom: 8px;
}

.install {
    padding-top: 30px;
}

@media (max-width: 700px) {
    .forum-table {
        font-size: 12px;
    }

    .forum-table th:nth-child(3),
    .forum-table td:nth-child(3) {
        display: none;
    }

    .post {
        grid-template-columns: 1fr;
    }

    .post aside {
        order: -1;
        border-left: 0;
        border-bottom: 1px solid var(--line);
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 8px;
        align-items: center;
    }

    .post aside .avatar {
        grid-row: span 5;
    }

    .post-head,
    .topic-action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .post-action-strip,
    .topic-action-right {
        justify-content: flex-start;
    }

    .topic-action-left,
    .topic-action-right,
    .staff-tool-strip {
        width: 100%;
    }

    .nav-user {
        margin-left: 0;
        width: 100%;
    }

    .wrap {
        padding-left: 6px;
        padding-right: 6px;
    }
}
