/* 상담 요청 팝업 (assets/js/consult-modal.js 가 만든다) — 2026-11-25
   위쪽 가운데 막대나 제목 줄을 끌어 창을 옮기고, 오른쪽 위 X로 닫는다.
   휴대폰(640px 이하)에서는 화면 아래에서 올라오는 창으로 바뀌고 옮길 수 없다. */

button.cta-btn[data-consult] { border: 0; font-family: inherit; cursor: pointer; }

html.cm-lock { overflow: hidden; scrollbar-gutter: stable; } /* 2026-11-28: 스크롤바가 사라져도 화면이 옆으로 밀리지 않게 */

.cm-root { position: fixed; inset: 0; z-index: 10000; font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", -apple-system, "Segoe UI", sans-serif; color: var(--text-body, #2f3350); }
.cm-root[hidden] { display: none; }
.cm-backdrop { position: absolute; inset: 0; touch-action: none; background: rgba(13, 19, 51, .38); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); animation: cm-fade .2s ease both; }

.cm-win {
  position: fixed; left: 0; top: 0; width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  display: flex; flex-direction: column; box-sizing: border-box;
  background: #fff; border-radius: 18px; box-shadow: 0 28px 70px rgba(13, 19, 51, .38), 0 0 0 1px rgba(22, 32, 74, .06);
  overflow: hidden; animation: cm-pop .24s cubic-bezier(.2, .8, .3, 1) both;
}
.cm-win * { box-sizing: border-box; }
.cm-win:focus { outline: none; }
.cm-win.is-dragging { box-shadow: 0 34px 80px rgba(13, 19, 51, .46), 0 0 0 1px rgba(22, 32, 74, .1); }

/* 끌어서 옮기는 위쪽 막대 */
.cm-grip { flex: none; display: flex; align-items: center; justify-content: center; height: 20px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
.cm-grip span { width: 44px; height: 5px; border-radius: 3px; background: #cfd2dc; transition: background-color .15s, width .15s; }
.cm-grip:hover span, .cm-grip:focus-visible span { background: var(--blue, #3e68b3); width: 54px; }
.cm-win.is-dragging .cm-grip, .cm-win.is-dragging .cm-head { cursor: grabbing; }

.cm-head { position: relative; flex: none; padding: 2px 54px 12px 24px; border-bottom: 1px solid var(--gray-line, #dcdde3); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.cm-sub { margin: 8px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-muted, #6b6f88); word-break: keep-all; }

/* 상담 요청 / 일반 문의: 창 제목을 고르는 두 칸 */
.cm-kind { display: inline-flex; gap: 3px; padding: 3px; border-radius: 13px; background: #eceef3; cursor: default; touch-action: manipulation; }
.cm-kind label { position: relative; margin: 0; cursor: pointer; }
.cm-kind input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cm-kind span { display: block; padding: 6px 18px; border-radius: 10px; font-size: 17px; line-height: 1.3; font-weight: 800; letter-spacing: -.3px; color: #7b8099; transition: background-color .18s, color .18s, box-shadow .18s; white-space: nowrap; }
.cm-kind label:hover span { color: var(--text-body, #2f3350); }
.cm-kind input:checked + span { background: #fff; color: var(--text-dark, #050315); box-shadow: 0 2px 8px rgba(22, 32, 74, .14); }
.cm-kind input:focus-visible + span { outline: 3px solid rgba(62, 104, 179, .45); outline-offset: 1px; }

.cm-x { position: absolute; right: 14px; top: 3px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #eceef3; color: #4a4f68; cursor: pointer; display: grid; place-items: center; transition: background-color .15s, color .15s, transform .15s; }
.cm-x:hover { background: var(--blue-light, #e4ebf7); color: var(--blue-dark, #243a94); }
.cm-x:active { transform: scale(.94); }
.cm-x svg { width: 14px; height: 14px; display: block; }
.cm-win button:focus-visible, .cm-win select:focus-visible, .cm-win input:focus-visible, .cm-win textarea:focus-visible { outline: 3px solid rgba(62, 104, 179, .35); outline-offset: 1px; }

.cm-form[hidden] { display: none; }
.cm-form { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0; }
.cm-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; padding: 12px 24px 4px; }
.cm-body::-webkit-scrollbar, .cm-done::-webkit-scrollbar { display: none; }
/* 사용자가 '전하실 말씀' 칸을 키워 창이 길어지면(JS 가 is-scroll 을 붙임) 오른쪽에 가는 스크롤바를 보여 준다 */
.cm-body.is-scroll { scrollbar-width: thin; scrollbar-color: #c2c6d6 transparent; padding-right: 14px; }
.cm-body.is-scroll::-webkit-scrollbar { display: block; width: 8px; }
.cm-body.is-scroll::-webkit-scrollbar-track { background: transparent; }
.cm-body.is-scroll::-webkit-scrollbar-thumb { background: #c2c6d6; border-radius: 8px; }
.cm-body.is-scroll::-webkit-scrollbar-thumb:hover { background: #a9aec2; }

.cm-sec + .cm-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-line, #dcdde3); }
.cm-sec-h { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; font-size: 14px; line-height: 1; font-weight: 800; color: var(--text-dark, #050315); }
.cm-sec-h i { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--blue-dark, #243a94); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }

.cm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.cm-f { display: flex; flex-direction: column; min-width: 0; }
.cm-f.is-wide { grid-column: 1 / -1; }
.cm-f[hidden], .cm-sub[hidden] { display: none; }
.cm-f label { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--text-body, #2f3350); }
.cm-f label em { font-style: normal; font-weight: 900; color: var(--accent-red, #c81e2c); margin-left: 3px; }
.cm-f label small { font-weight: 500; font-size: 12px; color: var(--text-muted, #6b6f88); margin-left: 6px; }
.cm-f input[type="text"], .cm-f input[type="tel"], .cm-f input[type="email"], .cm-f input[type="date"], .cm-f select, .cm-f textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1.5px solid #cfd2dc; border-radius: 10px; background: #fff; color: var(--text-dark, #050315);
  font: inherit; font-size: 14px; line-height: 1.4; transition: border-color .15s, box-shadow .15s, background-color .15s; -webkit-appearance: none; appearance: none;
}
.cm-f textarea { height: auto; min-height: 52px; padding: 8px 12px; resize: vertical; line-height: 1.55; }
.cm-f select { padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6f88' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.cm-f select:invalid, .cm-f select.is-empty { color: #8c90a4; }
.cm-f select option { color: var(--text-dark, #050315); }
.cm-f input::placeholder, .cm-f textarea::placeholder { color: #9a9eb2; }
.cm-f input:hover, .cm-f select:hover, .cm-f textarea:hover { border-color: #aeb3c4; }
.cm-f input:focus, .cm-f select:focus, .cm-f textarea:focus { outline: none; border-color: var(--blue, #3e68b3); box-shadow: 0 0 0 4px rgba(62, 104, 179, .16); }
.cm-f input:disabled { background: #f3f4f7; color: #9a9eb2; cursor: not-allowed; border-color: #e1e3ea; }
.cm-f.is-err input, .cm-f.is-err select, .cm-f.is-err textarea { border-color: var(--accent-red, #c81e2c); background: #fff8f8; }
.cm-f.is-err input:focus, .cm-f.is-err select:focus, .cm-f.is-err textarea:focus { box-shadow: 0 0 0 4px rgba(200, 30, 44, .14); }
.cm-msg { display: block; min-height: 0; margin: 4px 0 0; font-size: 12px; line-height: 1.4; word-break: keep-all; color: var(--accent-red, #c81e2c); }
.cm-msg:empty { display: none; }
.cm-reqnote { margin-left: auto; font-size: 11.5px; line-height: 1; font-weight: 500; color: var(--text-muted, #6b6f88); }
.cm-reqnote em { font-style: normal; font-weight: 900; color: var(--accent-red, #c81e2c); margin-right: 1px; }
.cm-hint { margin: 6px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted, #6b6f88); }

.cm-count[hidden] { display: none; }
.cm-count { align-self: flex-end; margin-top: 2px; font-size: 11.5px; color: #9a9eb2; }

.cm-agree { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: start; margin-top: 12px; padding: 9px 14px; border-radius: 11px; background: var(--blue-pale, #f3f6fc); border: 1.5px solid transparent; cursor: pointer; transition: border-color .15s; }
.cm-agree input { position: absolute; left: 14px; top: 10px; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.cm-agree i { position: relative; width: 20px; height: 20px; border: 1.5px solid #b0b5c8; border-radius: 6px; background: #fff; transition: background-color .18s, border-color .18s; }
.cm-agree i::after { content: ""; position: absolute; left: 5.5px; top: 2px; width: 5px; height: 9.5px; border: solid #fff; border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) scale(0); transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.cm-agree input:checked + i { background: var(--blue-dark, #243a94); border-color: var(--blue-dark, #243a94); }
.cm-agree input:checked + i::after { transform: rotate(45deg) scale(1); }
.cm-agree input:focus-visible + i { outline: 3px solid rgba(62, 104, 179, .35); outline-offset: 2px; }
.cm-agree b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text-dark, #050315); }
.cm-agree b em { font-style: normal; font-weight: 900; color: var(--accent-red, #c81e2c); margin-left: 3px; }
.cm-agree small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; color: var(--text-muted, #6b6f88); word-break: keep-all; }
.cm-agree.is-err { border-color: var(--accent-red, #c81e2c); }

.cm-alert { margin: 0 0 16px; padding: 12px 14px; border-radius: 11px; background: #fff3f3; border: 1px solid #f0c4c8; color: #8d1a24; font-size: 13.5px; line-height: 1.6; word-break: keep-all; }
.cm-alert a { color: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.cm-alert[hidden] { display: none; }

.cm-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 24px 14px; border-top: 1px solid var(--gray-line, #dcdde3); background: #fff; }
.cm-foot .cm-note { flex: 1 1 auto; margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-muted, #6b6f88); word-break: keep-all; }
.cm-btn { flex: none; height: 42px; padding: 0 20px; border-radius: 11px; border: 1.5px solid #cfd2dc; background: #fff; color: var(--text-body, #2f3350); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .15s, border-color .15s, transform .12s, filter .15s; }
.cm-btn:hover { background: #f5f6f9; border-color: #aeb3c4; }
.cm-btn:active { transform: scale(.97); }
.cm-btn.is-main { min-width: 150px; border-color: var(--blue-dark, #243a94); background: linear-gradient(135deg, var(--blue, #3e68b3) 0%, var(--blue-dark, #243a94) 100%); color: #fff; box-shadow: 0 8px 20px -10px rgba(36, 58, 148, .8); }
.cm-btn.is-main:hover { filter: brightness(1.07); background: linear-gradient(135deg, var(--blue, #3e68b3) 0%, var(--blue-dark, #243a94) 100%); }
.cm-btn[disabled] { opacity: .6; cursor: progress; transform: none; filter: none; }

/* 접수 완료 화면 */
.cm-win.is-done .cm-kind { pointer-events: none; } /* 접수를 마친 뒤에는 유형을 바꿀 수 없다 */
.cm-done { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 28px 24px 26px; text-align: center; }
.cm-done[hidden] { display: none; }
.cm-done-ic { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--blue-light, #e4ebf7); display: grid; place-items: center; }
.cm-done-ic svg { width: 30px; height: 30px; stroke: var(--blue-dark, #243a94); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cm-done h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; letter-spacing: -.3px; color: var(--text-dark, #050315); }
.cm-done > p { margin: 0 auto; max-width: 420px; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; color: var(--text-muted, #6b6f88); word-break: keep-all; }
.cm-done-box { margin: 22px auto 0; max-width: 460px; padding: 6px 18px; border-radius: 13px; background: var(--blue-pale, #f3f6fc); text-align: left; }
.cm-done-box div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; padding: 9px 0; font-size: 13.5px; line-height: 1.5; }
.cm-done-box div + div { border-top: 1px solid #e1e7f3; }
.cm-done-box dt { color: var(--text-muted, #6b6f88); font-weight: 600; }
.cm-done-box dd { margin: 0; color: var(--text-dark, #050315); font-weight: 700; word-break: break-all; }
.cm-done .cm-btn { margin-top: 24px; min-width: 150px; }

@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cm-pop { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .cm-win { left: 0 !important; top: auto !important; right: 0; bottom: 0; width: 100%; max-height: min(94vh, 94dvh); border-radius: 20px 20px 0 0; animation: cm-up .28s cubic-bezier(.2, .8, .3, 1) both; }
  .cm-grip, .cm-head { cursor: default; touch-action: auto; }
  .cm-head { padding: 0 60px 14px 20px; }
  .cm-head h2 { font-size: 21px; }
  .cm-x { right: 14px; }
  .cm-body { padding: 16px 20px 6px; }
  .cm-grid { grid-template-columns: 1fr; gap: 13px; }
  .cm-foot { padding: 12px 20px calc(16px + env(safe-area-inset-bottom)); }
  .cm-foot .cm-note { display: none; }
  .cm-btn { flex: 1 1 0; padding: 0 12px; }
  .cm-btn.is-main { flex: 1.6 1 0; min-width: 0; }
  .cm-f input[type="text"], .cm-f input[type="tel"], .cm-f input[type="email"], .cm-f input[type="date"], .cm-f select, .cm-f textarea { font-size: 16px; } /* iOS 확대 방지 */
  .cm-done { padding: 28px 20px 24px; }
  @keyframes cm-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .cm-backdrop, .cm-win { animation: none !important; }
}

/* 필수 표시(*)와 '선택' 표시 */
.cm-f .cm-opt-tag { display: none; }
.cm-f.is-opt .cm-opt-tag { display: inline; }
.cm-f.is-opt label em { display: none; }

/* 회신 방법 카드 */
.cm-reply { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cm-rc { position: relative; display: block; margin: 0; cursor: pointer; }
.cm-rc input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cm-rc-b { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 11px; align-items: center; min-height: 48px; padding: 6px 14px; border: 1.5px solid #cfd2dc; border-radius: 12px; background: #fff; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.cm-rc-b svg { grid-row: 1 / span 2; width: 32px; height: 32px; padding: 8px; border-radius: 50%; background: #eceef3; color: #6b6f88; transition: background-color .15s, color .15s; }
.cm-rc-b b { align-self: end; font-size: 14px; line-height: 1.3; font-weight: 800; color: var(--text-dark, #050315); }
.cm-rc-b small { align-self: start; font-size: 12px; line-height: 1.4; color: var(--text-muted, #6b6f88); word-break: keep-all; }
.cm-rc:hover .cm-rc-b { border-color: #aeb3c4; }
.cm-rc input:checked + .cm-rc-b { border-color: var(--blue-dark, #243a94); background: var(--blue-pale, #f3f6fc); box-shadow: 0 0 0 3px rgba(62, 104, 179, .14); }
.cm-rc input:checked + .cm-rc-b svg { background: var(--blue-dark, #243a94); color: #fff; }
.cm-rc input:focus-visible + .cm-rc-b { outline: 3px solid rgba(62, 104, 179, .45); outline-offset: 2px; }
.cm-reply.is-err .cm-rc-b { border-color: var(--accent-red, #c81e2c); }

/* 전화를 고르면 나타나는 희망 시간 */
.cm-time { margin-top: 10px; padding: 10px 14px 8px; border-radius: 12px; background: var(--blue-pale, #f3f6fc); animation: cm-fade .2s ease both; }
.cm-time[hidden], .cm-hint[hidden] { display: none; }
.cm-time .cm-hint { margin-top: 10px; }
#cm-mailnote { margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--blue-pale, #f3f6fc); }

@media (max-width: 640px) {
  .cm-kind span { padding: 7px 16px; font-size: 17px; }
  .cm-head { padding-top: 2px; }
}
@media (max-width: 480px) {
  .cm-reply { grid-template-columns: 1fr; gap: 10px; }
}

/* 아이패드 등 터치 화면(창이 640px보다 넓어도)에서는 입력 글자를 16px 이상으로 해 누를 때 화면이 확대되지 않게 한다 (2026-11-28) */
@media (pointer: coarse) {
  .cm-f input[type="text"], .cm-f input[type="tel"], .cm-f input[type="email"], .cm-f input[type="date"], .cm-f select, .cm-f textarea { font-size: 16px; }
}
