/* =========================================================
   카공 랜딩페이지 스타일
   - 모바일 우선: 기본값이 모바일, 큰 화면은 @media 로 확장
   - 라이트/다크 모드: 기기 설정을 따르고, 헤더 버튼으로 직접 바꿀 수 있음
   ========================================================= */

/* ---------- 색상 (라이트) ---------- */
:root {
  --bg: #ffffff;
  --surface: #f6f6f7;       /* 카드·FAQ 배경 */
  --ink: #18181b;           /* 본문 글자 */
  --ink-2: #52525b;         /* 보조 글자 */
  --ink-3: #8a8a93;         /* 흐린 글자 */
  --line: #e7e7ea;
  --accent: #f0590e;        /* 포인트: 오렌지 */
  --accent-text: #c2410c;   /* 흰 배경 위 작은 글자용 (대비 확보) */
  --accent-soft: #fff1e8;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, .86);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .08);
  color-scheme: light;

  --radius-sm: 10px;
  --radius: 14px;
  --gutter: 16px;
  --container: 1160px;
  --header-h: 60px;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui,
          "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

/* ---------- 색상 (다크) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e10;
    --surface: #18181b;
    --ink: #f4f4f5;
    --ink-2: #b4b4bc;
    --ink-3: #85858f;
    --line: #27272a;
    --accent: #ff7a3d;
    --accent-text: #ff8f5c;
    --accent-soft: #2a1a12;
    --on-accent: #111111;
    --header-bg: rgba(14, 14, 16, .82);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #18181b;
  --ink: #f4f4f5;
  --ink-2: #b4b4bc;
  --ink-3: #85858f;
  --line: #27272a;
  --accent: #ff7a3d;
  --accent-text: #ff8f5c;
  --accent-soft: #2a1a12;
  --on-accent: #111111;
  --header-bg: rgba(14, 14, 16, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- 리셋 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  word-break: keep-all;          /* 한국어 단어 단위 줄바꿈 */
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  transition: background-color .2s, color .2s;
}
img, svg, picture { display: block; max-width: 100%; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* ---------- 레이아웃 ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.container--narrow { max-width: calc(760px + var(--gutter) * 2); }
@media (min-width: 768px) { :root { --gutter: 24px; } }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-actions { display: flex; align-items: center; gap: 4px; }

.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { height: 44px; width: auto; }                 /* 가로형 로고 (288×110 원본) */
@media (min-width: 911px) { .logo img { height: 48px; } }

/* 다크모드 전환 버튼 */
/* ---------- 헤더 시계 ----------
   모바일: 날짜/시간 두 줄로 좁게 · 데스크톱: 2026.11.10 (화) 14:32:07 한 줄 */
.clock {
  display: inline-grid; justify-items: end; align-content: center; row-gap: 1px;
  height: 36px; padding: 0 8px; margin-right: 2px;
  border: 1px solid var(--line); border-radius: 4px;
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.1;
}
.clock-date, .clock-week { font-size: 10px; font-weight: 500; color: var(--ink-3); }
.clock-time { font-size: 13px; font-weight: 600; color: var(--ink); }
.clock-week { display: none; }
@media (max-width: 359px) { .clock-date { display: none; } }   /* 아주 작은 폰은 시간만 */
@media (min-width: 911px) {
  .clock {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 10px; margin: 0 4px 0 12px;
  }
  .clock-date, .clock-week { font-size: 13px; }
  .clock-week { display: inline; margin-left: -2px; }
}

.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.theme-toggle:hover { background: var(--surface); color: var(--ink); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* 모바일 메뉴 (기본) */
.nav-toggle {
  width: 44px; height: 44px; margin-right: -10px;
  display: grid; place-content: center; gap: 6px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.nav {
  position: fixed; inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 auto 0;
  padding: 4px var(--gutter) 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.nav.is-open { transform: none; opacity: 1; visibility: visible; }
.nav ul { display: grid; }
.nav li a, .nav-btn { display: flex; align-items: center; min-height: 52px; font-size: 17px; font-weight: 600; border-bottom: 1px solid var(--line); }
.nav li:last-child a, .nav li:last-child .nav-btn { border-bottom: 0; }
.nav-btn { width: 100%; padding: 0; background: none; border: 0; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink-3); text-align: left; cursor: pointer; }

/* 헤더: 910px 이하는 모바일 헤더(햄버거 메뉴), 911px 부터 데스크톱 헤더 */
@media (min-width: 911px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: none; }
  .nav {
    position: static; padding: 0 12px 0 0; background: none; border: 0; box-shadow: none;
    transform: none; opacity: 1; visibility: visible;
  }
  .nav ul { display: flex; gap: 24px; }
  .nav li a, .nav-btn { min-height: 44px; border: 0; font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
  .nav-btn { width: auto; color: var(--ink-3); }
  .nav li a:hover, .nav-btn:hover { color: var(--ink); }
}

/* ---------- 소개 ---------- */
.intro { padding: 20px 0 8px; }
.intro h1 { font-size: clamp(24px, 6.4vw, 40px); font-weight: 800; letter-spacing: -.035em; line-height: 1.25; }
.intro h1 em { font-style: normal; color: var(--accent); }
.intro-desc { margin-top: 6px; font-size: clamp(14px, 3.6vw, 17px); color: var(--ink-2); }
@media (min-width: 768px) { .intro { padding: 40px 0 12px; } }

/* =========================================================
   광고 배너 그리드 (메인)
   - 모바일 2열 / 데스크톱 3열
   - 모든 칸은 같은 비율(--ad-ratio). 다른 크기의 배너도 잘리지 않고 칸 안에 맞춰짐
   - 칸 비율이 미리 잡혀 있어 이미지 로딩 중에도 화면이 밀리지 않음(CLS 0)
   ========================================================= */
.deals { padding: 16px 0 40px; --ad-ratio: 640 / 150; }
@media (min-width: 768px) { .deals { --ad-ratio: 640 / 200; } }   /* PC 일반 배너 640×200 */
.deals-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.deals-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }

.ad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
@media (min-width: 768px) {
  .deals { padding: 24px 0 72px; }
  .deals-head { margin-bottom: 16px; }
  .deals-head h2 { font-size: 20px; }
  .ad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ad {
  display: block;
  overflow: hidden;
  background: var(--surface);                 /* 이미지가 뜨기 전 자리 표시 */
}
.ad-item .ad { aspect-ratio: var(--ad-ratio); }
.ad-item .ad img { width: 100%; height: 100%; object-fit: contain; }
.ad-item .ad picture { width: 100%; height: 100%; }


/* ---------- 섹션 공통 ---------- */
.section { padding: 48px 0; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(20px, 5vw, 28px); font-weight: 800; letter-spacing: -.03em; margin-bottom: 20px; }
@media (min-width: 768px) { .section { padding: 80px 0; } .section-title { margin-bottom: 28px; } }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border-radius: var(--radius); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; padding: 14px 20px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { padding: 0 20px 18px; color: var(--ink-2); font-size: 15px; }

/* ---------- 신뢰 섹션 (검증 기준 / 약속) ---------- */
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent-text); margin-bottom: 8px; }
.section-lead { max-width: 640px; margin: -8px 0 24px; color: var(--ink-2); font-size: 15px; }
@media (min-width: 768px) { .section-lead { margin: -12px 0 32px; font-size: 16px; } }


/* 검증 기준: 모바일 1열, 태블릿 2열, 데스크톱 4열 */
.steps { display: grid; gap: 12px; counter-reset: none; }
.step { padding: 20px; background: var(--surface); border-radius: var(--radius); }
.step-num { display: block; font-size: 13px; font-weight: 800; color: var(--accent-text); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--ink-2); }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 16px; } .step { padding: 24px; } }

/* 약속 박스 */
.promise {
  display: grid; gap: 24px; padding: 28px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.promise .section-lead { margin-bottom: 16px; }
.checklist { display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 26px; font-size: 15px; }
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: .35em;
  width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.btn-tg {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 10px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 15px;
}
.btn-tg svg { fill: currentColor; }
@media (min-width: 768px) {
  .promise { grid-template-columns: 1fr auto; align-items: end; padding: 40px; }
  .promise .section-title { margin-bottom: 20px; }
}


/* 푸터: 로고 + 텔레그램 / 링크 + 저작권 */
.site-footer {
  padding: 32px 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 13px; color: var(--ink-3);
  border-top: 1px solid var(--line);
}
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo--footer img { height: 40px; }
.footer-tg {
  display: grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--ink-2);
  transition: color .15s, border-color .15s;
}
.footer-tg svg { fill: currentColor; transform: translateX(-1px); }
.footer-tg:hover { color: #229ed9; border-color: #229ed9; }   /* 텔레그램 색 */
.footer-bottom {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-links strong { font-weight: 700; color: var(--ink); }
.copyright { font-size: 12px; }
@media (min-width: 768px) {
  .site-footer { padding-top: 40px; }
  .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ---------- 모바일 하단 고정 배너 ---------- */
.ad-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: center;
  padding: 6px 44px calc(6px + env(safe-area-inset-bottom));
  background: var(--bg);
  box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(0, 0, 0, .06);
  transform: translateY(110%);
  transition: transform .3s ease;
}
.ad-sticky.is-visible { transform: none; }
.ad-sticky[hidden] { display: none; }
.ad-sticky-slot { width: 100%; max-width: 320px; }
.ad-sticky .ad { border-radius: 6px; }
.ad-sticky .ad img { width: 100%; height: auto; }
.ad-sticky-close {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  margin-top: calc(env(safe-area-inset-bottom) / -2);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
}
.ad-sticky-close:hover { background: var(--surface); }
body.has-sticky-ad .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .ad-sticky { display: none !important; } }

/* =========================================================
   성인 확인 팝업
   - 라이트/다크 모드와 상관없이 항상 어두운 화면 + 로고의 금색
   - 확인 전에는 뒤 화면 스크롤 막음
   ========================================================= */
:root:not([data-age="ok"]) body { overflow: hidden; }
:root[data-age="ok"] .age-gate { display: none; }

.age-gate {
  --gold: #d4af5a;
  --gold-ink: #1a1408;
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(6, 6, 8, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #f4f4f5;
  color-scheme: dark;
  transition: opacity .25s ease;
}
.age-gate.is-leaving { opacity: 0; }

.age-gate-box {
  position: relative;
  width: 100%; max-width: 520px;
  padding: 32px 20px 20px;
  border-radius: 20px;
  background: #121214;
  border: 1px solid rgba(212, 175, 90, .28);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  text-align: center;
}
.age-gate-logo { width: auto; height: 64px; margin: 0 auto 16px; }   /* 가로형 로고 */
@media (min-width: 560px) { .age-gate-logo { height: 76px; } }
.age-gate-badge {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; letter-spacing: -.02em;
  color: #e5484d; background: #fff; border: 3px solid #e5484d;
}
.age-gate h2 { font-size: clamp(20px, 5.4vw, 26px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.age-gate p { color: #b4b4bc; }
#age-desc { margin-top: 10px; font-size: 15px; line-height: 1.65; }

.age-gate-actions { display: grid; gap: 10px; margin-top: 24px; }
.age-btn {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 20px; border-radius: 12px;
  font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  transition: background-color .2s, border-color .2s, transform .15s;
}
.age-btn:active { transform: scale(.98); }
.age-btn--enter { background: var(--gold); color: var(--gold-ink); }
.age-btn--enter:hover { background: #e2c071; }
.age-btn--exit { border: 1.5px solid #3a3a40; color: #d4d4d8; }
.age-btn--exit:hover { border-color: #5a5a62; }
.age-gate :focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.age-gate-links { display: flex; justify-content: center; gap: 8px; margin-top: 18px; font-size: 13px; }
.age-gate-links a { color: #8a8a93; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 560px) {
  .age-gate-box { padding: 40px 36px 24px; }
  .age-gate-actions { grid-template-columns: 1fr 1fr; }
}
