/* 독립 프로모션 페이지 /promo — 외부 랜딩 iframe 을 화면 전체로 띄운다 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* overflow 는 body 에만 둔다 — html 에도 걸면 body 가 따로 스크롤 영역이 되어
   높이 맞춤 모드에서 문서 스크롤·sticky 상단 바가 동작하지 않는다 */
.promo-body {
  overflow-x: hidden;
  background: #fff;
  color: #222;
  font-family: Pretendard, 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* 기본: 상단 바 + iframe 이 화면 높이를 채우고, 스크롤은 iframe 안에서 한다.
   (교차 출처 iframe 은 내부 문서 높이를 읽을 수 없어 이 방식이 가장 안정적이다) */
.promo-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.promo-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 16px;
  border-bottom: 1px solid #eee;
  background: #fff;
}

.promo-bar__home {
  display: inline-flex;
  flex: 0 0 auto;
}

.promo-bar__home img {
  display: block;
  height: 24px;
  width: auto;
}

.promo-bar__fallback {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
  text-align: right;
}

.promo-bar__fallback a {
  color: #222;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.promo-frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
}

/* 외부 랜딩이 높이를 알려주면(postMessage) iframe 을 내용 높이로 늘리고 페이지가 스크롤한다 */
.promo-shell.is-auto-height {
  height: auto;
}

.promo-shell.is-auto-height .promo-bar {
  position: sticky;
  top: 0;
  z-index: 1;
}

.promo-shell.is-auto-height .promo-frame {
  flex: none;
}

/* 모바일: 로고는 숨기고 안내 문구만 가운데에 둔다 (360px 에서도 한 줄) */
@media (max-width: 599px) {
  .promo-bar {
    justify-content: center;
    min-height: 36px;
    padding: 6px 12px;
  }

  .promo-bar__home {
    display: none;
  }

  .promo-bar__fallback {
    font-size: 12px;
    text-align: center;
  }
}
