/* ========================================= */
/* Detail Page Styles                       */
/* ========================================= */

/* Super Pass Badge - larger for detail page */

/* Campaign Info */
.campaign-info { }

.campaign-details {
  display: flex;
  flex-direction: column;
  gap: 0;              /* 정보 표(detail-item)는 아래 :has 규칙의 gap 12 로 줄 사이를 둔다 */
  padding: 16px;
  background: var(--bg-muted);
  border-radius: var(--r-12);   /* 큰 면 = 8 (26-09-02 모서리 규칙) */
  border: 0;   /* 회색 면 = 테두리 없음 (10-18 규칙 통일) */
}

/* 상세 첫 덩어리 안의 정보 상자 → 선으로 (26-10-18) — 덩어리 사이가 띠가 되면서 회색 상자가 띠와 겹쳐 박스 쌓기로 보였다.
   공동구매 상세(1-3 pl-flat)와 같은 모양. 주의 안내(important-notice)는 상자 유지 */
.campaign-info > .campaign-details { padding: 0; background: none; border: 0; border-radius: 0; }   /* 10-26 위 선 뺌(사용자 "선이 위아래 왜") — 위는 탭 줄 선과 겹쳤고, 아래는 다음 구간 제목이 이미 나눈다 */
.campaign-info > .campaign-details > .box-title { margin-bottom: 4px; }   /* Recruitment Status 머리 → 첫 줄(행 위 8) = 12 */
.campaign-info > .campaign-details.rs { margin-top: var(--space-section); }   /* 10-26 정보 표 마지막 글자 → 다음 제목 24 (마지막 줄 아래 패딩 0) — 탭 줄 → 첫 글자 24 와 같게 */
/* 덩어리 끝 카드의 mb24 가 덩어리 아래 패딩 16 과 겹쳐 띠 위만 40 이 되던 것 → 패딩 한 곳 */
.section-padding > .card:last-child { margin-bottom: 0; }

/* 10-25 이름·값 규칙: 정보 표 = 이름 칸 고정(가장 긴 이름 폭, 최대 40%) + 값 왼쪽 맞춤. 좌우 끝 배치는 금액 영수증 표(.pl-spec.is-num)만.
   줄마다 같은 이름 칸 = 상자 전체 grid + 줄은 subgrid */
.campaign-details:has(> .detail-item) { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: var(--space-content) var(--space-card); }   /* 줄 사이 12 = 상자 gap 한 곳 (10-26 사용자: 패딩 8+8 → gap, 16 → "더 줄여" 12) */
.detail-item {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: baseline;
  padding: 0;   /* 줄 사이는 상자 gap 12 — 선 없음 (10-25 사용자 "다른 곳은 줄이 없던데") */
}
.detail-item > :first-child { font: var(--t-body); color: var(--fg-secondary); overflow-wrap: anywhere; }
.detail-item > :nth-child(2) { font: var(--t-body); color: var(--fg-primary); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-item > :nth-child(n+3) { grid-column: 2; }   /* 보조 설명 = 값 칸 아래 */
/* 상세 Platforms (26-10-18 E+D 합침): 두 묶음. 내 채널 = 카드와 같은 브랜드색 칩 + 체크, 그 외 = 회색 칩.
   내 채널이 하나도 없으면 "Your channels" 묶음을 빼고 그 외 한 묶음만. 칩은 카드 배지(.badge)를 상세 크기 14/20·32 로 키운 것 */
.pl-channels { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pl-sub { font-size: 12px; line-height: 16px; color: var(--fg-secondary); }
.pl-row + .pl-sub { margin-top: 4px; }
.pl-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-row .badge { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border-radius: var(--r-8); font: var(--t-tag-14); font-weight: 500; }   /* 필터 칩과 같은 32 높이 · 값 글자와 같은 14 */
.pl-row .badge.is-mine { font-weight: 700; padding-left: 8px; }   /* 체크 아이콘 쪽 8 · 글자 쪽 12 — 아이콘 안 여백 때문에 12:12 면 왼쪽이 넓어 보임 (10-18) */
.pl-row .badge .icon { width: 20px; height: 20px; flex: none; color: currentColor; fill: currentColor; }   /* 체크 = 칩 글자색 (Instagram 분홍 위 검정 체크 방지) */
.pl-row .badge:not(.is-mine) { background: var(--bg-emphasis); border-color: transparent; color: var(--fg-secondary); }   /* 회색 면 위 회색 칩 — bg-muted 면 묻혀서 한 단 진한 emphasis */

 /* 모집 현황 숫자 — 평소 검정, 정원 찼을 때만 빨강 (26-08-28 결정) */
.rc-count.is-full { color: var(--fg-brand); }
.recruitment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

/* Guidelines Section */
.guidelines-section { }

/* Related Section */
.related-section { }

/* Hashtag Groups */

/* Important Notice — 중립 회색 (26-08-28: 노랑 #FFF3CD/갈색 #8B4513 은 시스템 밖 색) */
.important-notice {
  padding: 16px;
  background: var(--bg-muted);
  border: 0;   /* 회색 면 = 테두리 없음 (10-18 규칙 통일) */
  border-radius: var(--r-12);   /* 큰 면 = 8 (26-09-02 모서리 규칙) */
}
.notice-text {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--fg-primary);
  display: flex; align-items: flex-start; gap: 6px;   /* 아이콘 열 + 글 열 — 줄바꿈된 글이 아이콘·점 아래로 파고들지 않게 (10-18) */
}
.notice-text .icon { color: var(--fg-primary); flex: none; margin-top: 2px; font-size: 16px; }   /* 글 옆 아이콘 16 · 14/20 첫 줄 가운데 (10-25 사용자) */
.notice-body { min-width: 0; }
.notice-title { font-weight: 600; margin-bottom: 4px; }
.notice-list { margin: 0; padding-left: 14px; list-style: disc; }
.notice-list li + li { margin-top: 4px; }

/* Map 구간 (10-18 재구성) — 지도 = 링크, 주소 줄 = 복사 */
.map-frame { display: block; height: 160px; border-radius: var(--r-12); overflow: hidden; position: relative; background: var(--bg-sunken); }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.map-frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); pointer-events: none; }   /* 사진·지도 = 안쪽 그림자 6% */
.map-place { margin-top: 16px; font-size: 16px; line-height: 24px; font-weight: 700; color: var(--fg-primary); }
.addr-list { display: flex; flex-direction: column; margin-top: 4px; }
.addr-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0; background: none; border: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.addr-row + .addr-row { border-top: 1px solid var(--border-subtle); }
.addr-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.addr-label { font-size: 12px; line-height: 16px; color: var(--fg-secondary); }
.addr-value { font-size: 14px; line-height: 20px; color: var(--fg-primary); }
.addr-row > .icon { width: 20px; height: 20px; flex: none; color: var(--fg-secondary); }
.addr-row:active .addr-value { color: var(--fg-secondary); }

/* Bottom Action Bar */
.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-default);
  border-top: 1px solid var(--border-subtle);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));   /* 폰 홈 표시줄 위로 (10-21 앱처럼 보기) */
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: none;   /* 10-29 사용자 "그림자가 뒤에 있는 게 좀, 무거운데" — 위 1px 선만으로 본문과 나뉨 (선+그림자 이중이었음). 47개 화면 공통 */
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: none;
}
.bottom-action-bar.hidden { display: none; }

.heart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.heart-btn .icon { color: var(--fg-primary); }
.heart-btn.active .icon { color: var(--fg-brand); }

.apply-btn { flex: 1; }   /* 모양 = 공용 .btn.btn-lg.btn-primary, 여기선 폭만 (10-22 버튼 정리) */

/* 슈퍼패스 화면에서 연 상세 — 하단 바 변형 (26-09-12, detail.html from=sp03·sp08·sp07) */
/* 담긴 상태: 빨강은 "지금 할 일"일 때만. 담은 뒤 버튼은 되돌리기라 보조 버튼(.btn-secondary) 값으로 내린다 */
.apply-btn.is-added { background: var(--bg-default); color: var(--fg-primary); border: 1px solid var(--border-subtle); }
/* 08 에서 연 패스권 캠페인(이미 패스로 신청) — buttons.css 비활성 단일 스펙과 같은 값 */
.bottom-action-bar > [hidden] { display: none; }
/* 07 에서 연 상세: 신청이 끝나 CTA 자리를 상태 칩 + 일정이 대신한다. 빨강 없음 */
.bar-booking { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bar-booking-when { max-width: 100%; font: var(--t-label); color: var(--fg-primary); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-booking + .btn { flex: none; }

/* 섹션 재구성 A안 승격 (26-08-28, _concept/2026-08-28/detail-sections-a.html) */
.section-padding{padding:24px 16px}
.campaign-info.section-padding{padding-top:16px}   /* 사진 바로 아래 첫 섹션은 16 — 24는 헐렁함 (26-08-30 사용자) */
.campaign-info h1{margin-top:0}                     /* UA h1 상단 마진 13 제거 — 실측 29 → 16 */                 /* 위·아래 24 대칭 (현재 위 16 / 아래 16+24=40) */
.section-padding>.card.mb24{margin-bottom:0}
.section-padding h3{margin-top:0}                  /* h3 기본 상단 마진 16 제거 (현재 위 32/아래 40) */
.dl-group{margin-bottom:16px}.dl-group:last-child{margin-bottom:0}
.dl-list{margin:0;padding-left:16px;list-style:disc}ol.dl-list{list-style:decimal}.dl-list li{margin-bottom:4px}.dl-list li:last-child{margin-bottom:0}
/* 브랜드가 쓴 글 (10-21): 글 칸 하나 그대로 — 줄바꿈 유지, 본문 14/20 */
.brand-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font: var(--t-body); color: var(--fg-primary); }
.brand-text + .image-container { margin-top: 20px; }   /* 글 → 상세 이미지 (예전 목록 마지막 묶음 아래 20 그대로) */
/* 접기만 있는 구간 (Terms & conditions): 줄 높이 44 의 위아래 14 가 구간 여백 24 에 더해져 띠~글자 38 로 떠 보임 → 위아래 10 (10+14 = 다른 구간 24). 펼치면 아래 24 (10-18) */
.additional-notice-section:has(.acc) { padding-top: 10px; padding-bottom: 10px; }   /* 접기 있는 상세만 — 배송형은 펼친 글이라 기본 24 */
.additional-notice-section:has(.acc[open]) { padding-bottom: 24px; }
.acc{margin:0}.acc-head{display:flex;align-items:center;gap:8px;list-style:none;cursor:pointer;min-height:44px}.acc-head::-webkit-details-marker{display:none}
.acc-caret{margin-left:auto;color:var(--fg-primary);transition:transform .2s}.acc[open] .acc-caret{transform:rotate(180deg)}
/* 브랜드가 쓴 글 그대로 (리뷰 가이드라인 · 약관 — 입력값이 텍스트 한 덩어리, 10-18 사용자). 소제목·목록 구조를 만들지 않고 줄바꿈만 살림 */
.plain-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.acc-body { margin-top: 12px; }
/* 관련 캠페인 — 좌우 슬라이드 (26-08-28): 카드 160(홈 카드보다 살짝 작게, 2장+엿보기), 간격 12, 화면 끝까지 bleed + 좌우 16, 마지막 카드 엿보기 */
.rel-row{display:flex;gap:12px;margin:12px -16px 0;padding:0 16px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-left:16px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.rel-row::-webkit-scrollbar{display:none}
.rel-row .card{flex:0 0 160px;min-width:0;scroll-snap-align:start}   /* min-width 0: 한 줄 제목(nowrap)이 카드를 넓히지 않게 (10-25) */
.rel-row .card > .card-body{margin-top:12px}
.rel-row::after{content:"";flex:0 0 4px}
.btn-sm.mt12{display:inline-flex}


/* 상자 제목 — 아이콘 + 굵은 14, 아래 줄(보통 14)과 위계 구분 (10-19) */
.box-title { display: flex; align-items: center; gap: 6px; }

/* 채널 탭 — 일반 상세 모집 현황 · 공동구매 판매 수수료 공통 (10-19). 채널 글자 칩을 누르면 아래가 그 채널의 팔로워 구간으로 바뀐다.
   예전 Platforms 칩 묶음(내 채널/그 외)과 공동구매 로고 탭이 같은 정보를 다른 모양으로 보여주던 것을 하나로. 내 채널 = 체크, 선택 = 차콜 면.
   로고 대신 글자: Douyin·Xiaohongshu 는 원본 로고가 없다 */
.rc-tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 4px; padding: 4px 16px; scrollbar-width: none; }
.rc-tabs::-webkit-scrollbar { display: none; }
.rc-tab { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-8); background: var(--bg-sunken); color: var(--fg-primary); font: var(--t-tag-14); font-weight: 500; cursor: pointer; position: relative; }
.rc-tab::after { content: ''; position: absolute; inset: -6px 0; }   /* 누르는 영역 44 */
.rc-tab.is-mine { padding-left: 8px; }   /* 체크 쪽 8 · 글자 쪽 12 (시각 보정) */
.rc-tab .icon { width: 20px; height: 20px; flex: none; color: currentColor; fill: currentColor; }
.rc-tab.is-on { --ch: var(--fg-primary); background: var(--ch); color: var(--fg-inverse); box-shadow: none; font-weight: 600; }   /* 고른 채널 = 그 채널 로고색으로 칠함, 테두리 없음 (10-20 사용자 "로고색으로 칠해") */
.rc-tab.is-on[data-ch="instagram"] { --ch: var(--sns-instagram); }
.rc-tab.is-on[data-ch="youtube"] { --ch: var(--sns-youtube); }
.rc-tab.is-on[data-ch="facebook"] { --ch: var(--sns-facebook); }
.rc-tab.is-on[data-ch="xiaohongshu"] { --ch: var(--sns-xiaohongshu); }
.rc-tab.is-on:is([data-ch="x"], [data-ch="threads"], [data-ch="tiktok"], [data-ch="douyin"]) { --ch: var(--sns-black); }   /* 로고가 검정인 채널 */
.rc-tabs.is-static { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }   /* 가이드 "Posting channels" — 위 수수료 탭과 같은 칩, 누르는 기능 없음 (10-20) */
.rc-tabs.is-static .rc-tab { cursor: default; }
.rc-tabs.is-static .rc-tab::after { content: none; }
.rc-legend { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 12px; line-height: 16px; color: var(--fg-secondary); }
.rc-legend .icon { width: 20px; height: 20px; }
.rc-panel .rc-count { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--fg-primary); font-variant-numeric: tabular-nums; }
.rc-none { font-size: 14px; line-height: 20px; color: var(--fg-secondary); }   /* 이 구간은 모집 안 함 */
.rc-panel .recruitment-item + .recruitment-item { border-top: 1px solid var(--border-subtle); }

/* 키워드 머리 = 제목 + 글자 버튼 "Copy all" (10-23 공동구매 상세 Hashtags 와 같게 — 아래 큰 테두리 버튼은 칩과 겹쳐 보였다) */

/* 모집 현황 (10-25 사용자 "공동구매같이") — 공동구매 상세 .pl-comm 수수료 카드와 같은 값. 부품 = components/RecruitStatus.astro */
.rs-card { padding: var(--space-card); border: 1px solid var(--border-subtle); border-radius: var(--r-12); }
.rs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; font: var(--t-caption); font-weight: 600; color: var(--fg-secondary); }
.rs-key { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.rs-key i { width: 6px; height: 6px; border-radius: 50%; background: var(--mark-success); }
.rs .rs-logos { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0 0 12px; padding: 0; overflow: visible; }
.rs .rc-tab.rs-logo { justify-content: center; height: 44px; padding: 0; border-radius: var(--r-12); background: var(--bg-default); box-shadow: inset 0 0 0 1px var(--border-subtle); color: var(--fg-primary); }
.rs .rc-tab.rs-logo::after { content: none; }
.rs .rc-tab.rs-logo svg { width: 20px; height: 20px; }
.rs .rc-tab.rs-logo.is-on { background: var(--bg-default); color: var(--ch); box-shadow: inset 0 0 0 2px var(--ch); }
.rs .rc-tab.rs-logo.is-mine::before { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--mark-success); }
.rs-head { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); font: var(--t-caption); color: var(--fg-secondary); }
.rs-head b { font-weight: 600; color: var(--fg-primary); }
.rs .recruitment-item { gap: 12px; align-items: baseline; }
.rs .recruitment-item:last-child { border-bottom: 0; padding-bottom: 0; }
.rs .recruitment-item.is-mine > :first-child { font-weight: 600; }
.rs-tier { margin-left: 4px; vertical-align: 1px; }
@media (max-width: 369px) { .rs .rs-logos { gap: 4px; } }

/* 캠페인 상세 탭(개요·상세·위치·가이드, 배송은 3개) = 전체 폭 나눔 (10-27 사용자 "전체 넓이로 써도 되겠는데") — 공동구매 상세(groupbuy-detail.css)와 같은 규칙 */
#detailTabs { gap: 0; padding: 0; }
#detailTabs .fixed-tab { flex: 1 1 auto; justify-content: center; }
#detailTabs .fixed-tab::after { inset: 0; }

/* 상세 머리 (10-29 시안 → 라이브) — Air Pass 마크 → 브랜드 → 제목 → 요약 한 줄 → 소개 2줄 + More. 브랜드 글자 = 공동구매 상세 .pl-brand 와 같은 값 */
.campaign-info .cd-top { display: flex; margin: -16px -16px var(--space-card); }   /* 10-29 사용자 "전체 영역으로": 사진 바로 아래 전폭 띠 — 카드에서 사진 모서리에 붙는 배지와 같은 생각 */
.campaign-info .cd-top .super-pass { flex: 1 1 auto; justify-content: center; height: 40px; padding: 0 16px; border-radius: 0; }   /* 아이콘+글자 가운데 (10-29 사용자) */
.campaign-info .cd-top .super-pass::before { content: none; }
.campaign-info .cd-top .super-pass.super-pass-lg { gap: 6px; font-size: 14px; }   /* lint-allow: L16 펄 배지 전용 글꼴 — 상세 전폭 띠만 글자 14·아이콘 16 (10-29 사용자 "여기만 조금 더 키울까") */
.campaign-info .cd-top .super-pass.super-pass-lg .icon { font-size: 16px; }   /* 전폭에선 테두리 광택이 화면 끝에서 잘려 안 보임 */
.campaign-info .pl-brand { font: var(--t-caption); font-weight: 400; color: var(--fg-secondary); }
.campaign-info .cd-title { margin: 2px 0 0; }
.cd-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: var(--space-control); font: var(--t-caption); color: var(--fg-secondary); }
.cd-facts b { font-weight: 600; color: var(--fg-primary); }
.cd-dot { color: var(--fg-tertiary); }
.cd-desc { margin: var(--space-content) 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cd-desc.is-open { display: block; }
.cd-desc:has(+ .cd-more[hidden]) { margin-bottom: var(--space-card); }
.cd-more { display: inline-flex; align-items: center; min-height: 32px; margin: 0; padding: 0; border: 0; background: none; font: var(--t-caption); font-weight: 600; color: var(--fg-primary); text-decoration: underline; cursor: pointer; }

/* 모집 현황 — 제한 없고 0명인 구간 3개 이상 = "Other tiers" 한 줄로 접힘 (10-29) */
.rs-open { border-top: 1px solid var(--border-subtle); }
.rs-open > summary { list-style: none; cursor: pointer; }
.rs-open > summary::-webkit-details-marker { display: none; }
.rs-open > .recruitment-item + .recruitment-item { border-top: 1px solid var(--border-subtle); }
.rs-open-sub { margin-left: 6px; font: var(--t-caption); color: var(--fg-tertiary); }
.rs-open > summary .rc-count { color: var(--fg-secondary); text-decoration: underline; }
.rs-open .rs-hide, .rs-open[open] .rs-show { display: none; }
.rs-open[open] .rs-hide { display: inline; }
.rs .rs-open:last-child > summary:last-child { padding-bottom: 0; }
