.bbs-section,
.bbs-form,
.reply-bbs-form,
.bbs-container,
.post-it-bbs-container,
.free-bbs-container {
    background: rgba(7, 12, 17, 0.84);
    border: 1px solid rgba(156, 203, 179, 0.16);
    border-radius: 2px;
    box-shadow: none;
}

.bbs-section,
.bbs-container,
.post-it-bbs-container,
.free-bbs-container {
    padding: 1rem;
    margin: 1.25rem auto;
    max-width: 840px;
}

.bbs-form,
.reply-bbs-form {
    padding: 1rem;
    margin: 1.4rem auto;
    max-width: 680px;
}

.bbs-form div,
.reply-bbs-form div {
    margin-bottom: 0.95rem;
}

.bbs-form label,
.reply-bbs-form label {
    display: block;
    margin-bottom: 0.4rem;
    color: #d7f2df;
    font-weight: 700;
    text-align: left;
}

.bbs-form input[type="text"],
.reply-bbs-form input[type="text"],
.bbs-form input[type="file"],
.reply-bbs-form input[type="file"],
.bbs-form textarea,
.reply-bbs-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #edf5ee;
}

.bbs-form textarea,
.reply-bbs-form textarea {
    min-height: 130px;
    resize: vertical;
}

.bbs-post,
.post-it-bbs-post,
.post-reply {
    margin-bottom: 1rem;
    padding: 0.9rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.bbs-post h3,
.post-it-bbs-post h3,
.post-reply h3 {
    margin: 0 0 0.65rem;
    text-align: left;
    color: #f0f8f2;
}

.post-meta {
    margin-bottom: 0.8rem;
    color: #bfd2c3;
    text-align: left;
    font-size: 0.92rem;
}

.post-number {
    color: #d7f2df;
    margin-right: 0.5rem;
}

.bbs-post p,
.post-it-bbs-post p,
.post-reply p {
    width: 100%;
    margin-bottom: 0.8rem;
    padding: 0;
    background: transparent;
    color: #edf5ee;
}

.bbs-image {
    margin-top: 0.75rem;
    border-radius: 2px;
    overflow: hidden;
}

.bbs-image img {
    width: min(100%, 520px);
    border-radius: 2px;
}

.replies-container {
    margin-top: 1rem;
}

.post-reply {
    margin-left: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.bbs-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.action-link,
.like-button,
.reply-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.7rem 1rem;
    border-radius: 2px;
    border: 1px solid rgba(156, 203, 179, 0.22);
    background: rgba(156, 203, 179, 0.14);
    color: #edf5ee;
}

.action-link:hover,
.like-button:hover,
.reply-toggle:hover {
    border-color: rgba(156, 203, 179, 0.44);
}

.like-button {
    cursor: pointer;
}

.reply-form {
    margin-top: 0.8rem;
}

.emoji-picker-row {
    display: grid;
    gap: 0.8rem;
}

.courtyard-page .emoji-picker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.8rem;
}

.courtyard-emoji-picker {
    width: 100%;
    border: 1px solid rgba(211, 232, 218, 0.24);
    background: rgba(255, 255, 255, 0.035);
}

.courtyard-emoji-picker summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    color: #d7f2df;
    cursor: pointer;
}

.courtyard-emoji-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(2.75rem, 1fr));
    gap: 0.3rem;
    padding: 0.6rem;
    border-top: 1px solid rgba(211, 232, 218, 0.16);
}

.courtyard-page .emoji-insert {
    min-width: 44px;
    min-height: 44px;
    padding: 0.35rem;
    border: 1px solid rgba(211, 232, 218, 0.24);
    background: rgba(156, 203, 179, 0.1);
    color: #edf5ee;
    font-size: 1.2rem;
    cursor: pointer;
}

.courtyard-page .emoji-insert:hover,
.courtyard-page .emoji-insert:focus-visible,
.courtyard-emoji-picker summary:focus-visible {
    border-color: #a8bfad;
    outline: 2px solid #a8bfad;
    outline-offset: 2px;
}

emoji-picker {
    width: 100%;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
    .post-reply {
        margin-left: 0;
    }
}

.courtyard-page .bbs-actions .action-link,
.courtyard-page .bbs-actions .like-button,
.courtyard-page .bbs-actions .reply-toggle,
.courtyard-page .bbs-form button,
.courtyard-page .reply-bbs-form button,
.courtyard-page .bbs-form input[type="text"],
.courtyard-page .reply-bbs-form input[type="text"],
.courtyard-page .bbs-form input[type="file"],
.courtyard-page .reply-bbs-form input[type="file"] {
    min-height: 44px;
}

.courtyard-page .bbs-actions .action-link,
.courtyard-page .bbs-actions .like-button,
.courtyard-page .bbs-actions .reply-toggle {
    padding: 0.6rem 0.8rem;
}

.bbs-section,
.bbs-form,
.reply-bbs-form,
.bbs-container,
.post-it-bbs-container,
.free-bbs-container {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background: transparent;
}
.bbs-post,
.post-it-bbs-post,
.post-reply {
    padding: 1rem 0;
    border: 0;
    border-top: 1px solid rgba(156, 203, 179, 0.16);
    border-radius: 0;
    background: transparent;
}
.bbs-actions { justify-content: flex-start; }
.action-link,
.like-button,
.reply-toggle { min-height: 2.2rem; padding: 0.4rem 0.7rem; border-radius: 0; background: transparent; }
    .bbs-image,
    .bbs-image img,
    emoji-picker { border-radius: 0; }

/* Posts and forms need visible ownership and nesting. */
.bbs-form,
.reply-bbs-form {
    padding: 1rem;
    border: 1px solid rgba(156, 203, 179, 0.22);
    background: rgba(8, 14, 11, 0.72);
}

.bbs-post,
.post-it-bbs-post {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(156, 203, 179, 0.2);
    background: rgba(10, 17, 13, 0.78);
}

.post-reply {
    margin: .75rem 0 0 1.25rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(156, 203, 179, 0.15);
    border-left: 3px solid rgba(156, 203, 179, 0.38);
    background: rgba(255, 255, 255, 0.035);
}

.bbs-form input[type="text"],
.reply-bbs-form input[type="text"],
.bbs-form input[type="file"],
.reply-bbs-form input[type="file"],
.bbs-form textarea,
.reply-bbs-form textarea {
    border-color: rgba(211, 232, 218, 0.24);
    background: #0a100d;
}

@media (max-width: 720px) {
    .bbs-post,
    .post-it-bbs-post,
    .bbs-form,
    .reply-bbs-form { padding: .85rem; }

    .post-reply { margin-left: .65rem; }
}
.courtyard-page #content .disabled-link {
    color: #a8bfad;
}
.courtyard-page .bbs-form input::placeholder,
.courtyard-page .bbs-form textarea::placeholder,
.courtyard-page .reply-bbs-form input::placeholder,
.courtyard-page .reply-bbs-form textarea::placeholder {
    color: #a8bfad;
    opacity: 1;
}

.post-share-button { min-height: 44px; }
