/*
 * 신한 The ACE Elite 안내 페이지 — 공용 레이아웃(헤더·모바일 메뉴·푸터·가맹점 팝업).
 * 값은 tokens.css 변수만 쓴다. 브레이크포인트: 1024px 이하 = MO(태블릿 포함).
 *
 * reset.css 가 `body, *` 에 font-size:16px · color:#222 를 걸기 때문에 요소마다 크기·색을 명시한다.
 * 헤더는 position:fixed 로 히어로 위에 겹친다(시안 header y=0, mainvisual y=0).
 */

/* ------------------------------------------------------------------ 공통 */
.sh-page,
.sh-page * {
  font-family: var(--sh-font);
  letter-spacing: var(--sh-tracking);
}

.sh-page a {
  color: inherit;
  text-decoration: none;
}

.sh-page button {
  background: none;
  font: inherit;
}

.sh-page img {
  display: block;
  max-width: 100%;
}

.sh-page [id] {
  scroll-margin-top: var(--sh-header-height);
}

.sh-page :focus-visible {
  outline: 2px solid var(--sh-color-gold);
  outline-offset: 2px;
}

html.is-scroll-locked,
html.is-scroll-locked body {
  overflow: hidden;
}

/* ------------------------------------------------------------------ 헤더 (128:1287 / MO 128:1122) */
.sh-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--sh-z-header);
  background: var(--sh-color-header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sh-header-height);
  padding: 0 var(--sh-header-padding);
}

.sh-header__logo img {
  width: 175px;
  height: 18px;
}

.sh-gnb {
  display: flex;
  align-items: center;
  height: 100%;
}

.sh-gnb__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  color: var(--sh-color-text);
  transition: color var(--sh-duration);
}

.sh-gnb__link:hover,
.sh-gnb__link.is-active {
  color: var(--sh-color-gold);
}

.sh-gnb__link.is-active {
  font-weight: 600;
}

.sh-header__menu {
  display: none;
  width: 26px;
  height: 26px;
  padding: 0;
}

/* ------------------------------------------------------------------ 모바일 메뉴 (128:881) */
.sh-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--sh-z-menu);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  background: var(--sh-color-gnb-bg);
}

.sh-mobile-menu[hidden] {
  display: none;
}

.sh-mobile-menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
}

.sh-mobile-menu__title {
  font-size: 18px;
  line-height: 1.4;
  color: var(--sh-color-gnb-title);
}

.sh-mobile-menu__close {
  width: 28px;
  height: 28px;
  padding: 0;
}

.sh-mobile-menu__nav {
  display: flex;
  flex-direction: column;
  padding-left: 20px;
}

.sh-mobile-menu__link {
  display: flex;
  align-items: center;
  height: 80px;
  padding: 0 10px;
  border-bottom: 1px solid var(--sh-color-gnb-line);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sh-color-white);
}

.sh-page .sh-mobile-menu__link {
  color: var(--sh-color-white);
}

.sh-page .sh-mobile-menu__link.is-active {
  color: var(--sh-color-gold);
}

/* ------------------------------------------------------------------ 푸터 (128:1267 / MO 128:1121) */
.sh-footer {
  position: relative;
  padding: 40px var(--sh-gutter) 80px;
  background: var(--sh-color-footer-bg);
}

.sh-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: var(--sh-container);
  margin: 0 auto;
}

.sh-footer__logo {
  width: 175px;
  height: 18px;
}

.sh-footer__company {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sh-footer__name {
  font-size: 14px;
  font-weight: 600;
  color: var(--sh-color-white);
}

.sh-footer__info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.sh-footer__info-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.sh-footer__label,
.sh-footer__value,
.sh-page .sh-footer__value {
  font-size: 14px;
  color: var(--sh-color-footer-text);
}

.sh-footer__label {
  font-weight: 600;
}

.sh-footer__label::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 10px;
  margin-left: 4px;
  background: var(--sh-color-footer-divider);
  vertical-align: -1px;
}

.sh-footer__copyright {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--sh-color-footer-copy);
}

/* 시안: 1920 기준 컨테이너(1280) 오른쪽 바깥 20px. 좁아지면 거터 안쪽으로 붙는다. */
.sh-footer__top {
  position: absolute;
  top: 40px;
  right: max(var(--sh-gutter), calc((100% - var(--sh-container)) / 2 - 60px));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 6px;
  background: var(--sh-color-top-btn);
  filter: drop-shadow(4px 4px 10px rgba(0, 0, 0, 0.1));
}

.sh-page .sh-footer__top {
  background: var(--sh-color-top-btn);
}

.sh-footer__top img {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------------ 가맹점 팝업 (128:793 / MO 128:700) */
.partner-modal {
  position: fixed;
  inset: 0;
  z-index: var(--sh-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-modal[hidden] {
  display: none;
}

.partner-modal__backdrop {
  position: absolute;
  inset: 0;
  background: var(--sh-color-backdrop);
}

/* 다이얼로그 자체가 스크롤 컨테이너다. 헤더(호텔명+탭)는 sticky, 닫기 버튼은 본문 끝에 있다(시안 그대로). */
.partner-modal__dialog {
  position: relative;
  width: var(--sh-popup-width);
  max-width: calc(100% - 40px);
  max-height: calc(100% - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--sh-color-white);
}

.partner-modal__dialog:focus {
  outline: none;
}

.partner-modal__header {
  position: sticky;
  top: 0;
  z-index: 1;
}

.partner-modal__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--sh-color-popup-top);
}

.partner-modal__title {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 500;
  color: var(--sh-color-white);
}

.partner-modal__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
}

.partner-modal__tabs {
  display: flex;
  padding-left: 20px;
  background: var(--sh-color-white);
}

.partner-modal__tab {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 14px;
  border-bottom: 2px solid transparent;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  color: var(--sh-color-text-muted);
}

.partner-modal__tab:first-child {
  padding: 0 10px;
}

.sh-page .partner-modal__tab {
  color: var(--sh-color-text-muted);
}

.sh-page .partner-modal__tab.is-active {
  border-bottom-color: var(--sh-color-text);
  font-weight: 600;
  color: var(--sh-color-text);
}

.partner-modal__footer {
  padding: 30px 20px 60px;
}

.partner-modal__btn-close {
  width: 100%;
  height: 50px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--sh-color-white);
}

.sh-page .partner-modal__btn-close {
  background: var(--sh-color-gold);
  color: var(--sh-color-white);
}

/* ---------- 팝업 본문 (가맹점별 <template> 이 복제되어 들어온다. 계약은 layout.html partnerModal 주석) */
.partner-detail__img {
  width: 100%;
  aspect-ratio: 305 / 207;
  object-fit: cover;
}

.partner-detail__heading {
  display: flex;
  align-items: center;
  height: 49px;
  padding: 0 20px;
  background: var(--sh-color-surface);
  font-size: 21px;
  font-weight: 600;
  color: var(--sh-color-text);
}

.partner-detail__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 20px 86px;
}

.partner-detail__venue {
  font-size: 24px;
  font-weight: 600;
  color: var(--sh-color-text);
}

.partner-detail__desc {
  margin-top: -12px; /* 업장명과 소개 사이 8px (본문 gap 20px 보정) */
  font-size: 16px;
  line-height: 1.4;
  color: var(--sh-color-text-sub);
}

.partner-detail__contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.partner-detail__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding-left: 20px;
  background: no-repeat left 3px / 14px 14px;
}

.partner-detail__contact,
.partner-detail__contact > span,
.partner-detail__contact > a {
  font-size: 16px;
  color: var(--sh-color-text-sub);
  word-break: break-all;
}

.partner-detail__contact--url {
  background-image: url('/images/shinhan/common/ic-url.svg');
}

.partner-detail__contact--address {
  background-image: url('/images/shinhan/common/ic-address.svg');
}

.partner-detail__contact--tel {
  background-image: url('/images/shinhan/common/ic-tel.svg');
}

.sh-page .partner-detail__map {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 4px 4px 6px;
  border-radius: 2px;
  background: var(--sh-color-surface-soft);
  font-size: 12px;
  color: var(--sh-color-text-sub);
  white-space: nowrap;
}

.partner-detail__map::after {
  content: '';
  width: 14px;
  height: 14px;
  background: url('/images/shinhan/common/ic-map-arrow.svg') no-repeat center / 14px 14px;
}

.partner-detail__call {
  display: none;
}

.partner-detail__notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 20px 60px;
  list-style: none;
}

.partner-detail__notes li {
  position: relative;
  padding-left: 6px;
  font-size: 16px;
  line-height: 24px;
  color: var(--sh-color-text-sub);
}

.partner-detail__notes li::before {
  content: '';
  position: absolute;
  top: 11px;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--sh-color-text-sub);
}

/* ------------------------------------------------------------------ MO (≤1024px, 태블릿 포함) */
@media (max-width: 1024px) {
  .sh-header__logo img {
    width: 131px;
    height: 14px;
  }

  .sh-gnb {
    display: none;
  }

  .sh-header__menu {
    display: block;
  }

  .sh-footer {
    padding: 30px var(--sh-gutter) 50px;
  }

  .sh-footer__logo {
    width: 117px;
    height: 12px;
  }

  .sh-footer__name {
    font-size: 12px;
    font-weight: 400;
    color: var(--sh-color-footer-text);
  }

  .sh-footer__info {
    flex-direction: column;
    gap: 8px;
  }

  .sh-footer__label,
  .sh-footer__value,
  .sh-page .sh-footer__value,
  .sh-footer__info-item {
    font-size: 12px;
  }

  .sh-footer__label::after {
    height: 8px;
  }

  .sh-footer__top {
    top: 30px;
    right: 22px;
    width: 30px;
    height: 30px;
  }

  /* 팝업은 전체 화면 */
  .partner-modal__dialog {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
  }

  .partner-modal__title {
    font-size: 16px;
  }

  .partner-modal__tabs {
    height: 40px;
    border-bottom: 1px solid var(--sh-color-line);
  }

  .partner-modal__tab {
    height: 40px;
    border-bottom-width: 1px;
    font-size: 14px;
  }

  /* `.sh-page button { font: inherit }`(0,1,1)가 위 규칙(0,1,0)을 이겨 탭이 16px 로 렌더됐다 */
  .sh-page .partner-modal__tab {
    font-size: 14px;
  }

  .partner-modal__footer {
    padding: 30px 20px 60px;
  }

  .partner-modal__btn-close {
    height: 42px;
    border-radius: 4px;
    font-size: 16px;
  }

  .partner-detail__heading {
    height: 43px;
    font-size: 16px;
  }

  .partner-detail__body {
    padding: 20px 20px 30px;
  }

  .partner-detail__venue {
    font-size: 18px;
  }

  .partner-detail__desc,
  .partner-detail__contact,
  .partner-detail__contact > span,
  .partner-detail__contact > a {
    font-size: 14px;
  }

  .partner-detail__contact {
    background-position: left 2px;
  }

  .sh-page .partner-detail__call {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid var(--sh-color-line-strong);
    border-radius: 4px;
    background: var(--sh-color-white);
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-color-text-sub);
  }

  .partner-detail__notes {
    gap: 0;
    padding: 20px 20px 0;
  }

  /* 시안 MO 128:700 — 유의사항 14px / line-height 24px */
  .partner-detail__notes li {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-page * {
    transition: none !important;
  }
}
