.comments-section.imageboard {
    --board-ink: #1f2f3d;
    --board-muted: #607487;
    --board-line: #aebdca;
    --board-link: #2f5f8f;
    --board-name: #167246;
    --board-quote: #5f7f22;
    --board-root: #f7fafc;
    --board-reply: #e3edf5;
    margin-top: 42px;
    padding: 0;
    border-top: 1px solid #9cabb8;
    background: #eef4f8;
    color: var(--board-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.discussion-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px 10px;
    border-bottom: 1px solid var(--board-line);
    background: #d8e6f1;
}

.discussion-header h3 {
    margin: 1px 0 0;
    color: #1d3d5a;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 22px;
    line-height: 1;
}

.discussion-kicker {
    color: var(--board-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.discussion-count {
    color: var(--board-muted);
    font-size: 12px;
    white-space: nowrap;
}

.comment-form-home {
    height: 0;
}

.comment-login-notice,
.comments-empty {
    margin: 12px 14px;
    color: var(--board-muted);
}

.comment-login-notice a {
    color: var(--board-link);
    font-weight: 700;
}

.comment-form.imageboard-post-form {
    width: min(calc(100% - 28px), 620px);
    margin: 12px 14px 16px;
    padding: 0;
    border: 1px solid #8ea3b5;
    border-radius: 0;
    background: #f8fbfd;
    box-shadow: 2px 2px 0 rgba(59, 79, 96, 0.14);
}

.comment-form.imageboard-post-form.is-replying {
    width: min(100%, 620px);
    margin: 6px 0 8px;
}

.comment-form label {
    display: block;
    padding: 6px 8px;
    border-bottom: 1px solid #9fb2c2;
    background: #c8dceb;
    color: #294a66;
    font-size: 12px;
    font-weight: 700;
}

.comment-form textarea {
    display: block;
    width: 100%;
    min-height: 92px;
    max-height: 260px;
    margin: 0;
    padding: 8px 9px;
    resize: vertical;
    border: 0;
    border-bottom: 1px solid #b7c5d0;
    border-radius: 0;
    outline: 0;
    background: #ffffff;
    color: var(--board-ink);
    font: 13px/1.45 Arial, Helvetica, sans-serif;
}

.comment-form textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(47, 95, 143, 0.28);
}

.reply-context {
    padding: 7px 8px;
    border-bottom: 1px solid #9fb2c2;
    background: #edf5db;
    color: #405d18;
}

.reply-context strong {
    color: var(--board-quote);
}

.cancel-reply {
    float: right;
    padding: 0;
    border: 0;
    background: transparent;
    color: #7a3030;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.comment-form-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 8px;
}

.comment-verification {
    flex: 1 1 320px;
    min-width: 0;
    padding: 7px;
    border: 1px solid #c2cdd6;
    background: #f1f5f8;
}

.comment-security-label {
    margin-bottom: 5px;
    color: #3d5366;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#comment-turnstile {
    width: min(100%, 360px);
    min-height: 65px;
}

.comment-security-feedback {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 9px;
    margin-top: 5px;
}

.comment-turnstile-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6d7780;
    font-size: 11px;
}

.comment-turnstile-status::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #738493;
    content: '';
}

.comment-turnstile-status.loading::before {
    animation: comment-security-pulse 1s ease-in-out infinite alternate;
}

.comment-turnstile-status.verified {
    color: #187247;
}

.comment-turnstile-status.verified::before {
    background: #2aa665;
}

.comment-turnstile-status.error {
    color: #8b3030;
}

.comment-turnstile-status.error::before {
    background: #bd4c4c;
}

.comment-turnstile-retry {
    padding: 2px 5px;
    border: 1px solid #8a5e5e;
    background: #ffffff;
    color: #7b2c2c;
    font: 10px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

@keyframes comment-security-pulse {
    from { opacity: 0.35; }
    to { opacity: 1; }
}

.comment-form button[type='submit'] {
    flex: 0 0 auto;
    min-width: 124px;
    padding: 7px 11px;
    border: 1px solid #315f84;
    border-radius: 0;
    background: #3b6f99;
    color: #ffffff;
    font: 700 12px Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.comment-form button[type='submit']:hover:not(:disabled) {
    background: #2e5d83;
}

.comment-form button[type='submit']:disabled {
    border-color: #9caab5;
    background: #bec9d1;
    color: #5f6d77;
    cursor: not-allowed;
}

.comment-form-error {
    margin: 10px 14px;
    padding: 7px 9px;
    border: 1px solid #c88f8f;
    background: #fbe8e8;
    color: #7b2727;
    line-height: 1.4;
}

.comment-form .comment-form-error {
    margin: 0;
    border-width: 0 0 1px;
}

.comment-threads {
    padding: 2px 10px 18px;
}

.comment-thread {
    margin: 12px 0 19px;
    padding-bottom: 9px;
    border-bottom: 1px solid #c3ced7;
}

.comment-post-wrapper {
    min-width: 0;
}

.comment-post-wrapper.is-reply {
    margin: 4px 0 0 30px;
}

.imageboard-post.comment {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    scroll-margin-top: var(--comment-anchor-offset, 96px);
    width: fit-content;
    max-width: min(100%, 900px);
    min-width: min(420px, 100%);
    margin: 0;
    padding: 7px 9px 8px;
    border: 0;
    border-left: 3px solid #8ba4b8;
    border-radius: 0;
    background: var(--board-root);
    box-shadow: none;
    color: var(--board-ink);
    transition: none;
}

.imageboard-post.comment:hover {
    box-shadow: none;
    transform: none;
}

.is-reply > .imageboard-post.comment {
    border: 1px solid #b3c2ce;
    border-left: 3px solid #93aabd;
    background: var(--board-reply);
    box-shadow: 1px 1px 0 rgba(67, 85, 101, 0.13);
}

.imageboard-post.comment:target {
    border-color: #b89a42;
    background: #fff8d8;
}

.comment-avatar-link {
    flex: 0 0 auto;
}

.comment-profile-pic {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0;
    border: 1px solid #aab8c4;
    border-radius: 50%;
    background: #ffffff;
    object-fit: cover;
}

.comment-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    word-break: break-word;
}

.comment-meta {
    color: #445564;
    font-size: 11px;
    line-height: 1.45;
}

.poster-name,
.poster-name:visited {
    color: var(--board-name);
    font-weight: 700;
    text-decoration: none;
}

.poster-name:hover {
    text-decoration: underline;
}

.poster-badge,
.pinned-indicator {
    display: inline-block;
    margin-left: 3px;
    padding: 1px 4px;
    border-radius: 0;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    vertical-align: 1px;
}

.poster-badge.badge-admin {
    background: #a23434;
}

.poster-badge.badge-mod {
    background: #2f754c;
}

.pinned-indicator {
    border: 0;
    background: #8d7222;
}

.post-number,
.post-number:visited {
    color: var(--board-link);
    font-weight: 700;
    text-decoration: none;
}

.post-number:hover {
    text-decoration: underline;
}

.comment-actions {
    display: inline-flex;
    gap: 5px;
    margin-left: 7px;
    vertical-align: baseline;
}

.comment-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: #566b7d;
    font: 10px Arial, Helvetica, sans-serif;
    text-decoration: underline;
    cursor: pointer;
}

.comment-btn:hover {
    background: transparent;
    color: #1f4f78;
}

.comment-btn.report {
    border: 0;
    background: transparent;
    color: #8a3f3f;
    font-size: 10px;
}

.comment-btn.pin,
.comment-btn.pin.is-pinned {
    color: #796019;
}

.comment-btn.pin.is-pinned {
    font-weight: 700;
}

.comment-btn.report.reported,
.comment-btn.hidden,
.comment-btn.muted {
    background: transparent;
    color: #2c744c;
    font-weight: 700;
    pointer-events: none;
}

.comment-btn.confirming {
    color: #a43131;
    font-weight: 700;
}

.comment-text {
    margin: 7px 4px 2px 2px;
    color: #202b34;
    font: 13px/1.45 Arial, Helvetica, sans-serif;
    white-space: normal;
}

.comment-moderation-note {
    margin: 0;
    padding: 5px 8px;
    color: #65727c;
    background: #f1f5f8;
    border-top: 1px solid #d2dbe2;
    font: 11px/1.35 Arial, Helvetica, sans-serif;
}

.comment-reactions {
    position: relative;
    margin: 4px 2px 0;
}

.reaction-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.reaction-chip,
.reaction-picker-toggle,
.reaction-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #aebdc8;
    background: #f7fafc;
    color: #26333c;
    font-family: Arial, Helvetica, sans-serif;
}

button.reaction-chip,
.reaction-picker-toggle,
.reaction-option {
    cursor: pointer;
}

.reaction-chip {
    min-height: 27px;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 14px;
    font-size: 15px;
}

.reaction-chip[hidden] {
    display: none;
}

.reaction-chip.is-selected {
    background: #e6f1fb;
    border-color: #4d8ebe;
    box-shadow: inset 0 0 0 1px rgba(77, 142, 190, 0.15);
}

.reaction-count {
    color: #435766;
    font-size: 11px;
    font-weight: 700;
}

.reaction-picker-toggle {
    width: 20px;
    height: 20px;
    padding: 0;
    border-color: transparent;
    border-radius: 50%;
    background: transparent;
    color: #74838e;
    font-size: 13px;
    line-height: 1;
    opacity: 0.72;
}

.reaction-chip:hover,
.reaction-picker-toggle:hover,
.reaction-option:hover,
.reaction-option.is-selected {
    background: #e9f1f6;
    border-color: #718fa4;
}

.reaction-picker-toggle:hover {
    background: #edf2f5;
    border-color: #bdc9d1;
    opacity: 1;
}

.reaction-picker {
    position: absolute;
    z-index: 12;
    bottom: 27px;
    left: 0;
    display: flex;
    gap: 3px;
    padding: 5px;
    background: #ffffff;
    border: 1px solid #90a5b4;
    box-shadow: 0 4px 12px rgba(39, 54, 65, 0.2);
}

.reaction-picker[hidden] {
    display: none;
}

.reaction-option {
    width: 34px;
    height: 32px;
    padding: 0;
    font-size: 19px;
}

.reaction-feedback {
    display: block;
    min-height: 13px;
    margin-top: 2px;
    color: #5a6872;
    font-size: 10px;
}

.reaction-chip:focus-visible,
.reaction-picker-toggle:focus-visible,
.reaction-option:focus-visible {
    outline: 2px solid #2f6f9f;
    outline-offset: 1px;
}

.quote-link,
.quote-link:visited {
    color: var(--board-quote);
    font-weight: 700;
    text-decoration: none;
}

.quote-link:hover {
    text-decoration: underline;
}

.pinned-comment {
    border-left-color: #a98b2e !important;
}

.comment-form-slot {
    min-height: 0;
}

.comment-pagination {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 13px 14px 16px;
    border-top: 1px solid var(--board-line);
    background: var(--board-root);
}

.comment-page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.comment-page-link,
.comment-page-direction {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid var(--board-line);
    background: var(--board-reply);
    color: var(--board-link);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.comment-page-link {
    min-width: 34px;
    padding: 7px 9px;
}

.comment-page-direction {
    width: fit-content;
    padding: 7px 11px;
}

.comment-page-direction:last-child {
    justify-self: end;
}

.comment-page-link:hover,
.comment-page-direction:hover {
    border-color: var(--board-link);
    filter: brightness(0.96);
}

.comment-page-link:focus-visible,
.comment-page-direction:focus-visible {
    outline: 2px solid var(--board-link);
    outline-offset: 2px;
}

.comment-page-link.is-current {
    border-color: #315f84;
    background: #315f84;
    color: #ffffff;
}

.comment-page-direction.is-disabled {
    color: var(--board-muted);
    cursor: default;
    opacity: 0.58;
}

.comment-page-ellipsis {
    padding: 0 2px;
    color: var(--board-muted);
    font-weight: 700;
}

@media (max-width: 680px) {
    .comments-section.imageboard {
        margin-right: -12px;
        margin-left: -12px;
    }

    .comment-threads {
        padding-right: 6px;
        padding-left: 6px;
    }

    .comment-post-wrapper.is-reply {
        margin-left: 12px;
    }

    .imageboard-post.comment {
        width: 100%;
        min-width: 0;
    }

    .comment-profile-pic {
        width: 38px;
        height: 38px;
    }

    .comment-actions {
        display: flex;
        flex-wrap: wrap;
        margin: 3px 0 0;
    }

    .comment-form-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-form button[type='submit'] {
        width: 100%;
    }

    .comment-pagination {
        grid-template-columns: 1fr 1fr;
    }

    .comment-page-numbers {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .comment-page-direction {
        grid-row: 2;
    }
}
