/* ========================================= */
/* Cards - Card Components & Badges         */
/* ========================================= */

/* Card (unboxed by default) */
.card { position: relative; }
.card[hidden] { display: none; }   /* 홈 카테고리 탭 Super Pass 필터 (26-08-26) */
.card .media { border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }   /* 26-08-27: 반투명 border 밑으로 사진이 비쳐 검은 테처럼 보이던 문제 → 안쪽 그림자 1px 로 교체 */
.card-body { overflow: hidden; min-width: 0; }
.grid2 .card > .card-body { margin-top: 12px; }   /* 10→12 스냅 (26-08-30) */   /* 사진↔본문 10 — index 인라인에서 공통으로 이동 (26-08-27, 시안 페이지에서 누락됐던 값) */
/* 카드 정보 구조 개편 (26-08-26): 클라이언트명 → 캠페인명 → 모집 현황(숫자+막대). 설명 문장은 카드에서 제거 */
.card-client { margin-top: 0; font: var(--t-caption); font-weight: 400; color: var(--fg-secondary);   /* 브랜드 이름 = 12/16 400 회색 — 10-23 사용자 "업체명·제목 굵기 밸런스": 제목 600 과 겹쳐 무거워 400 으로 — 앱 전체 한 값 (10-21 사용자 확정, 전 700 검정) */ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-client + .card-title { margin-top: 2px; }
.card-title + .badge-group { margin-top: 6px; }
.badge-group + .card-footer { margin-top: 8px; }   /* 26-08-31 8 (6 이 .card-footer 8 을 덮고 있었음) */
.card-title { margin-top: 8px; min-height: 40px; font: var(--t-label); font-weight: 600; color: var(--fg-primary); }   /* 카드 상품명·캠페인명 = 14/20 600 — 홈·공동구매·캠페인 목록 한 값 (10-21 사용자 확정, 전 400). 2줄 자리 고정 → 그리드 행 높이 통일 */
.card-recruit { display: flex; align-items: center; gap: 6px; }
.card-recruit .icon { font-size: 16px; color: var(--fg-secondary); }   /* 글 줄 안 아이콘 = 16 (10-25) */
.card-recruit-num { font-size: 12px; line-height: 16px; color: var(--fg-secondary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.card-recruit-num b { color: var(--fg-primary); font-weight: 700; }
/* 모집 막대 제거 (26-08-27 컨셉 B '문장형' 승격): "5 / 10 applied" 한 줄. 숫자+막대 이중 표현 정리 */
/* 타입·기한 — 버튼처럼 보이던 라벨을 텍스트 메타로 (26-08-26). 위치·금액은 정책상 비노출 */
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--fg-secondary); }
.card-meta-sep { color: var(--fg-tertiary); }
.card-days, .card-meta-sep { white-space: nowrap; flex-shrink: 0; }   /* 다국어: 앞 글이 길어도 "D-30" 이 쪼개지지 않게 (10-20) */
.card-days.is-urgent { color: var(--fg-brand); font-weight: 500; }
/* 내 채널 없는 캠페인은 존재하지 않음 — 모든 캠페인은 Instagram 이 디폴트 (사용자 26-08-26) */
.card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%; word-break: keep-all; overflow-wrap: anywhere; }   /* 한국어 낱말 단위 줄바꿈 (10-25 사용자 — "찾아 드려 / 요"처럼 한 글자가 다음 줄로 넘어갔다) */
.card-body .card-title { line-height: 20px; }
/* 캠페인 카드 = 브랜드 → 제목 1줄 말줄임 → 회색 설명 2줄 (라이브 구성, 10-25 사용자 지시로 되돌림 — 옛 "제목 2줄·설명 없음"). 설명이 붙은 제목만 1줄: 공동구매 카드(제목 뒤 상품명)는 2줄 그대로
   설명은 1줄뿐이어도 2줄 자리(32)를 지켜 두 칸 격자의 줄이 맞는다. 제목 → 설명 2 는 title-gap.css */
.card-title:has(+ .card-desc) { display: block; min-height: 0; white-space: nowrap; text-overflow: ellipsis; }
.card-desc { min-height: 32px; font: var(--t-caption); color: var(--fg-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
.card-desc + .badge-group { margin-top: 6px; }
.card-footer { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }   /* 26-08-31 사용자: 배지 줄과 8 분리 */
.card-info { display: flex; flex-direction: column; gap: 2px; }

.card-actions { display: flex; gap: 4px; }

.card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px;
  border-radius: var(--r-8);   /* 작은 버튼 = 4, 시스템 .btn-xs 와 동일 (26-09-02) */
  font-size: 11px;
  line-height: 14px;
  background: var(--bg-sunken);
  color: var(--fg-secondary);
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.card-action-btn:hover { background: var(--border-control); }

/* Badge group */
.badge-group { display: flex; flex-wrap: nowrap; gap: 4px; overflow: hidden; }   /* 한 줄 고정: 최대 2개 + "+N" (26-08-26) */
.badge-group > .badge { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* 번역이 길면 앞 배지가 줄고 "+N" 은 남는다 (10-20 다국어) */
.badge-group > .badge-more { flex: none; }

/* Badge base */
.badge {
  /* 글자 세로 중앙 = 줄높이 100% + 위아래 같은 여백 (10-21 사용자 "폰트 자체를 100%로").
     위아래 여백을 다르게 줘서 글자를 내리지 않는다 — 글꼴(일본어·번체 기기 글꼴)이 바뀌면 다시 어긋남. 옛 값: 위2/아래0 */
  /* inline-block 유지 — flex 로 바꾸면 줄 안 배지의 말줄임(…)이 안 된다. 위아래 여백은 같게(2.5) = 18 - 테두리 2 - 글자 11 */
  display: inline-block;
  box-sizing: border-box;
  height: 18px;
  padding: 2.5px 4px;   /* 좌우 3 → 4 (10-23) — 카드 안 채널 배지 줄이 360 에서 안 잘리는 최대. 따로 쓰는 상태 칩(.badge.st)은 6 */
  border-radius: 4px;   /* SNS 배지·태그·카운터 = 2 (design-system-showcase §4 Radius) */
  font: var(--t-tag-11);
  background: var(--bg-default);
  color: var(--fg-secondary);   /* 기본 배지 = 회색 글자 (10-20 칩·배지 검정 금지) */
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  white-space: nowrap;   /* 다국어: 배지 글자가 두 줄로 쪼개지지 않게 (10-20) */
}
/* 줄 안에 나란히 놓인 배지는 칸보다 길면 말줄임 (10-20 다국어). 글 줄 안 배지는 overflow 가 기준선을 바꿔서 제외 */
.sp-row-tags > .badge, .pl-card-st > .badge, .card-status > .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* Platform badges */
/* 채널 배지 (현행 10-18): 브랜드색 꼬리표, 전부 같은 진하기. 카드 = 한 줄 · 내 채널(.is-mine) 맨 앞 · 넘치면 "+N".
   상세 = 두 묶음(pages/detail.css .pl-channels). 위치는 제목 아래.
   옛 이력: 08-27 회색 한 룩 → 같은 날 브랜드색 복원 → 10-18 내 채널 아닌 배지 흐림(.5) 폐기 */
/* SNS 브랜드 규정색 — 외부 자산(토큰 아님). 채널 마크 아이콘에만. Instagram #E4405F · Facebook #1877F2 · YouTube #FF0000 · TikTok/X #000000 · Xiaohongshu #FF2442 (26-08-30) */
/* 브랜드 컬러 복원 (26-08-27) + 26-08-31 사용자: 배경 살짝 브랜드 틴트(6%), 선은 옅게(30%) — color-mix 로 규정색 하나에서 파생 */
.badge.instagram { color: #E4405F; background: color-mix(in srgb, #E4405F 6%, white); border-color: color-mix(in srgb, #E4405F 30%, white); }
.badge.twitter, .badge.tiktok, .badge.douyin, .badge.threads { color: var(--fg-primary); background: var(--bg-muted); border-color: var(--border-subtle); }   /* 브랜드색이 검정인 채널 = 진한 글자 + 옅은 회색 면 (10-23: 회색 글자 흰 면은 "꺼진 배지"로 읽혀 색 있는 채널과 진하기가 달랐다. 검정 채움은 10-20 사용자 반려라 안 씀) */
.badge.youtube { color: #FF0000; background: color-mix(in srgb, #FF0000 6%, white); border-color: color-mix(in srgb, #FF0000 30%, white); }
.badge.facebook { color: #1877F2; background: color-mix(in srgb, #1877F2 6%, white); border-color: color-mix(in srgb, #1877F2 30%, white); }
.badge.xiaohongshu { color: #FF2442; background: color-mix(in srgb, #FF2442 6%, white); border-color: color-mix(in srgb, #FF2442 30%, white); }
/* 내 채널 아닌 배지 흐리게(.5) 폐기 (26-10-18) — 라이브는 받는 채널 전부 같은 진하기, 흐리면 신청 불가로 읽힘. 내 채널은 맨 앞 순서로만 구분 */
.badge-more { border-color: transparent; background: var(--bg-sunken); color: var(--fg-secondary); }
.badge-group.is-wrap { flex-wrap: wrap; overflow: visible; }   /* 상세처럼 채널을 전부 보여 주는 자리 — 줄바꿈 */

/* Platform badges - larger text for campaign details */
/* 상세 플랫폼 배지 = 홈 카드 배지와 동일 크기 (26-08-27 확대 규칙 폐기) */


/* Super Pass Badge */
/* Super Pass (카드) — v2 펄 스텁 (26-08-26 채택). 사진 위 좌하단 12/12.
   펄 그라데이션 = 항공권 홀로그램 포일, 잉크 #111. 테두리 1px 만 빛이 돈다. */
@property --pass-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
/* Super Pass 배지 전용 서체 — Unbounded 800 (Google Fonts, OFL). 26-08-27 사용자 선택(잠정) — 컨셉 superpass-font.html */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 800; font-display: swap; src: url('../../public/fonts/Unbounded-ExtraBold.ttf') format('truetype'); }
.super-pass {
  font-family: 'Unbounded', Pretendard, sans-serif;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;   /* 24 = 4 (10-18 크기별 라운드) */
  background: linear-gradient(120deg, #FFD9CF, #FFC7E0 45%, #E8D5FF);
  color: var(--fg-primary);
  font-size: 9px;   /* lint-allow: L16 펄 배지 초소형 표기 — 8단 밖 유일 예외 */
  line-height: 1;   /* 배지 글자 = 줄높이 100% (10-21) */
  font-weight: 800;
  letter-spacing: .04em;
  position: relative;
  z-index: 0;
  isolation: isolate;
}
.super-pass .icon { font-size: 14px; color: var(--fg-primary); margin: 0; }   /* 배지 안 아이콘 14 — 배지 글자 9~12 옆 20 은 아이콘이 큼 (10-25 사용자) */
.super-pass::before {
  /* 테두리를 따라 도는 광택. 1px·짧은 호는 파스텔 위에서 안 보여(26-08-27) 굵기 2px·호를 길고 밝게 */
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--pass-ang), transparent 0deg 240deg, rgba(255, 255, 255, .6) 290deg, var(--bg-default) 330deg, rgba(255, 255, 255, .6) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(rgb(0 0 0) 0 0) content-box, linear-gradient(rgb(0 0 0) 0 0);
          mask: linear-gradient(rgb(0 0 0) 0 0) content-box, linear-gradient(rgb(0 0 0) 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: passSheen 2.4s linear infinite;
  pointer-events: none;
}
@keyframes passSheen { to { --pass-ang: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .super-pass::before { animation: none; background: rgba(255, 255, 255, .8); }
}
.card .media { position: relative; }
.card .media .super-pass { position: absolute; left: 0; bottom: 0; border-radius: 0 4px 0 8px; }  /* 사진 좌하단 모서리에 밀착, 바깥 모서리는 사진 라운드(4)와 맞춤 (26-08-27) */

/* Hotel Pass — Super Pass 와 같은 규격(Unbounded 800 · 24h/32h · 사각 4 · 회전 광택), 펄만 교체.
   항공권 포일(분홍→라벤더) 대비 호텔 키카드 펄(민트→하늘→라벤더). 끝색 라벤더를 공유해 한 가족으로 읽힘. 아이콘 bed-fill. (26-08-29) */
.super-pass.hotel-pass { background: linear-gradient(120deg, #CFEFE6, #C9E2FF 45%, #E8D5FF); }

/* 패스권 카드 = 사진 테두리도 펄 (26-08-31). 2px 링을 마스크로 뚫은 pseudo — 사진(background-image)은 그대로, 배지와 같은 그라데이션이라 배지가 프레임에서 자라난 것처럼 이어진다 */
.card:has(.media > .super-pass) .media::after {
  content: ''; position: absolute; inset: 0; border-radius: 8px; padding: 2px; pointer-events: none;
  background: var(--pearl-sky);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:has(.media > .super-pass.hotel-pass) .media::after { background: var(--pearl-hotel); }

/* Super Pass Badge (large, 상세 페이지) — 카드 배지와 동일 룩(펄·Unbounded·사각 4)을 크기만 키움. 26-08-27 통일 */
.super-pass.super-pass-lg { height: 32px; padding: 0 12px 0 8px; gap: 6px; font-size: 12px; line-height: 1; border-radius: 4px; }   /* 펄 배지는 전용 글꼴(Unbounded 800)이라 tag 토큰 대신 크기만 — 라운드 8 → 6 → 4 (10-18 사용자 "라운드 더 빼"), 아이콘 쪽 8 시각 보정 */
.super-pass.super-pass-lg .icon { font-size: 14px; }   /* 배지 안 아이콘 14 (10-25) */

/* Heart Icon */
.heart-icon {
  /* v2 규격 공유 (26-08-26): 흰 원형 스크림 32 · 우상단 8 · 하트 18. 사진 위 흰 선 하트는 안 보여서 교체 */
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.heart-icon::before {           /* 시각은 32, 터치 영역은 44 */
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
}
.heart-icon:hover { transform: none; }
.heart-icon .icon { font-size: 20px; color: var(--fg-primary); }
.heart-icon.active .icon { color: var(--fg-brand); }
.heart-icon.inactive .icon { color: var(--fg-primary); }

/* Image container expand/collapse */
.image-container {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.image-container.collapsed { max-height: 200px; }
.image-container.expanded { max-height: none; }
.image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.image-container.expanded::after { opacity: 0; }

/* 캠페인 요약 카드 — 사진 80 + 이름·설명(+상태 배지). 리뷰 검수·캠페인 질문 쓰기가 같이 씀 (10-20 → 10-25 review.css 에서 승격)
   사진 = 선 대신 안쪽 1px 그림자. 그림자는 ::after 로 사진 위에 얹는다 — 부모 inset 그림자는 img 밑에 깔려 안 보임 */
.campaign-summary { display: flex; align-items: flex-start; gap: 12px; }
.campaign-summary-media { position: relative; flex: none; width: 80px; height: 80px; border-radius: var(--r-8); background: var(--bg-muted); }
.campaign-summary-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.campaign-summary-media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); pointer-events: none; }
.campaign-summary-body { flex: 1; min-width: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.campaign-summary-name { font: var(--t-body); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.campaign-summary-desc { font: var(--t-caption); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }


/* 리뷰 타일 — 게시물 사진 4:5(인스타 세로) + SNS 칩 + 캠페인 + 글 2줄 + 아래 줄. 내 리뷰·실시간 리뷰 공용 (10-25 my-reviews 에서 승격)
   rtile-grid 2열 격자 · rtile-row 가로 넘김(베스트) */
.rtile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; margin: 0; padding: 0; list-style: none; }
.rtile-row { display: flex; gap: 12px; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.rtile-row::-webkit-scrollbar { display: none; }
.rtile-row > .rtile { flex: none; width: 42%; scroll-snap-align: start; }
.rtile { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.rtile-shot { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-12); overflow: hidden; background: var(--bg-muted); }
.rtile-shot img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.rtile-shot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); pointer-events: none; }
.rtile-sns { position: absolute; left: 8px; bottom: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: var(--r-full); background: color-mix(in srgb, var(--bg-default) 92%, transparent); font: var(--t-tag-12); color: var(--fg-primary); }
.rtile-sns img { width: 20px; height: 20px; }   /* 아이콘 20 이상 (10-23) */
.rtile-camp { display: block; font: var(--t-caption); font-weight: 600; color: var(--fg-primary); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtile-text { margin: 0; font: var(--t-caption); color: var(--fg-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.rtile-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.rtile-date { font: var(--t-caption); color: var(--fg-secondary); font-variant-numeric: tabular-nums; }
.rtile-by { min-width: 0; font: var(--t-caption); color: var(--fg-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
