/* ==========================================================================
   dlog · 새 UI — 10 디자이너 찾기 (작품으로 찾기 · 공개 레이아웃)
   ========================================================================== */

.dg-wrap { display: flex; flex-direction: column; gap: 18px; padding-top: 30px; padding-bottom: 70px; }

.dg-head h1 { font-size: 27px; font-weight: 800; letter-spacing: -.025em; }
.dg-head h1 span {
  margin-left: 8px; font-size: 15px; font-weight: 600; color: var(--ink-3);
  letter-spacing: 0;
}

/* ---------- 검색 ---------- */
.dg-search { position: relative; }
.dg-search input {
  width: 100%; height: 58px; padding: 0 64px 0 22px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  font-size: 15px;
  box-shadow: var(--sh-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dg-search input::placeholder { color: var(--ink-3); }
.dg-search input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .16);
}
.dg-search button {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--brand); color: #fff;
  transition: background .15s ease;
}
.dg-search button:hover { background: var(--brand-ink); }

/* ---------- 분야 칩 (링크) ---------- */
.dg-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.dg-cats a {
  height: 36px; padding: 0 16px; display: inline-flex; align-items: center;
  border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dg-cats a:hover { background: #F3F5F9; color: var(--ink); }
.dg-cats a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 조건 (드롭다운) ---------- */
.dg-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dg-reset { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; font-size: 12.5px; color: var(--ink-3); }
.dg-reset:hover { color: var(--brand); }
.dg-count { font-size: 13px; color: var(--ink-3); margin-right: 4px; }
.dg-count b { color: var(--ink); font-weight: 800; }

.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-full);
  font-size: 13px; color: var(--ink-2); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.dd-btn:hover { border-color: var(--brand-soft-2); background: var(--brand-tint); }
.dd-btn .dd-lb { font-weight: 600; color: var(--ink-3); }
.dd-btn b { font-weight: 700; color: var(--ink); }
.dd-btn svg { color: var(--ink-3); transition: transform .18s ease; }
.dd.open .dd-btn { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .14); background: var(--surface); }
.dd.open .dd-btn svg { transform: rotate(180deg); color: var(--brand); }
/* 고른 값이 있으면 브랜드색으로 표시 */
.dd.is-set .dd-btn { border-color: var(--brand-soft-2); background: var(--brand-tint); }
.dd.is-set .dd-btn b { color: var(--brand); }

.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 170px; max-height: 320px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(17, 20, 32, .14), 0 2px 6px rgba(17, 20, 32, .06);
  animation: ddIn .14s ease-out;
}
.dd-menu[hidden] { display: none; }
.dd-menu.wide { min-width: 240px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.dd-menu.wide[hidden] { display: none; }
.dd-menu.wide li:first-child { grid-column: 1 / -1; }
.dd-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: 36px; padding: 0 10px; border-radius: var(--r-sm);
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap; outline: none;
}
.dd-menu a:hover, .dd-menu a:focus-visible { background: #F3F5F9; color: var(--ink); }
.dd-menu a.on { background: var(--brand-tint); color: var(--brand); font-weight: 700; }
.dd-menu a svg { color: var(--brand); flex: none; }
/* 정렬은 오른쪽 끝이라 메뉴를 오른쪽에 맞춘다 */
.dg-filters > .dd:last-child .dd-menu { left: auto; right: 0; }
@keyframes ddIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 카드 그리드 ---------- */
.dg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.dg-card {
  position: relative; min-width: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.dg-card[hidden] { display: none; }
.dg-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--brand-soft-2); }

/* 2x2 작품 콜라주 */
.dg-collage {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; aspect-ratio: 1 / 1;
}
.dg-collage .thumb { border-radius: 0; }
.dg-collage .thumb svg { width: 40%; height: 40%; }
.dg-collage .thumb::after { background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.12)); }

/* 본문 */
.dg-body { padding: 14px 15px 15px; }

.dg-nm { display: flex; align-items: center; gap: 7px; }
.dg-nm b { font-size: 15.5px; font-weight: 800; letter-spacing: -.015em; }
.dg-nm a:hover b { color: var(--brand); }
.dg-open {
  margin-left: auto; flex: none;
  display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 9px;
  border-radius: var(--r-full); background: var(--ok-bg); color: var(--ok);
  font-size: 11px; font-weight: 700;
}

.dg-role { margin-top: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dg-career { margin-top: 2px; font-size: 12px; color: var(--ink-3); }

.dg-rate { display: flex; align-items: center; gap: 4px; margin-top: 9px; font-size: 12.5px; color: var(--ink-2); }
.dg-rate svg { color: #F5A524; fill: currentColor; }
.dg-rate b { font-weight: 800; color: var(--ink); }
.dg-rate span { color: var(--ink-3); }

.dg-facts {
  display: flex; flex-direction: column; gap: 5px;
  margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line);
}
.dg-facts li {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--ink-2);
}
.dg-facts svg { color: var(--ink-3); flex: none; }

.dg-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 13px; }
.dg-acts .btn { padding: 0 8px; font-size: 12.5px; }

/* ---------- 빈 상태 ---------- */
.dg-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 56px 20px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.dg-empty b { font-size: 15px; font-weight: 700; }
.dg-empty span { max-width: 420px; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.dg-empty .btn { margin-top: 4px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1200px) { .dg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px)  { .dg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px)  {
  .dg-grid { grid-template-columns: 1fr; }
  .dg-filters .grow { display: none; }
  .dg-search input { height: 52px; font-size: 14px; }
}

/* 지역 메뉴는 17개 시/도가 한 번에 보이게 */
.dd-menu.wide { max-height: 460px; }
/* 카드 줄 수가 달라도 버튼은 바닥에 맞춘다 */
.dg-card { display: flex; flex-direction: column; }
.dg-body { flex: 1 1 auto; display: flex; flex-direction: column; }
.dg-acts { margin-top: auto; padding-top: 13px; }
.dg-facts li.done { color: var(--ok); font-weight: 700; }
.dg-facts li.done svg { color: var(--ok); }
