/* 「빠른 견적상담」 가로 깃발 + 팝업 (v8 시안, 2026-11-16). style.css 의 :root 토큰만 쓴다 — 새 색·새 글꼴 없음, 글꼴 축소 없음.
   기존 .float-quote/.fq-* 규칙은 새 마크업과 클래스가 달라 자동으로 무효가 된다(삭제는 다음 정리 때). */

/* ── 깃발: 화면 오른쪽 가장자리에 꽂힌 가로 깃발(왼쪽 끝이 제비꼬리 모양), 오른쪽 아래 고정 ──
   v3(11-16 보완): 본문을 가리지 않게 작게 — 두 줄(「빠른」/「견적상담」) 약 88x58. PC 1280 은 본문 오른쪽 여백(100px) 안에 들어가 가림 0.
   그보다 좁은 화면은 style.css 의 --fq-r(버튼 자리) 규칙이 목록 행·푸터의 오른쪽을 비워 글자가 깃발 밑으로 가지 않는다(기존 세로 탭·둥근 버튼과 같은 방식).
   푸터 아래 여백 84px 은 style.css(.site-footer)에 이미 있어 페이지 맨 끝 요소도 깃발에 안 가린다. */
:root { --fq-r: 92px; }   /* 폰: 깃발 폭 + 안전 4 (종전 68) */
@media (min-width: 960px) { :root { --fq-r: 96px; } }   /* PC: 깃발 폭 + 안전 (종전 60) — 1280 에서는 좌우 여백 100px 안이라 비움 0 */
.qf { position: fixed; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 80; filter: drop-shadow(0 8px 18px rgba(7, 35, 117, .30)); }
.qf-flag {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: max-content; height: 58px; padding: 0 9px 0 21px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; text-align: left;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%);
  box-shadow: inset -5px 0 0 var(--secondary);   /* 깃대 */
  transition: background .15s;
}
.qf-flag:hover { background: var(--secondary); box-shadow: inset -5px 0 0 var(--accent); }
.qf-flag:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: 0; }
@media (min-width: 960px) {
  .qf { bottom: 32px; }
  .qf-flag { height: 62px; padding-left: 23px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16px 50%); }
}

/* 폰: 인증서비스 아코디언 본문(.pt p)은 원래 오른쪽 버튼 자리를 비우지 않아(PC 규칙에만 있음) 깃발 밑으로 글이 간다 → 다른 목록 행과 같은 규칙을 폰에도 적용 */
@media (max-width: 959px) {
  .pt p { padding-right: max(16px, calc(var(--fq-r) - var(--inset) - 1px)); }
}

/* ── 팝업 ── */
body.qf-open { overflow: hidden; }
.qf-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 12px; background: rgba(11, 26, 63, .55); overscroll-behavior: contain; }
.qf-panel {
  position: relative; width: min(460px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 20px 18px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(7, 35, 117, .35);
}
.qf-panel h2 { margin: 0 40px 4px 0; font-size: 21px; line-height: 1.3; font-weight: 700; color: var(--ink); }
.qf-sub { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.qf-x { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--secondary); }
.qf-x .ic { width: 20px; height: 20px; stroke-width: 2.2; }
.qf-x:hover { background: var(--tint); }

.qf-f { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.qf-f > label, .qf-f > legend { display: block; margin: 0 0 6px; padding: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.qf-hint { margin-left: 4px; font-size: 14px; font-weight: 400; color: var(--muted); }
.qf-f input[type="text"] {
  display: block; width: 100%; height: 50px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; -webkit-appearance: none; appearance: none;
}
.qf-f input[type="text"]:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.qf-f.qf-bad input[type="text"] { border-color: #C0392B; }

/* 칩(선택 버튼) — 체크/라디오는 화면 밖으로 두고 글자 칸이 버튼 */
.qf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.qf-scale { display: grid; grid-template-columns: repeat(4, 1fr); }
.qf-chip { position: relative; display: block; }
.qf-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.qf-chip span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 14px; font-size: 15px; font-weight: 500; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; user-select: none; white-space: nowrap;
}
.qf-scale .qf-chip span { padding: 0 4px; }
.qf-chip:hover span { background: var(--tint); }
.qf-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.qf-chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.qf-agree { margin-top: 4px; }
.qf-f > label.qf-check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-size: 15px; font-weight: 500; color: var(--text); cursor: pointer; }
.qf-check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--primary); }
.qf-check b { color: var(--primary); font-weight: 700; }
.qf-terms { margin: 0 0 0 32px; font-size: 14px; color: var(--muted); }
.qf-terms summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.qf-terms ul { margin: 4px 0 4px; padding: 0; }
.qf-terms li { margin: 0 0 4px; line-height: 1.5; }

.qf-err { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: #B3261E; }
.qf-err-top { margin: 0 0 10px; font-weight: 700; }
.qf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.qf-submit { display: grid; place-items: center; width: 100%; min-height: 54px; margin-top: 6px; font-size: 17px; font-weight: 700; color: #fff; background: var(--primary); border-radius: 12px; }
.qf-submit:hover { background: var(--secondary); }
.qf-submit[disabled] { opacity: .65; cursor: wait; }
.qf-alt { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line-soft); text-align: center; font-size: 14px; color: var(--muted); }
.qf-alt a { font-weight: 700; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.qf-done { text-align: center; padding: 18px 4px 4px; }
.qf-done h2 { margin: 8px 0 6px; }
.qf-done p { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--text); }
.qf-done-ic { display: inline-block; padding: 14px; width: 68px; height: 68px; border-radius: 50%; background: var(--tint); color: var(--primary); }
.qf-done:focus { outline: none; }

@media (max-width: 380px) {
  .qf-panel { padding: 20px 14px 16px; }
  .qf-chip span { padding: 0 11px; }
}
@media (prefers-reduced-motion: no-preference) {
  .qf-modal { animation: qf-fade .14s ease-out; }
  .qf-panel { animation: qf-rise .18s ease-out; }
}
@keyframes qf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qf-rise { from { transform: translateY(14px); } to { transform: none; } }
