/* 레이아웃 — 옛 App.vue · TopNav.vue · AppFooter.vue · MobileTabBar.vue 의 <style> 를 옮겼다(scoped 를 풀었다 — 클래스 이름이 겹치지 않는다). */

/* ── App.vue ── */
.site-main{min-height:calc(100vh - 340px);padding:0 0 64px;overflow-x:clip}
/* 상단 광고(2026-11-05 — fragments/layout.html .top-ad) — PC 본문 폭 낮은 띠(광고 칸 100%×90, ads.css .ad-fix), 모바일 피드형 띠. 못 채우면 칸째 접는다 */
/* PC·모바일 같은 결(2026-11-05 사용자 "PC 도 왼쪽 위 광고 네모, 회색 칸 말고 흰 띠 + 위아래 구분") — 흰 띠 + 위아래 8px 회색 띠 + 왼쪽 위 테두리 "광고" */
.top-ad{margin:0;padding:14px 0 16px;background:var(--white);border-top:8px solid var(--bg);border-bottom:8px solid var(--bg)}
.top-ad__in{display:flex;flex-direction:column;align-items:stretch}
.top-ad__l{align-self:flex-start;margin:0 0 10px;padding:1px 6px;border:1px solid var(--line);border-radius:4px;font-size:11px;line-height:16px;font-weight:600;color:#8b95a1}
.top-ad:has(ins.adsbygoogle[data-ad-status="unfilled"]){display:none}
.top-ad .adsbygoogle{margin:0}   /* 광고 조각의 위아래 16px 여백을 뺀다 — 칸 여백은 .top-ad 가 낸다 */
@media(max-width:640px){
  .top-ad__in{padding:0 10px}
  .top-ad__l{margin:0 0 10px 4px}
  .top-ad__in .adsbygoogle{align-self:center}
  /* 모바일 상단만 320×100(2026-11-05 사용자 "모바일에서 상단만 높이 낮은 걸로") — 본문 광고는 300×250 그대로 */
  .top-ad .adsbygoogle.ad-fix[data-ai-ad]{width:320px;max-width:100%;height:100px}
}

/* ── components/TopNav.vue ── */
/* 헤더는 2단이다 — 유틸 줄(32px) + 본 줄(64px) = 96px, 모바일은 본 줄(54px) + 검색(54px) = 108px.
 * 이 값이 styles.css 의 --hd-h 와 어긋나면 스티키 필터바가 헤더에 가린다. */
.gnb { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--line); }

.gnb-util { background: var(--n50); border-bottom: 1px solid var(--line-soft); }
.gnb-util-in {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 32px;
  display: flex; align-items: center; justify-content: flex-end; gap: 18px;
  font-size: 12.5px; color: var(--t2);
}
.gnb-util-in a:hover { color: var(--primary-ink); }

.gnb-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 16px;
}

.logo { display: flex; align-items: center; width: 168px; height: 40px; flex-shrink: 0; }
.logo img { width: 100%; height: auto; max-height: 40px; object-fit: contain; }

/* 1뎁스 — 알약 배경 대신 밑줄로 현재 위치를 표시한다. 헤더가 깔끔해지고 활성 표시가 또렷하다. */
.gnav { display: flex; align-items: center; gap: 4px; }
.gnav-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 12px; height: 64px; border-radius: 0;
  font-size: 15px; font-weight: 600; color: var(--t2); letter-spacing: -.015em;
  transition: color .13s, box-shadow .13s; white-space: nowrap;
}
.gnav-item:hover { color: var(--t1); background: none; }
.gnav-item.act { color: var(--primary-ink); box-shadow: inset 0 -2.5px 0 var(--primary); }
.gnav-item.on { color: var(--primary-ink); background: none; }
.caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .45; transition: transform .16s;
}
.gnav-item.on .caret { transform: rotate(180deg); opacity: .9; }

/* 2뎁스 드롭다운 */
.gnav-drop { position: relative; }
.drop {
  position: absolute; top: 100%; left: -8px; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r2);
  box-shadow: var(--shadow-pop); padding: 8px; min-width: 250px;
  animation: dropin .14s ease-out;
}
.drop-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 520px; }
@keyframes dropin { from { opacity: 0; transform: translateY(-4px); } }
@media(prefers-reduced-motion: reduce) { .drop { animation: none; } }
.drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r); transition: background .12s;
}
.drop-item:hover { background: var(--n50); }
.drop-ic {
  width: 34px; height: 34px; border-radius: var(--r); flex-shrink: 0;
  display: grid; place-items: center;
}
.drop-ic.tone { background: var(--primary-pale); color: var(--primary-ink); }
.drop-tx { display: flex; flex-direction: column; min-width: 0; }
.drop-tx b { font-size: 14px; font-weight: 600; color: var(--t1); letter-spacing: -.015em; }
.drop-tx em { font-style: normal; font-size: 12px; color: var(--t3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gnb-spacer { flex: 1; }

/* 검색 — 2단으로 나눠 자리가 생겼으므로 좁히지 않는다 */
.gnb-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--n50); border: 1px solid var(--border2);
  border-radius: var(--r); height: 40px; padding: 0 14px;
  width: 280px; color: var(--t3); transition: all .14s;
}
.gnb-search:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.16); }
.gnb-search svg { flex-shrink: 0; color: var(--t3); }
.gnb-search input { border: 0; background: none; outline: none; width: 100%; font-size: 14.5px; color: var(--t1); }
.gnb-search input::placeholder { color: var(--t3); }
/* 일상모아 여섯 칸(2026-11-14)이 들어가면 981~1180px 에서 검색칸이 밀려난다 — 칸 여백을 줄이고 검색칸이 남은 폭만 쓴다 */
@media(max-width: 1180px) {
  .gnav-item { padding: 0 9px; }
  .gnb-search { width: auto; flex: 1 1 150px; min-width: 120px; }
}

/* CTA — 떠 있는 알약에서 평면 사각으로. 헤더에 그림자가 하나도 없어야 아래 광고가 뜬다. */
.gnb-cta {
  flex-shrink: 0; padding: 0 16px; height: 40px; border-radius: var(--r);
  display: inline-flex; align-items: center;
  background: var(--primary); color: #fff; font-weight: 600; font-size: 14.5px;
  box-shadow: none; transition: background .13s;
}
.gnb-cta:hover { background: var(--primary-dark); }

/* 모바일 검색 줄 */
.gnb-msearch {
  display: none; align-items: center; gap: 9px;
  margin: 0 14px 10px; height: 42px; padding: 0 14px;
  background: var(--n50); border: 1px solid var(--border2); border-radius: var(--r);
  color: var(--t3);
}
.gnb-msearch:focus-within { background: #fff; border-color: var(--primary); }
.gnb-msearch svg { flex-shrink: 0; }
.gnb-msearch input { border: 0; background: none; outline: none; width: 100%; font-size: 15px; color: var(--t1); }
.gnb-msearch input::placeholder { color: var(--t3); }

/* 햄버거 */
.gnb-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 38px; height: 38px; padding: 8px; border-radius: var(--r); flex-shrink: 0;
}
.gnb-burger span { display: block; width: 100%; height: 2px; background: var(--t2); border-radius: 2px; transition: all .22s; }
.gnb-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.gnb-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.gnb-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.gnb-burger:hover { background: var(--n50); }

/* 모바일 드로어 */
.gnb-drawer { position: fixed; inset: var(--hd-h) 0 0 0; z-index: 99; background: rgba(21,32,46,.3); }
.drawer-nav {
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 16px;
  box-shadow: var(--sh2);
  max-height: calc(100vh - var(--hd-h)); overflow-y: auto;
}
.drawer-nav > a, .dw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px; border-radius: var(--r); width: 100%;
  font-size: 15.5px; font-weight: 600; color: var(--t2); text-align: left;
}
.drawer-nav > a:hover, .drawer-nav > a.act, .dw-head.open { background: var(--primary-tint); color: var(--primary-ink); }
.dw-head .caret { transition: transform .16s; }
.dw-head.open .caret { transform: rotate(180deg); }
.dw-sub { display: flex; flex-direction: column; padding: 2px 0 6px 8px; margin-left: 10px; border-left: 2px solid var(--primary-pale2); }
.dw-sub a {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; font-size: 14.5px; font-weight: 500; color: var(--t2); border-radius: var(--r);
}
.dw-sub a:hover { background: var(--n50); color: var(--primary-ink); }
.dw-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--primary); }
.dw-dot.tone { background: var(--primary-lite); }
.drawer-cta {
  margin-top: 8px; justify-content: center !important;
  background: var(--primary) !important; color: #fff !important; border-radius: var(--r);
}

/* 좌우 패딩은 .wrap(styles.css)과 같은 값으로 내려가야 로고와 본문이 한 줄에 선다 */
@media(max-width: 1024px) { .gnb-inner, .gnb-util-in { padding: 0 16px; } }
@media(max-width: 640px)  { .gnb-inner { padding: 0 14px; } }
@media(max-width: 980px) {
  .gnb-util { display: none; }
  .gnav, .gnb-search, .gnb-cta { display: none; }
  .gnb-burger { display: flex; }
  .gnb-msearch { display: flex; }
  .gnb-inner { height: 54px; }
}
@media(max-width: 360px) {
  .gnb-inner { padding: 0 10px; gap: 10px; }
  .gnb-msearch { margin: 0 10px 10px; }
  .logo { width: 142px; height: 34px; }
  .logo img { max-height: 34px; }
}

/* ── components/AppFooter.vue ── */
.foot {
  background: var(--navy);
  color: #aeb6c2;
  margin-top: 0;
}
.foot-inner { padding-top: 44px; padding-bottom: 50px; }

/* 상단 행: 로고 + 네비 + 소셜 */
.foot-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
}
.foot-brand { display: flex; align-items: center; }
.brand-mark { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand-mark b { color: #8fb0d8; }
.foot-nav { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.foot-nav a { font-size: 13.5px; color: #c6cdd7; font-weight: 500; transition: color .12s; }
.foot-nav a:hover { color: #fff; }
.ft-privacy { color: #fff !important; font-weight: 700 !important; }

/* 링크 컬럼 그리드 */
.foot-links { display: flex; gap: 52px; margin-bottom: 28px; flex-wrap: wrap; }
.fl-col h4 { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.fl-col a { display: block; font-size: 13.5px; color: rgba(255,255,255,.6); padding: 4px 0; transition: color .12s; }
.fl-col a:hover { color: #fff; }

/* 메타 */
.foot-meta { font-size: 12.5px; color: #8b94a1; line-height: 1.9; border-top: 1px solid rgba(255,255,255,.06); padding-top: 24px; }
.fm-row { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fm-row b { color: #c6cdd7; font-weight: 600; }
.foot-copy { margin-top: 12px; font-size: 12px; color: #6f7785; }
.fm-mail { color: #8b94a1; text-decoration: none; }
.fm-mail:hover { color: #fff; }

@media(max-width: 900px) {
  .foot-top { flex-direction: column; gap: 16px; }
  .foot-links { gap: 28px; }
}
@media(max-width: 560px) {
  .foot-inner { padding-top: 32px; padding-bottom: 40px; }
}

/* ── components/MobileTabBar.vue ── */
.mtab {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
  display: none; align-items: stretch;
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mtab-i {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: 56px; color: var(--t3); font-size: 11px; font-weight: 500;
  transition: color .12s;
}
.mtab-i.on { color: var(--primary-ink); font-weight: 600; }
.mtab-ic { width: 23px; height: 23px; display: grid; place-items: center; }
.mtab-ic svg { width: 100%; height: 100%; }
.mtab-tx { letter-spacing: -.02em; }
/* 활성 탭 위에 짧은 선 — 색만으로는 작은 글씨에서 구분이 약하다 */
.mtab-i.on::before { content: ''; position: absolute; top: 0; width: 26px; height: 2px; background: var(--primary); border-radius: 0 0 2px 2px; }
.mtab-i { position: relative; }

@media (max-width: 768px) { .mtab { display: flex; } }

/* ── Java 이식 추가 — hidden 속성으로 여닫는다(옛 v-show/v-if) ── */
.drop[hidden], .dw-sub[hidden], .gnb-drawer[hidden] { display: none !important; }

/* 공용 화면(ai114/page) — 봇 본문을 그대로 싣는 화면 */
.ai-generic { padding-top: 28px; }
.ai-generic .ai-h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--t1); margin: 0 0 10px; }
.ai-generic .ai-lead { color: var(--t2); line-height: 1.7; margin: 0 0 20px; }
.ai-sec { background: var(--white); border: 1px solid var(--line); border-radius: var(--r2); padding: 20px 22px; margin: 0 0 16px; }
.ai-sec .ai-h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; color: var(--t1); }
.ai-sec p { color: var(--t2); line-height: 1.75; margin: 0 0 10px; }
.ai-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ai-table th { text-align: left; width: 32%; color: var(--t2); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.ai-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); color: var(--t1); word-break: break-all; }
.ai-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.ai-list li { padding: 6px 0; font-size: 14.5px; }
.ai-list a { color: var(--primary-ink); }
.ai-list span { color: var(--t3); font-size: 13px; }
.ai-faq dt { font-weight: 700; color: var(--t1); margin: 12px 0 4px; }
.ai-faq dd { margin: 0; color: var(--t2); line-height: 1.7; }
.ai-rel ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-rel a { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 13.5px; color: var(--t2); }
.ai-rel a:hover { color: var(--primary-ink); border-color: var(--primary-pale2); }

/* 쿠팡 프로모 "광고" 네모(2026-11-05 사용자 "쿠팡 광고도 왼쪽 위에 광고 네모") — 보호 조각은 그대로 두고 바깥 CSS 로만 왼쪽 위에 붙인다. 고지 문구는 그대로 */
[data-ai-promo]::before{content:"광고";display:table;margin:0 0 10px;padding:1px 6px;border:1px solid #e1e4e9;border-radius:4px;font-size:11px;line-height:16px;font-weight:600;color:#8b95a1;text-align:left}
.m-fad>[data-ai-promo]{padding-top:0!important}   /* 피드 칸이 위 여백을 이미 낸다 — 네모가 애드센스 칸과 같은 높이에 오게 조각 안쪽 위 여백만 뺀다 */
