/* =========================================================
   나우페이 공식인증 채널 페이지
   ========================================================= */

:root {
  --maincolor: #01DE5A;
  --subcolor: #279653;
  --bgcolor: #f3f3f3;
  --text-color1: #262626;
  --text-color2: #757575;
  --bg-gradient: linear-gradient(135deg, var(--maincolor) 0%, var(--subcolor) 100%);

  /* 확장 토큰 */
  --white: #ffffff;
  --line: #ececec;
  --line-soft: #f1f1f1;
  --maincolor-08: rgba(1, 222, 90, 0.08);
  --maincolor-14: rgba(1, 222, 90, 0.14);
  --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.06);
  --radius-card: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --card-max-width: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--text-color1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font-family: inherit;
}

/* =========================================================
   배경 (PC 뷰) — 카드가 항상 중앙에 고정되고
   배경은 은은한 브랜드 컬러 글로우로 채운다.
   ========================================================= */

.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bgcolor);
}

/* =========================================================
   카드 컨테이너 — 모바일 기준, PC에서도 동일 비율로 중앙 고정
   ========================================================= */

.phone-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--card-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bgcolor);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

@media (min-width: 540px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
  }

  .phone-card {
    min-height: 88vh;
    margin-top: 0;
  }
}

/* =========================================================
   각 섹션 공통 (흰색 둥근 사각형)
   ========================================================= */

.profile-section,
.coupon-section,
.cta-section,
.review-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 15px;

}

/* =========================================================
   프로필 섹션
   ========================================================= */

.profile-section {
  /* Common styles applied */
}

/* [새로운 레이아웃 모드] HTML 변경 없이 클래스명만 추가하면 버튼이 설명칸 아래로 내려갑니다. */
.profile-section.layout-btn-bottom {
  display: flex;
  flex-direction: column;
}

.profile-section.layout-btn-bottom .profile-row {
  display: contents;
  /* 래퍼를 무시하고 안쪽 요소들을 직접 flex 아이템으로 만듦 */
}

.profile-section.layout-btn-bottom .profile-left {
  order: 1;
}

.profile-section.layout-btn-bottom .brand-desc {
  order: 2;
  margin-top: 14px;
  margin-bottom: 16px;
}

.profile-section.layout-btn-bottom .cs-btn {
  order: 3;
  width: 100%;
  /* 하단에서 꽉 찬 버튼 느낌을 주기 위해 */
  padding: 14px 12px;
  font-size: 14px;
}

/* 하단 버튼일 때는 모바일/PC 관계없이 텍스트와 아이콘 모두 보이도록 덮어쓰기 */
.profile-section.layout-btn-bottom .cs-btn-text,
.profile-section.layout-btn-bottom .cs-btn-icon {
  display: inline-block;
  margin: 0 4px;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-circle {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--maincolor);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-circle img {
  width: 80%;
  object-fit: cover;
  display: block;
}

.logo-circle.img-fallback img {
  display: none;
}

.logo-circle.img-fallback::after {
  content: attr(data-fallback);
  color: var(--white);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.brand-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-color1);
  letter-spacing: -0.2px;
}

.verified-badge {
  display: inline-flex;
}

.customer-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  color: var(--subcolor);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.customer-pill svg {
  flex: none;
  color: var(--subcolor);
}

.customer-pill strong {
  font-weight: 800;
}

.cs-btn {
  flex: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--text-color1);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cs-btn-text {
  margin-right: 5px;
}

.cs-btn-icon {
  display: block;
}

@media (min-width: 540px) {
  .cs-btn-text {
    display: inline;
  }

  .cs-btn-icon {
    display: none;
  }
}

.cs-btn:hover {
  background: #000;
}

.cs-btn:active {
  transform: scale(0.96);
}

.brand-desc {
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--text-color2);
  line-height: 1.5;
}

/* =========================================================
   채널 한눈에 보기 + 통계 카드
   ========================================================= */

.coupon-section {
  /* Common padding is applied */
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.review-header .section-title {
  margin-bottom: 0;
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-color2);
}

.review-summary .star-icon {
  font-size: 14px;
}

.review-summary .rating-num {
  font-weight: 800;
  color: var(--text-color1);
  font-size: 14px;
}

.review-summary .review-count {
  color: #999;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-color1);
}

.section-title .heart {
  color: var(--maincolor);
  font-size: 15px;
}

.section-title .sparkle {
  font-size: 15px;
}

.stats-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 4px 18px;

}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 13.5px;
  color: var(--text-color2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-label i {
  color: var(--subcolor);
  /* 아이콘을 브랜드 메인 색상으로 강조 */
  font-size: 14px;
}

.stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--subcolor);
}

/* =========================================================
   CTA 버튼 영역
   ========================================================= */

.cta-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plus-friend-btn:active {
  transform: scale(0.98);
}

.nowpay-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 16px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-gradient);
  color: var(--white);
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  text-decoration: none;
  cursor: pointer;
}

/* =========================================================
   후기 섹션
   ========================================================= */

.review-section {
  /* Common padding is applied */
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 16px 15px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--avatar-color, var(--maincolor));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reviewer-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-color1);
}

.stars {
  font-size: 11px;
  letter-spacing: 1px;
  color: #f5a623;
}

.review-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-color1);
}

/* =========================================================
   푸터
   ========================================================= */

.footer {
  margin-top: auto;
  padding: 22px 20px 30px;
  text-align: center;
  border-top: 1px solid var(--line-soft);
}

.footer p {
  margin: 0 0 4px;
  font-size: 11.5px;
  color: #a8a8a8;
  line-height: 1.6;
}

.footer p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   로드 애니메이션
   ========================================================= */

.profile-section,
.brand-banner,
.coupon-section,
.cta-section,
.review-section {
  animation: fadeUp 0.55s ease both;
}

.brand-banner {
  animation-delay: 0.05s;
}

.coupon-section {
  animation-delay: 0.1s;
}

.cta-section {
  animation-delay: 0.15s;
}

.review-section {
  animation-delay: 0.2s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {

  .profile-section,
  .brand-banner,
  .coupon-section,
  .cta-section,
  .review-section {
    animation: none;
  }
}

/* =========================================================
   포커스 접근성
   ========================================================= */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--maincolor);
  outline-offset: 2px;
}