body.spf-page-detail[data-spf-comment-endpoint] #comment {
    width: 100%;
    max-width: 100%;
    margin: 24px auto 0;
    overflow: hidden;
    box-sizing: border-box;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .cmt_editor,
body.spf-page-detail[data-spf-comment-endpoint] #comment .simple_wrt,
body.spf-page-detail[data-spf-comment-endpoint] #comment .cmt_wrt {
    box-sizing: border-box;
    max-width: 100%;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .cmt_editor_tl {
    display: block;
    float: none;
    margin: 0 0 10px;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .simple_wrt {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 0 !important;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-input] {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 96px;
    padding: 12px;
    border: 1px solid #c9c4c1;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit] {
    position: static;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 96px;
    width: 96px;
    min-width: 96px;
    height: 96px;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid #861a20;
    border-radius: 6px;
    background: #961f26;
    color: #fff;
    box-shadow: 0 1px 3px rgba(79, 15, 19, 0.18);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-align: center;
    white-space: nowrap;
    word-break: keep-all;
    cursor: pointer;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-input]:focus-visible {
    border-color: #961f26;
    outline: none;
    box-shadow: 0 0 0 3px rgba(150, 31, 38, 0.14);
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit]:focus-visible {
    outline: 2px solid #a00303;
    outline-offset: 2px;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit]:hover:not(:disabled) {
    border-color: #711319;
    background: #7e171d;
    box-shadow: 0 2px 6px rgba(79, 15, 19, 0.22);
    transform: translateY(-1px);
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit]:active:not(:disabled) {
    box-shadow: 0 2px 6px rgba(79, 15, 19, 0.2);
    transform: translateY(1px);
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit]:disabled {
    border-color: #b9b2ae;
    background: #b9b2ae;
    box-shadow: none;
    cursor: wait;
    transform: none;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .fdb_tag a {
    font-size: 0;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .fdb_tag a::before {
    content: '댓글';
    font-size: 14px;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .fdb_tag a b {
    font-size: 14px;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-item {
    padding-left: 0 !important;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-item--new {
    animation: spf-comment-reveal 700ms ease-out;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-content {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-actions button {
    min-height: 44px;
    min-width: 44px;
    padding: 4px 9px;
    border: 1px solid #c9c4c1;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
    word-break: keep-all;
}

body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-edit-input] {
    display: block;
    width: 100%;
    min-height: 72px;
    padding: 8px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body.spf-page-detail[data-spf-comment-endpoint] .layout_content {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.spf-page-detail[data-spf-comment-endpoint] .layout_content > .leftside,
    body.spf-page-detail[data-spf-comment-endpoint] .layout_content > .rightside {
        display: none !important;
    }

    body.spf-page-detail[data-spf-comment-endpoint] .layout_content > .main_content {
        float: none !important;
        width: auto !important;
        max-width: 100% !important;
        margin: 0 12px !important;
    }
}

@media (max-width: 533px) {
    body.spf-page-detail[data-spf-comment-endpoint] #comment .simple_wrt {
        flex-direction: column;
    }

    body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit] {
        display: block !important;
        flex: 0 0 48px;
        width: 100%;
        min-width: 100%;
        height: 48px;
        min-height: 48px;
    }
}

@keyframes spf-comment-reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-input],
    body.spf-page-detail[data-spf-comment-endpoint] #comment [data-spf-comment-submit] {
        transition: none;
    }

    body.spf-page-detail[data-spf-comment-endpoint] #comment .spf-comment-item--new {
        animation: none;
    }
}
