/* ============ MAECHULUTION — 무료 진단 신청 모달 (Tweaks-style) ============ */
.diag-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
  background: rgba(16, 24, 36, .42);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.diag-overlay.is-open { opacity: 1; }
.diag-overlay[hidden] { display: none; }

.diag-panel {
  width: 100%;
  max-width: 460px;
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 40px 90px -30px rgba(16, 30, 50, .5);
  transform: translateY(16px) scale(.97);
  opacity: 0;
  transition: transform .38s var(--ease), opacity .38s var(--ease);
}
.diag-overlay.is-open .diag-panel { transform: none; opacity: 1; }

/* header */
.diag-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 1.9rem) clamp(1.4rem, 3vw, 1.9rem) 1rem;
  background: linear-gradient(var(--bg) 72%, rgba(255,255,255,0));
}
.diag-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue-700);
}
.diag-title { font-size: 1.42rem; font-weight: 800; letter-spacing: -0.025em; margin-top: .45rem; }
.diag-x {
  flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-soft);
  cursor: pointer; transition: background .2s, color .2s, transform .2s;
}
.diag-x svg { width: 18px; height: 18px; }
.diag-x:hover { background: var(--blue-tint); color: var(--blue-700); }

/* body / fields */
.diag-body { padding: .4rem clamp(1.4rem, 3vw, 1.9rem) clamp(1.4rem, 3vw, 1.9rem); display: grid; gap: 1.15rem; }
.diag-section { display: grid; gap: .5rem; }
.diag-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 440px) { .diag-row2 { grid-template-columns: 1fr; } }
.diag-label { font-size: .85rem; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.diag-hint { font-weight: 500; color: var(--muted); font-size: .8rem; }
.diag-input {
  font-family: inherit; font-size: 1rem; color: var(--ink);
  width: 100%;
  padding: .85em 1em;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.diag-input::placeholder { color: #AEB4BD; }
.diag-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-tint);
}
.diag-textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.diag-input.invalid { border-color: #E5484D; box-shadow: 0 0 0 4px rgba(229,72,77,.12); }

/* service chips (segmented, multi) */
.diag-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.diag-chip {
  font-family: inherit; font-size: .92rem; font-weight: 600;
  padding: .6em 1em; border-radius: 999px;
  border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--ink-soft);
  cursor: pointer; transition: all .2s var(--ease);
}
.diag-chip:hover { border-color: var(--blue); color: var(--blue-700); }
.diag-chip[aria-pressed="true"] {
  background: var(--blue); border-color: var(--blue); color: #fff;
}

.diag-err { color: #E5484D; font-size: .88rem; font-weight: 600; margin: -.3rem 0 0; }
.diag-err[hidden] { display: none; }

.diag-submit { width: 100%; margin-top: .3rem; }
.diag-foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: -.2rem; }

/* success state */
.diag-success {
  padding: clamp(2.4rem, 5vw, 3.4rem) clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  display: grid; justify-items: center; gap: .9rem;
}
.diag-success[hidden] { display: none; }
.diag-check {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue-tint); color: var(--blue-700);
  margin-bottom: .4rem;
  animation: popCheck .5s var(--ease) backwards;
}
.diag-check svg { width: 34px; height: 34px; }
@keyframes popCheck { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.diag-success h3 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }
.diag-success p { color: var(--muted); }
.diag-success .btn { margin-top: .6rem; }

@media (prefers-reduced-motion: reduce) {
  .diag-overlay, .diag-panel { transition: none; }
  .diag-check { animation: none; }
}

/* ============ 상시 플로팅 간편상담 위젯 (우측 하단) ============ */
.quick-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 80;
  width: 300px;
  max-width: calc(100vw - 2rem);
  display: grid;
  gap: .7rem;
  animation: quickIn .6s var(--ease) .8s backwards;
}
.quick-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgba(16, 30, 50, .4);
  padding: 1.2rem 1.2rem 1.3rem;
  display: grid;
  gap: .7rem;
}
.quick-title { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
.quick-input {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  width: 100%;
  padding: .72em .85em;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color .2s, box-shadow .2s;
}
.quick-input::placeholder { color: #AEB4BD; }
.quick-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.quick-input.invalid { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
.quick-tel { display: flex; align-items: center; gap: .35rem; }
.quick-sel {
  font-family: inherit; font-size: .95rem; color: var(--ink);
  padding: .72em .5em .72em .7em;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
}
.quick-sel:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-tint); }
.quick-num { flex: 1 1 0; min-width: 0; text-align: center; }
.quick-dash { color: var(--muted); flex: none; }
.quick-agree {
  display: flex; align-items: flex-start; gap: .45rem;
  font-size: .8rem; color: var(--ink-soft); line-height: 1.35; cursor: pointer;
}
.quick-agree input { margin-top: .12em; accent-color: var(--blue); flex: none; }
.quick-agree a { color: var(--blue-700); font-weight: 600; }
.quick-err { color: #E5484D; font-size: .8rem; font-weight: 600; margin: -.2rem 0 0; }
.quick-err[hidden] { display: none; }
.quick-submit {
  font-family: inherit; font-size: 1rem; font-weight: 700; color: #fff;
  width: 100%;
  padding: .85em 1em;
  border: none; border-radius: 10px;
  background: var(--blue);
  cursor: pointer;
  transition: background .2s, transform .15s;
}
.quick-submit:hover { background: var(--blue-700); }
.quick-submit:active { transform: translateY(1px); }
.quick-done {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85em 1em;
  border-radius: 10px;
  background: var(--blue-tint); color: var(--blue-700);
  font-weight: 700; font-size: .98rem;
}
.quick-done[hidden] { display: none; }
.quick-done svg { width: 20px; height: 20px; flex: none; }
.quick-actions { display: flex; gap: .6rem; }
.quick-btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7em .5em;
  border-radius: 12px;
  font-size: .86rem; font-weight: 800; letter-spacing: -0.02em;
  text-decoration: none;
  box-shadow: 0 10px 26px -12px rgba(16, 30, 50, .5);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s;
}
.quick-btn:hover { transform: translateY(-2px); }
.quick-btn svg { width: 17px; height: 17px; flex: none; }
.quick-btn--kakao { background: #FEE500; color: #1A1A1A; }
.quick-btn--call { background: var(--blue); color: #fff; }
@keyframes quickIn { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .quick-fab { width: 270px; }
}
@media (prefers-reduced-motion: reduce) {
  .quick-fab { animation: none; }
}
html.no-motion .quick-fab { animation: none; }
.quick-fab { opacity: 1; }
