                                                                                     
@media (max-width: 819px), (pointer: coarse) {
    #detail-sheet.is-comment-detail {
        overflow: hidden;
        overscroll-behavior: contain;
    }
    #detail-sheet.is-comment-detail .sheet-panel {
        display: flex;
        flex-direction: column;
        width: min(100%, 680px);
        height: min(100%, 860px);
        max-height: 100%;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        border-radius: 22px 22px 0 0;
    }
    #detail-sheet.is-comment-detail .sheet-close {
        position: relative;
        top: auto;
        float: none;
        flex: 0 0 44px;
        align-self: flex-end;
        width: 44px;
        height: 44px;
        margin: 8px 12px 4px;
        z-index: 5;
    }
    #detail-sheet.is-comment-detail #detail-sheet-content {
        flex: 1 1 auto;
        min-height: 0;
        min-width: 0;
        width: 100%;
        padding: 0 14px 8px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scroll-padding-top: 16px;
        scroll-padding-bottom: 104px;
    }
    #detail-sheet.is-comment-detail .social-post-view {
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 100%;
        overflow-wrap: anywhere;
    }
    #detail-sheet.is-comment-detail .social-post-comments {
        min-width: 0;
        padding-bottom: 12px;
    }
    #detail-sheet.is-comment-detail .social-comment-form {
        position: sticky;
        bottom: 0;
        z-index: 4;
        flex: 0 0 auto;
        grid-template-columns: minmax(0, 1fr) 48px;
        gap: 8px;
        align-items: end;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-top: auto;
        padding: 12px 0 max(10px, env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #ede5f4;
        background: #fff;
        box-shadow: 0 -8px 18px rgba(255, 255, 255, .96);
    }
    #detail-sheet.is-comment-detail .social-comment-form textarea {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: 48px;
        max-height: 100px;
        margin: 0;
        padding: 12px;
        border-radius: 12px;
        box-sizing: border-box;
        font-size: 16px;
        line-height: 1.4;
        resize: none;
        overflow-y: auto;
    }
    #detail-sheet.is-comment-detail .social-comment-form button[type="submit"] {
        width: 48px;
        min-width: 48px;
        height: 48px;
        min-height: 48px;
        padding: 10px;
        flex-shrink: 0;
        touch-action: manipulation;
    }
    #detail-sheet.is-comment-detail .social-comment-form button[type="submit"] svg {
        width: 21px;
        height: 21px;
        margin: auto;
    }
    #detail-sheet.is-comment-detail.is-comment-composing .social-comment-form {
        scroll-margin-bottom: 8px;
    }
}
@media (max-width: 359px) {
    #detail-sheet.is-comment-detail #detail-sheet-content { padding-inline: 10px; }
    #detail-sheet.is-comment-detail .social-comment-form { gap: 6px; }
}
