/* ============================================================
   Papatto Widgets — Structure Layer
   구조(레이아웃/간격/컴포넌트 트리)는 톤앤매너와 무관하게 고정.
   Role 기반 네이밍 컨벤션(papatto_naming_convention.md) 준수:
   Role(컴포넌트명) / Token Ref(크기) / Semantic Tag(HTML태그)는 독립 축.
   ============================================================ */
/* ReviewSection 리뷰 본문 전용 서체 — 지금은 톤앤매너 무관 고정값(추후 테마별
   --font-family 토큰으로 전환 예정, 그 전까지는 여기서 직접 로드). */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:ital,wght@0,400;0,500&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 시맨틱 태그는 페이지 조립 시점에 코드가 결정 (h1이 올지 h2가 올지 미리 알 수 없음).
   태그 자체의 브라우저 기본 font-size/weight/line-height가 토큰 값을 덮어쓰지 않도록,
   부모(Role 클래스가 걸린 wrapper)의 값을 그대로 상속받게 강제한다. */
h1, h2, h3, h4, h5, h6,
p, small, button, label {
  font: inherit;
  color: inherit;
}

.page {
  max-width: 480px;
  margin: 0 auto;
}

/* ── 공용: Headline (Role: Headline · 4-1 규칙: 페이지 내 위치로 Token Ref 결정) ── */
.headline-wrapper {
  padding: 0 var(--gutter);
  font-weight: var(--font-weight-headline);
  line-height: var(--line-height);
}
/* 정렬 컨트롤(2026-08, 필드별 → 섹션 단일 컨트롤로 승격) — 인스턴스(섹션) 하나당 --align
   override 하나가 headline/subhead/button-list에 전부 상속되어 같이 움직인다("헤드라인만
   왼쪽, 나머지는 가운데"처럼 어긋나는 조합은 애초에 만들 수 없게" 함 — 사용성 테스트 결론).
   --h1/--h2는 폴백 start(원래 기본값)로, 뒤이어 나오는 --center 변형은 폴백 center로 —
   --center 클래스가 붙은 타입(hero/cardGrid/cta/faq/quote)은 기본 가운데, 안 붙은 타입
   (imageText/carousel)은 기존처럼 start 유지. */
.headline-wrapper--h1 { font-size: var(--font-h1); text-align: var(--align, start); }  /* 페이지 첫 Headline */
.headline-wrapper--h2 { font-size: var(--font-h2); text-align: var(--align, start); }  /* 그 외 섹션 */
.headline-wrapper--center { text-align: var(--align, center); }

/* ── 공용: Subhead (Role: Subhead · Token: Lead, Headline과 무관한 독립 토큰) ── */
.subhead-wrapper {
  padding: 0 var(--gutter);
  font-size: var(--font-lead);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height);
  color: var(--color-text-primary);
  text-align: var(--align, start);
}
.subhead-wrapper--center { text-align: var(--align, center); }

/* ── 공용: Button / ButtonSecondary (Role: Button) ── */
.button-list {
  display: flex;
  gap: var(--space-10);
  justify-content: var(--align, center); /* 정렬 컨트롤(2026-08) — left/right는 flex justify-content로도 유효한 키워드 */
  padding: 0 var(--gutter);
}
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  height: 40px;
  padding: 0 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: var(--font-body);
  font-weight: var(--font-weight-button);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none; /* external link 액션은 <a> 태그로 렌더돼 브라우저 기본 밑줄이 붙는다 */
}
.btn--primary {
  background: var(--color-accent);
  color: var(--color-text-inverse);
}
.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-text-primary);
}
.btn--on-dark.btn--primary {
  background: var(--color-text-inverse);
  color: var(--color-accent);
}
.btn--on-dark.btn--secondary {
  border-color: var(--color-text-inverse);
  color: var(--color-text-inverse);
}

/* ============================================================
   HeroSection
   ============================================================ */
.hero-section {
  position: relative;
  /* 텍스트가 위쪽에, 여백은 아래쪽에(2026-09, 이전엔 반대였음). Figma 스펙은 80px 고정이었지만,
     실제 사이트는 topbar가 sticky + 음수 margin으로 히어로 위에 겹쳐 뜨는 구조라(site-topbar
     margin-bottom: -var(--topbar-height)) 80px 고정이면 topbar 높이(배너·사이트명 길이에 따라
     달라짐)에 따라 헤드라인이 topbar에 가려질 수 있다. topbar 실측 높이 + 여유 40px로 계산
     (기존 20px + 요청으로 20px 추가).
     텍스트 블록 위/중간/아래 위치 조정(2026-09, 에디터의 hero vpos 컨트롤) — --hero-pt/
     --hero-pb/--hero-height는 styleOverrides에 값이 있을 때만 채워지는 커스텀 프로퍼티라,
     아직 그 컨트롤을 안 쓴 기존 히어로는 fallback(기존 동적 계산)이 그대로 적용되어 전혀
     영향이 없다. 실제로 위치를 고르고 나면 세 값이 항상 같이 세팅되어 박스 높이가 상태와
     무관하게 고정된다(template-gallery.html에서 먼저 검증한 수치/방식 그대로 이식). */
  padding-top: var(--hero-pt, calc(var(--topbar-height, 120px) + var(--space-40)));
  padding-bottom: var(--hero-pb, var(--space-320));
  height: var(--hero-height, auto);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.hero-section__bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
/* 단색 반투명 오버레이 대신 텍스트가 있는 쪽만 진하고 반대쪽은 투명한 그라디언트(2026-09) —
   텍스트가 있는 쪽은 가독성을 확보하고, 반대쪽은 사진이 원본 그대로 드러나게 한다.
   --color-overlay의 톤별 알파값(modern 0.45 / kitsch 0.35)은 그대로 시작점 색으로 재사용.
   방향은 --hero-gradient-direction으로 텍스트 위치(vpos)에 맞춰 뒤집는다(에디터가 세팅) —
   top이면 위가 진하고(to bottom, 기존 기본값), center/bottom이면 아래가 진하다(to top). */
.hero-section__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--hero-gradient-direction, to bottom), var(--color-overlay) 0%, transparent 100%);
}
.hero-section > *:not(.hero-section__bg) { position: relative; z-index: 1; }
/* bottom 위치일 때만 --hero-content-mt:auto가 들어와 flex 컨테이너 안에서 이 블록을
   아래로 밀어낸다(margin-top:auto 트릭) — height가 고정일 때만 밀어낼 여유가 생긴다. */
.hero-section__content { margin-top: var(--hero-content-mt, 0); }

.hero-section .headline-wrapper,
.hero-section .subhead-wrapper {
  color: var(--color-text-inverse);
}
.hero-section .headline-wrapper {
  margin-bottom: var(--space-10);
  font-weight: var(--font-weight-headline-hero);
}
.hero-section .subhead-wrapper { margin-bottom: var(--space-20); }
.hero-section .button-list { margin-top: var(--space-20); }
/* Hero 버튼은 CTA 버튼과 다른 액센트 슬롯을 쓸 수 있어야 함 (Kitsch 실측으로 확인됨) */
.hero-section .btn--primary {
  background: var(--color-hero-button-bg, var(--color-text-inverse));
  color: var(--color-hero-button-text, var(--color-accent));
  backdrop-filter: blur(var(--btn-backdrop-blur, 0px));
  -webkit-backdrop-filter: blur(var(--btn-backdrop-blur, 0px));
}

/* ============================================================
   ImageTextSection
   구조: 이미지 → headline → subhead. headline/subhead는 공용 Role 클래스 재사용.
   .image-text-section__image-frame은 cta-section__image-frame과 값은 같지만
   의미가 다른 섹션이라 클래스를 공유하지 않는다.
   ============================================================ */
.image-text-section {
  padding: var(--space-40) 0;
}
.image-text-section__image-frame {
  width: 100%;
  aspect-ratio: 400 / 320;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
  margin-bottom: var(--space-20);
}
.image-text-section .headline-wrapper {
  margin-bottom: var(--space-20);
  font-weight: var(--font-weight-headline-section);
}

/* ============================================================
   ImageSlideSection — 순서: 텍스트(headline/body) → 이미지 → 페이지네이션
   (2026-09, 이미지가 먼저였던 구성에서 순서만 변경 — "이미지 앞 20px" 여백 역할이
   본문 쪽(margin-bottom)으로 옮겨갔을 뿐 값 자체는 그대로다). 이미지는 carousel처럼
   가로로 밀려나는 슬라이드 애니메이션, 텍스트(headline/body)는 페이드 인/아웃으로
   전환한다 — 그래서 이미지 트랙(.image-slide-image-track, transform:translateX)과
   텍스트 트랙(.image-slide-text-track, grid-stack + opacity)을 완전히 분리했다.
   번호 페이지네이션은 슬라이드 개수와 무관하게 고정 40px.
   ============================================================ */
.image-slide-section {
  padding: var(--space-40) 0;
}
.image-slide-viewport {
  overflow: hidden;
  touch-action: pan-y; /* 가로 드래그는 JS가 처리, 세로 스크롤은 브라우저에 맡김 */
  cursor: grab;
}
.image-slide-viewport:active {
  cursor: grabbing;
}
.image-slide-image-track {
  display: flex;
  transition: transform 0.4s ease;
}
.image-slide-section__image-frame {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 400 / 280;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
}
.image-slide-text-track {
  display: grid; /* 헤드라인/본문을 같은 칸에 겹쳐 쌓아서 페이드 전환 중에도 높이가 안정되게 함 */
}
.image-slide-text-page {
  grid-column: 1;
  grid-row: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.image-slide-text-page.is-active {
  opacity: 1;
  pointer-events: auto;
}
.image-slide-section .headline-wrapper {
  margin-bottom: var(--space-20);
  font-weight: var(--font-weight-headline-section);
}
.image-slide-section__body {
  padding: 0 var(--gutter);
  margin-bottom: var(--space-20); /* 본문 → 이미지 간격(예전엔 이미지 자체의 margin-bottom이었음) */
  font-size: var(--font-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height);
  color: var(--color-text-primary);
  text-align: var(--align, start);
}

.image-slide-pagination {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: 0 var(--gutter);
  margin-top: var(--space-40);
}
.image-slide-pagination__numbers {
  flex: 1;
  display: flex;
  gap: 4px; /* Figma 실측: PaginationItem 내부 gap은 --space-10(10px)이 아니라 4px */
  justify-content: flex-start; /* 왼쪽 정렬 — Controller(화살표 쌍)는 반대편 끝에 따로 묶인다(2026-09, 구조 변경) */
}
.image-slide-pagination__controller {
  flex-shrink: 0;
  display: flex;
  gap: var(--space-10);
}
.image-slide-pagination__number {
  flex: 0 0 40px;
  width: 40px;
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  height: 40px;
  font-family: var(--font-family);
  font-size: var(--font-body);
  color: var(--color-text-muted);
}
.image-slide-pagination__number.is-active {
  color: var(--color-text-primary);
}

/* ============================================================
   CarouselSection
   ============================================================ */
.carousel-section {
  padding: var(--space-40) 0;
}
.carousel-section .headline-wrapper { margin-bottom: var(--space-20); }

.carousel-slide-wrapper {
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 0 var(--gutter);
  cursor: grab;
}
.carousel-slide-wrapper:active { cursor: grabbing; }
.carousel-slide-wrapper::-webkit-scrollbar { display: none; }

.carousel-slide {
  display: flex;
  gap: var(--space-10);
}
/* 스크롤 컨테이너의 padding-right는 스펙상 유효해도 실제 브라우저(Chromium 계열)가
   가로 스크롤 끝에서 이 여백을 무시해버려(끝까지 스크롤하면 마지막 카드가 뷰포트에
   딱 붙음) — .carousel-slide-wrapper의 padding만으로는 마지막 카드 옆 여백이 생기지
   않는다. 실제 flex item(가짜 ::after)을 하나 더 넣어야 스크롤 영역에 반영된다.
   gap이 이 spacer 앞에도 적용되므로, 원하는 --gutter만큼만 보이도록 gap만큼 빼서 준다. */
.carousel-slide::after {
  content: '';
  flex: 0 0 calc(var(--gutter) - var(--space-10));
}

/* Widget: Card */
.card {
  flex: 0 0 240px;
  width: 240px;
  overflow: hidden; /* 카드 자체가 라운드+테두리를 가질 수 있어서 상시 클립 (radius:0/border:0이면 시각 영향 없음) */
  border-radius: var(--radius-card);
  border: var(--border-card-width, 0) solid var(--color-border-card, transparent);
}
.card__image-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-image);
}
.card__texts { padding: var(--space-10) var(--card-inset, 0) 0; }
.card-title-wrapper {
  font-size: var(--font-title-card);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height);
  color: var(--color-text-primary);
}
.card-detail-wrapper {
  margin-top: var(--space-10);
  font-size: var(--font-detail);
  line-height: var(--line-height);
  color: var(--color-accent-soft);
}

.carousel-nav-buttons {
  display: flex;
  gap: var(--space-10);
  justify-content: center;
  padding: 0 var(--gutter);
  margin-top: var(--space-20);
}
.icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 16px; /* Figma 실측(imageSlide/review) — 완전 원형(pill)이 아니라 둥근 사각형. carousel/cardGrid 등 다른 슬라이드 nav 버튼도 전부 이 모양으로 통일 */
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-primary);
}
/* 더 넘길 카드/슬라이드가 없을 때(2026-09) — carousel/review는 스크롤 끝, imageSlide는
   첫/마지막 페이지에서 JS가 native disabled를 건다. 클릭도 실제로 막히고(브라우저 기본
   동작) 아이콘도 회색으로 바뀌어야 하므로 색만 muted로 바꾼다. */
.icon-btn:disabled {
  color: var(--color-text-muted);
  cursor: default;
}
.icon-btn .icon { font-size: 24px; }

/* ============================================================
   CtaSection
   ============================================================ */
.cta-section {
  padding-top: var(--space-40);
  padding-bottom: 0;
}
.cta-section .headline-wrapper {
  margin-bottom: var(--space-10);
  font-weight: var(--font-weight-headline-section);
}
.cta-section .subhead-wrapper { margin-bottom: var(--space-20); }
.cta-section .button-list { margin-bottom: var(--space-20); }
.cta-section .btn--primary {
  background: var(--color-cta-button-bg, var(--color-accent));
  color: var(--color-cta-button-text, var(--color-text-inverse));
}

.cta-section__image-frame {
  width: 100%;
  aspect-ratio: 400 / 320;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
}

.icon {
  font-family: var(--icon-family);
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    "FILL" var(--icon-fill),
    "wght" var(--icon-weight),
    "GRAD" var(--icon-grade),
    "opsz" var(--icon-opsz);
}

/* QuoteSection 인용부호 전용 — 테마별 --icon-* 토큰과 무관하게 항상 Sharp/굵게/채움 고정 (Figma 스펙) */
.material-symbols-sharp {
  font-family: "Material Symbols Sharp";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  font-variation-settings:
    'FILL' 1,
    'wght' 700,
    'GRAD' -25,
    'opsz' 24;
}

.icon-btn--plain {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: inherit;
}

/* ============================================================
   NotificationBanner
   배경색이 톤마다 "브랜드 액센트"일 수도 "중립 잉크색"일 수도 있어서
   (Modern=오렌지 액센트, Kitsch=검정 중립) 전용 시맨틱 토큰으로 분리.
   ============================================================ */
.notification-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
  background: var(--color-notification-bg);
  color: var(--color-text-inverse);
  padding: 2px var(--gutter);
}
.notification-banner__text {
  flex: 1;
  font-size: var(--font-helper);
  line-height: 1.4;
  text-align: center;
}

/* ============================================================
   Site Topbar (NotificationBanner + Header)
   ============================================================ */
.site-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: calc(-1 * var(--topbar-height, 120px));
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-40);
  padding: 10px var(--gutter);
  background: var(--color-header-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--color-header-text); /* Header 배경이 밝을 수도(Kitsch) 어두울 수도(Modern) 있어서 분리 */
}

/* 로고 밝기 기반 자동 배경 전환(2026-08, app.js의 applyTopbarLuminance가 토글) — blur(15px)는
   .site-header의 backdrop-filter를 그대로 물려받아서 안 건드림(요청사항: 오파시티/블러는 그대로).
   여기 opacity 값(.55/.75)은 임시 추정치 — --color-header-bg의 실제 값(테마 파일)을 보고
   맞춰야 정확함. --color-header-text도 같이 뒤집어서 로고 옆 메뉴 아이콘 색도 항상 잘 보이게 함. */
.pp-topbar--dark-logo .site-header {
  --color-header-bg: rgba(255, 255, 255, .75);
  --color-header-text: #1a1a1a;
}
.pp-topbar--light-logo .site-header {
  --color-header-bg: rgba(0, 0, 0, .55);
  --color-header-text: #ffffff;
}

.logo-section {
  /* 로고 표시창 크기(2026-08): 세로 48px→28px로 줄이고, 가로는 최대 280px까지 허용.
     너비는 max-width라서 강제로 꽉 채우진 않음 — 실제 이미지가 그보다 좁으면 그만큼만 차지함.
     참고: 지금 업로드 크롭 비율(sections-schema.json의 logo aspect)이 15:4(≈3.75:1)인데
     이 공간을 꽉 채우게 보임(아니면 지금처럼 왼쪽으로 치우쳐 짧게 보이는 게 정상 동작). */
  height: 36px;
  max-width: 280px;
  display: flex;
  align-items: center;
}
.logo-section img {
  height: 100%;
  width: auto;
  max-width: 100%;
  display: block;
}

/* ============================================================
   FqaAccordionSection
   ============================================================ */
.faq-section {
  padding: var(--space-40) 0;
  background: var(--color-faq-bg, transparent);
}
.faq-section .headline-wrapper {
  margin-bottom: var(--space-40);
  font-weight: var(--font-weight-headline-section);
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  padding: 0 var(--gutter);
}

.accordion {
  background: var(--color-surface-muted);
  border-radius: var(--radius-card);
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.accordion summary::-webkit-details-marker { display: none; }

.accordion-title-wrapper {
  flex: 1;
  font-size: var(--font-title-accordion);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height);
}

.accordion-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}
.accordion[open] .accordion-icon { transform: rotate(180deg); }

.accordion-body-wrapper {
  padding: 0 var(--gutter) 20px;
  font-size: var(--font-body);
  line-height: var(--line-height);
  color: var(--color-text-muted);
}

/* ============================================================
   QuoteSection
   ============================================================ */
.quote-section {
  background: var(--color-quote-bg);
  padding: var(--space-40) 0;
  color: var(--color-quote-text, var(--color-text-primary));
  text-align: center;
}

.quote-section__icon {
  display: flex;
  justify-content: var(--align, center); /* 정렬 컨트롤과 연동 — 본문과 같이 left/center/right로 이동 */
  padding: 0 var(--gutter);
  margin-bottom: var(--space-20);
}
.quote-section__icon .material-symbols-sharp {
  font-size: 56px;
  transform: rotate(180deg); /* 기본 글리프는 꼬리가 아래(닫는 따옴표 ”)라 여는 따옴표(“)처럼 보이게 회전 */
}

.quote-wrapper {
  padding: 0 var(--gutter);
  font-size: var(--font-quote);
  font-weight: var(--font-weight-quote);
  line-height: var(--line-height);
  /* 정렬 컨트롤(2026-08) — 미설정 시 .quote-section의 text-align:center를 그대로 상속 */
  text-align: var(--align, inherit);
}

.quote-detail-wrapper {
  padding: 0 var(--gutter);
}
.quote-author-name {
  font-size: var(--font-body);
  font-weight: 600;
}
.quote-author-title {
  margin-top: var(--space-10);
  font-size: var(--font-detail);
  /* Kitsch 실측: 흰색이 아니라 3번째 액센트 슬롯(연두) — 전용 토큰으로 분리 */
  color: var(--color-quote-author-title);
}

/* ============================================================
   Footer (구조 컨테이너 — 아직 Figma 스펙 없어 임의 구성)
   ============================================================ */
.site-footer {
  background: var(--color-accent);
  color: var(--color-text-inverse);
  padding: var(--space-40) var(--gutter);
}
.site-footer__logo {
  height: 32px;
  margin-bottom: var(--space-20);
}
.site-footer__logo img {
  height: 100%;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  margin-bottom: var(--space-40);
  font-size: var(--font-body);
}
.site-footer__links a {
  color: var(--color-text-inverse);
  text-decoration: none;
  opacity: 0.8;
}
.site-footer__links a:hover { opacity: 1; }
.site-footer__bottom {
  padding-top: var(--space-20);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: var(--font-detail);
  color: var(--color-text-muted);
}

/* Widget: HorizontalRule (Role 없음, 구조 요소) — FeatureSection/StatSection이 공유 */
.horizontal-rule {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-40) var(--gutter);
}

/* ============================================================
   FeatureSection
   신규 토큰: --font-title-feature (FeatureTitle, 20px Regular) — type-scale.css에 등록됨
   ============================================================ */
.feature-section {
  padding: var(--space-40) 0;
}

/* Widget: FeatureCard — title/body + icon(선택), 텍스트/아이콘 중앙정렬 디폴트 */
.feature-card {
  padding: 0 var(--gutter);
  text-align: center;
}
/* FeatureCard 아이콘 — 테마별 --icon-* 토큰과 무관하게 지금은 고정 스펙(Outlined/wght200/GRAD0/opsz48).
   추후 테마 토큰(--icon-family 등)으로 전환 예정 — 그때는 이 블록만 var(--icon-*)로 교체하면 됨. */
.feature-card__icon {
  margin-bottom: var(--space-20);
}
.feature-card__icon .icon {
  font-family: "Material Symbols Outlined";
  font-size: 48px;
  font-variation-settings:
    "FILL" 0,
    "wght" 200,
    "GRAD" 0,
    "opsz" 48;
}
.feature-title-wrapper {
  font-size: var(--font-title-feature);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height);
  color: var(--color-text-primary);
  margin-bottom: var(--space-10);
}
.feature-body-wrapper {
  font-size: var(--font-body);
  line-height: var(--line-height);
  color: var(--color-text-muted);
}

/* ============================================================
   ReviewSection — 배경 전체에 사업 성격에 맞는 인물 사진(Hero와 동일한
   절대배치 자식 .review-section__bg 패턴), 그 위에 이미지 위 중앙 정렬
   헤드라인 + 유리질감(반투명) 리뷰 카드 캐러셀. 카드 240px+peek 스크롤은
   carousel과 동일해 .carousel-nav-buttons/.icon-btn을 그대로 재사용한다.
   ============================================================ */
.review-section {
  position: relative;
  padding: var(--space-40) 0;
  overflow: hidden;
}
.review-section__bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.review-section > *:not(.review-section__bg) { position: relative; z-index: 1; }
.review-section .headline-wrapper { margin-bottom: var(--space-40); }
.review-slide-wrapper {
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  cursor: grab;
}
.review-slide-wrapper:active { cursor: grabbing; }
.review-slide-wrapper::-webkit-scrollbar { display: none; }
.review-slide {
  display: flex;
  gap: var(--space-10);
}
/* carousel-slide와 동일한 이유(브라우저가 스크롤 끝 padding-right를 무시함)로
   가짜 flex item을 붙여 마지막 카드 옆에도 --gutter만큼 여백이 남게 한다. */
.review-slide::after {
  content: '';
  flex: 0 0 calc(var(--gutter) - var(--space-10));
}
.review-card {
  flex: 0 0 240px;
  width: 240px;
  height: 280px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: var(--space-20);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #ffffff;
  border-radius: 16px; /* Figma 실측 고정값 — --radius-card는 테마별로 0(modern)/24(kitsch)라 여기 쓰면 스펙과 어긋남 */
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}
.review-card__stars {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-20);
}
.review-card__star { fill: var(--color-text-muted); }
.review-card__star--filled { fill: var(--color-text-primary); }
.review-card__body-wrapper {
  flex: 1;
  overflow: hidden;
  font-family: "Roboto Serif", serif;
  font-size: var(--font-body);
  line-height: var(--line-height);
  color: #2e2e30;
  margin-bottom: var(--space-10);
}
.review-card__author-wrapper {
  font-size: var(--font-detail);
  color: var(--color-text-primary);
}
/* review의 nav 버튼은 사진 배경 위에 떠 있어서 carousel/cardGrid/imageSlide가 쓰는
   불투명 .icon-btn(--color-surface, --color-border)과 다르게 review-card와 같은
   유리질감(반투명 흰색 + 흰 테두리)이어야 한다(Figma 실측, 테마 토큰 무관 고정값). */
.review-section .icon-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: #ffffff;
  color: #1f1f1f;
}
.review-section .icon-btn:disabled {
  background: rgba(255, 255, 255, 0.4);
  border-color: transparent;
  color: rgba(31, 31, 31, 0.4); /* Figma 실측: 색 자체는 활성(#1f1f1f)과 같고 opacity만 0.4 */
}

/* ============================================================
   MapSection — 실제 지도 API 연동 전 자리표시자(구조 검토용 1차 구현)
   ============================================================ */
.map-section {
  padding: var(--space-40) 0;
}
.map-section .headline-wrapper { margin-bottom: var(--space-20); padding: 0 var(--gutter); }
.map-section__placeholder {
  margin: 0 var(--gutter);
  aspect-ratio: 4 / 3;
  background: var(--color-surface-muted);
  border-radius: var(--radius-image);
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-section__placeholder .icon {
  font-size: 40px;
  color: var(--color-text-muted);
}
.map-section__address-wrapper {
  margin-top: var(--space-10);
  padding: 0 var(--gutter);
  font-size: var(--font-body);
  color: var(--color-text-muted);
}

/* ============================================================
   FloatingCta — 섹션 흐름 밖, 화면 하단에 항상 고정되는 문의 바
   (구조 검토용 1차 구현 — production app.js에는 아직 연결 안 함)
   ============================================================ */
/* 처음엔 숨겨져 있다가(2026-09) 스크롤을 30px쯤 내리면 페이드인 — One Page·One CTA 원칙상
   히어로의 CTA 버튼이 화면에 보이는 동안은 굳이 또 하나(플로팅)를 겹쳐 보여줄 필요가 없고,
   히어로를 지나 스크롤하면 그제서야 "항상 붙어있는 CTA"로 넘겨받는 느낌을 주려는 것.
   .is-visible 토글은 app.js(프로덕션)/이 에디터 양쪽 다 같은 클래스명으로 스크롤 리스너가
   붙인다. */
/* Figma 실측(2026-09) — 진한 단색 필 대신 화면 맨 아래에 딱 붙는 반투명 화이트 유리질감
   바로 교체. 위/아래 패딩이 비대칭(8 위 / 24 아래)인 건 기기 하단 세이프에어리어 여백을
   바 안쪽에 미리 넣어둔 것으로 읽혀서(스펙에 별도 바깥 여백 지정이 없음), 바 자체를
   화면 아래 끝에 딱 붙이고(bottom:0) 그 여백으로 대신했다. 모서리 반경도 스펙에 값이
   없어 각짐(0)으로 — 기존 필/버튼의 --radius-pill과는 별개로 이 바만 각짐. */
.floating-cta {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(8px);
  width: 100%;
  max-width: 480px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 38px;
  padding: 8px 14px 24px 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.floating-cta.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.floating-cta__text {
  font-size: var(--font-helper);
  color: var(--color-text-primary); /* 배경이 밝아져서(반투명 화이트) 흰 글자였던 예전 값은 이제 안 보임 — 어두운 텍스트로 전환 */
  flex: 1;
}
/* 버튼은 사이트 기본 액센트(--color-accent, 톤마다 다름)가 아니라 항상 브랜드 오렌지
   고정(Figma #ff5000) — hero/cta 섹션의 .btn--primary 스코프 오버라이드와 같은 패턴.
   모서리도 이 바와 마찬가지로 각짐. 나중에 "버튼색"/"모서리 둥근정도" 편집 옵션은
   topbar 배너색과 같은 방식(요소에 직접 inline style)으로 이 두 규칙을 덮어쓰면 된다. */
.floating-cta .btn--primary {
  background: var(--color-brand-accent-1, #ff5000);
  border-radius: 0;
}

/* ============================================================
   StatSection
   신규 토큰: --font-stat-value (StatValue, 48px), --font-stat-unit (StatUnit, 48px)
   theme-*.css 각 톤 파일에 두 토큰 값 추가 필요.
   font-weight은 기존 토큰 재사용: value=--font-weight-headline(Bold), unit=--font-weight-body(Regular)
   ============================================================ */
.stat-section {
  padding: var(--space-40) 0;
}

/* Widget: StatCard */
.stat-card {
  padding: 0 var(--gutter);
}
.stat-metric-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-20);
}
.stat-value-wrapper {
  font-size: var(--font-stat-value);
  font-weight: var(--font-weight-headline);
  line-height: var(--line-height);
  color: var(--color-text-primary);
}
.stat-unit-wrapper {
  font-size: var(--font-stat-unit);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height);
  color: var(--color-text-primary);
}
.stat-body-wrapper {
  font-size: var(--font-body);
  line-height: var(--line-height);
  color: var(--color-text-muted);
}
/* ============================================================
   CardGridSection — 4개씩 페이지 단위로 렌더되는 2x2 그리드.
   carousel의 .card와는 폭/이미지 비율이 달라 별도 클래스를 쓴다.
   ============================================================ */
.card-grid-section {
  padding: var(--space-40) 0;
}
.card-grid-section .headline-wrapper { margin-bottom: var(--space-20); }

.card-grid-track {
  padding: 0 var(--gutter);
  display: grid; /* 모든 페이지를 같은 칸에 겹쳐 쌓아서, 컨테이너 높이가 항상 가장 큰 페이지 기준으로 고정되게 함 */
}
.card-grid-page {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10) var(--space-10);
  visibility: hidden;
  pointer-events: none;
}
.card-grid-page.is-active {
  visibility: visible;
  pointer-events: auto;
}

.card-grid__item {
  overflow: hidden;
  border-radius: var(--radius-card);
  border: var(--border-card-width, 0) solid var(--color-border-card, transparent);
}
.card-grid__image-frame {
  width: 100%;
  aspect-ratio: 181 / 140;
  background-color: var(--color-border);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-image);
}
.card-grid__texts { padding: var(--space-10) var(--card-inset, 0) 0; }
.card-grid__title-wrapper {
  font-size: var(--font-title-card);
  font-weight: var(--font-weight-title);
  line-height: var(--line-height);
  color: var(--color-text-primary);
}
.card-grid__body-wrapper {
  margin-top: var(--space-10);
  font-size: var(--font-detail);
  line-height: var(--line-height);
  color: var(--color-accent-soft);
}

/* ============================================================
   팝업 / 드로어 공용 오버레이
   ============================================================ */
.pp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.pp-overlay--drawer {
  align-items: stretch;
  justify-content: flex-start;
}
.pp-overlay__panel {
  position: relative;
  padding: 6px 6px 24px 6px;
  background: var(--color-surface, #fff);
  border-radius: 32px;
  max-width: 400px;
  width: calc(100% - 40px);
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
}
.pp-overlay--drawer .pp-overlay__panel {
  border-radius: 0;
  max-width: 320px;
  width: 80%;
  max-height: 100%;
  height: 100%;
  text-align: left;
}
.pp-overlay__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--color-surface-muted, #f5f5f5);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.popup-content__media {
  position: relative;
  margin-bottom: var(--space-20);
}
.popup-content__image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: var(--color-border, #e5e5e5);
  background-size: cover;
  background-position: center;
  border-radius: 28px 28px 0 0;
}
.popup-content__close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 36px;
  height: 36px;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.popup-content__headline { margin-bottom: var(--space-10); }
.popup-content__body { color: var(--color-text-muted); line-height: var(--line-height); margin-bottom: var(--space-20); }
.popup-content__buttons { display: flex; gap: var(--space-10); justify-content: center; }

.drawer-content__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  margin-bottom: var(--space-20);
}
.drawer-content__name p { font-weight: var(--font-weight-headline); font-size: var(--font-lead); margin-bottom: var(--space-10); }
.drawer-content__bio p { color: var(--color-text-muted); margin-bottom: var(--space-40); }
.drawer-content__links { display: flex; flex-direction: column; gap: var(--space-20); }
.drawer-content__links a { color: var(--color-text-primary); text-decoration: none; font-size: var(--font-body); }



/* ── ProfilePage (Menu/link-in-bio) ── */
.profile-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #FCFCFE;
  padding: var(--topbar-height, 120px) 32px 0; /* Topbar의 음수 margin(겹침 트릭)을 상쇄 — Hero와 달리 흰 배경 콘텐츠라 안 겹쳐야 함. 좌우 여백도 여기서 한 번만 관리 */
  box-sizing: border-box;
}

.profile-page__avatar {
  width: 120px;
  height: 120px;
  margin-top: 40px;
  margin-bottom: 40px;
  border-radius: 36px;
  background-size: cover;
  background-position: center;
  border: 1px solid #dfdfe1;
}

.profile-page__name {
  width: 100%;
  
  text-align: left;
  margin-bottom: 10px;
}

.profile-page__name p {
  font-size: 20px;
  font-weight: 500;
  line-height: 145%;
  color: #2E2E30;
  margin: 0;
}

.profile-page__role {
  width: 100%;
  text-align: left;
}

.profile-page__role p {
  font-size: 16px;
  font-weight: 400;
  line-height: 145%;
  color: #2E2E30;
  margin-bottom: 10px;
}

.profile-page__divider {
  width: 100%;
  height: 1px;
  background: #e9e9eb;
  margin-top: 10px;
  margin-bottom: 20px;
}

.profile-page__description {
  width: 100%;
  text-align: left;
}

.profile-page__description p {
  font-size: 16px;
  font-weight: 400;
  line-height: 145%;
  color: #000000;
  margin: 0;
}

.profile-page__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Info/Links 두 블록 사이 간격(40px)과 페이지 맨 끝 여백(80px)을 여기서 통째로 관리(2026-08) —
   blockOrder로 두 블록 순서가 바뀌어도 항상 같은 위치(사이/끝)에 같은 값이 적용되게. */
.profile-page__body {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  padding-bottom: 80px;
}

/* ── Link item card ── */
.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: #f2f2f4;
  border: 1px solid #e9e9eb;
  border-radius: 16px;
  text-decoration: none;
  box-sizing: border-box;
}

.link-item__icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.link-item__icon--og,
.link-item__icon--favicon {
  background-size: cover;
  background-position: center;
}
.link-item__icon--favicon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.link-item__icon--fallback .icon {
  font-size: 24px;
  color: #1f1f1f;
}

.link-item__texts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.link-item__title {
  font-size: 16px;
  font-weight: 500;
  color: #000000;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-item__desc {
  font-size: 14px;
  font-weight: 400;
  color: #000000;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-item__url {
  font-size: 12px;
  font-weight: 400;
  color: #a6a6a8;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-item__menu {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f1f1f;
  cursor: pointer;
}