/* 11/22 처음 화면 「환자가 AI에게 물으면, 우리 병원이 나올까요?」 (assets/ask.js · 도구/insert_home_measure.cjs)
   왼쪽 AI 답 화면(실측을 옮겨 그림) + 오른쪽 20칸 결과판(도장 「실측」) + 찾은 빈틈 2개 + 상담 단추 */
.ask { --ask-gold: #b8914f; --ask-rose: #c4605a; --ask-grey: #a9b0be; }
.ask-head { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: end; margin-bottom: 52px; }
.ask-head h2 { margin: 0; }
.ask-head .sec-lead { margin: 0 0 20px; font-size: 18px; }
.ask-head .sec-lead b { color: var(--ink); }
.ask-proof { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ask-proof li { position: relative; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px 6px 29px; }
.ask-proof li::before { content: ''; position: absolute; left: 12px; top: 50%; width: 9px; height: 5px; border-left: 1.7px solid var(--gold); border-bottom: 1.7px solid var(--gold); transform: translateY(-75%) rotate(-45deg); }

.ask-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px; align-items: start; }

/* ── 왼쪽: AI 답 화면 ── */
.ask-chat { position: sticky; top: 104px; scroll-margin-top: 96px; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: 0 56px 96px -54px rgba(11,20,48,.5), 0 0 0 1px rgba(11,20,48,.07); }
.ask-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 9px; background: #f5f1e8; border-bottom: 1px solid #ebe3d3; }
.ask-tabs button { font: inherit; font-size: 14.5px; font-weight: 700; color: #6d7486; background: transparent; border: 0; border-radius: 13px; padding: 10px 4px; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.ask-tabs button:hover { color: var(--ink); }
.ask-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 8px 18px -10px rgba(11,20,48,.45), 0 0 0 1px rgba(184,145,79,.35); }
.ask-qs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px 2px; }
.ask-qs::-webkit-scrollbar { display: none; }
.ask-qs button { flex: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; transition: .2s; }
.ask-qs button b { color: #9a7b45; margin-right: 5px; font-weight: 800; }
.ask-qs button:hover { border-color: var(--ink-2); }
.ask-qs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.ask-qs button.on b { color: var(--gold-soft); }
.ask-conv { display: flex; flex-direction: column; gap: 14px; min-height: 452px; padding: 16px 20px 20px; }
.ask-u { align-self: flex-end; max-width: 90%; background: var(--ink); color: #fff; border-radius: 20px 20px 6px 20px; padding: 11px 17px 13px; box-shadow: 0 14px 26px -16px rgba(11,20,48,.7); }
.ask-u small { display: block; font-size: 11.5px; font-weight: 700; color: var(--gold-soft); letter-spacing: .04em; }
.ask-u p { margin: 2px 0 0; font-size: 16.5px; font-weight: 600; line-height: 1.5; }
.ask-u .mask { background: rgba(255,255,255,.14); color: var(--gold-soft); }
.ask-a { align-self: stretch; background: #faf8f3; border: 1px solid #eee7da; border-radius: 6px 20px 20px 20px; padding: 13px 13px 13px; }
.ask-a-h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.ask-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--gold-soft); background: var(--ink); }
.ask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ask-list li { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 11px; border-radius: 11px; background: #fff; border: 1px solid #eeeae2; font-size: 14px; color: #8a91a1; }
.ask-list .n, .ask-card-h .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #eef0f4; color: #8a91a1; }
.ask-list .o-nm { flex: none; font-size: 13px; color: #98a0ae; }
.ask-list .bar { height: 7px; border-radius: 4px; background: linear-gradient(90deg, #e4e7ed, #f1f2f5); }
.ask-list li.me { background: linear-gradient(100deg, #f8eed8, #ecd8aa); border-color: #d9bd85; color: var(--ink); box-shadow: 0 12px 24px -16px rgba(143,116,68,.8); }
.ask-list li.me .n, .ask-card-h .n { background: var(--ink); color: var(--gold-soft); }
.me-nm b { font-size: 15px; color: var(--ink); }
.me-nm em { font-style: normal; font-size: 11.5px; font-weight: 600; color: #8f7444; margin-left: 6px; }
.ask-list li.me .tag { margin-left: auto; flex: none; font-size: 12px; font-weight: 800; color: #fff; background: var(--ink); padding: 3px 10px; border-radius: 999px; }
.ask-list li.more { min-height: 0; padding: 0 12px; background: transparent; border: 0; color: #a5abb8; letter-spacing: .1em; }
.ask-list li.tail { flex-wrap: wrap; gap: 4px 10px; background: #fff; border: 1.5px dashed #d6bd88; color: var(--ink-2); font-size: 13.5px; }
.ask-list li.price { flex-wrap: wrap; gap: 4px 10px; background: #fff; border-color: #e2d3b2; color: var(--ink-2); font-weight: 700; }
.ask-list li.price small { flex-basis: 100%; font-size: 12px; font-weight: 500; color: var(--muted); }
.ask-miss { display: flex; align-items: center; gap: 8px; margin: 11px 2px 0; font-size: 14.5px; font-weight: 700; color: var(--ask-rose); }
.ask-miss svg { width: 18px; height: 18px; flex: none; }
.ask-none { display: grid; gap: 4px; padding: 26px 18px; border: 1.5px dashed #d3d8e1; border-radius: 14px; text-align: center; color: var(--muted); font-size: 14px; background: repeating-linear-gradient(135deg, #fff 0 10px, #f8f9fb 10px 20px); }
.ask-none b { color: var(--ink-2); font-size: 15px; }
.ask-gen { display: grid; gap: 9px; padding: 14px 12px; border-radius: 11px; background: #fff; border: 1px solid #eeeae2; }
.ask-gen span { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e4e7ed, #f1f2f5); }
.ask-card { background: #fff; border: 1px solid #e2d3b2; border-radius: 14px; padding: 12px 14px; }
.ask-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.ask-card-h b { font-size: 15px; }
.ask-card-h em { font-style: normal; font-size: 11.5px; font-weight: 600; color: #8f7444; }
.ask-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ask-card li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; font-size: 14px; color: var(--ink-2); background: #f6f7f9; }
.ask-card li b { font-weight: 700; text-align: right; }
.ask-card li.ok b { color: #8a6a32; }
.ask-card li.warn { background: #fbeceb; }
.ask-card li.warn b { color: var(--ask-rose); }
.ask-tries { display: grid; gap: 8px; }
.ask-try { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid #eeeae2; }
.ask-try small { flex: none; font-size: 12px; font-weight: 800; color: #9a7b45; background: #f6efdf; padding: 3px 9px; border-radius: 999px; }
.ask-try b { font-size: 14.5px; color: var(--ink-2); }
.ask-try + .ask-try { margin-left: 26px; }
/* 초이스닥 판정 */
.ask-v { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: 16px; background: #f7f1e3; border: 1px solid #e8dcc0; }
.ask-v-ic { flex: none; width: 30px; height: 30px; color: var(--ask-gold); margin-top: 2px; }
.ask-v-ic svg { width: 100%; height: 100%; display: block; }
.ask-v small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; color: #9a7b45; }
.ask-v b { display: block; font-size: 17.5px; font-weight: 800; color: var(--ink); line-height: 1.35; }
.ask-v p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.ask-v.w { background: #fbedeb; border-color: #f0d3cf; }
.ask-v.w .ask-v-ic { color: var(--ask-rose); }
.ask-v.n { background: #f4f5f8; border-color: #e3e6ec; }
.ask-v.n .ask-v-ic { color: var(--ask-grey); }
.ask-foot { margin: 0; padding: 11px 20px 13px; border-top: 1px solid #f0ece4; font-size: 12.5px; color: var(--muted); background: #fcfbf8; }
/* 움직임 */
.ask-in { animation: askIn .5s cubic-bezier(.2,.8,.2,1) both; }
.ask-a.ask-in .ask-list li, .ask-a.ask-in .ask-card li, .ask-a.ask-in .ask-try { animation: askIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms + 80ms); }
.ask-v.ask-in { animation-delay: .35s; }
@keyframes askIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ask-typing { display: inline-flex; gap: 5px; align-self: flex-start; padding: 13px 16px; border-radius: 6px 18px 18px 18px; background: #faf8f3; border: 1px solid #eee7da; }
.ask-typing i { width: 7px; height: 7px; border-radius: 50%; background: #c9b48a; animation: askDot 1s infinite ease-in-out both; }
.ask-typing i:nth-child(2) { animation-delay: .15s; } .ask-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes askDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* ── 오른쪽: 20칸 결과판 ── */
.ask-board { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 24px 26px 22px; box-shadow: 0 40px 80px -58px rgba(11,20,48,.5); }
.ask-board-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 34px; }
.ask-board-h .t { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.ask-board-h .s { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
/* 도장 — 병원 서류의 붉은 확인 도장처럼 */
.ask-seal { flex: none; width: 66px; height: 66px; margin: -6px -4px 0 0; border-radius: 50%; display: grid; place-content: center; text-align: center; color: #b2443b; border: 2px solid #b2443b; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4.5px rgba(178,68,59,.55); transform: rotate(-11deg); line-height: 1.1; opacity: .92; }
.ask-seal b { font-size: 17px; font-weight: 800; letter-spacing: .08em; }
.ask-seal small { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; }
.ask-grid { display: grid; grid-template-columns: 118px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: center; }
.ask-ch { position: relative; text-align: center; font-size: 13px; font-weight: 700; color: var(--ink-2); line-height: 1.3; padding: 0 0 6px; }
.ask-ch b { display: block; font-size: 11.5px; color: #9a7b45; }
.ask-ch.gap { color: var(--ask-rose); }
.ask-ch.gap b { color: var(--ask-rose); }
.gap-tag { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--ask-rose); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.gap-tag::after { content: ''; position: absolute; left: 50%; bottom: -4px; margin-left: -4px; border: 4px solid transparent; border-bottom: 0; border-top-color: var(--ask-rose); }
.ask-rh { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.ask-dot { height: 48px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #f6f7f9; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; }
.ask-dot svg { width: 25px; height: 25px; }
.ask-dot.y { color: var(--ask-gold); }
.ask-dot.m { color: #c4a66e; }
.ask-dot.w { color: var(--ask-rose); }
.ask-dot.n { color: var(--ask-grey); }
.ask-dot.gapcol { background: #fcefed; }
.ask-dot:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 10px 20px -12px rgba(11,20,48,.5); }
.ask-dot.on { background: #fff; box-shadow: 0 0 0 2px var(--ink), 0 10px 20px -12px rgba(11,20,48,.5); }
.ask-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.ask-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ask-legend svg { width: 16px; height: 16px; }
.ask-legend .y { color: var(--ask-gold); } .ask-legend .m { color: #c4a66e; } .ask-legend .w { color: var(--ask-rose); } .ask-legend .n { color: var(--ask-grey); }
.ask-legend span { color: var(--muted); }
.ask-total { margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); }
.ask-total-t { margin: 0 0 10px; font-size: 15px; color: var(--ink-2); }
.ask-total-t b { color: var(--ink); }
.ask-bar { display: flex; gap: 3px; height: 34px; border-radius: 10px; overflow: hidden; }
.ask-bar span { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; white-space: nowrap; }
.ask-bar .y { flex: 9; background: linear-gradient(135deg, #e3c88f, #c9a261); color: var(--ink); }
.ask-bar .m { flex: 6; background: #f1e6cd; color: #7d6337; }
.ask-bar .w { flex: 3; background: #f3d2ce; color: #9c3f38; }
.ask-total-n { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* 찾은 빈틈 */
.ask-finds { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.ask-find { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--ask-rose); border-radius: 16px; padding: 16px 18px; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.ask-find:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -24px rgba(11,20,48,.55); }
.ask-find .k { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--ask-rose); }
.ask-find p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.ask-find p b { color: var(--ink); }
.ask-find .go { margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--gold); }
.ask-find .go::after { content: ' →'; color: var(--gold); }
.ask-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 18px; padding: 20px 24px; border-radius: 18px; background: var(--ink); color: #fff; }
.ask-cta p { margin: 0; font-size: 16px; line-height: 1.55; color: #d9deea; max-width: 25em; }
.ask-cta p b { color: var(--gold-soft); }
.ask-cta-btns { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; }
.ask-cta .btn { background: var(--gold); border-color: var(--gold); color: var(--night); min-height: 48px; }
.ask-cta .btn:hover { background: var(--gold-soft); }
.ask-cta .text-link { margin-left: 0; color: #fff; font-size: 15px; }

@media (max-width: 1080px) {
  .ask-head { grid-template-columns: 1fr; gap: 22px; margin-bottom: 40px; }
  .ask-body { grid-template-columns: 1fr; gap: 28px; }
  .ask-chat { position: relative; top: auto; max-width: 620px; width: 100%; margin: 0 auto; }
}
@media (max-width: 700px) {
  .ask-head .sec-lead { font-size: 16.5px; }
  .ask-proof li { font-size: 12.5px; padding: 5px 11px 5px 26px; }
  .ask-proof li::before { left: 10px; }
  .ask-chat { border-radius: 22px; }
  .ask-tabs { padding: 7px; }
  .ask-tabs button { font-size: 13.5px; padding: 9px 2px; }
  .ask-qs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 12px 14px 2px; }
  .ask-conv { min-height: 450px; padding: 14px 14px 16px; }
  .ask-u p { font-size: 15.5px; }
  .ask-foot { padding: 10px 14px 12px; }
  .ask-board { padding: 20px 14px 18px; border-radius: 20px; }
  .ask-board-h { margin-bottom: 26px; }
  .ask-board-h .t { font-size: 19px; }
  .ask-board-h .s { font-size: 13px; }
  .ask-seal { width: 56px; height: 56px; }
  .ask-seal b { font-size: 15px; }
  .ask-grid { grid-template-columns: 64px repeat(5, minmax(0, 1fr)); gap: 4px; }
  .ask-ch { font-size: 11px; }
  .ask-ch b { font-size: 10.5px; }
  .gap-tag { font-size: 10px; top: -22px; padding: 1px 7px; }
  .ask-rh { font-size: 12.5px; }
  .ask-dot { height: 42px; border-radius: 10px; }
  .ask-dot svg { width: 22px; height: 22px; }
  .ask-legend { font-size: 12px; gap: 6px 12px; }
  .ask-bar span { font-size: 12px; }
  .ask-finds { grid-template-columns: 1fr; gap: 10px; }
  .ask-cta { padding: 20px 18px; }
  .ask-cta-btns, .ask-cta .btn { width: 100%; }
  .ask-cta-btns { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ask-in, .ask-a.ask-in .ask-list li, .ask-a.ask-in .ask-card li, .ask-a.ask-in .ask-try, .ask-typing i { animation: none !important; }
}

