/* 176차(사용자, 롤백할 수도 있음): 서클 · 고정팟 · 크루 목록 — React 'PlaceCard'(card-22)를 CSS 로 옮김.
   위 그림(로고 + 흐린 로고 배경) · 왼쪽 위 종류/가입 상태 · 오른쪽 위 인원 → 이름 · 관리자 · 소개 → 얼굴 + '자세히 보기'.
   가입 가능만 색(초록 상태 · 노란 버튼), 가입 마감은 회색(그림 흑백 · 회색 상태 · 회색 버튼).
   '자세히 보기'는 안내 창(phConfirm)과 같은 느낌의 <dialog> — js/circles.js */
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cc {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
  box-shadow: 0 6px 18px -12px color-mix(in srgb, var(--text) 30%, transparent);
  transition: transform .4s var(--ease-bounce), box-shadow .3s ease, border-color .2s ease;
  animation: cc-in .5s ease backwards; animation-delay: calc(min(var(--i, 0), 12) * 45ms);
}
.cc:hover { transform: scale(1.03); box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--text) 24%, transparent); z-index: 1; }
.cc.is-mine { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 28%, transparent); }
@keyframes cc-in { from { opacity: 0; transform: translateY(20px); } }

.cc-media {  /* 위 그림 칸 전체 = 서클 로고 (PlaceCard 사진처럼 꽉 채움), 로고가 없으면 뱃지 색 그라데이션 + 몬스터볼 */
  position: relative; display: grid; place-items: center; height: 200px; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc-color, var(--poke-yellow)) 42%, var(--surface)), color-mix(in srgb, var(--cc-color, var(--poke-blue)) 14%, var(--surface)));
  transition: filter .3s ease;
}
.cc-media-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-bounce); }
.cc:hover .cc-media-img { transform: scale(1.06); }
.cc-media::after {  /* 176차(사용자): 그라데이션으로 통일감 — 위는 뱃지가 보이게 살짝 어둡게, 아래는 카드 바탕색으로 녹아들게 (모든 카드 같은 모양) */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgb(0 0 0 / .22) 0%, transparent 28%, transparent 46%, color-mix(in srgb, var(--surface) 55%, transparent) 72%, var(--surface) 100%);
}
.cc-media-empty { display: grid; place-items: center; transition: transform .45s var(--ease-bounce); }
.cc:hover .cc-media-empty { transform: scale(1.08) rotate(-6deg); }
.cc-tags, .cc-count { z-index: 1; }
.cc-tags { position: absolute; top: 10px; left: 10px; right: 64px; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px);
  color: var(--text); font-size: 11.5px; font-weight: 800; line-height: 1.3; white-space: nowrap;
}
.cc-count { position: absolute; top: 10px; right: 10px; }
.cc-count b { font-variant-numeric: tabular-nums; }
.cc-status { background: #16a34a; color: #fff; }
.cc-status .pulse-dot { background: #fff; }
.cc.is-closed .cc-status, .circle-dialog.is-closed .cc-status { background: var(--surface-muted); color: var(--text-3); }

.cc-body { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 14px 16px 16px; }
.cc-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cc-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; overflow-wrap: anywhere; }
.cc-mine { flex: none; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--text-2); }
.cc-meta { margin: 0; color: var(--text-2); font-size: 13px; }
.cc-meta b { color: var(--text); font-weight: 800; }
.cc-desc { display: -webkit-box; min-height: 3.1em; margin: 0; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: var(--text-2); font-size: 13px; line-height: 1.55; }
.cc-desc-empty { color: var(--text-3); }
.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.cc-faces { display: flex; align-items: center; min-width: 0; }
.cc-faces .avatar { box-shadow: 0 0 0 2px var(--surface); }
.cc-faces .avatar + .avatar { margin-left: -8px; }
.cc-faces-more { margin-left: 6px; color: var(--text-3); font-size: 12px; font-style: normal; font-weight: 800; }
.cc-more { position: static; flex: none; gap: 4px; }
.cc-more::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }  /* 카드 어디를 눌러도 자세히 보기 */
.cc-more .ui-icon { transition: transform .2s ease; }
.cc:hover .cc-more .ui-icon { transform: translateX(3px); }
/* 가입 마감 = 회색 */
.cc.is-closed .cc-media { filter: grayscale(1); }
.cc.is-closed .cc-title { color: var(--text-2); }
.cc.is-closed .cc-faces { filter: grayscale(1); opacity: .75; }
.cc.is-closed .cc-more { color: var(--text-3); }

/* 자세히 보기 창 */
.circle-dialog { width: min(460px, calc(100vw - 32px)); max-width: none; max-height: min(86vh, 760px); padding: 0; overflow: visible; border: 0; background: transparent; color: var(--text); }
.circle-dialog::backdrop { background: rgba(10, 12, 20, .42); backdrop-filter: blur(2px); }
.circle-dialog[open] .cd-card { animation: toast-in .32s var(--ease-bounce) both; }
.cd-card {
  position: relative; display: grid; gap: 14px; max-height: min(86vh, 760px); overflow: auto; padding: 22px;
  border: 1px solid var(--border); border-top: 5px solid var(--cc-color, var(--poke-yellow)); border-radius: 20px;
  background: var(--surface); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
}
.circle-dialog.is-closed .cd-card { border-top-color: var(--border-strong); }
.cd-close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.cd-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-muted); color: var(--text-2); cursor: pointer; transition: transform .2s var(--ease-bounce); }
.cd-close:hover { transform: rotate(90deg); color: var(--text); }
.cd-head { display: flex; align-items: center; gap: 14px; padding-right: 36px; }
.cd-logo { display: grid; flex: none; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--surface-muted); }
.cd-logo img { width: 100%; height: 100%; object-fit: cover; }
.circle-dialog.is-closed .cd-logo img { filter: grayscale(1); }
.cd-head-text { min-width: 0; }
.cd-title { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.cd-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cd-badges .circle-badge { margin-left: 0; }
.cd-badges .cc-tag:not(.cc-status) { background: var(--surface-muted); backdrop-filter: none; color: var(--text-2); }
.cd-desc { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.cd-sec { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.cd-label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text-3); font-size: 12px; font-weight: 800; }
.cd-n { display: inline-grid; place-items: center; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-muted); color: var(--text-2); font-size: 11px; }
.cd-leader { display: inline-flex; align-items: center; gap: 8px; justify-self: start; color: var(--text); font-weight: 800; }
.cd-members { max-height: 168px; overflow: auto; }
.cd-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.cd-link { display: flex; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 12px; color: var(--text); font-size: 14px; font-weight: 700; transition: background-color .15s ease; }
.cd-link:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.cd-ext { margin-left: auto; color: var(--text-3); }
.cd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-join { flex: 1; margin: 0; }
.cd-join .btn, a.cd-join { justify-content: center; width: 100%; height: 46px; font-size: 15px; }
.cd-state { flex: 1; padding: 12px; border-radius: 12px; background: var(--surface-muted); font-weight: 800; text-align: center; }
.cd-state.is-mine { background: color-mix(in srgb, #22c55e 16%, var(--surface)); }
.cd-state.is-closed { color: var(--text-3); }
.circle-dialog .circle-admin, .circle-dialog .circle-leader-row { margin: 0; padding-top: 12px; border-top: 1px solid var(--border); }

@media (max-width: 560px) {
  .cc-grid { grid-template-columns: 1fr; gap: 14px; }
  .cc:hover { transform: none; }
  .cd-card { padding: 18px; }
}
.circle-group + .circle-mine-note, .circle-group ~ #request { margin-top: 28px; }  /* 맨 아래 등록 안내가 카드에 붙지 않게 */
.cc-media-img.is-cover { object-position: center 30%; }  /* 176차: 고른 포켓몬 그림 — 얼굴 쪽이 보이게 */
.cd-logo.is-cover { background: color-mix(in srgb, var(--cc-color, var(--poke-yellow)) 22%, var(--surface)); }
.cover-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.cover-swatch { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid var(--border); border-radius: 14px; background: var(--surface-muted); cursor: pointer; overflow: hidden; transition: transform .2s var(--ease-bounce), border-color .15s ease; }
.cover-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.cover-swatch img { width: 56px; height: 56px; object-fit: contain; }
.cover-swatch.is-none span { color: var(--text-3); font-size: 12px; font-weight: 800; }
.cover-swatch:hover { transform: translateY(-2px); }
.cover-swatch:has(input:checked) { border-color: var(--poke-yellow); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poke-yellow) 30%, transparent); background: var(--surface); }
.cover-swatch:has(input:focus-visible) { outline: 2px solid var(--poke-blue); outline-offset: 2px; }

/* 184차: 종류 · 나이 제한 칩 + 카드 나이 표시 */
.circle-filters { display: flex; align-items: center; gap: 8px 18px; margin: 0 0 18px; overflow-x: auto; scrollbar-width: none; }
.circle-filters::-webkit-scrollbar { display: none; }
.circle-filter { flex: none; flex-wrap: nowrap; align-items: center; margin: 0; }
.circle-filter a { white-space: nowrap; }
.circle-filter a small { margin-left: 2px; opacity: .65; font-weight: 700; }
.circle-filter.is-age { padding-left: 18px; border-left: 1.5px solid var(--border); }
.circle-filter-label { white-space: nowrap; font-size: 12px; font-weight: 800; color: var(--text-3); letter-spacing: .04em; }
.cc-tag.cc-age.is-adult { background: color-mix(in srgb, #ef4444 82%, #000); color: #fff; }
.circle-age-options { display: flex; flex-wrap: wrap; gap: 6px 16px; }
