/* LOT 82 폼 팝업 (2026-12-07 r16). 스크립트가 꺼지면 쓰이지 않는다. */
html.fm-open{ overflow:hidden; }
dialog.fmodal{
  padding:0; margin:auto; border:var(--stroke) solid var(--ink); border-radius:24px;
  width:min(900px, calc(100vw - 32px)); max-height:calc(100dvh - 48px); overflow:auto; overscroll-behavior:contain;
  background:var(--blush); color:var(--ink);
}
dialog.fmodal::backdrop{ background:rgba(23,27,23,.55); }
.fmodal__bar{
  position:sticky; top:0; z-index:3; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 20px; background:var(--blush); border-bottom:1px solid var(--line);
}
.fmodal__title{ font-size:18px; font-weight:800; letter-spacing:-0.01em; line-height:1.3; }
.fmodal__close{
  flex:none; width:44px; height:44px; border-radius:50%; border:var(--stroke) solid var(--ink); background:#fff; color:var(--ink);
  font-size:24px; line-height:1; cursor:pointer;
}
.fmodal__close:focus-visible{ outline:3px solid var(--slate); outline-offset:2px; }
.fmodal__body{ padding:16px 20px 28px; }
.fmodal__body .dform{ margin:0; max-width:none; }
.fmodal__open{ margin-top:28px; text-align:center; }
/* 휴대폰: 화면 전체를 덮는 시트. 팝업 안에서만 스크롤 */
@media (max-width:767px){
  dialog.fmodal{ width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0; }
  .fmodal__bar{ padding:10px 16px; }
  .fmodal__body{ padding:12px 12px 32px; }
  .fmodal__body .dform{ padding:20px 16px; }
}
html[lang="ar"] .fmodal__title{ letter-spacing:0; }

/* ---------- 한 화면에 한 질문 (r16) ---------- */
dialog.fmodal--steps[open]{ display:flex; flex-direction:column; }
dialog.fmodal--steps{ width:min(680px, calc(100vw - 32px)); overflow:hidden; }
@media (min-width:768px){ dialog.fmodal--steps{ height:min(640px, calc(100dvh - 48px)); } }   /* 데스크톱: 화면마다 높이가 출렁이지 않게 */
.fmodal--steps .fmodal__bar{ position:static; }
.fmodal__steps-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 20px 0; }
.fmodal__progress{ display:flex; align-items:center; gap:10px; flex:1; }
.fmodal__count{ font-size:14px; font-weight:800; color:var(--ink-2); white-space:nowrap; }
.fmodal__meter{ flex:1; max-width:220px; height:6px; border-radius:99px; background:rgba(23,27,23,.12); overflow:hidden; }
.fmodal__fill{ display:block; height:100%; width:0; background:var(--ink); border-radius:99px; transition:width .2s; }
.st-skiprest{ border:0; background:none; padding:6px 0; font:inherit; font-size:14px; font-weight:600; color:var(--ink-2); text-decoration:underline; text-underline-offset:3px; cursor:pointer; white-space:nowrap; }
.fmodal--steps .fmodal__body{ flex:1; overflow:auto; overscroll-behavior:contain; padding:20px 20px 12px; }
.fmodal--steps .dform{ border:0; background:transparent; padding:0; margin:0; max-width:none; }
.fmodal--steps .dform__title, .fmodal--steps .st-hide{ display:none; }
.fmodal--steps .dform__grid{ display:block; margin:0; }
.st{ display:none; }
.st.is-on{ display:flex; flex-direction:column; gap:14px; }
.st .f{ display:flex; flex-direction:column; gap:14px; margin:0; padding:0; border:0; }
.st .f__k{ font-size:24px; font-weight:800; line-height:1.35; letter-spacing:-0.01em; }
.st .f__k em{ font-size:.7em; }
.st .f-pair{ display:flex; flex-direction:column; gap:22px; }   /* r17: 한 화면에 두 칸 */
.st .f-pair .f__k{ font-size:21px; }
.st input[type="text"], .st input[type="email"], .st input[type="tel"], .st input[type="number"], .st textarea{ min-height:60px; font-size:19px; padding:0 16px; border-radius:14px; }
.st textarea{ padding:14px 16px; min-height:140px; }
.st .st-native{ display:none; }
.st .chips, .st-choices{ display:grid; gap:10px; }
.st .chips label{ display:flex; align-items:center; gap:12px; min-height:58px; padding:0 18px; border:1.5px solid var(--ink); border-radius:14px; background:#fff; font-size:18px; font-weight:600; cursor:pointer; }
.st .chips label:has(input:checked){ background:var(--t-coral); border-width:2.5px; }
.st .chips input{ width:20px; height:20px; accent-color:var(--ink); }
.st-choices{ grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); }
.st-choice{ min-height:52px; padding:0 16px; border:1.5px solid var(--ink); border-radius:14px; background:#fff; font:inherit; font-size:16px; font-weight:600; text-align:start; cursor:pointer; color:var(--ink); }
.st-choice[aria-pressed="true"]{ background:var(--t-coral); border-width:2.5px; }
.st-choice:focus-visible, .st .chips label:focus-within{ outline:3px solid var(--slate); outline-offset:2px; }
.st .st-search{ min-height:56px; font-size:18px; padding:0 16px 0 44px; border:1.5px solid var(--ink); border-radius:14px; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5' fill='none' stroke='%231F1A17' stroke-width='2'/%3E%3Cpath d='M13 13l4 4' stroke='%231F1A17' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 14px center / 20px 20px; width:100%; box-sizing:border-box; }
[dir="rtl"] .st .st-search{ padding:0 44px 0 16px; background-position:right 14px center; }
.st .st-search{ position:sticky; top:-20px; z-index:2; box-shadow:0 0 0 4px var(--blush), 0 10px 10px -2px var(--blush); }
@media (max-width:767px){ .st .st-search{ top:-16px; } }   /* r17: 긴 목록을 스크롤해도 찾기 칸은 위에 남는다 */
.st-choices--long .st-choice{ min-height:50px; }
.st-err{ margin:0; font-size:15px; font-weight:700; color:#A32B1F; }
.st .f__other{ min-height:56px; font-size:17px; }
.st--final .consent{ margin-top:8px; }
.st-sum__t{ font-size:22px; font-weight:800; outline:none; }
.st-sum{ display:grid; grid-template-columns:minmax(0,2fr) minmax(0,3fr); gap:0; margin:0; border-top:1px solid var(--line); }
.st-sum dt, .st-sum dd{ margin:0; padding:10px 0; border-bottom:1px solid var(--line); font-size:15px; }
.st-sum dt{ font-weight:700; color:var(--ink-2); padding-inline-end:12px; }
.st-sum dd{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.st-sum__v{ overflow-wrap:anywhere; }
.st-edit{ flex:none; border:0; background:none; padding:0; font:inherit; font-size:14px; font-weight:700; color:var(--coral-ink); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.fmodal__nav{ flex:none; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 20px calc(12px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:var(--blush); }
.fmodal__nav-end{ display:flex; align-items:center; gap:10px; margin-inline-start:auto; }
.btn--ghost{ background:#fff; color:var(--ink); border:1.5px solid var(--ink); }
.st-skip{ border:0; background:none; padding:10px 6px; font:inherit; font-size:15px; font-weight:700; color:var(--ink-2); cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.btn__arrow--back{ transform:scaleX(-1); }
[dir="rtl"] .btn__arrow.btn__arrow--back{ transform:none; }
[dir="rtl"] .btn__arrow{ transform:scaleX(-1); }
@media (max-width:767px){
  dialog.fmodal--steps{ width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; top:0; }
  .fmodal__steps-row{ padding:8px 16px 0; }
  .fmodal--steps .fmodal__body{ padding:16px 16px 8px; }
  .st .f__k{ font-size:21px; }
  .st-choices{ grid-template-columns:1fr; }
  .st-sum{ grid-template-columns:minmax(0,2fr) minmax(0,3fr); }
  .st-sum dt, .st-sum dd{ padding:8px 0; font-size:14px; }
  .st-sum__t{ font-size:20px; }
  .st-send{ flex:1; justify-content:center; text-align:center; line-height:1.25; padding-block:8px; }
  .fmodal__nav{ padding:10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .fmodal__nav .btn{ min-height:50px; }
}
/* hidden 속성이 .btn의 display에 덮이지 않게 */
.fmodal [hidden]{ display:none !important; }
.fmodal__nav-end:has(.st-send:not([hidden])){ flex:1; }
