:root {
    --brown: #5b4636;
    --brown-dark: #3b2f2f;
    --brown-soft: #846d5b;

    --cream: #f7f2ea;
    --paper: #fffdf9;

    --border: #d9c9b3;
    --border-light: #eadfd1;

    --text: #3b332e;
    --muted: #948a82;

    --green: #596b50;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: transparent;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
}

button,
input,
textarea {
    font-family: inherit;
}

.comments-widget {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 8px 0 20px;
}


/* ---------------------------------------------------
   TITLE
--------------------------------------------------- */

h1 {
    margin: 0 0 26px;
    text-align: center;

    color: #171311;

    font-size: 1.85rem;
    font-weight: 500;
}


/* ---------------------------------------------------
   COMMENT FORM
--------------------------------------------------- */

.comment-form {
    position: relative;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: rgba(255, 253, 249, 0.96);

    padding: 18px;
}


.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}


.field {
    margin-bottom: 16px;
}


.field label {
    display: block;

    margin-bottom: 6px;

    color: var(--brown);

    font-size: 0.88rem;
}


.private-note {
    margin-left: 4px;

    color: var(--muted);

    font-size: 0.76rem;
    font-style: italic;
}


input,
textarea {
    width: 100%;

    border: 1px solid var(--border-light);
    border-radius: 6px;

    background: #fff;

    color: var(--text);

    padding: 10px 11px;

    font-size: 0.96rem;
}


input:focus,
textarea:focus {
    outline: none;

    border-color: #aa8e72;

    box-shadow:
        0 0 0 2px
        rgba(91, 70, 54, 0.08);
}


textarea {
    min-height: 120px;

    resize: vertical;

    line-height: 1.55;

    padding-bottom: 42px;
}


.comment-field {
    position: relative;
}


.comment-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: -45px;
    padding: 0 11px 13px;

    position: relative;
    z-index: 2;

    pointer-events: none;
}


.comment-tools > * {
    pointer-events: auto;
}


#characterCount {
    color: var(--muted);

    font-size: 0.78rem;
}


/* ---------------------------------------------------
   EMOJI
--------------------------------------------------- */

.emoji-wrapper {
    position: relative;
}


.emoji-button {
    width: 29px;
    height: 29px;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--brown-soft);

    font-size: 1.15rem;
    line-height: 1;

    cursor: pointer;
}


.emoji-button:hover {
    color: var(--brown-dark);
}


.emoji-picker {
    position: absolute;

    left: 0;
    bottom: 37px;

    width: 220px;

    padding: 10px;

    display: grid;
    grid-template-columns:
        repeat(6, 1fr);

    gap: 5px;

    border: 1px solid var(--border);

    border-radius: 8px;

    background: var(--paper);

    box-shadow:
        0 7px 24px
        rgba(55, 40, 30, 0.12);

    z-index: 20;
}


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


.emoji-picker button {
    width: 28px;
    height: 28px;

    padding: 0;

    border: 0;
    border-radius: 4px;

    background: transparent;

    font-size: 1rem;

    cursor: pointer;
}


.emoji-picker button:hover {
    background: var(--cream);
}


/* ---------------------------------------------------
   REPLY MODE
--------------------------------------------------- */

.reply-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin: -2px -2px 16px;

    padding: 9px 11px;

    border-left:
        3px solid var(--brown-soft);

    background: var(--cream);

    color: var(--brown);

    font-size: 0.82rem;
}


.reply-banner[hidden] {
    display: none;
}


.cancel-reply {
    padding: 0;

    border: 0;

    background: transparent;

    color: var(--muted);

    font-size: 0.78rem;

    cursor: pointer;
}


.cancel-reply:hover {
    color: var(--brown-dark);
}


/* ---------------------------------------------------
   FORM FOOTER
--------------------------------------------------- */

.form-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 16px;

    margin-top: 13px;
}


.form-message {
    min-height: 18px;

    color: var(--muted);

    font-size: 0.82rem;
}


.form-message.success {
    color: var(--green);
}


.error-message {
    color: #8a3e38;
}


.comment-form
button[type="submit"] {

    border: 0;

    border-radius: 6px;

    background: var(--brown);

    color: white;

    padding: 9px 19px;

    font-size: 0.92rem;

    cursor: pointer;
}


.comment-form
button[type="submit"]:hover {

    background: #49372b;
}


.comment-form
button[type="submit"]:disabled {

    opacity: 0.55;

    cursor: default;
}


/* ---------------------------------------------------
   HONEYPOT
--------------------------------------------------- */

.honeypot {
    position: absolute !important;

    left: -10000px !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;
}


/* ---------------------------------------------------
   COMMENTS HEADING
--------------------------------------------------- */

.comments-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin: 32px 0 10px;
}


.comments-heading h2 {
    margin: 0;

    color: #171311;

    font-size: 1.3rem;
}


.sort-controls {
    display: flex;

    gap: 13px;
}


.sort {
    margin: 0;

    padding: 3px 0;

    border: 0;

    background: transparent;

    color: #a39a92;

    font-size: 0.8rem;

    cursor: pointer;
}


.sort.active {
    color: var(--brown);
}


.sort:hover {
    color: var(--brown-dark);
}


/* ---------------------------------------------------
   SCROLLING COMMENTS
--------------------------------------------------- */

.comment-list {
    max-height: 500px;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 10px;

    scrollbar-width: thin;

    scrollbar-color:
        #b8a28a
        #f7f2ea;
}


.comment-list::-webkit-scrollbar {
    width: 8px;
}


.comment-list::-webkit-scrollbar-track {
    background: #f7f2ea;
}


.comment-list::-webkit-scrollbar-thumb {
    background: #b8a28a;

    border-radius: 4px;
}


/* ---------------------------------------------------
   COMMENT
--------------------------------------------------- */

.comment {
    padding: 18px 4px 19px;

    border-bottom:
        1px dashed var(--border);
}


.comment-identity {
    display: flex;
    align-items: center;

    gap: 11px;
}


.comment-initial {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 32px;

    width: 32px;
    height: 32px;

    border:
        1px solid var(--border);

    background: var(--cream);

    color: var(--brown);

    font-size: 0.9rem;
    font-weight: bold;
}


.comment-details {
    min-width: 0;
}


.comment-name-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 6px;
}


.comment-name {
    color: var(--brown);

    font-size: 0.94rem;
}


.comment-time {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 0.76rem;
}


.comment-body {
    margin:
        13px
        0
        0
        43px;

    color: var(--text);

    font-size: 0.96rem;
    line-height: 1.65;

    white-space: pre-wrap;

    overflow-wrap: anywhere;
}


/* ---------------------------------------------------
   ORGANISER / PINNED
--------------------------------------------------- */

.organiser-badge,
.pinned-badge {
    display: inline-block;

    padding: 2px 6px;

    border:
        1px solid #b9a58c;

    border-radius: 4px;

    background: #f5efe7;

    color: var(--brown);

    font-family:
        Arial,
        sans-serif;

    font-size: 0.61rem;

    text-transform: uppercase;

    letter-spacing: 0.04em;
}


.pinned-badge::before {
    content: "Рюд ";

    font-size: 0.58rem;
}


/* ---------------------------------------------------
   COMMENT ACTIONS
--------------------------------------------------- */

.comment-actions {
    display: flex;
    align-items: center;

    gap: 16px;

    margin:
        11px
        0
        0
        43px;
}


.comment-actions button {
    border: 0;

    background: transparent;

    padding: 0;

    color: var(--muted);

    font-size: 0.78rem;

    cursor: pointer;
}


.comment-actions button:hover {
    color: var(--brown);
}


.heart-button {
    display: inline-flex;
    align-items: center;

    gap: 4px;
}


.heart-symbol {
    color: var(--brown-soft);

    font-size: 1rem;

    line-height: 1;
}


.heart-button.hearted
.heart-symbol {

    color: var(--brown);
}


.heart-button.hearted {
    color: var(--brown);
}


.heart-button:disabled {
    opacity: 0.6;
}


/* ---------------------------------------------------
   REPLIES
--------------------------------------------------- */

.comment-replies {
    margin-left: 42px;

    padding-left: 17px;

    border-left:
        1px solid var(--border-light);
}


.comment-replies
.comment {

    padding-top: 15px;
}


.comment-replies
.comment:last-child {

    border-bottom:
        1px dashed var(--border);
}


/*
Deep replies do not continue marching
further and further across the screen.
*/

.comment-replies
.comment-replies {

    margin-left: 15px;
}


/* ---------------------------------------------------
   MESSAGES
--------------------------------------------------- */

.loading,
.empty-comments,
.error {
    padding: 24px 6px;

    text-align: center;

    color: var(--muted);

    font-size: 0.9rem;
}


/* ---------------------------------------------------
   MOBILE
--------------------------------------------------- */

@media (max-width: 600px) {

    .comments-widget {
        padding:
            12px
            8px
            24px;
    }


    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }


    .comments-heading {
        align-items: flex-end;
    }


    .comment-body,
    .comment-actions {
        margin-left: 0;
    }


    .comment-replies {
        margin-left: 16px;

        padding-left: 12px;
    }


    .emoji-picker {
        width: 206px;

        grid-template-columns:
            repeat(6, 1fr);
    }
}

/* ==================================================
   REPLIES — visibly nested beneath parent comment
   ================================================== */

#commentList .comment-replies {
    margin-left: 52px !important;
    padding-left: 18px !important;
    border-left: 2px solid #e4d4c2 !important;
}

#commentList .comment-replies > .comment {
    margin-top: 0 !important;
    padding-top: 16px !important;
    padding-left: 0 !important;
}

/* Replies within replies: only a little further in */
#commentList .comment-replies .comment-replies {
    margin-left: 22px !important;
    padding-left: 14px !important;
}

/* Keep reply body/actions aligned with its own avatar */
#commentList .comment-replies .comment-body {
    margin-left: 43px !important;
}

#commentList .comment-replies .comment-actions {
    margin-left: 43px !important;
}

/* ===== EMBED SIZE / SCALE FIX ===== */



body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.comments-widget {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 0 20px !important;
}

.comment-form {
    width: 100%;
}

/* Slightly larger controls to match the Carrd site */
.comment-form button[type="submit"] {
    padding: 10px 20px;
    font-size: 0.92rem;
}

.comment-actions button {
    font-size: 0.78rem;
    padding: 5px 10px;
}

.comment-initial {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

.comment-body {
    font-size: 0.96rem;
}

/* Larger readable text without enlarging the whole layout */

.field label {
    font-size: 1rem;
}

.private-note {
    font-size: 0.85rem;
}

input,
textarea {
    font-size: 1rem;
}

.comment-form button[type="submit"] {
    font-size: 0.95rem;
}

.comments-heading h2 {
    font-size: 1.4rem;
}

.comment-name {
    font-size: 1.05rem;
}

.comment-time {
    font-size: 0.88rem;
}

.comment-body {
    font-size: 1.15rem;
    line-height: 1.65;
}

.comment-actions button {
    font-size: 0.88rem;
}

.sort {
    font-size: 0.85rem;
}

.organiser-badge,
.pinned-badge {
    font-size: 0.68rem;
}

#characterCount {
    font-size: 0.85rem;
}