/* 간편문의 (2026-10-21, 시안 비교에서 A 로 확정)
 * 넓은 화면: 오른쪽 아래 고양이 귀 [간편문의] 버튼 → 그 자리에 작은 문의 창. 연락처 칸이 보이면 버튼을 감춘다.
 * 휴대폰(640px 이하): 아래 고정 줄(전화하기 | 간편문의) → 아래에서 올라오는 문의 창. */
:root { --err: #B3261E; --shadow: 0 8px 24px rgba(35, 31, 32, .22); --field: #878C90; }  /* --field: 입력칸 테두리, 흰 바탕 대비 3.4:1 */

/* 떠 있는 버튼 */
.qa-fab { position: fixed; right: 28px; bottom: 28px; z-index: 20; display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 26px 0 22px; background: var(--ink); color: var(--paper); border: 0; border-radius: 30px; box-shadow: var(--shadow); font: 600 17px/1 var(--body); cursor: pointer; }
.qa-fab .ears { position: absolute; left: 18px; bottom: 100%; width: 44px; height: 14px; margin-bottom: -2px; fill: var(--ink); }
.qa-fab:hover { background: #3a3536; }
.qa-fab:hover .ears { fill: #3a3536; }
.qa-fab.away { opacity: 0; visibility: hidden; pointer-events: none; }  /* 숨긴 동안 Tab·화면낭독기도 닿지 않게 */
html.motion .qa-fab { transition: opacity .25s ease, transform .25s var(--ease), visibility 0s; }
html.motion .qa-fab.away { transform: translateY(12px); transition-delay: 0s, 0s, .25s; }
.q-bar { display: none; }

/* 문의 창 */
.qf-panel { position: fixed; right: 28px; bottom: 28px; z-index: 30; width: 384px; max-height: calc(100vh - var(--top) - 48px); overflow: auto; overscroll-behavior: contain; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.qf-panel[hidden] { display: none; }
html.motion .qf-panel { transform-origin: 100% 100%; transform: scale(.96); opacity: 0; transition: transform .28s var(--ease), opacity .2s ease; }
html.motion .qf-panel.open { transform: none; opacity: 1; }

/* 문의 칸 */
.qf { display: grid; gap: 12px; padding: 20px 22px; }
.qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qf-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.qf .qf-head h2 { margin: 0; font-family: var(--disp); font-size: 26px; font-weight: 400; line-height: 1.2; }
.qf-x { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: -8px; padding: 0; background: none; border: 0; border-radius: 20px; color: var(--ink); cursor: pointer; }
.qf-x:hover { background: var(--fog); }
.qf-lead { margin: -6px 0 2px; color: var(--slate); font-size: 15px; }
.qf-f { display: grid; gap: 6px; }
.qf-f > span, .qf-kind legend { font-size: 15px; font-weight: 600; }
.qf-f em { color: var(--slate); font-style: normal; font-weight: 400; }
.qf input:not([type]), .qf input[type=tel], .qf textarea { width: 100%; padding: 8px 12px; border: 2px solid var(--field); border-radius: 10px; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
.qf textarea { resize: vertical; min-height: 64px; }
.qf input:focus, .qf textarea:focus { outline: 0; border-color: var(--ink); }
.qf [aria-invalid=true] { border-color: var(--err) !important; }
.qf-kind { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.qf-kind legend { margin-bottom: 6px; padding: 0; }
.qf-kind label { position: relative; }
.qf-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qf-kind span { display: inline-block; padding: 6px 13px; border: 2px solid var(--field); border-radius: 20px; font-size: 14px; cursor: pointer; }
.qf-kind input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.qf-kind input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }
.qf-ok { display: flex; gap: 10px; align-items: flex-start; color: var(--slate); font-size: 14px; line-height: 1.55; cursor: pointer; }
.qf-ok input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.qf-ok.bad { color: var(--err); }
.qf-send { justify-content: center; width: 100%; cursor: pointer; font-family: var(--body); }
.qf-tel { margin: -4px 0 0; font-size: 15px; text-align: center; color: var(--slate); }
.qf-tel a { color: var(--ink); font-weight: 600; }
.qf-msg { margin: 0; font-size: 15px; }
.qf-msg:empty { display: none; }
.qf-msg.bad { color: var(--err); }
.qf-msg.ok { padding: 12px 14px; background: var(--fog); border-radius: 10px; }
.qf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* 휴대폰 */
@media (max-width: 640px) {
  .qa-fab { display: none; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .q-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: 1fr 1fr; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--paper); border-top: 2px solid var(--ink); }
  .q-bar > * { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; color: var(--ink); font: 600 17px/1 var(--body); text-decoration: none; cursor: pointer; }
  .q-bar > :last-child { background: var(--ink); color: var(--paper); }
  /* 휴대폰: 아래에서 올라오는 창. 키보드가 올라오면 그 위로 올라가고(--kb), 보이는 높이 안에 들어간다(--vvh) */
  .qf-panel { top: auto; left: 0; right: 0; bottom: var(--kb, 0px); width: auto; max-height: 88vh; max-height: min(88dvh, calc(var(--vvh, 100dvh) - 12px)); border-bottom: 0; border-radius: 16px 16px 0 0; }
  html.qf-lock { overflow: hidden; }
  html.qf-lock body::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(35, 31, 32, .45); }
  html.motion .qf-panel { transform: translateY(100%); opacity: 1; transition: transform .35s var(--ease); }
  html.motion .qf-panel.open { transform: none; }
  .qf { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
}
