/* 쪽지 모달 (#hmMemoModal) — 셸은 hm_scrap_modal 과 공유 */

#hmMemoModal.hm_memo_modal.hm_scrap_modal .hm_scrap_modal__panel {
    width: min(480px, 100%);
    max-height: min(640px, calc(100vh - 40px));
    max-height: min(640px, calc(100dvh - 40px));
}

#hmMemoModal.hm_memo_modal.hm_scrap_modal.hm_scrap_modal--compact .hm_scrap_modal__panel {
    width: min(360px, calc(100vw - 48px));
    max-width: min(360px, calc(100vw - 48px));
    max-height: min(420px, calc(100dvh - 40px));
}

#hmMemoModal.hm_memo_modal {
    --hm-memo-text-height: calc(24px + 4 * 1.5 * 15px);
}

.hm_memo_tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.hm_memo_tabs li {
    flex: 1 1 0;
}

.hm_memo_tab {
    display: block;
    width: 100%;
    padding: 9px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
    color: #555;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}

.hm_memo_tab.is-active {
    border-color: #8cc152;
    background: #f3faeb;
    color: #4a7c23;
}

#hmMemoModal.hm_memo_modal.hm_scrap_modal .hm_memo_modal__heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 8px;
    min-width: 0;
    flex: 1 1 auto;
    padding-right: 8px;
}

#hmMemoModal.hm_memo_modal.hm_scrap_modal .hm_memo_modal__heading .hm_scrap_modal__title {
    flex: 0 0 auto;
}

#hmMemoModal #hmMemoSummary.hm_memo_summary {
    margin: 0;
    flex: 0 0 auto;
}

#hmMemoSummary[hidden] {
    display: none !important;
}

.hm_memo_summary {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.hm_memo_table_wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hm_memo_table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.hm_memo_table col.hm_memo_col_nick {
    width: 22%;
}

.hm_memo_table col.hm_memo_col_preview {
    width: 46%;
}

.hm_memo_table col.hm_memo_col_date {
    width: 20%;
}

.hm_memo_table col.hm_memo_col_delete {
    width: 12%;
}

.hm_memo_table thead th {
    padding: 6px 6px;
    border-bottom: 2px solid #e8e8e8;
    color: #666;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
    white-space: nowrap;
}

.hm_memo_table tbody td {
    padding: 6px 6px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
}

.hm_memo_table tbody td.hm_scrap_empty {
    padding: 28px 12px;
    border-bottom: 0;
    text-align: center;
}

.hm_memo_item {
    cursor: pointer;
}

.hm_memo_item:hover td {
    background: #fafafa;
}

.hm_memo_item.is-deleting {
    opacity: .45;
    pointer-events: none;
}

.hm_memo_col_nick {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm_memo_item__nick_cell {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    min-width: 0;
    transform: translateY(3px);
}

.hm_memo_item__avatar {
    flex: 0 0 auto;
    line-height: 0;
}

.hm_memo_item__avatar img {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.hm_memo_item__nick {
    overflow: hidden;
    min-width: 0;
    color: #171717;
    font-size: inherit;
    font-weight: 400;
    line-height: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm_memo_item__badge {
    display: inline-block;
    flex: 0 0 auto;
    margin-right: 4px;
    padding: 1px 5px;
    border-radius: 999px;
    background: #8cc152;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    vertical-align: middle;
}

.hm_memo_item__preview_cell {
    display: inline-flex;
    align-items: center;
    gap: 0;
    max-width: 100%;
    min-width: 0;
}

.hm_memo_item__preview {
    overflow: hidden;
    min-width: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm_memo_col_preview {
    overflow: hidden;
    color: #444;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hm_memo_col_date {
    color: #888;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}

.hm_memo_col_delete {
    text-align: center;
}

.hm_memo_item__delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #dc2626;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}

.hm_memo_item__delete_mark {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.hm_memo_item__delete:hover,
.hm_memo_item__delete:focus {
    background: #ffe9e9;
    color: #b91c1c;
}

.hm_memo_pager_wrap {
    padding-top: 14px;
}

.hm_memo_pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hm_memo_pager__btn {
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
    color: #444;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.hm_memo_pager__btn:hover:not(:disabled),
.hm_memo_pager__btn:focus:not(:disabled) {
    border-color: #8cc152;
    background: #f3faeb;
    color: #4a7c23;
    outline: none;
}

.hm_memo_pager__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.hm_memo_pager__info {
    min-width: 4.5em;
    color: #666;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.hm_memo_list_more {
    padding-top: 14px;
    text-align: center;
}

.hm_memo_view_meta {
    margin-bottom: 10px;
    padding: 0px 5px 6px 5px;
    border-bottom: 1px solid #eee;
}

.hm_memo_view_meta__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hm_memo_view_meta__peer {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: #171717;
    font-size: 14px;
    line-height: 1.4;
}

.hm_memo_view_meta__label {
    color: #666;
    font-weight: 400;
}

.hm_memo_view_meta__avatar {
    display: inline-block;
    margin: -2px 3px 0 0;
    line-height: 0;
    vertical-align: middle;
}

.hm_memo_view_meta__avatar img {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.hm_memo_view_meta__name {
    font-size: 14px;
    font-weight: 400;
}

.hm_memo_view_meta__date {
    flex: 0 0 auto;
    color: #888;
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
    white-space: nowrap;
}

.hm_memo_view_content {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fafafa;
    color: #333;
    font-size: 15px;
    line-height: 1.5;
    min-height: var(--hm-memo-text-height);
    height: var(--hm-memo-text-height);
    max-height: var(--hm-memo-text-height);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
}

.hm_memo_view_actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 14px;
}

.hm_memo_view_actions__side {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hm_memo_view_actions__side--right {
    margin-left: auto;
}

#hmMemoModal .hm_memo_view_actions .hm_scrap_btn,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn {
    min-height: 0;
    padding: 8px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    background: #fafafa;
    color: #444;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

#hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary {
    border: none;
    background: #283593;
    color: #fff;
}

#hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
#hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus {
    border-color: #8cc152;
    background: #f3faeb;
    color: #4a7c23;
    outline: none;
}

#hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:hover,
#hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:focus,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:hover,
#hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:focus {
    background: #1f287a;
    outline: none;
}

#hmMemoModal .hm_scrap_notice__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 0;
}

.hm_memo_view_nav {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.hm_memo_form_group {
    margin-bottom: 14px;
}

.hm_memo_form_group label {
    display: block;
    margin-bottom: 6px;
    color: #333;
    font-size: 13px;
    font-weight: 700;
}

.hm_memo_recv_head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.hm_memo_recv_head label {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.hm_memo_form_group input[type="text"],
.hm_memo_form_group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    resize: vertical;
}

.hm_memo_form_group textarea {
    min-height: var(--hm-memo-text-height);
}

#hmMemoModal #hm_memo_recv_mb_id {
    padding: 9px 12px;
}

.hm_memo_form_info {
    margin-top: 6px;
    color: #888;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.hm_memo_recv_status {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding-right: 5px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: right;
    color: #888;
    word-break: break-all;
}

.hm_memo_recv_status.is-empty {
    color: #888;
}

.hm_memo_recv_status.is-pending {
    color: #666;
}

.hm_memo_recv_status.is-ok {
    color: #283593;
}

.hm_memo_recv_status.is-bad {
    color: #b91c1c;
}

#hmMemoModal .hm_memo_captcha {
    margin: 0;
    padding: 0;
    border: 0;
}

#hmMemoModal .hm_memo_form_group:has(.hm_memo_captcha) {
    margin-bottom: 0;
}

/* reCAPTCHA — 모바일은 body.hm-mobile 규칙, PC는 @media (min-width: 641px) */
#hmMemoModal .hm_memo_captcha.recaptcha {
    max-width: 100%;
}

/* 모바일: reCAPTCHA 0.8 (전역 0.7보다 약간 크게) */
body.hm-mobile #hmMemoModal .hm_memo_captcha.recaptcha {
    width: 244px;
    height: 62px;
    overflow: hidden;
}

body.hm-mobile #hmMemoModal .hm_memo_captcha.recaptcha .g-recaptcha {
    transform: scale(0.8);
    -webkit-transform: scale(0.8);
    transform-origin: 0 0;
    -webkit-transform-origin: 0 0;
}

#hmMemoModal .hm_memo_captcha textarea[name="g-recaptcha-response"] {
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
}

#hmMemoModal .hm_memo_captcha img#captcha_img {
    display: block;
    margin-bottom: 8px;
}

#hmMemoModal .hm_memo_captcha .captcha_box {
    width: 100%;
    max-width: 160px;
    margin-bottom: 8px;
}

#hmMemoModal .hm_memo_captcha button {
    margin-right: 6px;
    margin-bottom: 6px;
}

#hmMemoModal .hm_memo_captcha #captcha_info {
    display: block;
    color: #888;
    font-size: 12px;
}

.hm_memo_back {
    margin-right: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#hmMemoModal .hm_scrap_modal__close {
    border-radius: 0;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

#hmMemoModal .hm_scrap_modal__close:hover,
#hmMemoModal .hm_scrap_modal__close:focus,
#hmMemoModal .hm_scrap_modal__close:active {
    background: transparent;
    outline: none;
    box-shadow: none;
}

body.hm-mobile #hmMemoModal .hm_scrap_modal__close,
body.hm-mobile #hmMemoModal .hm_scrap_modal__close:hover,
body.hm-mobile #hmMemoModal .hm_scrap_modal__close:focus,
body.hm-mobile #hmMemoModal .hm_scrap_modal__close:active {
    background: transparent;
    color: inherit;
}

@media (max-width: 640px) {
    #hmMemoModal.hm_memo_modal.hm_scrap_modal {
        align-items: center;
        justify-content: center;
        padding: max(14px, env(safe-area-inset-top))
            calc(10px + env(safe-area-inset-right, 0px))
            max(14px, env(safe-area-inset-bottom))
            calc(10px + env(safe-area-inset-left, 0px));
    }

    #hmMemoModal.hm_memo_modal.hm_scrap_modal .hm_scrap_modal__panel {
        width: 100%;
        max-width: none;
        align-self: stretch;
        margin-top: 0;
        max-height: min(640px, calc(100dvh - 56px));
        border-radius: 18px;
        box-sizing: border-box;
    }

    #hmMemoModal.hm_memo_modal.hm_scrap_modal.hm_scrap_modal--compact .hm_scrap_modal__panel {
        align-self: center;
        width: min(320px, calc(100vw - 36px));
        max-width: min(320px, calc(100vw - 36px));
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_nick {
        width: 25%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_preview {
        width: 45%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_date {
        width: 18%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_delete {
        width: 12%;
    }

    #hmMemoModal .hm_memo_col_date {
        font-size: 11px;
    }

    #hmMemoModal .hm_memo_captcha.m_captcha audio {
        display: block;
        width: 100%;
        max-width: 187px;
        margin: 0 0 5px;
    }

    #hmMemoModal .hm_memo_captcha.m_captcha img#captcha_img {
        display: block;
        width: 150px;
        height: 56px;
        margin: 5px 0 3px;
        border: 1px solid #e9e9e9;
    }

    #hmMemoModal .hm_memo_captcha.m_captcha .captcha_box {
        width: 108px;
        max-width: none;
        height: 27px;
        margin: 0 0 0 3px;
        padding: 0 5px;
        border: 1px solid #b8c9c2;
        background: #f7f7f7;
        font-size: 1.25em;
        font-weight: 700;
        line-height: 27px;
        text-align: center;
        box-sizing: border-box;
    }

    #hmMemoModal .hm_memo_captcha.m_captcha button#captcha_reload {
        width: 36px;
        height: 36px;
        margin-right: 6px;
        margin-bottom: 6px;
        border: 0;
        background: url('../img/captcha2.png') no-repeat 0 -36px;
        background-size: 36px auto;
        cursor: pointer;
        text-indent: -999px;
        overflow: hidden;
        vertical-align: top;
    }

    #hmMemoModal .hm_memo_captcha.m_captcha button#captcha_reload span {
        display: none;
    }
}

@media (min-width: 641px) {
    #hmMemoModal .hm_memo_table col.hm_memo_col_nick {
        width: 22%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_preview {
        width: 50%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_date {
        width: 18%;
    }

    #hmMemoModal .hm_memo_table col.hm_memo_col_delete {
        width: 10%;
    }

    #hmMemoModal .hm_memo_table tbody td {
        line-height: 28px;
    }

    #hmMemoModal .hm_memo_item__nick,
    #hmMemoModal .hm_memo_item__preview {
        font-size: 14px;
    }

    #hmMemoModal .hm_memo_col_date {
        font-size: 12px;
    }

    #hmMemoModal .hm_memo_item__avatar img,
    #hmMemoModal .hm_memo_view_meta__avatar img {
        width: 28px;
        height: 28px;
    }

    /* 자동등록방지 — PC 축소 (약 85%) */
    #hmMemoModal .hm_memo_captcha.recaptcha {
        width: 260px;
        height: 66px;
        overflow: hidden;
    }

    #hmMemoModal .hm_memo_captcha.recaptcha .g-recaptcha {
        transform: scale(0.85);
        -webkit-transform: scale(0.85);
        transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
    }

    #hmMemoModal .hm_memo_captcha:not(.recaptcha) img#captcha_img {
        height: 34px;
        margin-bottom: 6px;
    }

    #hmMemoModal .hm_memo_captcha:not(.recaptcha) .captcha_box {
        max-width: 78px;
        height: 34px;
        margin-bottom: 6px;
        padding: 0 4px;
        font-size: 14px;
        font-weight: 700;
        line-height: 34px;
        box-sizing: border-box;
    }

    #hmMemoModal .hm_memo_captcha:not(.recaptcha) button#captcha_mp3,
    #hmMemoModal .hm_memo_captcha:not(.recaptcha) button#captcha_reload {
        width: 34px;
        height: 34px;
        margin-right: 4px;
        margin-bottom: 4px;
        border: 0;
        background: url('../img/captcha2.png') no-repeat;
        background-size: 34px auto;
        cursor: pointer;
        text-indent: -999px;
        overflow: hidden;
        vertical-align: top;
    }

    #hmMemoModal .hm_memo_captcha:not(.recaptcha) button#captcha_reload {
        background-position: 0 -34px;
    }

    #hmMemoModal .hm_memo_captcha:not(.recaptcha) #captcha_info {
        font-size: 11px;
    }

    #hmMemoModal .hm_memo_form_group:has(#hm_memo_content) {
        margin-bottom: 11px;
    }
}

/* ============================================================
 * 다크 모드 — 모바일(body.hm-mobile)에서만 (PC 라이트 UI 유지)
 * prefers-color-scheme:dark + 그누보드 모바일 스킨일 때만
 * ============================================================ */
@media (prefers-color-scheme: dark) {
    body.hm-mobile #hmMemoModal.hm_memo_modal {
        color-scheme: dark;
    }

    body.hm-mobile #hmMemoModal .hm_memo_summary {
        color: var(--hm-text-sub, #a1a1a1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_tab {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-sub, #a1a1a1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_tab.is-active {
        border-color: rgba(140, 193, 82, 0.45);
        background: rgba(140, 193, 82, 0.12);
        color: #9dd65a;
    }

    body.hm-mobile #hmMemoModal .hm_memo_table thead th {
        border-bottom-color: var(--hm-border, #2c2c2e);
        color: var(--hm-text-sub, #a1a1a1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_table tbody td {
        border-bottom-color: var(--hm-border, #2c2c2e);
        color: var(--hm-text-body, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_table tbody td.hm_scrap_empty {
        color: var(--hm-text-muted, #9ca3af);
    }

    body.hm-mobile #hmMemoModal .hm_memo_item:hover td {
        background: var(--hm-tap, rgba(255, 255, 255, 0.05));
    }

    body.hm-mobile #hmMemoModal .hm_memo_item__nick {
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_col_preview {
        color: var(--hm-text-body, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_col_date {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_item__delete {
        background: rgba(255, 255, 255, 0.06);
        color: #f87171;
    }

    body.hm-mobile #hmMemoModal .hm_memo_item__delete:hover,
    body.hm-mobile #hmMemoModal .hm_memo_item__delete:focus {
        background: rgba(239, 68, 68, 0.14);
        color: #fca5a5;
    }

    body.hm-mobile #hmMemoModal .hm_memo_pager__btn {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_pager__btn:hover:not(:disabled),
    body.hm-mobile #hmMemoModal .hm_memo_pager__btn:focus:not(:disabled) {
        border-color: rgba(140, 193, 82, 0.45);
        background: rgba(140, 193, 82, 0.12);
        color: #9dd65a;
    }

    body.hm-mobile #hmMemoModal .hm_memo_pager__info {
        color: var(--hm-text-sub, #a1a1a1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_meta {
        border-bottom-color: var(--hm-border, #2c2c2e);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_meta__peer,
    body.hm-mobile #hmMemoModal .hm_memo_view_meta__name {
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_meta__label,
    body.hm-mobile #hmMemoModal .hm_memo_view_meta__date {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_content {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.12));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-body, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus {
        border-color: rgba(255, 255, 255, 0.22);
        background: var(--hm-tap, rgba(255, 255, 255, 0.07));
        color: var(--hm-text-main, #fff);
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary {
        border-color: #7c93f0;
        background: #5c6bc0;
        color: #fafafa;
    }

    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:hover,
    body.hm-mobile #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:focus,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:hover,
    body.hm-mobile #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:focus {
        background: #6d7fd4;
        color: #fff;
    }

    body.hm-mobile #hmMemoModal .hm_memo_form_group label {
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_form_group input[type="text"],
    body.hm-mobile #hmMemoModal .hm_memo_form_group textarea {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_form_group input[type="text"]::placeholder,
    body.hm-mobile #hmMemoModal .hm_memo_form_group textarea::placeholder {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_form_info {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_recv_status,
    body.hm-mobile #hmMemoModal .hm_memo_recv_status.is-empty,
    body.hm-mobile #hmMemoModal .hm_memo_recv_status.is-pending {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_recv_status.is-ok {
        color: #90caf9;
    }

    body.hm-mobile #hmMemoModal .hm_memo_recv_status.is-bad {
        color: #fca5a5;
    }

    body.hm-mobile #hmMemoModal .hm_memo_captcha #captcha_info {
        color: var(--hm-text-muted, #787878);
    }

    body.hm-mobile #hmMemoModal .hm_memo_captcha.m_captcha img#captcha_img {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
    }

    body.hm-mobile #hmMemoModal .hm_memo_captcha.m_captcha .captcha_box {
        border-color: var(--hm-card-border, rgba(255, 255, 255, 0.14));
        background: var(--hm-bg-card, #252525);
        color: var(--hm-text-main, #e1e1e1);
    }

    body.hm-mobile #hmMemoModal .hm_memo_back {
        color: var(--hm-text-sub, #a1a1a1);
    }

    body.hm-mobile #hmMemoModal .hm_scrap_modal__close,
    body.hm-mobile #hmMemoModal .hm_scrap_modal__close:hover,
    body.hm-mobile #hmMemoModal .hm_scrap_modal__close:focus,
    body.hm-mobile #hmMemoModal .hm_scrap_modal__close:active {
        color: var(--hm-text-main, #e1e1e1);
    }
}

/* ============================================================
 * 다크 모드 — PC 토글(상단 라이트/다크 버튼) 대응
 * 공통 셸(패널/헤더/제목/닫기 배경 등)은 hm_scrap_modal.css 의 PC 다크 규칙이 처리하고,
 * 여기서는 쪽지 고유 요소만 보정한다.
 * ============================================================ */
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal.hm_memo_modal {
    color-scheme: dark;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_summary {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_tab {
    border-color: #374151;
    background: #1f2937;
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_tab.is-active {
    border-color: rgba(140, 193, 82, 0.45);
    background: rgba(140, 193, 82, 0.12);
    color: #9dd65a;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_table thead th {
    border-bottom-color: #293241;
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_table tbody td {
    border-bottom-color: #293241;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_table tbody td.hm_scrap_empty {
    color: #9ca3af;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_item:hover td {
    background: rgba(255, 255, 255, 0.05);
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_item__nick {
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_col_preview {
    color: #cbd5e1;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_col_date {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_item__delete {
    background: rgba(255, 255, 255, 0.06);
    color: #f87171;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_item__delete:hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_item__delete:focus {
    background: rgba(239, 68, 68, 0.14);
    color: #fca5a5;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_pager__btn {
    border-color: #374151;
    background: #1f2937;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_pager__btn:hover:not(:disabled),
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_pager__btn:focus:not(:disabled) {
    border-color: rgba(140, 193, 82, 0.45);
    background: rgba(140, 193, 82, 0.12);
    color: #9dd65a;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_pager__info {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_meta {
    border-bottom-color: #293241;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_meta__peer,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_meta__name {
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_meta__label,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_meta__date {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_content {
    border-color: #293241;
    background: #1f2937;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn {
    border-color: #374151;
    background: #1f2937;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn:not(.hm_scrap_btn--primary):focus {
    border-color: rgba(140, 193, 82, 0.45);
    background: rgba(140, 193, 82, 0.12);
    color: #9dd65a;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary {
    border-color: #5c6bc0;
    background: #5c6bc0;
    color: #fff;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_view_actions .hm_scrap_btn--primary:focus,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_notice__actions .hm_scrap_btn--primary:focus {
    background: #6d7fd4;
    color: #fff;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_group label {
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_group input[type="text"],
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_group textarea {
    border-color: #374151;
    background: #1f2937;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_group input[type="text"]::placeholder,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_group textarea::placeholder {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_form_info {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_recv_status,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_recv_status.is-empty,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_recv_status.is-pending {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_recv_status.is-ok {
    color: #90caf9;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_recv_status.is-bad {
    color: #fca5a5;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_captcha #captcha_info {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_captcha .captcha_box {
    border-color: #374151;
    background: #1f2937;
    color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_captcha img#captcha_img {
    border-color: #374151;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_memo_back {
    color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_modal__close,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_modal__close:hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_modal__close:focus,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hmMemoModal .hm_scrap_modal__close:active {
    background: transparent;
    color: #cbd5e1;
}
