:root {
    --kakao-bg: #bacee0;
    --kakao-main: #fff;
    --kakao-border: #dfe5ec;
    --kakao-text: #1f2430;
    --kakao-sub: #6f7684;
    --kakao-mine: #fee500;
    --kakao-other: #ffffff;
    --kakao-panel: #f7f9fc;
    --admin-point: #0c63e7;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #ecf1f7;
    color: var(--kakao-text);
    font-family: 'Nanum Gothic', 'NanumGothic', 'Malgun Gothic', sans-serif;
}

#main {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.hm-guest-auth-wrap,
.hm-chat-app,
.hm-guest-auth-wrap *,
.hm-chat-app * {
    font-family: 'Nanum Gothic', 'NanumGothic', 'Malgun Gothic', sans-serif;
}

.hm-guest-auth-wrap {
    min-height: 100vh;
    padding: 56px 16px 30px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #eef1f6;
}

.hm-kakao-auth-inner {
    width: min(380px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hm-kakao-logo {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.hm-kakao-logo.hm-kakao-logo-text {
    font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
    font-size: 30px;
    font-weight: 530;
    line-height: 1;
    color: #ffffff;
    background: #333333;
    border-radius: 999px;
    min-width: 174px;
    min-height: 86px;
    padding: 0 28px;
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hm-kakao-logo.hm-kakao-logo-text::after {
    content: '';
    position: absolute;
    left: 28px;
    bottom: -14px;
    width: 0;
    height: 0;
    border-top: 16px solid #333333;
    border-right: 10px solid transparent;
}

.hm-kakao-logo img {
    display: block;
    width: min(218px, 78vw);
    height: auto;
}

.hm-kakao-auth-title {
    margin: 0;
    color: #262626;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.hm-kakao-auth-box {
    width: 100%;
    margin-top: 22px;
}

.hm-kakao-auth-group {
    width: 100%;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-sizing: border-box;
}

.hm-kakao-auth-group h2 {
    margin: 0 0 10px;
    color: #2f2f2f;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.hm-kakao-auth-group input {
    width: 100%;
    height: 46px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 15px;
    color: #000000;
}

.hm-kakao-auth-group > input + input {
    margin-top: 8px;
}

.hm-kakao-auth-group button {
    width: 100%;
    height: 46px;
    border: 1px solid #2f3845;
    border-radius: 8px;
    background: #2f3845;
    color: #000000;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    margin-top: 10px;
}

.hm-kakao-auth-group .hm-guest-primary-btn {
    margin-top: 0;
}

.hm-kakao-auth-group .hm-guest-secondary-btn {
    border-color: #556174;
    background: #ffffff;
    color: #000000;
}

.hm-guest-phone-panel {
    margin-top: 10px;
}

.hm-guest-phone-panel[hidden] {
    display: none;
}

.hm-kakao-auth-divider {
    margin: 14px 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-size: 13px;
}

.hm-kakao-auth-divider::before,
.hm-kakao-auth-divider::after {
    content: '';
    height: 1px;
    background: rgba(89, 101, 122, 0.3);
    flex: 1;
}

.hm-kakao-auth-divider span {
    margin: 0 10px;
}

.hm-guest-auth-row {
    display: block;
    margin-top: 10px;
    margin-bottom: 0;
}

.hm-kakao-auth-divider + .hm-kakao-auth-group .hm-guest-auth-row:first-child {
    margin-top: 18px;
}

.hm-guest-auth-row input {
    width: 100%;
    height: 46px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 15px;
    text-align: center;
}

.hm-guest-auth-row button {
    width: 100%;
    height: 46px;
    border: 1px solid #556174;
    background: #ffffff;
    color: #000000;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    margin-top: 8px;
}

.hm-guest-auth-help {
    margin-top: 10px;
    font-size: 12px;
    color: #000000;
    line-height: 1.4;
}

.hm-guest-auth-help.is-error {
    color: #000000;
}

.hm-guest-badge {
    margin-bottom: 8px;
    border: 1px solid #cfd8ea;
    background: #f3f7ff;
    border-radius: 0;
    font-size: 12px;
    color: #27457b;
    padding: 8px 10px;
}

.hm-member-badge {
    margin-bottom: 8px;
    border: 1px solid #e2d27a;
    background: #fff8cf;
    border-radius: 0;
    font-size: 12px;
    color: #544612;
    padding: 8px 10px;
}

.hm-guest-logout-btn {
    margin-top: 8px;
    width: 100%;
    min-height: 36px;
    border: 1px solid #d7deeb;
    background: #fff;
    color: #344158;
    border-radius: 0;
    font-size: 12px;
    cursor: pointer;
}

.hm-chat-app {
    width: min(1680px, calc(100vw - 24px));
    height: calc(100vh - 24px);
    margin: 12px auto;
    border: 1px solid var(--kakao-border);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-columns: 340px 1fr;
}

.hm-chat-app.hm-chat-admin {
    grid-template-columns: 340px 1fr 360px;
}

.hm-chat-sidebar {
    background: #fff;
    border-right: 1px solid var(--kakao-border);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hm-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--kakao-border);
}

.hm-sidebar-head h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.hm-sidebar-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#hm-sidebar-close {
    display: none;
}

.hm-icon-btn {
    border: 1px solid var(--kakao-border);
    background: #fff;
    border-radius: 0;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.hm-search-wrap {
    padding: 10px 12px;
    border-bottom: 1px solid var(--kakao-border);
}

.hm-search-wrap input,
.hm-new-chat-wrap input,
.hm-row-inline input,
.hm-panel-block textarea,
.hm-chat-input textarea {
    width: 100%;
    border: 1px solid #ced5df;
    border-radius: 0;
    padding: 10px 12px;
    box-sizing: border-box;
    font-size: 14px;
}

#hm-alimtalk-message {
    border: 1px solid #ced5df;
    padding: 10px !important;
    font-size: 13px;
    border-radius: 0 !important;
    height:80px !important;
}

#hm-send-alimtalk {
    margin-top: 10px;
}

#hm-send-kakao-link {
    margin-top: 15px;
}

.hm-status-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--kakao-border);
}

.hm-status-tabs button {
    border: 1px solid var(--kakao-border);
    background: #fff;
    border-radius: 0;
    height: 32px;
    font-size: 12px;
    cursor: pointer;
}

.hm-status-tabs button.is-active {
    background: #202632;
    color: #fff;
    border-color: #202632;
}

.hm-room-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: auto;
    flex: 1;
}

.hm-room-item {
    border-bottom: 1px solid #edf1f6;
    padding: 12px;
    cursor: pointer;
}

.hm-room-item:hover {
    background: #f7f9fc;
}

.hm-room-item.is-active {
    background: #eef4ff;
}

.hm-room-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.hm-room-main {
    min-width: 0;
    flex: 1;
}

.hm-room-name {
    font-weight: 700;
    font-size: 14px;
    display: block;
}

.hm-room-time {
    font-size: 11px;
    color: var(--kakao-sub);
    white-space: nowrap;
}

.hm-room-sub {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hm-room-preview {
    color: var(--kakao-sub);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-room-date {
    margin-top: 4px;
    font-size: 11px;
    color: var(--kakao-sub);
    line-height: 1.35;
}

/* changsu start: 방 목록 대화삭제 버튼 스타일 */
.hm-room-actions {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hm-room-close-btn,
.hm-room-delete-btn {
    flex: 0 0 auto;
    min-width: 62px;
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    border-radius: 0;
    box-sizing: border-box;
    cursor: pointer;
}

.hm-room-close-btn {
    border: 1px solid #2f3a4f;
    background: #2f3a4f;
    color: #ffffff;
}

.hm-room-close-btn.is-disabled {
    border-color: #cfd6e1;
    background: #eef2f7;
    color: #657086;
    cursor: default;
}

.hm-room-delete-btn {
    border: 1px solid #cfd6e1;
    background: #ffffff;
    color: #3a4559;
}

.hm-room-delete-btn:hover {
    background: #f4f7fb;
}
/* changsu end */

.hm-room-delete-head-btn {
    border: 1px solid #cfd6e1;
    background: #ffffff;
    color: #2f3a4f;
    border-radius: 0;
    height: 24px;
    min-width: 44px;
    padding: 0 9px;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hm-room-delete-head-btn:hover {
    background: #f4f7fb;
}

.hm-unread {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #ff4f4f;
    color: #fff;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-sizing: border-box;
}

.hm-sidebar-foot {
    border-top: 1px solid var(--kakao-border);
    padding: 10px 12px;
}

.hm-member-result {
    margin-top: 8px;
    max-height: 180px;
    overflow: auto;
}

.hm-member-item {
    padding: 8px 10px;
    border: 1px solid var(--kakao-border);
    border-radius: 0;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
}

.hm-member-item:hover {
    background: #f1f6ff;
}

.hm-chat-main {
    display: grid;
    grid-template-rows: 66px 1fr auto;
    min-width: 0;
    min-height: 0;
    background: var(--kakao-bg);
    position: relative;
    --hm-head-layer-top: 66px;
}

.hm-chat-main.is-file-dragover::after {
    content: '파일을 놓으면 첨부 전송됩니다';
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(47, 58, 79, 0.78);
    background: rgba(255, 255, 255, 0.54);
    color: #1f2531;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.1px;
    pointer-events: none;
    z-index: 60;
    box-sizing: border-box;
}

.hm-chat-head {
    height: 66px;
    background: #fff;
    border-bottom: 1px solid var(--kakao-border);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
}

.hm-chat-app.hm-chat-admin .hm-chat-head {
    padding-left: 9px;
}

.hm-chat-app.hm-chat-member .hm-chat-head {
    position: relative;
}

.hm-chat-title {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hm-chat-title strong {
    font-size: 15px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-chat-title span {
    color: var(--kakao-sub);
    font-size: 12px;
}

.hm-chat-app.hm-chat-member #hm-room-status-badge {
    display: none !important;
}

.hm-chat-app.hm-chat-member .hm-chat-title {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    max-width: calc(100% - 120px);
    align-items: center;
    pointer-events: none;
}

.hm-chat-app.hm-chat-member .hm-chat-title strong {
    justify-content: center;
}

.hm-chat-head-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 100%;
}

.hm-chat-head-actions > * {
    align-self: center;
}

#hm-member-search-btn,
#hm-member-chat-close {
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
    color: #111111;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* changsu start: 상단 아이콘 색상을 상태와 무관하게 동일색으로 고정 */
.hm-chat-head #hm-mobile-menu,
.hm-chat-head #hm-toggle-panel,
.hm-chat-head #hm-member-search-btn,
.hm-chat-head #hm-member-chat-close,
.hm-chat-head #hm-member-chat-close:link,
.hm-chat-head #hm-member-chat-close:visited,
.hm-chat-head #hm-member-chat-close:hover,
.hm-chat-head #hm-member-chat-close:active {
    color: #111111 !important;
    text-decoration: none !important;
}

.hm-chat-head #hm-member-search-btn svg {
    stroke: currentColor;
    fill: none;
}

.hm-chat-head #hm-member-chat-close .hm-head-close-icon {
    stroke: currentColor !important;
    fill: none;
}

.hm-chat-head #hm-toggle-panel .hm-admin-menu-icon {
    fill: currentColor;
}

.hm-chat-head #hm-mobile-menu .hm-head-menu-icon {
    width: 22px;
    height: 24px;
    display: block;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    fill: none;
}
/* changsu end */

#hm-member-search-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
    display: block;
}

#hm-member-chat-close .hm-head-close-icon {
    width: 20px;
    height: 20px;
    display: block;
    stroke: #111111;
    stroke-width: 2;
    transform: scale(1.12);
}

.hm-chat-app.hm-chat-admin #hm-mobile-menu,
.hm-chat-app.hm-chat-admin #hm-toggle-panel {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.hm-chat-app.hm-chat-admin #hm-room-status-badge {
    order: 1;
}

.hm-chat-app.hm-chat-admin #hm-toggle-panel {
    order: 2;
}

.hm-chat-app.hm-chat-admin #hm-member-search-btn {
    order: 3;
}

.hm-chat-app.hm-chat-admin #hm-member-chat-close {
    order: 4;
}

.hm-admin-menu-icon {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.hm-badge {
    /* changsu start: 상태 배지 텍스트 수직 중앙 정렬 보정 */
    border: 0;
    background: #f7f9fc;
    height: 24px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* changsu end */
}

.hm-chat-messages {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 14px;
}

.hm-room-search-layer {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--hm-head-layer-top, 62px);
    z-index: 46;
    padding: 13px 10px;
    background: #ffffff;
    border-bottom: 1px solid #d9dee7;
    box-sizing: border-box;
    display: none;
}

.hm-room-search-layer.is-open {
    display: block;
}

.hm-room-search-layer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.hm-room-search-layer-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hm-room-search-layer-status {
    display: inline-block;
    min-width: 96px;
    text-align: right;
    font-size: 13px;
    color: #586276;
    white-space: nowrap;
}

.hm-room-search-layer-status.is-error {
    color: #c5363a;
}

.hm-room-search-layer input {
    height: 40px;
    border: 1px solid #d4d9e2;
    border-radius: 0px;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 13px;
    line-height: 40px;
    color: #1f2531;
    vertical-align: middle;
}

.hm-room-search-layer input::placeholder,
.hm-room-search-layer input::-webkit-input-placeholder {
    line-height: 40px;
}

.hm-room-search-layer button {
    border: 1px solid #d4d9e2;
    background: #ffffff;
    color: #1f2531;
    width: 30px;
    height: 40px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.hm-room-search-layer button:disabled {
    opacity: 0.45;
    cursor: default;
}

.hm-room-search-layer #hm-room-search-layer-close {
    border: 0;
    background: transparent;
    width: 26px;
    font-size: 20px;
}

.hm-room-search-nav-btn {
    font-weight: 700;
}

.hm-empty {
    text-align: center;
    color: #546073;
    padding: 40px 10px;
    font-size: 14px;
}

.hm-day-divider {
    text-align: center;
    margin: 30px 0;
}

.hm-day-divider span {
    background: rgba(45, 54, 67, 0.2);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    padding: 4px 10px;
}

.hm-msg-row {
    display: flex;
    margin: 20px 0;
}

.hm-msg-row.mine {
    justify-content: flex-end;
}

.hm-msg-row.other {
    justify-content: flex-start;
}

.hm-bubble-wrap {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
    max-width: min(680px, 90%);
}

.hm-msg-row.mine .hm-bubble-wrap {
    flex-direction: row-reverse;
}

.hm-bubble {
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    word-break: break-word;
}

.hm-msg-row.mine .hm-bubble {
    background: var(--kakao-mine);
    color: #101318;
}

.hm-msg-row.other .hm-bubble {
    background: var(--kakao-other);
    color: #1f2430;
}

.hm-msg-row.is-search-focus .hm-bubble {
    box-shadow: 0 0 0 2px #ffce4a inset;
}

.hm-bubble.hm-bubble-file {
    padding: 0;
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
}

.hm-msg-meta {
    font-size: 11px;
    color: #4d5563;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.hm-msg-meta.hm-msg-time {
    transform: translateY(2px);
}

/* changsu start: 읽지 않음 카운트(1)는 카카오 노란색으로 고정 */
.hm-msg-meta.hm-msg-unread {
    color: #fee500;
    font-weight: 700;
    position: absolute;
    right: 0;
    bottom: calc(100% - 4px);
    margin-bottom: 0;
    line-height: 1;
}
/* changsu end */

/* changsu start: 메시지 단위 삭제 버튼 */
.hm-msg-meta-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.hm-msg-delete-btn {
    border: 0;
    background: transparent;
    color: #4f5b70;
    border-radius: 0;
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 0;
    cursor: pointer;
    transform: translateY(2px);
}

.hm-msg-delete-btn:hover {
    color: #1f2838;
}

.hm-msg-delete-icon {
    width: 13px;
    height: 13px;
    display: block;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* changsu start: 삭제 아이콘은 항상 메타 영역 바깥쪽에 배치 */
.hm-msg-row.mine .hm-msg-delete-btn {
    order: -1;
}

.hm-msg-row.other .hm-msg-delete-btn {
    order: 99;
}
/* changsu end */
/* changsu end */

.hm-reply {
    font-size: 11px;
    color: #4f5968;
    border-bottom: 1px solid rgba(0, 0, 0, 0.14);
    margin-bottom: 6px;
    padding-bottom: 4px;
}

.hm-chat-card,
.chat-card {
    border: 1px solid #d9dfeb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    min-width: 210px;
}

.chat-card p {
    margin: 6px 0 0;
    font-size: 12px;
    color: #48546a;
}

.chat-goods-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    align-items: stretch;
    gap: 12px;
    min-width: 250px;
    max-width: 320px;
    min-height: 68px;
    padding: 10px;
    border: 1px solid #d9dfeb;
    border-radius: 10px;
    background: #ffffff;
    box-sizing: border-box;
}

.chat-goods-card-link,
.chat-goods-card-link:link,
.chat-goods-card-link:visited,
.chat-goods-card-link:hover,
.chat-goods-card-link:active {
    color: inherit;
    text-decoration: none;
}

.chat-goods-thumb {
    display: block;
    width: 68px;
    height: 68px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    border: 1px solid #e2e6ee;
    background: #f5f7fb;
    object-fit: cover;
}

.chat-goods-body {
    min-width: 0;
    min-height: 68px;
    display: flex;
    flex-direction: column;
    /* changsu start: 상품번호/가격 줄을 조금 더 위로 올리기 */
    justify-content: flex-start;
    /* changsu end */
}

.chat-goods-name {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    color: #1f2531;
    font-weight: 700;
    word-break: break-word;
}

.chat-goods-meta-line {
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    white-space: nowrap;
}

.chat-goods-meta,
.chat-goods-price {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    word-break: break-word;
}

.chat-goods-meta {
    color: #5a667b;
    flex: 0 0 auto;
    white-space: nowrap;
}

.chat-goods-price {
    color: #253249;
    font-weight: 600;
    flex: 0 0 auto;
    white-space: nowrap;
}

.chat-kakao-btn {
    display: inline-block;
    background: #ffeb00;
    color: #1d1d1b;
    font-weight: 700;
    border-radius: 8px;
    padding: 8px 12px;
    text-decoration: none;
}

.chat-file-card {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
    max-width: 280px;
    box-sizing: border-box;
}

.chat-file-card.chat-file-card-doc {
    max-width: 280px;
}

.chat-file-card-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 230px;
    padding: 10px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(205, 214, 228, 0.9);
}

.chat-file-card-text {
    flex: 1 1 auto;
    min-width: 0;
}

.chat-file-card-text strong {
    display: block;
    font-size: 13px;
    line-height: 1.35;
    color: #222a36;
    font-weight: 500;
    word-break: break-all;
}

.chat-file-meta {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.3;
    color: #667388;
}

.chat-file-card-actions {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.3;
}

.chat-file-action {
    color: #2362c9;
    text-decoration: none;
    font-weight: 500;
}

.chat-file-action:hover {
    text-decoration: underline;
}

.chat-file-action-sep {
    margin: 0 6px;
    color: #8c98aa;
}

.chat-file-thumb {
    position: relative;
    flex: 0 0 40px;
    width: 40px;
    height: 48px;
}

.chat-file-thumb-doc {
    display: block;
    width: 34px;
    height: 44px;
    margin: 2px auto 0;
    border-radius: 4px;
    background: #f1f4fb;
    box-shadow: inset 0 0 0 1px rgba(183, 193, 209, 0.95);
}

.chat-file-thumb-doc::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 3px;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 49%, #dde4f0 50%, #dde4f0 100%);
    border-top-right-radius: 4px;
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.chat-file-thumb-ext {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    min-width: 24px;
    padding: 0 2px;
    text-align: center;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.chat-file-thumb.is-excel .chat-file-thumb-doc {
    background: #f3fbf5;
    box-shadow: inset 0 0 0 1px rgba(41, 151, 72, 0.45);
}

.chat-file-thumb.is-excel .chat-file-thumb-ext {
    color: #2b9b48;
}

.chat-file-thumb.is-word .chat-file-thumb-doc {
    background: #f2f7ff;
    box-shadow: inset 0 0 0 1px rgba(49, 111, 220, 0.42);
}

.chat-file-thumb.is-word .chat-file-thumb-ext {
    color: #2f63d1;
}

.chat-file-thumb.is-hwp .chat-file-thumb-doc {
    background: #f2fbfb;
    box-shadow: inset 0 0 0 1px rgba(48, 143, 150, 0.42);
}

.chat-file-thumb.is-hwp .chat-file-thumb-ext {
    color: #257f86;
}

.chat-file-thumb.is-pdf .chat-file-thumb-doc {
    background: #fff3f1;
    box-shadow: inset 0 0 0 1px rgba(212, 84, 70, 0.4);
}

.chat-file-thumb.is-pdf .chat-file-thumb-ext {
    color: #cb4b3d;
}

.chat-file-thumb.is-ppt .chat-file-thumb-doc {
    background: #fff5ef;
    box-shadow: inset 0 0 0 1px rgba(225, 117, 45, 0.42);
}

.chat-file-thumb.is-ppt .chat-file-thumb-ext {
    color: #da7426;
}

.chat-file-thumb.is-archive .chat-file-thumb-doc {
    background: #f7f3ff;
    box-shadow: inset 0 0 0 1px rgba(125, 94, 186, 0.38);
}

.chat-file-thumb.is-archive .chat-file-thumb-ext {
    color: #7b5eb5;
}

.chat-file-thumb.is-text .chat-file-thumb-doc,
.chat-file-thumb.is-file .chat-file-thumb-doc,
.chat-file-thumb.is-video .chat-file-thumb-doc {
    background: #f5f7fb;
    box-shadow: inset 0 0 0 1px rgba(146, 158, 179, 0.38);
}

.chat-file-thumb.is-text .chat-file-thumb-ext,
.chat-file-thumb.is-file .chat-file-thumb-ext,
.chat-file-thumb.is-video .chat-file-thumb-ext {
    color: #667388;
}

.chat-file-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 0;
    background: transparent;
}

.chat-file-video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 280px;
    border: 0;
    border-radius: 8px;
    background: #000;
}

.chat-file-card p {
    margin: 8px 0 0;
    font-size: 12px;
    color: #2d3442;
    word-break: break-all;
}

.chat-file-link {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: #1f2430;
    text-decoration: underline;
    font-size: 12px;
    font-weight: 700;
}

.hm-chat-input {
    background: #fff;
    border-top: 1px solid var(--kakao-border);
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 80px;
    gap: 10px;
}

.hm-chat-input textarea {
    resize: none;
    min-height: 44px;
    max-height: 120px;
}

.hm-chat-input #hm-send-btn,
.hm-row-inline button,
.hm-btn-wide {
    border: 1px solid #2f3a4f;
    background: #2f3a4f;
    color: #fff;
    border-radius: 0;
    cursor: pointer;
    font-size: 13px;
    padding: 0 12px;
    min-height: 40px;
}

.hm-chat-tools {
    display: none;
}

.hm-chat-tool-btn {
    border: 0;
    background: transparent;
    color: #2e3643;
    font-size: 16px;
    font-weight: 600;
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    position: relative;
}

.hm-chat-tool-btn::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    background: rgba(18, 24, 32, 0.92);
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    padding: 5px 7px;
    border-radius: 6px;
    z-index: 20;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.hm-chat-tool-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% + 2px);
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(18, 24, 32, 0.92);
    z-index: 20;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.hm-chat-tool-btn:hover::after,
.hm-chat-tool-btn:hover::before,
.hm-chat-tool-btn:focus-visible::after,
.hm-chat-tool-btn:focus-visible::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.hm-tool-icon {
    display: block;
    line-height: 1;
    width: 24px;
    height: 24px;
    stroke: #222222;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    shape-rendering: geometricPrecision;
    vector-effect: non-scaling-stroke;
}

.hm-tool-icon .hm-tool-fill {
    fill: #222222;
    stroke: none;
}

.hm-chat-tool-btn .hm-tool-order {
    width: 24px;
}

.hm-chat-tool-btn .hm-tool-file {
    transform: translateX(2px) translateY(1px);
}

.hm-chat-tool-btn .hm-tool-goods {
    width: 24px;
    height: 24px;
    transform: translateY(1px);
}


.hm-chat-tool-file {
    display: none !important;
}

.hm-chat-layer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 30;
    background: #ffffff;
    border: 1px solid #d8dce4;
    border-radius: 0px;
    display: none;
    overflow: hidden;
    max-height: 420px;
}

.hm-chat-layer.is-open {
    display: block;
}

.hm-chat-layer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #edf0f5;
    background: #f7f9fc;
}

.hm-chat-layer-head strong {
    font-size: 13px;
    color: #1f2531;
}

.hm-chat-layer-close {
    border: 0;
    background: transparent;
    color: #2f3542;
    width: 20px;
    height: 20px;
    padding: 0;
    line-height: 1;
    font-size: 18px;
    cursor: pointer;
}

.hm-chat-layer-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f5;
}

.hm-chat-layer-search input {
    border: 1px solid #d4d9e2 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #d4d9e2 !important;
    border-radius: 0px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    box-sizing: border-box;
    font-size: 13px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
    background-clip: padding-box;
}

.hm-chat-layer-search input:focus,
.hm-chat-layer-search input:focus-visible {
    border-color: #d4d9e2 !important;
    outline: none !important;
    box-shadow: none !important;
}

.hm-chat-layer-search button {
    border: 1px solid #d4d9e2 !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-color: #d4d9e2 !important;
    background: #f4f7fb;
    color: #1f2531;
    border-radius: 0;
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
}

.hm-chat-layer-search button:focus,
.hm-chat-layer-search button:focus-visible {
    border-color: #d4d9e2 !important;
    outline: none !important;
    box-shadow: none !important;
}

.hm-chat-layer-caption {
    padding: 11px 14px 0;
    font-size: 13px;
    color: #657086;
}

.hm-chat-layer-list {
    list-style: none;
    margin: 0;
    padding: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.hm-chat-layer-goods .hm-chat-layer-list {
    max-height: 330px;
}

.hm-chat-layer-order .hm-chat-layer-list {
    max-height: 320px;
}

.hm-chat-layer-emoji {
    max-height: 300px;
}

.hm-chat-layer-item {
    margin: 0 0 8px;
}

.hm-chat-layer-item:last-child {
    margin-bottom: 0;
}

.hm-chat-layer-item button {
    width: 100%;
    border: 1px solid #e1e6ee;
    background: #ffffff;
    border-radius: 0px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}

.hm-chat-layer-item button:hover {
    background: #f4f8ff;
    border-color: #b7caee;
}

.hm-chat-layer-item strong {
    display: block;
    font-size: 12px;
    color: #121823;
    margin-bottom: 2px;
}

.hm-chat-layer-item span {
    display: block;
    font-size: 12px;
    color: #5c677c;
    line-height: 1.35;
}

.hm-chat-layer-goods-btn {
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.hm-chat-layer-thumb {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    border: 1px solid #e2e6ee;
    background: #f5f7fb;
    object-fit: cover;
    display: block;
}

.hm-chat-layer-text {
    min-width: 0;
}

.hm-chat-layer-goods .hm-chat-layer-item strong {
    font-size: 13px;
    margin-bottom: 3px;
}

.hm-chat-layer-goods .hm-chat-layer-item span {
    font-size: 13px;
    line-height: 1.42;
}

.hm-chat-layer-text strong,
.hm-chat-layer-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-chat-layer-list .is-empty {
    border: 1px dashed #dde2ea;
    border-radius: 7px;
    background: #f8fafd;
    color: #728099;
    font-size: 12px;
    text-align: center;
    padding: 16px 10px;
}

.hm-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    max-height: 232px;
    overflow-y: auto;
}

.hm-emoji-grid button {
    border: 1px solid #e2e6ee;
    background: #ffffff;
    border-radius: 6px;
    height: 34px;
    min-height: 34px;
    line-height: 1;
    font-size: 18px;
    padding: 0;
    cursor: pointer;
}

.hm-emoji-grid button:hover {
    background: #f4f8ff;
    border-color: #b7caee;
}

.hm-admin-panel {
    border-left: 1px solid var(--kakao-border);
    background: var(--kakao-panel);
    overflow: auto;
    padding: 14px;
    box-sizing: border-box;
}

.hm-admin-panel.is-hidden {
    display: none;
}

.hm-admin-panel-top {
    display: none;
}

#hm-admin-panel-close {
    display: none;
}

.hm-panel-block {
    background: #fff;
    border: 1px solid var(--kakao-border);
    border-radius: 0;
    padding: 12px;
    margin-bottom: 12px;
}

.hm-panel-block h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.hm-peer-meta {
    margin: 0;
}

.hm-peer-meta div {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 6px;
}

.hm-peer-meta dt {
    color: #596173;
}

.hm-peer-meta dd {
    margin: 0;
    font-weight: 600;
}

.hm-row-inline {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.hm-btn-wide {
    width: 100%;
}

.hm-help {
    margin: 8px 0 0;
    color: #5e6776;
    font-size: 12px;
}

.hm-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hm-order-list li {
    border: 1px solid var(--kakao-border);
    background: #fff;
    border-radius: 0;
    padding: 8px;
    font-size: 12px;
    margin-bottom: 6px;
    cursor: pointer;
}

.hm-order-list li:hover {
    border-color: #9bb7ea;
    background: #f3f7ff;
}

#hm-mobile-menu {
    display: none;
}

@media (max-width: 1280px) {
    .hm-chat-app.hm-chat-admin {
        grid-template-columns: 320px 1fr;
    }

    .hm-admin-panel {
        position: fixed;
        z-index: 50;
        top: 0;
        right: 0;
        width: min(380px, 92vw);
        height: 100vh;
        transform: translateX(100%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }

    .hm-chat-app.hm-chat-admin.is-panel-open .hm-admin-panel {
        transform: translateX(0);
    }

    .hm-admin-panel-top {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 8px;
    }

    #hm-admin-panel-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 920px) and (hover: none), (max-width: 920px) and (pointer: coarse) {
    .hm-guest-auth-wrap {
        min-height: 100vh;
        margin: 0;
        padding: 14px;
        box-sizing: border-box;
    }

    .hm-guest-auth-card {
        width: 100%;
        padding: 18px;
    }

    .hm-guest-auth-row {
        grid-template-columns: 1fr;
    }

    .hm-chat-app,
    .hm-chat-app.hm-chat-admin {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
        grid-template-columns: 1fr;
    }

    .hm-chat-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(380px, 88vw);
        height: 100vh;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }

    .hm-chat-app.is-sidebar-open .hm-chat-sidebar {
        transform: translateX(0);
    }

    #hm-mobile-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hm-bubble-wrap {
        max-width: 92%;
    }

    .hm-chat-input {
        grid-template-columns: 1fr 70px;
    }
}

@media (hover: hover) and (pointer: fine) {
    html,
    body {
        background: #17191d;
        overflow: hidden;
    }

    #main {
        min-height: 100vh;
        background: transparent !important;
    }

    .hm-guest-auth-wrap {
        height: 100vh;
        min-height: 0;
        padding: 0;
        align-items: center;
        justify-content: center;
        background: #f5f7fb;
        overflow: hidden;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .hm-kakao-auth-inner {
        width: 360px;
        height: 640px;
        background: #f5f7fb;
        padding-top: 30px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .hm-kakao-auth-title {
        display: none;
    }

    .hm-kakao-logo {
        width: auto;
        height: auto;
        margin-bottom: 28px;
    }

    .hm-kakao-logo.hm-kakao-logo-text {
        font-size: 33px;
        min-width: 150px;
        min-height: 70px;
    }

    .hm-kakao-logo.hm-kakao-logo-text::after {
        left: 36px;
        bottom: -15px;
        border-top-width: 18px;
        border-right-width: 12px;
    }

    .hm-kakao-logo img {
        width: 172px;
    }

    .hm-kakao-auth-box {
        width: 252px;
        margin-top: 18px;
    }

    .hm-kakao-auth-group h2 {
        display: none;
    }

    .hm-kakao-auth-group input,
    .hm-guest-auth-row input {
        height: 40px;
        border-radius: 2px;
        background: #ffffff;
        border-color: #d8d8d8;
        font-size: 13px;
        color: #000000;
        padding: 0 10px;
    }

    .hm-kakao-auth-group input:-webkit-autofill,
    .hm-kakao-auth-group input:-webkit-autofill:hover,
    .hm-kakao-auth-group input:-webkit-autofill:focus,
    .hm-guest-auth-row input:-webkit-autofill,
    .hm-guest-auth-row input:-webkit-autofill:hover,
    .hm-guest-auth-row input:-webkit-autofill:focus {
        -webkit-text-fill-color: #000000;
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
        box-shadow: 0 0 0 1000px #ffffff inset;
    }

    .hm-kakao-auth-group input::placeholder,
    .hm-guest-auth-row input::placeholder {
        color: #000000;
        transform: translateY(1px);
    }

    .hm-kakao-auth-group input::-webkit-input-placeholder,
    .hm-guest-auth-row input::-webkit-input-placeholder {
        color: #000000;
        transform: translateY(1px);
    }

    .hm-kakao-auth-group button,
    .hm-guest-auth-row button {
        height: 40px;
        border-radius: 2px;
        background: #f2f2f2;
        border-color: #d8d8d8;
        font-size: 13px;
        font-weight: 400;
        color: #000000;
        margin-top: 6px;
    }

    .hm-kakao-auth-divider {
        margin: 30px 0 20px;
        color: #000000;
        font-size: 11px;
    }

    .hm-kakao-auth-divider::before,
    .hm-kakao-auth-divider::after {
        background: rgba(89, 101, 122, 0.25);
    }

    .hm-kakao-auth-group > input + input {
        margin-top: 5px;
    }

    .hm-guest-auth-row {
        margin-top: 5px;
    }

    .hm-kakao-auth-divider + .hm-kakao-auth-group .hm-guest-auth-row:first-child {
        margin-top: 14px;
    }

    .hm-guest-auth-help {
        display: none;
    }

    .hm-chat-app,
    .hm-chat-app.hm-chat-admin {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
        grid-template-columns: 1fr;
    }

    .hm-chat-app,
    .hm-chat-app * {
        font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Segoe UI', sans-serif;
    }

    .hm-chat-main {
        grid-template-rows: 60px minmax(0, 1fr) auto;
        background: #bacee0;
        min-height: 0;
        --hm-head-layer-top: 60px;
    }

    .hm-chat-head {
        height: 60px;
        background: #bacee0;
        border-bottom: 0;
        padding: 0 12px 0 16px;
        gap: 10px;
        align-items: center;
    }

    .hm-chat-head > * {
        align-self: center;
    }

    .hm-chat-head .hm-icon-btn {
        width: auto;
        height: auto;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: 14px;
        color: #1e2531;
        padding: 0;
        min-height: 0;
    }

    .hm-chat-head .hm-icon-btn,
    .hm-chat-head #hm-member-search-btn,
    .hm-chat-head #hm-member-chat-close,
    .hm-chat-head #hm-mobile-menu,
    .hm-chat-head #hm-toggle-panel {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        -webkit-appearance: none;
        appearance: none;
        outline: none;
    }

    .hm-chat-title {
        gap: 2px;
        justify-content: center;
    }

    .hm-chat-title strong {
        font-size: 14px;
        letter-spacing: -0.1px;
        font-weight: 700;
        line-height: 1.2;
        display: flex;
        align-items: center;
        min-height: 28px;
    }

    .hm-chat-title span {
        display: none;
    }

    .hm-chat-head-actions {
        margin-left: auto;
        position: relative;
        width: 18px;
        min-width: 18px;
        height: 18px;
        color: #111111;
    }

    .hm-chat-head-actions > * {
        display: none !important;
    }

    .hm-chat-head-actions::before,
    .hm-chat-head-actions::after {
        content: '';
        position: absolute;
        left: 8px;
        top: 1px;
        width: 1.8px;
        height: 16px;
        background: currentColor;
        border-radius: 2px;
        transform-origin: center;
    }

    .hm-chat-head-actions::before {
        transform: rotate(45deg);
    }

    .hm-chat-head-actions::after {
        transform: rotate(-45deg);
    }

    .hm-chat-app.hm-chat-member .hm-chat-head-actions {
        width: auto;
        min-width: 0;
        height: auto;
        position: static;
    }

    .hm-chat-app.hm-chat-member .hm-chat-head-actions > * {
        display: inline-flex !important;
    }

    .hm-chat-app.hm-chat-member .hm-chat-head-actions::before,
    .hm-chat-app.hm-chat-member .hm-chat-head-actions::after {
        content: none;
    }

    .hm-chat-app.hm-chat-admin .hm-chat-head-actions {
        width: auto;
        min-width: 0;
        height: auto;
        position: static;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .hm-chat-app.hm-chat-admin .hm-chat-head-actions > * {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .hm-chat-app.hm-chat-admin .hm-chat-head-actions::before,
    .hm-chat-app.hm-chat-admin .hm-chat-head-actions::after {
        content: none;
    }

    #hm-room-status-badge {
        display: none;
    }

    #hm-mobile-menu,
    #hm-toggle-panel {
        display: none !important;
    }

    .hm-chat-app.hm-chat-admin #hm-room-status-badge,
    .hm-chat-app.hm-chat-admin #hm-mobile-menu,
    .hm-chat-app.hm-chat-admin #hm-toggle-panel {
        display: inline-flex !important;
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu,
    .hm-chat-app.hm-chat-admin #hm-toggle-panel {
        width: 26px;
        height: 26px;
        min-width: 26px;
        min-height: 26px;
        font-size: 18px;
        line-height: 1;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu {
        font-size: 18px;
    }

    .hm-chat-app.hm-chat-admin #hm-toggle-panel .hm-admin-menu-icon {
        width: 23px;
        height: 23px;
    }

    .hm-chat-app.hm-chat-admin #hm-member-search-btn {
        order: 3;
    }

    .hm-chat-app.hm-chat-admin #hm-member-chat-close {
        order: 4;
    }

    .hm-chat-app.hm-chat-admin #hm-room-status-badge {
        order: 1;
    }

    .hm-chat-app.hm-chat-admin #hm-toggle-panel {
        order: 2;
    }

    .hm-chat-app.hm-chat-member .hm-chat-head-actions {
        gap: 10px;
    }

    .hm-room-search-layer {
        padding: 10px;
    }

    .hm-room-search-layer-inner {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hm-room-search-layer-controls {
        justify-content: flex-end;
    }

    .hm-room-search-layer-status {
        margin-right: auto;
        min-width: 0;
        text-align: left;
    }

    .hm-chat-messages {
        padding: 12px 15px 14px;
        background: #bacee0;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 0;
    }

    .hm-empty {
        color: #4f5f73;
        font-size: 13px;
        padding-top: 72px;
    }

    .hm-day-divider span {
        background: rgba(96, 111, 129, 0.24);
        color: #111111;
        font-size: 12px;
        padding: 8px 15px;
    }

    .hm-msg-row {
        margin: 20px 0;
    }

    .hm-bubble-wrap {
        max-width: 380px;
        gap: 5px;
    }

    .hm-bubble-wrap > .hm-msg-meta-wrap {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        padding-bottom: 0;
        position: relative;
    }

    .hm-bubble {
        border-radius: 4px;
        padding: 6px 8px;
        font-size: 12px;
        line-height: 1.4;
        box-shadow: none;
    }

    .hm-msg-row.mine .hm-bubble {
        background: #fee500;
        color: #17191d;
    }

    .hm-msg-row.other .hm-bubble {
        background: #ffffff;
        color: #151922;
    }

    .hm-msg-meta {
        font-size: 11px;
        color: #333333;
        letter-spacing: -0.1px;
    }

    /* changsu start: 모바일 메시지 삭제 버튼 터치 크기 보정 */
    .hm-msg-delete-btn {
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        padding: 0;
    }

    .hm-msg-delete-icon {
        width: 14px;
        height: 14px;
    }
    /* changsu end */

    .hm-chat-input {
        background: #ffffff;
        border-top: 1px solid #d8dde5;
        padding: 0;
        display: block;
        position: relative;
        height: clamp(92px, 16vh, 114px);
        min-height: clamp(92px, 16vh, 114px);
        max-height: clamp(92px, 16vh, 114px);
        box-sizing: border-box;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .hm-chat-input::before {
        content: none !important;
    }

    .hm-chat-input textarea {
        position: absolute;
        top: 10px;
        left: 15px;
        right: 15px;
        bottom: 50px;
        width: auto;
        height: auto !important;
        min-height: 40px;
        max-height: none;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        font-size: 12px;
        color: #1c2330;
        line-height: 1.34;
        padding: 0 !important;
        margin: 0 !important;
        text-indent: 0 !important;
        box-sizing: border-box;
        box-shadow: none !important;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1;
        -webkit-appearance: none;
        appearance: none;
    }

    .hm-chat-input textarea::placeholder {
        color: #8f99a8;
    }

    .hm-chat-input textarea:focus {
        outline: none;
    }

    .hm-chat-input input[type="range"],
    .hm-chat-input select {
        display: none !important;
    }

    .hm-chat-tools {
        position: absolute;
        left: 15px;
        right: 82px;
        bottom: 10px;
        height: 35px;
        display: flex;
        align-items: center;
        gap: 0;
        overflow: visible;
        white-space: nowrap;
        z-index: 2;
    }

    .hm-chat-layer {
        left: 0;
        right: 0;
        bottom: 100%;
        border-radius: 0px;
        max-height: 365px;
    }

    .hm-chat-layer-head {
        padding: 9px 11px;
    }

    .hm-chat-layer-head strong {
        font-size: 12px;
    }

    .hm-chat-layer-close {
        width: 18px;
        height: 18px;
        font-size: 16px;
    }

    .hm-chat-layer-search {
        padding: 10px 12px;
    }

    .hm-chat-layer-search input,
    .hm-chat-layer-search button {
        height: 36px;
        min-height: 36px;
        font-size: 13px;
    }

    .hm-chat-layer-search input,
    .hm-chat-layer-search input:focus {
        border-color: #d4d9e2;
        box-shadow: none;
        outline: none;
    }

    .hm-chat-layer-search button {
        padding: 0 14px;
    }

    .hm-chat-layer-caption {
        padding: 9px 12px 0;
        font-size: 12px;
    }

    .hm-chat-layer-list {
        max-height: 270px;
        padding: 8px;
    }

    .hm-chat-layer-item button {
        padding: 9px 10px;
    }

    .hm-chat-layer-goods .hm-chat-layer-list {
        max-height: 285px;
    }

    .hm-chat-layer-order .hm-chat-layer-list {
        max-height: 275px;
    }

    .hm-chat-layer-emoji {
        max-height: 260px;
    }

    .hm-emoji-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 5px;
        padding: 8px;
        max-height: 198px;
    }

    .hm-emoji-grid button {
        height: 30px;
        min-height: 30px;
        font-size: 17px;
        border-radius: 5px;
    }

    .hm-chat-tool-btn {
        border: 0;
        background: transparent;
        color: #2a3342;
        font-size: 0;
        font-weight: 400;
        letter-spacing: -0.2px;
        line-height: 1;
        padding: 0;
        width: 35px;
        height: 35px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .hm-chat-tool-btn .hm-tool-icon {
        width: 24px;
        height: 24px;
        stroke: #222222;
        stroke-width: 1.35;
        shape-rendering: geometricPrecision;
        vector-effect: non-scaling-stroke;
    }

    .hm-chat-tool-btn .hm-tool-icon .hm-tool-fill {
        fill: #222222;
    }

    .hm-chat-tool-btn .hm-tool-order {
        width: 24px;
    }

    .hm-chat-tool-btn .hm-tool-goods {
        width: 24px;
        height: 24px;
    }

    .hm-chat-tool-btn + .hm-chat-tool-btn {
        margin-left: 10px;
        padding-left: 0;
        border-left: 0;
    }

    .hm-chat-input #hm-send-btn {
        position: absolute;
        right: 18px;
        bottom: 10px;
        min-height: 30px;
        height: 30px;
        min-width: 54px;
        border: 1px solid #e1e5ec;
        border-radius: 0px;
        background: #f3f5f8;
        color: #b2b8c2;
        font-size: 12px;
        font-weight: 500;
        padding: 0 12px;
    }

    .hm-chat-input #hm-send-btn.is-ready {
        background: #fee500;
        border-color: #f2d500;
        color: #423630;
    }

    .hm-chat-sidebar {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .hm-chat-app.is-sidebar-open .hm-chat-sidebar {
        transform: translateX(0);
    }

    #hm-mobile-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hm-admin-panel {
        position: absolute;
        top: 0;
        right: 0;
        width: min(340px, 90%);
        height: 100%;
        z-index: 55;
        transform: translateX(100%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }

.hm-chat-app.is-panel-open .hm-admin-panel {
        transform: translateX(0);
    }
}

@media (max-width: 920px) {
    html,
    body,
    #main {
        min-height: 100vh;
        min-height: 100dvh;
        -webkit-text-size-adjust: 116%;
        text-size-adjust: 116%;
    }

    /* changsu start: 모바일 로그인 화면을 PC 로그인 규격과 동일하게 */
    .hm-guest-auth-wrap {
        height: 100vh;
        min-height: 0;
        padding: 16px 0 0;
        align-items: flex-start;
        justify-content: center;
        background: #f5f7fb;
        overflow: hidden;
    }

    .hm-kakao-auth-inner {
        width: min(360px, 100vw);
        height: 640px;
        background: #f5f7fb;
        padding-top: 30px;
        box-sizing: border-box;
        overflow: hidden;
    }

    .hm-kakao-auth-title {
        display: none;
    }

    .hm-kakao-logo {
        width: auto;
        height: auto;
        margin-bottom: 28px;
    }

    .hm-kakao-logo.hm-kakao-logo-text {
        font-size: 26px;
        min-width: 150px;
        min-height: 70px;
        transform: none;
        text-indent: -1px;
        padding-top: 3px;
    }

    .hm-kakao-logo.hm-kakao-logo-text::after {
        left: 36px;
        bottom: -15px;
        border-top-width: 18px;
        border-right-width: 12px;
    }

    .hm-kakao-auth-box {
        width: min(292px, calc(100% - 36px));
        margin-top: 14px;
    }

    .hm-kakao-auth-group h2 {
        display: none;
    }

    .hm-kakao-auth-group input,
    .hm-guest-auth-row input {
        height: 50px;
        box-sizing: border-box;
        border-radius: 2px;
        background: #ffffff;
        border-color: #d8d8d8;
        font-size: 15px;
        line-height: normal;
        color: #000000;
        padding: 3px 12px 0;
    }

    .hm-kakao-auth-group input:-webkit-autofill,
    .hm-kakao-auth-group input:-webkit-autofill:hover,
    .hm-kakao-auth-group input:-webkit-autofill:focus,
    .hm-guest-auth-row input:-webkit-autofill,
    .hm-guest-auth-row input:-webkit-autofill:hover,
    .hm-guest-auth-row input:-webkit-autofill:focus {
        -webkit-text-fill-color: #000000;
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
        box-shadow: 0 0 0 1000px #ffffff inset;
    }

    .hm-kakao-auth-group input::placeholder,
    .hm-guest-auth-row input::placeholder {
        color: #000000;
        line-height: normal;
    }

    .hm-kakao-auth-group input::-webkit-input-placeholder,
    .hm-guest-auth-row input::-webkit-input-placeholder {
        color: #000000;
        line-height: normal;
    }

    .hm-kakao-auth-group button,
    .hm-guest-auth-row button {
        height: 46px;
        border-radius: 2px;
        background: #f2f2f2;
        border-color: #d8d8d8;
        font-size: 15px;
        font-weight: 500;
        color: #000000;
        margin-top: 6px;
    }

    .hm-kakao-auth-divider {
        margin: 26px 0 18px;
        color: #000000;
        font-size: 13px;
    }

    .hm-kakao-auth-divider::before,
    .hm-kakao-auth-divider::after {
        background: rgba(89, 101, 122, 0.25);
    }

    .hm-kakao-auth-group > input + input {
        margin-top: 5px;
    }

    .hm-guest-auth-row {
        margin-top: 5px;
    }

    .hm-kakao-auth-divider + .hm-kakao-auth-group .hm-guest-auth-row:first-child {
        margin-top: 14px;
    }

    .hm-guest-auth-help {
        display: none;
    }
    /* changsu end */

    .hm-chat-app,
    .hm-chat-app.hm-chat-admin {
        height: 100vh;
        height: 100dvh;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow: hidden;
    }

    #hm-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hm-chat-main {
        height: 100%;
        min-height: 0;
        display: grid;
        grid-template-rows: 60px minmax(0, 1fr) calc(clamp(92px, 16vh, 114px) + env(safe-area-inset-bottom));
        --hm-head-layer-top: 60px;
    }

    /* changsu start: 모바일 상단 헤더 배경을 PC와 동일하게 고정 */
    .hm-chat-head {
        background: #bacee0;
        border-bottom: 0;
    }
    /* changsu end */

    /* changsu start: 모바일 검색 레이어 레이아웃을 기기별 포인터 조건과 무관하게 고정 */
    .hm-room-search-layer {
        padding: 10px;
    }

    .hm-room-search-layer-inner {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .hm-room-search-layer-controls {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 30px 30px 26px;
        align-items: center;
        column-gap: 6px;
        width: 100%;
    }

    .hm-room-search-layer-status {
        margin-right: 0;
        min-width: 0;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hm-room-search-layer input {
        width: 100%;
        font-size: 14px;
    }
    /* changsu end */

    /* changsu start: 모바일 상단 아이콘 체감 크기를 PC와 동일하게 보정 */
    .hm-chat-app .hm-chat-head-actions {
        gap: 10px;
    }

    .hm-chat-app #hm-member-search-btn,
    .hm-chat-app #hm-member-chat-close,
    .hm-chat-app.hm-chat-admin #hm-mobile-menu,
    .hm-chat-app.hm-chat-admin #hm-toggle-panel {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    .hm-chat-app #hm-member-search-btn svg {
        width: 24px;
        height: 24px;
    }

    .hm-chat-app #hm-member-chat-close .hm-head-close-icon {
        width: 24px;
        height: 24px;
        transform: scale(1.08);
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu {
        transform: none;
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu .hm-head-menu-icon {
        width: 19px;
        height: 24px;
    }

    .hm-chat-app.hm-chat-admin #hm-toggle-panel .hm-admin-menu-icon {
        width: 25px;
        height: 25px;
    }
    /* changsu end */

    .hm-chat-messages {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .hm-chat-input {
        display: block;
        position: relative;
        height: calc(clamp(92px, 16vh, 114px) + env(safe-area-inset-bottom));
        min-height: calc(clamp(92px, 16vh, 114px) + env(safe-area-inset-bottom));
        max-height: calc(clamp(92px, 16vh, 114px) + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 12;
    }

    .hm-chat-tools {
        position: absolute;
        left: 15px;
        right: 82px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        height: 35px;
        display: flex;
        align-items: center;
        gap: 0;
        overflow: visible;
        white-space: nowrap;
        z-index: 2;
    }

    .hm-chat-input textarea {
        position: absolute;
        top: 10px;
        left: 15px;
        right: 15px;
        width: auto;
        bottom: calc(50px + env(safe-area-inset-bottom));
        height: auto !important;
        min-height: 40px;
        max-height: none;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        z-index: 1;
    }

    .hm-chat-input #hm-send-btn {
        position: absolute;
        right: 18px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        min-height: 30px;
        height: 30px;
        min-width: 54px;
        border: 1px solid #e1e5ec;
        border-radius: 0;
        background: #f3f5f8;
        color: #b2b8c2;
        font-size: 12px;
        font-weight: 500;
        padding: 0 12px;
    }

    .hm-chat-input #hm-send-btn.is-ready {
        background: #fee500;
        border-color: #f2d500;
        color: #423630;
    }
}

@media (max-width: 920px) and (hover: none), (max-width: 920px) and (pointer: coarse) {
    .hm-chat-app,
    .hm-chat-main,
    .hm-chat-sidebar,
    .hm-admin-panel {
        box-shadow: none !important;
    }

    /* changsu start: 모바일 상단 아이콘 체감 크기를 PC와 동일하게 보정 */
    .hm-chat-app .hm-chat-head-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .hm-chat-app #hm-room-status-badge {
        flex: 0 0 auto;
    }

    .hm-chat-app #hm-member-search-btn,
    .hm-chat-app #hm-member-chat-close,
    .hm-chat-app.hm-chat-admin #hm-mobile-menu,
    .hm-chat-app.hm-chat-admin #hm-toggle-panel {
        width: 30px;
        height: 30px;
        min-width: 30px;
        min-height: 30px;
        padding: 0;
        line-height: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hm-chat-app #hm-delete-room-btn {
        width: auto;
        min-width: 44px;
        height: 28px;
        min-height: 28px;
        font-size: 12px;
        padding: 0 8px;
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu {
        transform: translateY(-1px);
    }

    .hm-chat-app.hm-chat-admin #hm-mobile-menu .hm-head-menu-icon {
        width: 20px;
        height: 24px;
    }

    .hm-chat-app #hm-member-search-btn svg {
        width: 24px;
        height: 24px;
    }

    .hm-chat-app #hm-member-chat-close .hm-head-close-icon {
        width: 24px;
        height: 24px;
        transform: scale(1.08);
    }

    .hm-chat-app.hm-chat-admin #hm-toggle-panel .hm-admin-menu-icon {
        width: 25px;
        height: 25px;
    }
    /* changsu end */

    .hm-chat-tool-btn .hm-tool-icon {
        width: 30px;
        height: 30px;
        stroke-width: 1.2;
    }

    .hm-chat-tool-btn .hm-tool-order,
    .hm-chat-tool-btn .hm-tool-goods {
        width: 30px;
        height: 30px;
    }


    .hm-chat-tool-btn {
        width: 40px;
        height: 40px;
    }

    .hm-chat-tool-btn + .hm-chat-tool-btn {
        margin-left: 14px;
    }
}
