/* =========================
   FORUM PAGE
========================= */

.forum-page {
    width: min(1080px, calc(100% - 40px));

    margin: 30px auto 75px;
}


/* =========================
   INTRO
========================= */

.forum-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 32px;

    margin-bottom: 30px;
    padding: 34px 36px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.13);
    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 244, 199, 0.96),
            rgba(255, 250, 224, 0.88)
        );

    box-shadow:
        0 4px 16px rgba(80, 60, 20, 0.055);
}

.forum-intro > div {
    min-width: 0;
    max-width: 680px;
}

.forum-intro h1 {
    margin: 0 0 10px;

    color: #40361e;

    font-size: clamp(28px, 4vw, 38px);
    font-weight: 780;
    line-height: 1.15;

    letter-spacing: -0.025em;
}

.forum-intro p {
    max-width: 620px;

    margin: 0;

    color: #74684a;

    font-size: 14px;
    line-height: 1.65;
}

.forum-intro .primary-button {
    flex: 0 0 auto;

    min-height: 42px;
    padding: 9px 17px;

    border-radius: 999px;

    white-space: nowrap;

    box-shadow:
        0 3px 9px rgba(80, 60, 20, 0.07);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.forum-intro .primary-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 5px 13px rgba(80, 60, 20, 0.1);
}

/* =========================
   FORUM SECTION
========================= */

.forum-section {
    padding: 24px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.11);
    border-radius: 18px;

    background: rgba(255, 252, 235, 0.72);

    box-shadow:
        0 3px 13px rgba(80, 60, 20, 0.04);
}


/* Section heading */

.forum-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
    padding-bottom: 15px;

    border-bottom: 1px solid rgba(90, 70, 20, 0.09);
}

.forum-heading h2 {
    margin: 0;

    color: #44391f;

    font-size: 21px;
    font-weight: 750;
    line-height: 1.25;
}

.forum-heading span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;
    padding: 5px 11px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.1);
    border-radius: 999px;

    background: rgba(255, 232, 145, 0.38);

    color: #6d5c30;

    font-size: 11.5px;
    font-weight: 700;

    white-space: nowrap;
}

/* =========================
   THREADS
========================= */

.thread-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}

.thread-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 19px 20px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.12);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.82);

    box-shadow:
        0 2px 8px rgba(80, 60, 20, 0.035);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.thread-card:hover {
    transform: translateY(-2px);

    border-color: rgba(90, 70, 20, 0.21);

    box-shadow:
        0 7px 18px rgba(80, 60, 20, 0.075);
}


/* Main content */

.thread-main {
    min-width: 0;
    flex: 1;
}

.thread-main h3 {
    margin: 0 0 7px;

    font-size: 17px;
    line-height: 1.3;
}

.thread-main h3 a {
    display: inline;

    color: #40361e;

    font-weight: 750;
    text-decoration: none;

    overflow-wrap: anywhere;

    transition: color 0.18s ease;
}

.thread-main h3 a:hover {
    color: #765f20;
    text-decoration: underline;

    text-underline-offset: 2px;
}


/* Preview */

.thread-preview {
    display: -webkit-box;

    max-width: 760px;

    margin: 0 0 12px;

    overflow: hidden;

    color: #746a50;

    font-size: 12.5px;
    line-height: 1.55;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* Metadata */

.thread-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;

    font-size: 11px;
}

.thread-meta a,
.thread-meta span {
    display: inline-flex;
    align-items: center;

    min-height: 25px;
    padding: 4px 9px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.09);
    border-radius: 999px;

    background: rgba(255, 240, 180, 0.28);

    color: #6e6245;

    line-height: 1;

    white-space: nowrap;
}

.thread-meta a {
    font-weight: 650;
    text-decoration: none;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.thread-meta a:hover {
    background: rgba(255, 232, 145, 0.48);

    color: #4f411f;
}


/* Open discussion */

.thread-open {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.11);
    border-radius: 50%;

    background: rgba(255, 232, 145, 0.48);

    color: #59491f;

    font-size: 24px;
    line-height: 1;

    text-decoration: none;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.thread-open:hover {
    transform: translateX(2px);

    border-color: rgba(90, 70, 20, 0.2);

    background: rgba(255, 225, 115, 0.7);
}

/* =========================
   EMPTY FORUM
========================= */

.empty-forum {
    max-width: 620px;

    margin: 10px auto;
    padding: 48px 30px;

    box-sizing: border-box;

    border: 1px dashed rgba(90, 70, 20, 0.2);
    border-radius: 17px;

    background: rgba(255, 252, 235, 0.65);

    text-align: center;
}

.empty-forum-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: rgba(255, 232, 145, 0.48);

    font-size: 27px;
}

.empty-forum h3 {
    margin: 0 0 8px;

    color: #493d20;

    font-size: 19px;
    font-weight: 750;
    line-height: 1.3;
}

.empty-forum p {
    max-width: 430px;

    margin: 0 auto 22px;

    color: #766b50;

    font-size: 13px;
    line-height: 1.6;
}

.empty-forum .primary-button {
    min-height: 40px;
    padding: 8px 16px;

    border-radius: 999px;
}


/* =========================
   FORUM OVERVIEW — MOBILE
========================= */

@media (max-width: 700px) {

    .forum-page {
        width: calc(100% - 28px);

        margin-top: 22px;
        margin-bottom: 55px;
    }

    .forum-intro {
        flex-direction: column;
        align-items: stretch;

        gap: 20px;

        margin-bottom: 22px;
        padding: 24px 22px;
    }

    .forum-intro h1 {
        font-size: 28px;
    }

    .forum-intro p {
        font-size: 13px;
    }

    .forum-intro .primary-button {
        align-self: flex-start;

        white-space: normal;
        text-align: center;
    }


    /* Discussion section */

    .forum-section {
        padding: 16px;
    }

    .forum-heading {
        gap: 12px;

        margin-bottom: 15px;
        padding-bottom: 13px;
    }

    .forum-heading h2 {
        font-size: 19px;
    }


    /* Thread cards */

    .thread-card {
        align-items: flex-start;

        gap: 12px;

        padding: 16px;
    }

    .thread-main h3 {
        font-size: 16px;
    }

    .thread-preview {
        margin-bottom: 11px;

        font-size: 12px;
    }

    .thread-meta {
        gap: 5px;
    }

    .thread-meta a,
    .thread-meta span {
        min-height: 24px;
        padding: 4px 7px;

        font-size: 10px;
    }

    .thread-open {
        width: 34px;
        height: 34px;

        margin-top: 2px;

        font-size: 21px;
    }


    /* Empty state */

    .empty-forum {
        padding: 38px 20px;
    }
}


@media (max-width: 420px) {

    .forum-page {
        width: calc(100% - 24px);
    }

    .forum-intro {
        padding: 22px 18px;
    }

    .forum-intro h1 {
        font-size: 25px;
    }

    .forum-intro .primary-button {
        width: 100%;

        box-sizing: border-box;
    }

    .forum-heading {
        align-items: flex-start;
    }

    .thread-card {
        position: relative;

        padding: 15px;
    }

    .thread-main {
        padding-right: 32px;
    }

    .thread-open {
        position: absolute;

        top: 14px;
        right: 14px;
    }

    .thread-meta {
        padding-right: 0;
    }
}

/* =========================
   CREATE THREAD FORM
========================= */

.create-thread-section {
    width: 100%;
    max-width: 760px;

    margin: 0 auto;
    padding: 34px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.13);
    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 244, 199, 0.94),
            rgba(255, 250, 224, 0.86)
        );

    box-shadow:
        0 5px 18px rgba(80, 60, 20, 0.055);
}


/* Header */

.create-thread-section h1 {
    margin: 0 0 8px;

    color: #40361e;

    font-size: clamp(27px, 4vw, 34px);
    font-weight: 780;
    line-height: 1.2;

    letter-spacing: -0.02em;
}

.create-thread-section > p {
    margin: 0 0 28px;

    color: #74684a;

    font-size: 13.5px;
    line-height: 1.6;
}

.create-thread-section > p strong {
    color: #514526;
}


/* Form */

.create-thread-form {
    display: block;

    width: 100%;
}


/* Fields */

.create-thread-form .forum-form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;

    margin: 0 0 22px;
}

.create-thread-form .forum-form-group label {
    display: block;

    margin: 0 0 7px;

    color: #493d20;

    font-size: 13px;
    font-weight: 700;
}


/* Input + textarea */

.create-thread-form .forum-form-group input[type="text"],
.create-thread-form .forum-form-group textarea {
    display: block;

    width: 100%;
    max-width: 100%;

    margin: 0;
    padding: 12px 14px;

    box-sizing: border-box;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;

    color: #332d20;

    background: rgba(255, 255, 255, 0.9);

    border: 1px solid rgba(90, 70, 20, 0.2);
    border-radius: 11px;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.create-thread-form .forum-form-group input[type="text"] {
    min-height: 45px;
}

.create-thread-form .forum-form-group textarea {
    min-height: 230px;

    resize: vertical;
}

.create-thread-form .forum-form-group input[type="text"]::placeholder,
.create-thread-form .forum-form-group textarea::placeholder {
    color: #9a927e;
}


/* Focus */

.create-thread-form .forum-form-group input[type="text"]:focus,
.create-thread-form .forum-form-group textarea:focus {
    border-color: rgba(151, 119, 35, 0.65);

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(180, 137, 32, 0.12);
}


/* Help text */

.create-thread-form .forum-form-group small {
    display: block;

    margin-top: 6px;

    color: #81765b;

    font-size: 11px;
    line-height: 1.4;
}


/* Actions */

.forum-form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 14px;

    margin-top: 6px;
}

.create-thread-form .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 9px 18px;

    box-sizing: border-box;

    border: 1px solid #d5bd68;
    border-radius: 999px;

    background: #f3d86f;
    color: #40361e;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 3px 8px rgba(80, 60, 20, 0.08);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.create-thread-form .primary-button:hover {
    transform: translateY(-1px);

    background: #efd05b;
    border-color: #cdb04f;

    box-shadow:
        0 5px 11px rgba(80, 60, 20, 0.12);
}

.forum-cancel-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 7px 13px;

    box-sizing: border-box;

    border-radius: 999px;

    color: #706348;

    font-size: 12.5px;
    font-weight: 650;

    text-decoration: none;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.forum-cancel-button:hover {
    color: #493d20;

    background: rgba(255, 255, 255, 0.55);
}


/* =========================
   CREATE THREAD — MOBILE
========================= */

@media (max-width: 700px) {

    .create-thread-section {
        padding: 25px 22px;
    }

    .create-thread-section h1 {
        font-size: 27px;
    }

    .create-thread-form .forum-form-group textarea {
        min-height: 200px;
    }
}


@media (max-width: 420px) {

    .create-thread-section {
        padding: 22px 18px;
    }

    .create-thread-section h1 {
        font-size: 25px;
    }

    .forum-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .create-thread-form .primary-button,
    .forum-cancel-button {
        width: 100%;

        box-sizing: border-box;

        text-align: center;
    }
}

/* Error message */

.create-thread-section .forum-error {
    margin: 0 0 22px;
    padding: 12px 15px;

    box-sizing: border-box;

    border: 1px solid rgba(166, 69, 69, 0.22);
    border-radius: 11px;

    background: rgba(255, 235, 235, 0.82);

    color: #7c3636;

    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}


/* =========================
   THREAD PAGE
========================= */

.forum-thread {
    margin-bottom: 34px;

    overflow: hidden;

    border: 1px solid rgba(90, 70, 20, 0.13);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.88);

    box-shadow:
        0 5px 18px rgba(80, 60, 20, 0.055);
}


/* Thread header */

.forum-thread-header {
    padding: 28px 30px 24px;

    border-bottom: 1px solid rgba(90, 70, 20, 0.09);

    background:
        linear-gradient(
            135deg,
            rgba(255, 244, 199, 0.96),
            rgba(255, 250, 224, 0.88)
        );
}

.forum-thread-header h1 {
    max-width: 850px;

    margin: 0 0 14px;

    color: #40361e;

    font-size: clamp(27px, 4vw, 36px);
    font-weight: 780;
    line-height: 1.2;

    letter-spacing: -0.025em;

    overflow-wrap: anywhere;
}


/* Thread metadata */

.forum-thread-header .thread-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;

    margin: 0;
}

.forum-thread-header .thread-meta a,
.forum-thread-header .thread-meta span {
    min-height: 26px;
    padding: 4px 9px;

    background: rgba(255, 255, 255, 0.52);

    font-size: 11px;
}


/* Thread body */

.forum-thread-body {
    min-height: 100px;

    padding: 28px 30px 32px;

    box-sizing: border-box;

    color: #403a2d;

    font-size: 14px;
    line-height: 1.75;

    overflow-wrap: anywhere;
}

/* =========================
   REPLIES
========================= */

.forum-replies {
    margin-top: 32px;
}

.forum-replies > .forum-heading {
    margin-bottom: 16px;
}


/* Reply list */

.reply-list {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* Individual reply */

.forum-reply {
    overflow: hidden;

    border: 1px solid rgba(90, 70, 20, 0.12);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.86);

    box-shadow:
        0 2px 9px rgba(80, 60, 20, 0.035);

    scroll-margin-top: 20px;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.forum-reply:hover {
    border-color: rgba(90, 70, 20, 0.2);

    box-shadow:
        0 5px 14px rgba(80, 60, 20, 0.055);
}


/* Reply header */

.reply-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    padding: 11px 16px;

    border-bottom: 1px solid rgba(90, 70, 20, 0.07);

    background: rgba(255, 244, 199, 0.42);

    color: #776c52;

    font-size: 10.5px;
}

.reply-author {
    display: inline-flex;
    align-items: center;

    color: #514526;

    font-size: 11.5px;
    font-weight: 700;

    text-decoration: none;

    transition: color 0.18s ease;
}

.reply-author:hover {
    color: #806820;

    text-decoration: underline;
    text-underline-offset: 2px;
}

.reply-header > span {
    margin-right: auto;

    white-space: nowrap;
}


/* Reply body */

.reply-body {
    min-height: 55px;

    padding: 17px 18px 20px;

    color: #433d30;

    font-size: 13.5px;
    line-height: 1.7;

    overflow-wrap: anywhere;
}


/* Empty replies */

.no-replies {
    padding: 30px 22px;

    border: 1px dashed rgba(90, 70, 20, 0.18);
    border-radius: 15px;

    background: rgba(255, 252, 235, 0.6);

    text-align: center;
}

.no-replies p {
    margin: 0;

    color: #786d53;

    font-size: 13px;
    line-height: 1.6;
}

/* =========================
   REPLY FORM SECTION
========================= */

.reply-form-section {
    margin-top: 28px;
    padding: 25px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.12);
    border-radius: 17px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 244, 199, 0.82),
            rgba(255, 250, 224, 0.72)
        );
}

.reply-form-section h2 {
    margin: 0 0 18px;

    color: #44391f;

    font-size: 20px;
    font-weight: 750;
    line-height: 1.3;
}


/* Login message */

.reply-login {
    margin: 0 0 14px;

    color: #746a50;

    font-size: 13px;
    line-height: 1.6;
}


/* =========================
   REPLY FORM
========================= */

.reply-form {
    display: block;

    width: 100%;
}

.reply-form .forum-form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;

    margin: 0 0 14px;
}

.reply-form .forum-form-group textarea {
    display: block;

    width: 100%;
    max-width: 100%;
    min-height: 155px;

    margin: 0;
    padding: 13px 14px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.2);
    border-radius: 11px;

    background: rgba(255, 255, 255, 0.92);
    color: #332d20;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.55;

    resize: vertical;
    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.reply-form .forum-form-group textarea::placeholder {
    color: #9a927e;
}

.reply-form .forum-form-group textarea:focus {
    border-color: rgba(151, 119, 35, 0.65);

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(180, 137, 32, 0.12);
}

.reply-form .forum-form-group small {
    display: block;

    margin-top: 6px;

    color: #81765b;

    font-size: 11px;
    line-height: 1.4;
}


/* Send reply button */

.reply-form .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 9px 18px;

    box-sizing: border-box;

    border: 1px solid #d5bd68;
    border-radius: 999px;

    background: #f3d86f;
    color: #40361e;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    box-shadow:
        0 3px 8px rgba(80, 60, 20, 0.08);

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.reply-form .primary-button:hover {
    transform: translateY(-1px);

    background: #efd05b;
    border-color: #cdb04f;

    box-shadow:
        0 5px 11px rgba(80, 60, 20, 0.12);
}


/* Logged-out CTA */

.reply-form-section > .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 16px;

    border-radius: 999px;
}


/* =========================
   THREAD ACTIONS
========================= */

.thread-owner-actions {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 15px;
}

.thread-owner-actions form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin: 0;
}


/* Edit + delete */

.forum-edit-button,
.forum-delete-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;
    padding: 6px 10px;

    box-sizing: border-box;

    border-radius: 999px;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}


/* Edit */

.forum-edit-button {
    border: 1px solid rgba(90, 70, 20, 0.15);

    background: rgba(255, 255, 255, 0.58);
    color: #625532;
}

.forum-edit-button:hover {
    transform: translateY(-1px);

    border-color: rgba(90, 70, 20, 0.25);

    background: rgba(255, 255, 255, 0.9);
}


/* Delete */

.forum-delete-button {
    border: 1px solid rgba(156, 69, 69, 0.18);

    background: rgba(255, 245, 245, 0.65);
    color: #8a4545;
}

.forum-delete-button:hover {
    transform: translateY(-1px);

    border-color: rgba(156, 69, 69, 0.3);

    background: #fff0f0;
}


/* Report */

.forum-thread-header > .forum-report-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    margin-top: 8px;
    padding: 6px 10px;

    box-sizing: border-box;

    border: 1px solid transparent;
    border-radius: 999px;

    background: transparent;
    color: #81765b;

    font-family: inherit;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.forum-thread-header > .forum-report-button:hover {
    border-color: rgba(90, 70, 20, 0.1);

    background: rgba(255, 255, 255, 0.42);
    color: #5e5339;
}

/* =========================
   FORUM INLINE EDITING
========================= */

.forum-inline-edit {
    margin: 0 22px 22px;
    padding: 22px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.13);
    border-radius: 14px;

    background: rgba(255, 249, 220, 0.72);
}

.forum-inline-edit h3 {
    margin: 0 0 18px;

    color: #493d20;

    font-size: 17px;
    font-weight: 750;
    line-height: 1.3;
}


/* Fields */

.forum-inline-edit .forum-form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;

    width: 100%;

    margin: 0 0 17px;
}

.forum-inline-edit .forum-form-group label {
    display: block;

    margin: 0 0 7px;

    color: #493d20;

    font-size: 12px;
    font-weight: 700;
}

.forum-inline-edit input[type="text"],
.forum-inline-edit textarea {
    display: block;

    width: 100%;
    max-width: 100%;

    padding: 11px 13px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.2);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.94);
    color: #332d20;

    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.55;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background-color 0.18s ease;
}

.forum-inline-edit textarea {
    min-height: 150px;

    resize: vertical;
}

.forum-inline-edit input[type="text"]:focus,
.forum-inline-edit textarea:focus {
    border-color: rgba(151, 119, 35, 0.65);

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(180, 137, 32, 0.12);
}


/* Actions */

.forum-edit-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 3px;
}

.forum-inline-edit .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;
    padding: 8px 15px;

    box-sizing: border-box;

    border: 1px solid #d5bd68;
    border-radius: 999px;

    background: #f3d86f;
    color: #40361e;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.forum-inline-edit .primary-button:hover {
    background: #efd05b;
    border-color: #cdb04f;
}

.forum-cancel-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;
    padding: 8px 13px;

    box-sizing: border-box;

    border: 1px solid transparent;
    border-radius: 999px;

    background: transparent;
    color: #706348;

    font-family: inherit;
    font-size: 12px;
    font-weight: 650;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background-color 0.18s ease;
}

.forum-cancel-edit:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #493d20;
}

/* =========================
   REPLY ACTIONS
========================= */

.delete-reply-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;

    margin: 0;
}

.reply-header .forum-edit-button,
.reply-header .forum-delete-button {
    flex: 0 0 auto;

    min-height: 28px;
    padding: 5px 8px;

    font-size: 10px;
}


/* Reply report */

.reply-header .forum-report-button {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 28px;

    margin: 0;
    padding: 5px 8px;

    box-sizing: border-box;

    border: 1px solid transparent;
    border-radius: 999px;

    background: transparent;
    color: #81765b;

    font-family: inherit;
    font-size: 10px;
    font-weight: 650;
    line-height: 1;

    cursor: pointer;

    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

.reply-header .forum-report-button:hover {
    border-color: rgba(90, 70, 20, 0.1);

    background: rgba(255, 255, 255, 0.55);
    color: #5e5339;
}

/* =========================
   FORUM REPORT MODAL
========================= */

.forum-report-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;

    background: rgba(35, 30, 20, 0.48);

    backdrop-filter: blur(3px);
}

.forum-report-box {
    position: relative;

    width: min(100%, 520px);
    max-height: calc(100vh - 40px);

    padding: 28px;

    box-sizing: border-box;
    overflow-y: auto;

    border: 1px solid rgba(90, 70, 20, 0.14);
    border-radius: 19px;

    background: #fffdf4;

    box-shadow:
        0 18px 55px rgba(35, 30, 20, 0.2);
}

.forum-report-box h2 {
    margin: 0 40px 8px 0;

    color: #40361e;

    font-size: 22px;
    font-weight: 760;
    line-height: 1.25;
}

.forum-report-box > p {
    margin: 0 0 23px;

    color: #746a50;

    font-size: 13px;
    line-height: 1.6;
}


/* Close */

.forum-report-close {
    position: absolute;
    top: 17px;
    right: 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    border: 1px solid rgba(90, 70, 20, 0.1);
    border-radius: 50%;

    background: rgba(255, 244, 199, 0.5);
    color: #655938;

    font-family: inherit;
    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease;
}

.forum-report-close:hover {
    transform: scale(1.04);

    background: rgba(255, 232, 145, 0.7);
}

.forum-report-box .forum-error {
    margin: 0 0 18px;
    padding: 11px 14px;

    box-sizing: border-box;

    border: 1px solid rgba(166, 69, 69, 0.22);
    border-radius: 10px;

    background: rgba(255, 235, 235, 0.82);
    color: #7c3636;

    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}


/* Fields */

.forum-report-box .forum-form-group {
    display: flex;
    flex-direction: column;

    margin: 0 0 18px;
}

.forum-report-box .forum-form-group label {
    margin: 0 0 7px;

    color: #493d20;

    font-size: 12px;
    font-weight: 700;
}

.forum-report-box .forum-form-group label span {
    color: #887d63;

    font-size: 10.5px;
    font-weight: 500;
}

.forum-report-box select,
.forum-report-box textarea {
    width: 100%;

    padding: 11px 13px;

    box-sizing: border-box;

    border: 1px solid rgba(90, 70, 20, 0.2);
    border-radius: 10px;

    background: #fff;
    color: #332d20;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.forum-report-box textarea {
    min-height: 120px;

    line-height: 1.55;

    resize: vertical;
}

.forum-report-box select:focus,
.forum-report-box textarea:focus {
    border-color: rgba(151, 119, 35, 0.65);

    box-shadow:
        0 0 0 3px rgba(180, 137, 32, 0.12);
}

.forum-report-box .forum-form-group small {
    margin-top: 6px;

    color: #81765b;

    font-size: 10.5px;
}


/* Report submit */

.forum-report-box .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 8px 15px;

    box-sizing: border-box;

    border: 1px solid #d5bd68;
    border-radius: 999px;

    background: #f3d86f;
    color: #40361e;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.forum-report-box .primary-button:hover {
    background: #efd05b;
    border-color: #cdb04f;
}


/* Successful report */

.forum-report-success {
    margin: 0 0 20px;
    padding: 12px 15px;

    border: 1px solid rgba(72, 130, 78, 0.2);
    border-radius: 11px;

    background: rgba(235, 249, 232, 0.9);
    color: #426b43;

    font-size: 12.5px;
    font-weight: 650;
    line-height: 1.5;
}

/* =========================
   THREAD PAGE — MOBILE
========================= */

@media (max-width: 700px) {

    .forum-thread-header {
        padding: 22px 20px 19px;
    }

    .forum-thread-header h1 {
        margin-bottom: 12px;

        font-size: 27px;
    }

    .forum-thread-body {
        min-height: 0;

        padding: 22px 20px 25px;

        font-size: 13.5px;
        line-height: 1.7;
    }

    .thread-owner-actions {
        margin-top: 13px;
    }

    .reply-header {
        padding: 10px 13px;
    }

    .reply-body {
        padding: 15px 15px 18px;
    }

    .forum-inline-edit {
        margin: 0 14px 16px;
        padding: 18px;
    }

    .reply-form-section {
        padding: 21px 19px;
    }

    .forum-report-box {
        padding: 24px 20px;
    }
}


@media (max-width: 420px) {

    .forum-thread-header {
        padding: 20px 17px 18px;
    }

    .forum-thread-header h1 {
        font-size: 24px;
    }

    .forum-thread-body {
        padding: 20px 17px 23px;
    }


    /* Actions may wrap instead of overflowing */

    .thread-owner-actions,
    .thread-owner-actions form {
        width: 100%;
    }

    .reply-header {
        align-items: flex-start;
    }

    .reply-header > span {
        flex-basis: 100%;

        margin-right: 0;
    }

    .delete-reply-form {
        margin-right: auto;
    }


    /* Editing */

    .forum-inline-edit {
        margin: 0 10px 14px;
        padding: 16px;
    }

    .forum-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-inline-edit .primary-button,
    .forum-cancel-edit {
        width: 100%;
    }


    /* Reply */

    .reply-form-section {
        padding: 19px 16px;
    }

    .reply-form .primary-button {
        width: 100%;
    }


    /* Report modal */

    .forum-report-modal {
        padding: 12px;
    }

    .forum-report-box {
        max-height: calc(100vh - 24px);

        padding: 23px 17px 18px;

        border-radius: 16px;
    }

    .forum-report-box h2 {
        font-size: 20px;
    }

    .forum-report-box .forum-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .forum-report-box .primary-button,
    .forum-report-box .forum-cancel-edit {
        width: 100%;
    }
}

/* =========================
   FORUM — ACCESSIBILITY
========================= */

.forum-intro .primary-button:focus-visible,
.thread-main h3 a:focus-visible,
.thread-meta a:focus-visible,
.thread-open:focus-visible,
.empty-forum .primary-button:focus-visible,
.create-thread-form input:focus-visible,
.create-thread-form textarea:focus-visible,
.forum-edit-button:focus-visible,
.forum-delete-button:focus-visible,
.forum-report-button:focus-visible,
.forum-inline-edit input:focus-visible,
.forum-inline-edit textarea:focus-visible,
.forum-inline-edit .primary-button:focus-visible,
.forum-cancel-edit:focus-visible,
.reply-author:focus-visible,
.reply-form textarea:focus-visible,
.reply-form .primary-button:focus-visible,
.forum-report-close:focus-visible,
.forum-report-box select:focus-visible,
.forum-report-box textarea:focus-visible,
.forum-report-box .primary-button:focus-visible,
.forum-cancel-button:focus-visible {
    outline: 3px solid rgba(180, 137, 32, 0.48);
    outline-offset: 3px;
}


/* Respect reduced-motion preferences */

@media (prefers-reduced-motion: reduce) {

    .forum-intro .primary-button,
    .thread-card,
    .thread-main h3 a,
    .thread-meta a,
    .thread-open {
        transition: none;
    }

    .forum-intro .primary-button:hover,
    .thread-card:hover,
    .thread-open:hover {
        transform: none;
    }
}