/* =========================================================================
   파일쿠키 카테고리 선택창 (웹툰 / K-AV) — 공용 스타일
   - 상단 네비의 [웹툰]/[K-AV] 탭 클릭 시 서비스 선택 오버레이
   - 하나의 반응형 컴포넌트: 모바일(≤767px)=가운데 세로 스택, PC(≥768px)=좌우 스플릿
   - 원본: design_handoff_category_selector (hifi). 실서비스는 fixed 전체화면 오버레이.
   ========================================================================= */

/* 오버레이 컨테이너: 실서비스는 전체화면 fixed */
.kcat { position: fixed; inset: 0; z-index: 99999; display: none; }
.kcat.is-open { display: block; }

.kcat__backdrop { position: absolute; inset: 0; background: rgba(6,10,20,.8); animation: kcatFade .22s ease both; }
.kcat__dialog { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 22px 16px; pointer-events: none; }
.kcat__inner { width: 100%; max-width: 1240px; margin: 0 auto; pointer-events: auto; animation: kcatRise .28s cubic-bezier(.2,.7,.3,1) both; }

.kcat__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 14px; }
.kcat__eyebrow { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); border-radius: 50px; padding: 4px 11px; margin-bottom: 9px; color: #fff; }
.kcat__eyebrow img { width: 13px; height: 13px; }
.kcat__eyebrow span { font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .03em; }
.kcat__title { font-size: 22px; font-weight: 900; color: #fff; letter-spacing: -.02em; line-height: 1.15; margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.kcat__close { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.kcat__close:hover { background: rgba(255,255,255,.24); }

.kcat__panels { display: flex; flex-direction: column; gap: 12px; }

/* 서비스 카드 (링크) */
.kcat-panel { position: relative; display: block; overflow: hidden; border-radius: 18px; height: 160px; box-shadow: 0 16px 36px rgba(0,0,0,.4); text-decoration: none; cursor: pointer; }
.kcat-panel__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.kcat-panel__scrim { position: absolute; inset: 0; pointer-events: none; }
.kcat-panel__body { position: absolute; left: 20px; right: 20px; bottom: 20px; }
.kcat-panel__name { font-size: 27px; font-weight: 900; color: #fff; letter-spacing: -.02em; text-shadow: 0 2px 6px rgba(0,0,0,.9), 0 6px 22px rgba(0,0,0,.7); }
.kcat-panel__desc { font-size: 11.5px; color: rgba(255,255,255,.9); margin-top: 3px; line-height: 1.35; text-shadow: 0 1px 4px rgba(0,0,0,.9), 0 2px 10px rgba(0,0,0,.75); }
.kcat-panel__cta { margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 50px; padding: 7px 7px 7px 16px; font-size: 12.5px; font-weight: 800; color: #0f172a; }
.kcat-panel__cta i { width: 22px; height: 22px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-style: normal; }

@keyframes kcatFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kcatRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- PC (≥768px): 좌우 스플릿 + hover 확장 ---- */
@media (min-width: 768px) {
  .kcat__dialog { padding: 30px 34px 34px; }
  .kcat__eyebrow { padding: 5px 12px; margin-bottom: 11px; }
  .kcat__eyebrow img { width: 15px; height: 15px; }
  .kcat__eyebrow span { font-size: 11.5px; letter-spacing: .04em; }
  .kcat__title { font-size: 30px; }
  .kcat__close { width: 48px; height: 48px; font-size: 24px; }
  .kcat__head { align-items: flex-end; margin-bottom: 18px; }

  .kcat__panels { flex-direction: row; gap: 20px; height: min(66vh, 520px); }
  .kcat-panel { flex: 1; height: auto; border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.5); transition: flex .4s cubic-bezier(.4,0,.2,1); }
  .kcat-panel:hover { flex: 1.5; }
  .kcat-panel__img { object-position: center 22%; }
  .kcat-panel__body { left: 0; right: 0; padding: 0 38px 38px; }
  .kcat-panel__name { font-size: 46px; text-shadow: 0 2px 6px rgba(0,0,0,.9), 0 8px 30px rgba(0,0,0,.7); }
  .kcat-panel__desc { font-size: 14px; margin-top: 6px; text-shadow: 0 1px 4px rgba(0,0,0,.95), 0 3px 14px rgba(0,0,0,.8); }
  .kcat-panel__cta { margin-top: 22px; padding: 12px 12px 12px 24px; font-size: 16px; }
  .kcat-panel__cta i { width: 34px; height: 34px; font-size: 17px; }
}

/* 열림 시 배경 스크롤 잠금 (선택) */
body.kcat-lock { overflow: hidden; }
