/* 의료관광 AI 사전상담 — 독립 스타일시트.
   카페의 app.css(Tailwind 사전 빌드)와 클래스가 섞이지 않도록 mt- 접두사를 쓴다. */

:root {
    /* 임베드(.mt-embed)는 분양 사이트 색으로 이 값을 덮어쓴다.
       랜딩에서는 정의가 없어 새 버튼만 다른 색으로 뜨므로 기본값을 둔다. */
    --mt-brand: #0f6f6a;
    --mt-primary: #0f6f6a;
    --mt-primary-dark: #0b514d;
    --mt-primary-soft: #e6f4f3;
    --mt-accent: #b45309;
    --mt-ink: #10233a;
    --mt-body: #405168;
    --mt-muted: #7b8ba1;
    --mt-line: #e2e8ef;
    --mt-bg: #f6f8fa;
    --mt-surface: #ffffff;
    --mt-danger: #b91c1c;
    --mt-danger-soft: #fef2f2;
    --mt-radius: 14px;
    --mt-shadow: 0 1px 2px rgba(16, 35, 58, .05), 0 8px 24px rgba(16, 35, 58, .06);
}

* { box-sizing: border-box; }

body.mt {
    margin: 0;
    background: var(--mt-bg);
    color: var(--mt-body);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-text-size-adjust: 100%;
}

.mt img { max-width: 100%; }
.mt a { color: var(--mt-primary); }

.mt-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ── 헤더 ─────────────────────────────── */
.mt-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--mt-line);
}
.mt-header-inner { display: flex; align-items: center; gap: 16px; height: 62px; }
.mt-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--mt-ink); font-weight: 700; }
.mt-logo-mark {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 32px;
    background: var(--mt-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.mt-logo-text { font-size: 15px; line-height: 1.25; }
.mt-logo-text small { display: block; font-size: 11px; font-weight: 500; color: var(--mt-muted); }

.mt-nav { display: none; margin-left: auto; gap: 4px; }
.mt-nav a {
    font-size: 14px; color: var(--mt-body); text-decoration: none;
    padding: 7px 11px; border-radius: 8px;
}
.mt-nav a:hover { background: var(--mt-primary-soft); color: var(--mt-primary-dark); }

.mt-langs { display: flex; gap: 4px; margin-left: auto; }
.mt-nav + .mt-langs { margin-left: 8px; }
.mt-langs a {
    font-size: 13px; text-decoration: none; color: var(--mt-body);
    border: 1px solid var(--mt-line); border-radius: 999px; padding: 5px 11px; white-space: nowrap;
}
.mt-langs a.is-on { background: var(--mt-primary); border-color: var(--mt-primary); color: #fff; font-weight: 600; }

/* ── 히어로 + 챗봇 ─────────────────────── */
.mt-hero { padding: 40px 0 48px; }
.mt-hero-grid { display: grid; gap: 28px; }
.mt-badge {
    display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .01em;
    color: var(--mt-primary-dark); background: var(--mt-primary-soft);
    border-radius: 999px; padding: 6px 13px; margin-bottom: 16px;
}
.mt-hero h1 { margin: 0 0 14px; font-size: 30px; line-height: 1.3; color: var(--mt-ink); letter-spacing: -.01em; }
.mt-hero p { margin: 0 0 22px; font-size: 16px; }
.mt-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--mt-primary); color: #fff; text-decoration: none; font-weight: 600;
    padding: 12px 22px; border-radius: 999px; border: 0; cursor: pointer; font-size: 15px;
}
.mt-cta:hover { background: var(--mt-primary-dark); }
.mt-hero-note { font-size: 13px; color: var(--mt-muted); margin-top: 14px; }

/* 챗봇 패널 */
.mt-chat {
    background: var(--mt-surface); border: 1px solid var(--mt-line);
    border-radius: var(--mt-radius); box-shadow: var(--mt-shadow);
    display: flex; flex-direction: column; overflow: hidden;
}
.mt-chat-head {
    padding: 14px 18px; border-bottom: 1px solid var(--mt-line);
    display: flex; align-items: center; gap: 10px;
}
.mt-chat-head strong { color: var(--mt-ink); font-size: 15px; }
.mt-chat-head span { font-size: 12.5px; color: var(--mt-muted); }
.mt-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: 0 0 8px; }
.mt-chat-reset {
    margin-left: auto; background: none; border: 1px solid var(--mt-line); color: var(--mt-muted);
    font-size: 12px; border-radius: 8px; padding: 4px 9px; cursor: pointer;
}
.mt-chat-reset:hover { color: var(--mt-body); }

.mt-log {
    padding: 18px; display: flex; flex-direction: column; gap: 12px;
    height: 380px; overflow-y: auto; scroll-behavior: smooth;
}
.mt-msg { max-width: 88%; font-size: 14.5px; border-radius: 13px; padding: 11px 14px; white-space: pre-wrap; word-break: break-word; }
.mt-msg-bot { background: var(--mt-primary-soft); color: #123c3a; align-self: flex-start; border-bottom-left-radius: 4px; }
.mt-msg-user { background: var(--mt-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.mt-msg-note { background: var(--mt-danger-soft); color: var(--mt-danger); align-self: flex-start; font-weight: 500; }
.mt-msg-sys { background: #f1f5f9; color: var(--mt-muted); align-self: center; font-size: 13px; }

/* 분류 결과 카드 */
.mt-result { align-self: flex-start; max-width: 92%; background: #fff; border: 1px solid var(--mt-line); border-radius: 13px; padding: 14px; }
.mt-result-lead { font-size: 13px; color: var(--mt-muted); margin-bottom: 8px; }
.mt-result-dept { font-size: 17px; font-weight: 700; color: var(--mt-ink); margin-bottom: 4px; }
.mt-result-desc { font-size: 13.5px; margin-bottom: 10px; }
.mt-meter { height: 6px; background: #eef2f6; border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.mt-meter i { display: block; height: 100%; background: var(--mt-primary); border-radius: 999px; }
.mt-result-conf { font-size: 12px; color: var(--mt-muted); }
.mt-result-alt { margin-top: 10px; font-size: 13px; color: var(--mt-body); }
.mt-result-alt span { display: inline-block; background: #f1f5f9; border-radius: 999px; padding: 3px 10px; margin: 3px 4px 0 0; font-size: 12.5px; }

/* 대체 진료과 칩 — 누르면 그 과를 그 자리에서 펼친다 */
.mt-chip {
    display: inline-block; background: #f1f5f9; border: 1px solid transparent;
    border-radius: 999px; padding: 3px 10px; margin: 3px 4px 0 0;
    font: inherit; font-size: 12.5px; color: var(--mt-body);
    cursor: pointer; transition: background .15s, border-color .15s;
}
.mt-chip:hover, .mt-chip:focus-visible { background: #e2e8f0; border-color: var(--mt-brand, #0f766e); }

/* 결과 카드에서 바로 상담 신청 */
.mt-result-actions { margin-top: 12px; }
.mt-apply {
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
    background: var(--mt-brand, #0f766e); color: #fff;
    border: 0; border-radius: 8px; padding: 8px 14px;
}
.mt-apply:hover, .mt-apply:focus-visible { filter: brightness(1.08); }

/* 응급·위중증 안내는 일반 안내보다 강하게 — 톤이 같으면 묻힌다 */
.mt-msg-alert {
    background: var(--mt-danger, #b91c1c); color: #fff;
    align-self: flex-start; font-weight: 700;
    border-left: 4px solid rgba(0,0,0,.25);
}
.mt-source { display: inline-block; font-size: 11px; border-radius: 999px; padding: 2px 8px; background: #eef2f6; color: var(--mt-muted); margin-left: 6px; vertical-align: 2px; }

/* 진료 경로 안내 */
.mt-pathway { margin-top: 12px; border-top: 1px solid var(--mt-line); padding-top: 10px; }
.mt-pathway h5 { margin: 0 0 6px; font-size: 12.5px; color: var(--mt-primary-dark); letter-spacing: .02em; }
.mt-pathway div { display: flex; gap: 8px; font-size: 12.5px; margin-bottom: 4px; align-items: baseline; }
.mt-pathway b { flex: 0 0 84px; color: var(--mt-muted); font-weight: 500; }
.mt-pathway span { flex: 1; color: var(--mt-body); }

.mt-chat-photo { margin: 0 0 10px; border: 1px solid var(--mt-line); border-radius: 10px; overflow: hidden; }
.mt-chat-photo img { display: block; width: 100%; height: 130px; object-fit: cover; background: #eef2f6; }
.mt-chat-photo figcaption { padding: 8px 10px; }
.mt-chat-photo figcaption b { display: block; font-size: 13px; color: var(--mt-ink); }
.mt-chat-photo figcaption span { display: block; font-size: 12.5px; margin-top: 2px; }
.mt-chat-photo figcaption small { display: block; font-size: 10.5px; color: var(--mt-muted); margin-top: 5px; }
.mt-chat-source { font-size: 11.5px; color: var(--mt-muted); margin-bottom: 8px; }
.mt-chat-source a { color: var(--mt-muted); }

.mt-info-block { margin-top: 6px; }
.mt-info-block h4 { margin: 0 0 4px; font-size: 14px; color: var(--mt-ink); }
.mt-info-block ul { margin: 0 0 10px; padding-left: 18px; }
.mt-info-block li { font-size: 13.5px; margin-bottom: 4px; }

.mt-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 18px 12px; }
.mt-quick button {
    font-size: 12.5px; background: #fff; border: 1px solid var(--mt-line); color: var(--mt-body);
    border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.mt-quick button:hover { border-color: var(--mt-primary); color: var(--mt-primary-dark); }

.mt-input { display: flex; gap: 8px; border-top: 1px solid var(--mt-line); padding: 12px; background: #fbfcfd; }
.mt-input textarea {
    flex: 1; resize: none; border: 1px solid var(--mt-line); border-radius: 10px;
    padding: 10px 12px; font: inherit; font-size: 14.5px; line-height: 1.5; height: 44px; max-height: 120px;
    color: var(--mt-ink); background: #fff;
}
.mt-input textarea:focus { outline: 2px solid var(--mt-primary-soft); border-color: var(--mt-primary); }
.mt-input button {
    background: var(--mt-primary); color: #fff; border: 0; border-radius: 10px;
    padding: 0 18px; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.mt-input button:disabled { background: #a9bcc3; cursor: default; }

.mt-typing { display: inline-flex; gap: 3px; }
.mt-typing i { width: 6px; height: 6px; border-radius: 50%; background: #7fb3af; animation: mt-blink 1.2s infinite; }
.mt-typing i:nth-child(2) { animation-delay: .2s; }
.mt-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes mt-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

/* ── 섹션 공통 ─────────────────────────── */
.mt-section { padding: 52px 0; border-top: 1px solid var(--mt-line); background: var(--mt-surface); }
.mt-section.alt { background: var(--mt-bg); }
.mt-section h2 { margin: 0 0 6px; font-size: 23px; color: var(--mt-ink); letter-spacing: -.01em; }
.mt-section .mt-sub { margin: 0 0 26px; font-size: 14.5px; color: var(--mt-muted); }

.mt-grid { display: grid; gap: 14px; }
.mt-grid-3 { grid-template-columns: 1fr; }
.mt-card { background: var(--mt-surface); border: 1px solid var(--mt-line); border-radius: var(--mt-radius); padding: 18px; }
.mt-card h3 { margin: 0 0 6px; font-size: 15.5px; color: var(--mt-ink); }
.mt-card p { margin: 0; font-size: 14px; }
.mt-card.is-focus { border-color: #a9d5d1; background: linear-gradient(180deg, #f4fbfa, #fff); }
.mt-tag { display: inline-block; font-size: 11px; font-weight: 600; color: var(--mt-primary-dark); background: var(--mt-primary-soft); border-radius: 999px; padding: 2px 9px; margin-bottom: 8px; }

.mt-list { margin: 0; padding-left: 20px; }
.mt-list li { font-size: 14px; margin-bottom: 7px; }

.mt-visa-card { border-left: 3px solid var(--mt-primary); }
.mt-visa-meta { margin: 6px 0 0; font-size: 13px; color: var(--mt-muted); }

/* 출처 한 줄 — 웹에서 확인한 정보에만 붙는다 */
.mt-source-line { margin: 12px 0 0; font-size: 12px; color: var(--mt-muted); line-height: 1.5; }
.mt-source-line a { color: var(--mt-muted); text-decoration: underline; }
.mt-source-line a:hover { color: var(--mt-primary-dark); }

.mt-subhead { margin: 28px 0 12px; font-size: 17px; color: var(--mt-ink); }

/* 사진 (저작자·라이선스 표기 필수) */
.mt-photos { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.mt-photo { margin: 0; background: var(--mt-surface); border: 1px solid var(--mt-line); border-radius: var(--mt-radius); overflow: hidden; }
.mt-photo img { display: block; width: 100%; height: 190px; object-fit: cover; background: #eef2f6; }
.mt-photo figcaption { padding: 12px 14px; }
.mt-photo figcaption b { display: block; font-size: 14.5px; color: var(--mt-ink); }
.mt-photo figcaption span { display: block; font-size: 13px; margin-top: 3px; }
.mt-photo figcaption small { display: block; font-size: 11px; color: var(--mt-muted); margin-top: 7px; }
.mt-photo figcaption small a { color: var(--mt-muted); }
.mt-visa-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--mt-primary-dark); font-weight: 700; }
.mt-note { font-size: 13px; color: var(--mt-muted); background: #f8fafc; border: 1px dashed var(--mt-line); border-radius: 10px; padding: 12px 14px; margin-top: 16px; }

/* 로드맵 표 */
.mt-goal { background: var(--mt-ink); color: #e8f0f5; border-radius: var(--mt-radius); padding: 18px 20px; margin-bottom: 20px; }
.mt-goal strong { display: block; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: #7fb3af; margin-bottom: 6px; }
.mt-goal p { margin: 0; font-size: 15px; line-height: 1.6; }
.mt-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mt-table { width: 100%; min-width: 640px; border-collapse: collapse; background: #fff; font-size: 14px; }
.mt-table th, .mt-table td { border: 1px solid var(--mt-line); padding: 11px 13px; text-align: left; vertical-align: top; }
.mt-table th { background: #f1f5f9; color: var(--mt-ink); font-weight: 600; font-size: 13.5px; }
.mt-table td:first-child { width: 46px; text-align: center; color: var(--mt-muted); }
.mt-table td:nth-child(2) { font-weight: 600; color: var(--mt-ink); }
.mt-table td:last-child { white-space: nowrap; color: var(--mt-primary-dark); font-size: 13px; }

/* 상담 신청 폼 */
.mt-form { display: grid; gap: 10px; margin-top: 6px; }
.mt-form label { font-size: 12.5px; color: var(--mt-muted); display: block; margin-bottom: 3px; }
.mt-form input, .mt-form select, .mt-form textarea {
    width: 100%; border: 1px solid var(--mt-line); border-radius: 9px; padding: 9px 11px;
    font: inherit; font-size: 14px; background: #fff; color: var(--mt-ink);
}
.mt-form-row { display: flex; gap: 8px; }
.mt-form-row button { flex: 1; }
.mt-btn-ghost { background: #fff; border: 1px solid var(--mt-line); color: var(--mt-body); border-radius: 9px; padding: 10px; font-size: 14px; cursor: pointer; }

/* ── 푸터 ─────────────────────────────── */
.mt-footer { background: var(--mt-ink); color: #b9c7d6; padding: 40px 0 48px; font-size: 13.5px; }
.mt-footer h3 { margin: 0 0 10px; font-size: 15px; color: #fff; }
.mt-footer dl { display: grid; grid-template-columns: 76px 1fr; gap: 4px 12px; margin: 0 0 18px; }
.mt-footer dt { color: #7f93a8; }
.mt-footer dd { margin: 0; }
.mt-footer a { color: #9fd3ce; }
.mt-footer-note { border-top: 1px solid #24384f; padding-top: 16px; margin-top: 8px; font-size: 12.5px; color: #8298ae; }

/* ── 반응형 ───────────────────────────── */
@media (min-width: 720px) {
    .mt-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .mt-photos { grid-template-columns: repeat(2, 1fr); }
    .mt-hero h1 { font-size: 36px; }
    .mt-section { padding: 64px 0; }
}
@media (min-width: 980px) {
    .mt-nav { display: flex; }
    .mt-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .mt-photos { grid-template-columns: repeat(3, 1fr); }
    .mt-hero-grid { grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
    .mt-hero { padding: 60px 0 68px; }
    .mt-hero h1 { font-size: 40px; }
    .mt-log { height: 420px; }
}
