/* ═══════════════════════════════════════════════
   allfont_new.tpl  –  Monotype-style font library
   prefix: afn-
═══════════════════════════════════════════════ */
.com_sub_wrap.no_searchBar {
    padding-top: 3em;
}
/* sub.css 760px 이하 padding:23em !important 을 이 페이지에서만 덮어씀
   JS가 실제 헤더 높이를 측정해 inline style로 정확한 값으로 교체함 */
@media screen and (max-width: 760px) {
  .com_sub_wrap.no_searchBar {
    padding-top: 130px !important; /* JS 실행 전 기본값 */
    padding-bottom: 40px !important;
  }
}
/* common.css .wrap{overflow:hidden}이 window 스크롤을 막으므로 이 페이지에서만 해제 */
.wrap { overflow: visible !important; }

/* ── 헤더 ─────────────────────────────────── */
.afn-header {
  padding: 36px 0 30px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: radial-gradient(1100px 520px at 8% -18%, rgba(120, 90, 255, .34), transparent 62%), radial-gradient(820px 480px at 96% -6%, rgba(255, 77, 109, .24), transparent 60%), linear-gradient(165deg, #0a0a0f 0%, #14141c 60%, #191824 100%);
}
.afn-header-inner {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

.afn-eyebrow {
  display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #cabfff;
    padding: 7px 15px 7px 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    margin-bottom: 30px;
}

.afn-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #ff6f91);
    box-shadow: 0 0 10px 1px rgba(167, 139, 250, .8);
}

.afn-title {
  font-size: clamp(22px, 3vw, 36px); font-weight: 800; color: #fff;
  margin: 0; letter-spacing: -.04em; line-height: 1.1;
}
.afn-title-count {
  font-size: clamp(13px, 1.2vw, 16px); font-weight: 400;
  color: rgba(255,255,255,.3); margin-left: 10px; letter-spacing: 0;
}
.afn-subtitle {
  font-size: clamp(13px, 1.4vw, 15px); color: rgba(255,255,255,.5);
  margin: 10px 0 0; line-height: 1.6;
}

/* ── 폰코자키 배너 (freefont 전용) ──────────── */
.afn-jockey-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 18px 24px;
  margin-top: 20px;
}
.afn-jockey-banner__info { flex: 1; min-width: 0; }
.afn-jockey-banner__label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #fff; margin: 0 0 6px;
}
.afn-jockey-banner__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 4px;
  background: #EE4817; color: #fff;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.afn-jockey-banner__desc {
  font-size: 13px; color: rgba(255,255,255,.55); margin: 0; line-height: 1.5;
}
.afn-jockey-banner__btn {
  white-space: nowrap;
  padding: 10px 22px;
  border-radius: 7px;
  font-size: 13px; font-weight: 500;
  background: #fff; color: #111;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity .15s;
}
.afn-jockey-banner__btn:hover { opacity: .85; }
@media (max-width: 600px) {
  .afn-jockey-banner { padding: 14px 16px; }
  .afn-jockey-banner__btn { width: 100%; text-align: center; }
}

/* ── 2단 레이아웃 ─────────────────────────── */
.afn-library { background: #fff; }
.afn-library-inner { display: flex; align-items: flex-start; }
.afn-scroll-wrap { } /* 데스크탑: 일반 흐름 */

/* ── 사이드바 ────────────────────────────── */
.afn-sidebar {
  width: 220px; flex-shrink: 0;
  border-right: 1px solid #ebebeb;
  padding: 28px 20px 60px 0;
  position: sticky;
  top: 60px;
  align-self: flex-start;
}
.afn-sb-section { margin-bottom: 24px; }
.afn-sb-section + .afn-sb-section {
  padding-top: 22px; border-top: 1px solid #f0f0f0;
}
.afn-sb-actions {
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}
.afn-sb-actions + .afn-sb-section {
  border-top: none;
  padding-top: 0;
}
.afn-sb-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #aaa; margin: 0 0 10px;
}

/* 필터 태그 (checkbox → pill 스타일) */
.afn-sb-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.afn-filter-tag {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 20px;
  border: 1px solid #e4e4e4; background: #fff;
  font-size: 12px; font-weight: 400; color: #555;
  cursor: pointer; transition: all .12s; user-select: none; line-height: 1.6;
}
.afn-filter-tag:hover { border-color: #aaa; color: #111; }
.afn-filter-tag input[type="checkbox"] { display: none; }
.afn-filter-tag:has(input:checked) { background: #111; border-color: #111; color: #fff; }
.afn-filter-tag.checked { background: #111; border-color: #111; color: #fff; }

/* 결과보기 버튼 */
.afn-filter-submit {
  width: 100%; margin-top: 10px; padding: 9px;
  background: #111; color: #fff; border: none;
  border-radius: 6px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .12s; display: block;
}
.afn-filter-submit:hover { background: #333; }

/* 무료폰트 */
.afn-sb-free-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; margin-top: 8px;
  text-decoration: none; color: #333;
  font-size: 13px; font-weight: 600;
  background: #fef3ef; transition: background .12s;
}
.afn-sb-free-btn:hover { background: #fde5dc; color: #EE4817; }
.afn-sb-free-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #EE4817; flex-shrink: 0;
}

/* ── 메인 영역 ───────────────────────────── */
.afn-main { flex: 1; min-width: 0; padding: 24px 0 60px 32px; min-height: var(--afn-sidebar-h, 0px); }

/* ── 검색바 ──────────────────────────────── */
.afn-controls-sticky { } /* 데스크탑: 일반 흐름 */
.afn-sbar-form { margin-bottom: 12px; }
.afn-sbar {
  display: flex; align-items: stretch;
  border: 1px solid #e0e0e0; border-radius: 8px;
  background: #fff; min-height: 48px;
}
.afn-sbar-divider { width: 1px; background: #ebebeb; flex-shrink: 0; align-self: stretch; }

.afn-sbar-search { flex: 1.5 0 180px; display: flex; align-items: center; padding: 0 12px; gap: 8px; min-width: 0; }
.afn-sbar-search-icon { background: none; border: none; padding: 0; cursor: pointer; color: #ccc; display: flex; align-items: center; flex-shrink: 0; transition: color .12s; }
.afn-sbar-search-icon:hover { color: #555; }
.afn-sbar-input { flex: 1; border: none; outline: none; background: transparent; font-size: 13px; color: #111; padding: 0; min-width: 0; line-height: normal; }
.afn-sbar-input::placeholder { color: #c8c8c8; }
.afn-sbar-erase { background: none; border: none; padding: 0; cursor: pointer; color: #ccc; display: none; align-items: center; flex-shrink: 0; transition: color .12s; }
.afn-sbar-erase:hover { color: #888; }
.afn-sbar-erase.visible { display: flex; }

.afn-sbar-views { display: flex; align-items: center; gap: 2px; padding: 0 10px; flex-shrink: 0; }
.afn-sbar-view {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; cursor: pointer; border-radius: 5px;
  color: #ccc; font-size: 15px; transition: all .12s;
}
.afn-sbar-view:hover { background: #f0f0f0; color: #555; }
.afn-sbar-view.on { background: #111; color: #fff; }

.afn-sbar-imgck { display: flex; align-items: center; padding: 0 10px; flex-shrink: 0; }
.afn-sbar-ck { display: none; }
.afn-sbar-cklabel { font-size: 12px; color: #999; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 5px; user-select: none; }
.afn-sbar-cklabel::before {
  content: ""; width: 14px; height: 14px; border-radius: 3px;
  border: 1.5px solid #d0d0d0; background: #fff; display: block; flex-shrink: 0; transition: all .12s;
}
.afn-sbar-ck:checked + .afn-sbar-cklabel { color: #111; }
.afn-sbar-ck:checked + .afn-sbar-cklabel::before { background: #111; border-color: #111; }

.afn-sbar-size { display: flex; align-items: center; gap: 6px; padding: 0 14px; flex-shrink: 0; }
.afn-sbar-sizeval { font-size: 12px; font-weight: 700; color: #444; min-width: 24px; text-align: right; }
.afn-sbar-sizepx { font-size: 11px; color: #bbb; }
.afn-sbar-range { -webkit-appearance: none; width: 90px; height: 3px; background: #e0e0e0; outline: none; cursor: pointer; border-radius: 2px; vertical-align: middle; }
.afn-sbar-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #111; cursor: pointer; }
.afn-sbar-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #111; cursor: pointer; border: none; }

.afn-sbar-sort { display: flex; align-items: center; padding: 0 2px; flex-shrink: 0; }
.afn-sbar-extxt { display: flex; align-items: center; padding: 0 2px; flex: 1.5; min-width: 0; }

/* 커스텀 드롭다운 */
.afn-drop { position: relative; display: flex; align-items: center; }
.afn-sbar-extxt .afn-drop { flex: 1; min-width: 0; }
.afn-sbar-extxt .afn-drop-btn { flex: 1; min-width: 0; justify-content: space-between; }
.afn-sbar-extxt .afn-drop-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.afn-drop-btn {
  display: flex; align-items: center; gap: 5px;
  border: none; background: transparent; cursor: pointer;
  padding: 7px 10px; border-radius: 6px;
  font-size: 13px; color: #444; white-space: nowrap;
  transition: background .12s; outline: none;
  user-select: none;
}
.afn-drop-btn:hover { background: #f0f0f0; }
.afn-drop-btn .afn-drop-val { pointer-events: none; }
.afn-drop-btn svg { flex-shrink: 0; transition: transform .18s; }
.afn-drop.open .afn-drop-btn { background: #f0f0f0; }
.afn-drop.open .afn-drop-btn svg { transform: rotate(180deg); }
.afn-drop-panel {
  position: absolute; top: calc(100% + 6px);
  right: 0; min-width: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 6px 24px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.05);
  display: none; z-index: 400;
  white-space: nowrap;
}
.afn-drop.open .afn-drop-panel { display: block; }
.afn-drop-opt {
  display: block; width: 100%;
  border: none; background: none; cursor: pointer;
  padding: 8px 14px; border-radius: 6px;
  font-size: 13px; color: #444; text-align: left;
  transition: background .10s, color .10s;
  white-space: nowrap;
}
.afn-drop-opt:hover { background: #f5f5f5; color: #111; }
.afn-drop-opt.sel { color: #111; font-weight: 700; background: #f0f0f0; }

/* tab 전환 */
.afn-tab-cont { display: none; }
.afn-tab-cont.active { display: block; }

/* ── 페이지네이션 ─────────────────────────── */
.afn-pg {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; flex-wrap: wrap;
}
.afn-pg-top  { padding: 12px 0 16px; border-bottom: 1px solid #ebebeb; }
.afn-pg-bottom { padding: 36px 0 24px; }
.afn-pg-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; flex-shrink: 0;
  border: 1px solid #e8e8e8; border-radius: 6px; background: #fff;
  text-decoration: none; color: #888; font-size: 10px; line-height: 1;
  cursor: pointer; box-sizing: border-box; transition: border-color .12s, color .12s;
}
.afn-pg-nav:hover { border-color: #aaa; color: #111; }
.afn-pg-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 6px;
  border: 1px solid #e8e8e8; border-radius: 6px; background: #fff;
  text-decoration: none; color: #555; font-size: 13px; font-weight: 400; line-height: 1;
  cursor: pointer; box-sizing: border-box; transition: border-color .12s, color .12s, background .12s;
}
.afn-pg-num:hover { border-color: #aaa; color: #111; }
.afn-pg-now { background: #111; border-color: #111; color: #fff; cursor: default; }
.afn-pg-now:hover { background: #111; border-color: #111; color: #fff; }

/* ── 폰트 리스트 로우 (list view) ────────── */
.afn-font-row { border-bottom: 1px solid #ebebeb; transition: background .12s; }
.afn-font-row:hover { background: #fafafa; }
.afn-font-row > a { display: block; text-decoration: none; color: inherit; }
.afn-meta {
  display: flex; align-items: center;
  gap: 12px; padding: 16px 16px 0; flex-wrap: wrap;
}
.afn-name { font-size: 12px; font-weight: 600; color: #111; letter-spacing: -.01em; }
.afn-wcnt { font-size: 11px; color: #bbb; }
.afn-company { font-size: 11px; color: #aaa; }
.afn-weights { display: flex; flex-wrap: wrap; gap: 3px; }
.afn-w {
  font-size: 11px; color: #888; border: 1px solid #e8e8e8;
  border-radius: 3px; padding: 2px 6px; white-space: nowrap;
}
.afn-font-row:hover .afn-w { border-color: #ccc; color: #555; }
.afn-w-more {
  font-size: 11px; color: #aaa; background: #f4f4f4;
  border-radius: 3px; padding: 2px 6px; white-space: nowrap;
}
.afn-spec {
  padding: 10px 16px 32px;
  font-size: 32px; line-height: 1.3; color: #111;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block;
}
.afn-empty { text-align: center; padding: 80px 20px; color: #bbb; font-size: 14px; }

/* ── 박스 뷰 ─────────────────────────────── */
.af2-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2em;
  padding: 16px 0;
}
@media (max-width: 1080px) { .af2-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px)  { .af2-grid { grid-template-columns: 1fr; } }
.af2-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: #fff; border-radius: 10px;
  overflow: hidden; position: relative;
  transition: box-shadow .2s, border-color .2s;
  border: 1px solid #efefef;
}
.af2-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,.09); border-color: #d0d0d0; }
.af2-body { flex: 1; padding: 2em 1.6em 1.8em; background: #fafafa; display: flex; flex-direction: column; gap: .8em; }
.af2-card:hover .af2-body { background: #f5f5f5; }
.af2-fname { font-size: 1.8em; font-weight: 400; line-height: 1.2; color: #111; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.af2-pangram { font-size: .82em; color: #888; line-height: 1.7; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.af2-foot { padding: .9em 1.4em; background: #fff; border-top: 1px solid #eaeaea; display: flex; flex-direction: column; gap: 0; position: relative; }
.af2-foot-main { display: flex; align-items: center; justify-content: space-between; transition: opacity .2s; }
.af2-card:hover .af2-foot-main { opacity: 0; }
.af2-company { font-size: .75em; color: #aaa; }
.af2-wcnt { font-size: .7em; color: #999; background: #f0f0f0; border-radius: 20px; padding: .2em .65em; white-space: nowrap; }
.af2-wrow {
  display: flex; flex-wrap: nowrap; gap: 4px; align-items: center;
  position: absolute; inset: 0; padding: .9em 1.4em;
  overflow: hidden;
  opacity: 0; transition: opacity .2s;
}
.af2-wrow::after {
  content: ''; position: absolute;
  top: 0; right: 0; bottom: 0; width: 2em;
  background: linear-gradient(to right, transparent, #fff);
  pointer-events: none;
}
.af2-card:hover .af2-wrow { opacity: 1; }
.af2-w { font-size: .65em; color: #555; background: #f5f5f5; border: 1px solid #e8e8e8; border-radius: 3px; padding: .18em .5em; white-space: nowrap; }

/* 박스뷰 이미지 토글 */
.af2-imgview { display: none; }
.af2-imgview img { width: 100%; aspect-ratio: 8/4; object-fit: cover; display: block; }
#result_cate_02.img-on .af2-imgview { display: block; }
#result_cate_02.img-on .af2-body { display: none; }
.af2-card-name { display: none; flex: 1 1 100%; font-size: .82em; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#result_cate_02.img-on .af2-card-name { display: block; }
#result_cate_02.img-on .af2-foot-main { flex-wrap: wrap; gap: .25em; }

/* ── 이미지 뷰 (list view) ───────────────── */
.afn-imgview {
  display: none; gap: 6px;
  padding: 10px 16px 18px;
}
.afn-imgview img {
  flex: 1 1 0; min-width: 0; aspect-ratio: 8/4;
  object-fit: cover; display: block;
}
#result_cate_01.img-on .afn-spec { display: none; }
#result_cate_01.img-on .afn-imgview { display: flex; }

/* ── 모바일 필터 드로어 ──────────────────── */
.afn-drawer-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 900;
  transition: opacity .25s;
}
.afn-drawer-backdrop.visible { display: block; }

.afn-sidebar-header {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #ebebeb;
  position: sticky; top: 0; background: #fff; z-index: 1;
}
.afn-sidebar-header-title { font-size: 15px; font-weight: 700; color: #111; }
.afn-drawer-close {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border: none; background: #f0f0f0; border-radius: 50%;
  cursor: pointer; color: #444; font-size: 18px; line-height: 1;
}

.afn-filter-bar { display: none; margin-bottom: 10px; }
.afn-filter-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px;
  background: #111; color: #fff; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.afn-filter-toggle { display: none; }
.afn-sidebar-body { }

/* ── 반응형 ──────────────────────────────── */
@media (max-width: 900px) {
  .afn-library-inner { flex-direction: column; align-items: stretch; }
  .afn-sidebar { width: 100%; border-right: none; padding: 0; min-height: 0;
                 position: static; max-height: none; overflow-y: visible; }
  .afn-main { width: 100%; padding: 16px 0 40px; box-sizing: border-box; }
  .afn-pg-top { padding: 10px 0 12px; }
}

@media (max-width: 768px) {
  .afn-scroll-wrap { display: block; }
  .afn-controls-sticky { position: static; background: none; box-shadow: none; padding: 0; }

  .afn-filter-bar { display: flex; margin-bottom: 8px; }
  .afn-filter-btn { padding: 9px 18px; border-radius: 20px; font-size: 14px; }

  .afn-sidebar-header { display: flex; }
  .afn-sidebar {
    position: fixed !important;
    top: 0; left: 0; bottom: 0;
    width: 300px;
    background: #fff; z-index: 910;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 !important;
    border: none !important; min-height: unset !important;
  }
  .afn-sidebar.open { transform: translateX(0); box-shadow: 6px 0 32px rgba(0,0,0,.18); }
  .afn-sidebar-body { padding: 20px 20px 40px; overflow: visible; max-height: none; }
  .afn-sb-section { margin-bottom: 20px; }
  .afn-sb-tags { gap: 5px; }

  .afn-sbar { flex-wrap: wrap; border-radius: 10px; }
  .afn-sbar-search { flex: 1 1 100%; min-height: 52px; border-bottom: 1px solid #ebebeb; padding: 0 14px; }
  .afn-sbar-input { font-size: 15px; }
  .afn-sbar-divider { display: none; }
  .afn-sbar-extxt { flex: 1; min-width: 0; min-height: 44px; }
  .afn-sbar-views { min-height: 44px; }
  .afn-sbar-imgck { min-height: 44px; padding: 0 8px; }
  .afn-sbar-sort { min-height: 44px; }
  .afn-sbar-size { padding: 0 10px; min-height: 44px; }
  .afn-sbar-range { width: 64px; }
  .afn-sbar-sizepx { display: none; }

  .afn-meta { gap: 5px 8px; padding: 12px 12px 0; }
  .afn-name { font-size: 13px; }
  .afn-company { font-size: 10px; }
  .afn-weights { gap: 2px; }
  .afn-w { font-size: 10px; padding: 1px 5px; }
  .afn-spec { font-size: 24px; padding: 8px 12px 20px; }
  .afn-imgview { padding: 8px 12px 14px; gap: 4px; }

  .afn-pg-top { display: flex; padding: 10px 0 12px; }
  .afn-pg-bottom { padding: 20px 0 16px; }

  /* 박스뷰: 모바일 wrow 항상 표시 */
  .af2-card:hover .af2-foot-main { opacity: 1; }
  .af2-wrow { position: static; padding: 0; margin-top: .5em; opacity: 1; }
  .af2-wrow::after { display: none; }
}

@media (max-width: 480px) {
  .afn-sbar-views { padding: 0 6px; }
  .afn-sbar-imgck { padding: 0 6px; }
  .afn-sbar-sort { padding: 0; }
  .afn-sbar-size { padding: 0 6px; }
  .afn-sbar-range { width: 50px; }
  .afn-weights { flex: 1 1 100%; }
  .afn-imgview { gap: 3px; }
  .afn-spec { font-size: 24px; }
}
