/* Index — scoped under .idx-page */

.idx-page {
  --idx-topbar-h: 65px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: var(--bg-page);
  min-height: 100vh;
  min-width: 320px;
}

.idx-page .idx-layout {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.idx-page .idx-main-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: clamp(16px, 3vw, 30px) 0;
}

.idx-page .idx-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 0 clamp(16px, 4vw, 57px);
}

.idx-page .idx-main:has(> .idx-home) {
  align-items: center;
}

.idx-page .idx-home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: clamp(20px, 4vw, 32px);
  width: 100%;
  max-width: 1550px;
  margin-inline: auto;
}

/* Main hero slide */
.idx-page .idx-slide {
  width: 100%;
  max-width: 1550px;
}

.idx-page .idx-slide__viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-height: 100px;
  /* absolute 배너만 있을 때 높이가 무너지지 않도록 고정 비율 — 데스크톱 에셋 main-nabber-d*.png (1550×400) */
  aspect-ratio: 1550 / 400;
  border-radius: var(--radius-md);
  container-type: inline-size;
  background: var(--bg-elevated, #1a1d24);
}

/* 모바일 배너(main-nabber-m*.png 500×240) — index picture 의 (max-width: 640px) 와 맞춤 */
@media (max-width: 640px) {
  .idx-page .idx-slide__viewport {
    aspect-ratio: 500 / 240;
  }
}

.idx-page .idx-slide__track {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

/* 슬라이드 1장 = PC·모바일 img 분리 (picture+display:contents 는 모바일에서 source 무시되는 경우 있음) */
.idx-page .idx-slide__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.idx-page .idx-slide__slide.idx-slide__slide--active {
  z-index: 1;
  pointer-events: none;
}

.idx-page .idx-slide__banner-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.65s ease-in-out;
  will-change: opacity;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.idx-page .idx-slide__banner-img--mo {
  display: none;
}

@media (max-width: 640px) {
  .idx-page .idx-slide__banner-img--pc {
    display: none !important;
  }
  .idx-page .idx-slide__banner-img--mo {
    display: block;
  }
}

.idx-page .idx-slide__banner-img.idx-slide__banner-img--active {
  opacity: 1;
  z-index: 1;
}

/* 배너(프록시 URL 등) 로드 전 스피너 — idx-slide--banners-ready 시 숨김 */
.idx-page .idx-slide__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: inherit;
  transition: opacity 0.35s ease, visibility 0s linear 0s;
}
.idx-page .idx-slide__loading::after {
  content: "";
  width: clamp(36px, 8cqw, 48px);
  height: clamp(36px, 8cqw, 48px);
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent, #e8b339);
  animation: idx-slide-spin 0.75s linear infinite;
}
.idx-page .idx-slide--banners-ready .idx-slide__loading {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}
@keyframes idx-slide-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .idx-page .idx-slide__banner-img {
    transition-duration: 0.25s;
  }
  .idx-page .idx-slide__loading::after {
    animation-duration: 1.2s;
    border-top-color: var(--accent, #e8b339);
  }
}

.idx-page .idx-slide__pager {
  --idx-pager-s: calc(100cqw / 1550);
  --idx-pager-slot-w: clamp(36px, calc(var(--idx-pager-s) * 52), 52px);
  --idx-pager-slot-h: clamp(18px, calc(var(--idx-pager-s) * 24), 24px);
  position: absolute;
  top: clamp(8px, calc(var(--idx-pager-s) * 30), 30px);
  left: clamp(12px, calc(var(--idx-pager-s) * 50), 50px);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(4px, calc(var(--idx-pager-s) * 8), 8px);
  margin: 0;
  padding: 0;
  pointer-events: auto;
}

.idx-page .idx-slide__page {
  box-sizing: border-box;
  flex-shrink: 0;
  width: var(--idx-pager-slot-w);
  height: var(--idx-pager-slot-h);
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-page .idx-slide__page:not(:first-child) {
  margin-left: clamp(-8px, calc(var(--idx-pager-s) * -10), -4px);
}

.idx-page .idx-slide__page img {
  display: block;
  flex-shrink: 0;
}

.idx-page .idx-slide__page-off img {
  width: clamp(22px, calc(var(--idx-pager-s) * 32), 32px);
  height: clamp(3px, calc(var(--idx-pager-s) * 4), 4px);
}

.idx-page .idx-slide__page-on img {
  width: var(--idx-pager-slot-w);
  height: var(--idx-pager-slot-h);
}

/* Topbar */
.idx-page .idx-topbar {
  position: relative;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: var(--idx-topbar-h);
  padding: 8px clamp(16px, 3vw, 24px);
  background: var(--bg-bar);
  border-bottom: 1px solid var(--border);
}

.idx-page .idx-topbar__start {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  flex: 1;
  min-width: 0;
}

.idx-page .idx-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.idx-page .idx-brand__logo {
  display: block;
  flex-shrink: 0;
  height: 26px;
  width: auto;
  max-width: min(180px, 45vw);
}

.idx-page .idx-marquee {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 500px;
  width: min(300px, 100%);
  padding: 12px 16px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
}

.idx-page .idx-marquee__icon {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
}

.idx-page .idx-marquee__text {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  font: 600 12px/1.45 var(--font-sans);
  letter-spacing: -0.06px;
  color: var(--text);
}

.idx-page :is(.idx-topbar__actions, .idx-panel__meta) {
  display: flex;
  align-items: center;
  gap: 12px;
}

.idx-page .idx-panel__meta {
  gap: 2px;
  justify-content: flex-end;
}

.idx-page .idx-topbar__actions {
  flex-shrink: 0;
}

.idx-page .idx-topbar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: none;
  font: 600 14px/20px var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
}

.idx-page .idx-topbar__btn--ghost {
  min-width: 82px;
  background: var(--bg-panel);
  color: var(--text-body);
}

.idx-page .idx-topbar__btn--accent {
  min-width: 96px;
  background: var(--accent);
  color: var(--text);
}

.idx-page .idx-topbar__menu {
  display: none;
}

.idx-page .idx-topbar__actions--compact {
  display: none;
}

.idx-page .idx-topbar__iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.idx-page .idx-topbar__iconbtn--login {
  padding: 4px 5px;
  background: var(--bg-panel);
}

.idx-page .idx-topbar__iconbtn--join {
  padding: 0;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.idx-page .idx-topbar__iconbtn-img {
  display: block;
  flex-shrink: 0;
}

.idx-page .idx-topbar__iconbtn-img--join {
  width: 36px;
  height: 36px;
}

/* 로그인 후 헤더 — login-user 시안 */
.idx-page .idx-topbar__actions--user {
  display: none;
}

.idx-page.idx-page--logged-in .idx-topbar__actions--guest {
  display: none !important;
}

/* login-user 등 --guest 없는 예전 마크업: 로그인 후 게스트 영역 숨김 */
.idx-page.idx-page--logged-in .idx-topbar__actions.idx-topbar__actions--full:not(.idx-topbar__actions--user) {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-topbar__actions.idx-topbar__actions--compact:not(.idx-topbar__actions--user) {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-topbar__actions--user.idx-topbar__actions--full {
  display: flex;
}

.idx-page.idx-page--logged-in .idx-topbar__actions--user.idx-topbar__actions--compact {
  display: none;
}

.idx-page .idx-userbar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.idx-page .idx-userbar__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.idx-page .idx-userbar__avatar {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.idx-page .idx-userbar__name {
  font-family: "Noto Sans KR", var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.08px;
  line-height: 1.45;
  color: var(--text);
  white-space: nowrap;
}

.idx-page .idx-userbar__level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  background-color: var(--purple);
  border-radius: 4px;
}

.idx-page .idx-userbar__lv-label {
  font-family: "Noto Sans KR", var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
  white-space: nowrap;
}

.idx-page .idx-userbar__lv-num {
  font-family: "Noto Sans KR", var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  color: #eeff00;
  white-space: nowrap;
}

.idx-page .idx-userbar__logout {
  position: relative;
  width: 82px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  background-color: #303338;
  font: 600 14px/20px var(--font-sans);
  color: #d1d5dc;
  cursor: pointer;
  flex-shrink: 0;
}

.idx-page .idx-userbar__logout-img {
  display: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.idx-page .idx-userbar__logout:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.idx-page .idx-topbar__iconbtn--cart {
  position: relative;
  display: none;
  padding: 0;
  overflow: visible;
  background: var(--bg-panel);
}

.idx-page .idx-topbar__iconbtn--cart .idx-topbar__cart-ico-wrap {
  position: relative;
  display: block;
  width: 36px;
  height: 36px;
}

.idx-page .idx-topbar__iconbtn--cart .idx-topbar__cart-ico {
  position: absolute;
  inset: 0;
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: opacity 0.15s ease;
}

.idx-page .idx-topbar__iconbtn--cart .idx-topbar__cart-ico--on {
  opacity: 0;
}

.idx-page .idx-topbar__iconbtn--cart.idx-topbar__iconbtn--cart-active .idx-topbar__cart-ico--off {
  opacity: 0;
}

.idx-page .idx-topbar__iconbtn--cart.idx-topbar__iconbtn--cart-active .idx-topbar__cart-ico--on {
  opacity: 1;
}

.idx-page .idx-topbar__iconbtn--cart .idx-badge-count {
  top: -2px;
  right: -2px;
  min-width: 16px;
  width: auto;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill, 9999px);
}

.idx-page .idx-topbar__iconbtn--cart img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

body.idx-topbar-sports-cart-page .idx-page .idx-topbar__iconbtn--cart,
.idx-page:has(.board.sports_inter) .idx-topbar__iconbtn--cart,
.idx-page:has(.board.sports_dome) .idx-topbar__iconbtn--cart,
.idx-page:has(.board.sports_spec) .idx-topbar__iconbtn--cart,
.idx-page:has(.board.sports_real) .idx-topbar__iconbtn--cart,
.idx-page:has(.idx-mg-page) .idx-topbar__iconbtn--cart {
  display: inline-flex;
}

.idx-page .idx-topbar__iconbtn--user-logout {
  padding: 0;
  overflow: hidden;
  background: var(--bg-panel);
}

/* .idx-page .idx-topbar__iconbtn--user-logout picture,
.idx-page .idx-topbar__iconbtn--user-logout img {
  display: block;
  width: 36px;
  height: 36px;
} */

/* .idx-page .idx-topbar__iconbtn--user-logout img {
  object-fit: contain;
} */

.idx-page .idx-bottombar {
  display: none;
}

.idx-page .idx-find-popup {
  display: none;
}

.idx-find-backdrop {
  display: none;
}

.idx-page .idx-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 95;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(20, 21, 24, 0.52);
  cursor: pointer;
}

/* Aside shell */
.idx-page .idx-aside {
  display: flex;
  flex-direction: column;
  width: min(256px, 100%);
  flex-shrink: 0;
  padding: 10px 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

.idx-page :is(.idx-aside__in, .idx-aside__sec) {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.idx-page .idx-aside__in {
  gap: 24px;
  padding: 0 16px 28px;
  box-sizing: border-box;
}

.idx-page .idx-aside__sec {
  gap: 8px;
}

.idx-page .idx-aside__ttl {
  margin: 0;
  min-height: 16px;
  font: 600 12px/16px var(--font-sans);
  color: var(--text-muted);
}

.idx-page .idx-aside__ban {
  display: block;
  width: 100%;
  height: auto;
}

.idx-page #idx-aside-banner-mount,
.idx-page .idx-aside-banner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.idx-page .idx-aside-banner-list .banner_right1 {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  line-height: 0;
  text-decoration: none;
  cursor: pointer;
}

.idx-page .idx-aside-banner-list .banner_right1 .idx-aside__ban {
  border-radius: var(--radius-sm, 10px);
}

.idx-page .idx-wallet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 4px;
  height: 35px;
  padding: 0 20px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.idx-page .idx-wallet__item {
  flex-shrink: 0;
}

.idx-page :is(.idx-wallet__item, .idx-panel__line) {
  display: flex;
  align-items: center;
  gap: 6px;
}

.idx-page .idx-wallet__label {
  font: 500 12px/1.45 var(--font-sans);
  letter-spacing: -0.06px;
  color: var(--text-body);
  white-space: nowrap;
}

.idx-page .idx-menu__sub {
  font: 500 12px/20px var(--font-sans);
  color: var(--text-body);
}

.idx-page .idx-wallet__icon {
  flex-shrink: 0;
  width: 19px;
  height: 15px;
}

.idx-page .idx-wallet__icon--narrow {
  width: 12px;
}

.idx-page :is(.idx-wallet__item, .idx-nav__row, .idx-menu__row, .idx-aside__ban, .idx-panel__line) {
  cursor: pointer;
}

/* General nav + aside game menu list */
.idx-page :is(.idx-nav, .idx-menu) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.idx-page .idx-nav__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  width: 100%;
  padding-left: 8px;
  border-radius: var(--radius-sm);
}

.idx-page :is(.idx-nav__ico, .idx-menu__ico) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.idx-page .idx-nav__ico {
  width: 20px;
  height: 20px;
}

.idx-page .idx-menu__ico {
  width: 25px;
  height: 25px;
}

.idx-page :is(.idx-nav__ico img, .idx-nav__img, .idx-menu__ico img) {
  display: block;
  max-width: 100%;
  height: auto;
}

.idx-page .idx-nav__stroke {
  position: absolute;
  width: 83.33%;
  height: 91.66%;
  top: 8.34%;
  left: 16.67%;
}

.idx-page .idx-nav__glyph--event {
  position: absolute;
  width: 91.67%;
  height: 91.67%;
  top: 8.33%;
  left: 8.33%;
}

.idx-page .idx-nav__glyph--support {
  position: absolute;
  width: 91.67%;
  height: 95.84%;
  top: 4.16%;
  left: 8.33%;
}

.idx-page .idx-nav__row > .idx-nav__img--inline {
  flex-shrink: 0;
  width: 20px;
  height: 18px;
  object-fit: contain;
}

.idx-page .idx-nav__img--tile {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.idx-page .idx-nav__text {
  flex: 1;
  min-width: 0;
  font: 500 14px/20px var(--font-sans);
  color: var(--text-body);
  white-space: nowrap;
}

.idx-page .idx-nav__count {
  font: 600 14px/1.35 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #eeff00;
}

.idx-page .idx-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 223px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.idx-page .idx-menu__row--active {
  background-color: #303338;
}

.idx-page .idx-menu__row--active .idx-menu__ttl {
  color: #fff;
}

.idx-page .idx-menu__row--active .idx-menu__sub {
  color: rgba(255, 255, 255, 0.88);
}

.idx-page .idx-menu__row:focus-visible {
  outline: 2px solid #fa52ff;
  outline-offset: 2px;
}

.idx-page .idx-menu__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.idx-page .idx-menu__ico--ball img {
  position: absolute;
  width: 96%;
  height: 90.94%;
  top: 9.06%;
  left: 4%;
}

.idx-page .idx-menu__ico--trophy img {
  width: 16px;
  height: 23px;
}

.idx-page .idx-menu__slot {
  flex-shrink: 0;
  width: 25px;
  display: block;
}

.idx-page .idx-menu__ttl {
  margin: 0;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 20px;
  font: 500 16px/20px var(--font-sans);
  color: var(--text-body);
  white-space: nowrap;
}

.idx-page .idx-menu__caret {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.idx-page .idx-menu__caret img {
  position: absolute;
  width: 66.67%;
  height: 79.16%;
  top: 20.84%;
  left: 33.33%;
}

/* Board */
.idx-page .idx-board {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 4px 0;
}

.idx-page :is(.idx-panel, .idx-cat) {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.idx-page .idx-panel {
  flex: 1 1 280px;
  min-width: min(100%, 260px);
  padding: 5px 0;
  background: var(--bg-sidebar);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.idx-page .idx-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 3px 20px;
  border-bottom: 1px solid var(--bg-page);
}

.idx-page .idx-panel__ttl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  font: 700 14px/1.45 var(--font-sans);
  letter-spacing: -0.07px;
  color: var(--text-body);
  white-space: nowrap;
}

.idx-page .idx-panel__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  font: 700 14px/20px var(--font-sans);
  letter-spacing: -0.07px;
  color: var(--text-body);
  white-space: nowrap;
  cursor: pointer;
}

.idx-page .idx-panel__more img {
  display: block;
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  object-fit: contain;
  align-self: center;
}

.idx-page .idx-panel__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 10px 20px;
}

.idx-page .idx-panel__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 2px;
}

.idx-page .idx-panel__txt {
  margin: 0;
  font: 400 12px/1.45 var(--font-kr);
  letter-spacing: -0.06px;
  color: var(--text-body);
  white-space: nowrap;
}

/* Main category */
.idx-page .idx-feed {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vw, 48px);
  width: 100%;
  max-width: 1550px;
  padding-bottom: clamp(28px, 5vw, 48px);
  box-sizing: border-box;
}

.idx-page .idx-cat {
  gap: 16px;
}

.idx-page .idx-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  width: 100%;
}

.idx-page .idx-cat__lead {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  flex: 1;
  min-width: 0;
}

.idx-page .idx-cat__icon {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.idx-page .idx-cat__icon > img {
  position: absolute;
}

.idx-page .idx-cat__svg--c1 {
  width: 95.83%;
  height: 95.83%;
  top: 4.17%;
  left: 4.17%;
}

.idx-page .idx-cat__name {
  margin: 0;
  font: 700 20px/28px var(--font-sans);
  color: var(--text);
}

.idx-page .idx-cat__btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 15px;
  background: var(--bg-chip);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.idx-page .idx-cat__btn-txt {
  font: 500 14px/20px var(--font-sans);
  color: var(--text-soft);
  white-space: nowrap;
}

.idx-page .idx-cat__btn-ico {
  display: flex;
  align-items: center;
  justify-content: center;
}

.idx-page .idx-cat__btn-ico img {
  width: 6px;
  height: 9px;
}

.idx-page .idx-cat__tiles {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.idx-page .idx-cat__tiles .idx-tile {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  align-self: flex-start;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
}

/* PC(>640px): 5열 기준 크기 유지, 3개 등 적을 때 왼쪽 정렬(늘리지 않음) */
@media (min-width: 641px) {
  .idx-page .idx-cat__tiles {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
  }

  .idx-page .idx-cat__tiles .idx-tile {
    flex: none;
    width: auto;
  }
}

.idx-page .idx-cat__tiles .idx-tile picture {
  display: block;
  width: 100%;
}

.idx-page .idx-cat__tiles .idx-tile img {
  width: 100%;
  height: auto;
  display: block;
}

/* Footer */
.idx-page .idx-ft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 50px);
  background: var(--bg-bar);
  border-top: 1px solid var(--border);
}

.idx-page .idx-ft__brand {
  display: flex;
  align-items: flex-end;
}

.idx-page .idx-ft__brand > span {
  font: 700 20px/1 var(--font-sans);
  letter-spacing: -0.8px;
  white-space: nowrap;
}

.idx-page .idx-ft__nex {
  color: var(--purple);
  line-height: 20px;
}

.idx-page .idx-ft__rest {
  color: var(--text);
  line-height: 16.3px;
}

.idx-page .idx-ft__legal {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: min(794px, 100%);
  flex: 1;
  min-width: 0;
}

.idx-page .idx-ft__txt {
  margin: 0;
  align-self: stretch;
  font: 400 12px/16px var(--font-sans);
  color: var(--text-muted);
  text-align: right;
}

.idx-page .idx-ft__hi {
  font-weight: 500;
  color: var(--purple);
}

@media (max-width: 1024px) {
  .idx-page .idx-marquee {
    display: none !important;
  }

  .idx-page.idx-page--logged-in .idx-userbar__logout {
    width: 44px;
    min-width: 44px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .idx-page.idx-page--logged-in .idx-userbar__logout-img {
    display: block;
  }

  .idx-page.idx-page--logged-in .idx-userbar__logout-txt {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* 로그인: 태블릿·모바일 — 우측 상단 모바일과 동일(카트 + 로그아웃 아이콘) */
  .idx-page.idx-page--logged-in .idx-topbar__actions--user.idx-topbar__actions--full {
    display: none !important;
  }

  .idx-page.idx-page--logged-in .idx-topbar__actions--user.idx-topbar__actions--compact {
    display: flex !important;
  }

  .idx-page .idx-menu__row {
    max-width: none;
  }

  /* 스크롤 시 상단 메뉴 고정 — ≤1024: 로고(.idx-brand) 뷰포트 수평 중앙 */
  .idx-page .idx-topbar {
    position: sticky;
    top: 0;
    align-self: stretch;
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 0 clamp(16px, 4vw, 24px);
    min-height: var(--idx-topbar-h);
  }

  /* 좌측 슬라이드 패널 (태블릿·모바일) — 데스크톱에서는 사이드바 고정 노출 */
  .idx-page.idx-drawer-open .idx-drawer-backdrop {
    display: block;
    inset: auto;
    top: calc(var(--idx-topbar-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100dvh - var(--idx-topbar-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .idx-page .idx-topbar__menu {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .idx-page .idx-topbar__menu img {
    display: block;
  }

  .idx-page .idx-topbar__start {
    grid-column: 2;
    justify-self: center;
    flex: unset;
    justify-content: center;
    min-width: 0;
  }

  .idx-page .idx-brand {
    justify-content: center;
  }

  .idx-page .idx-topbar__actions--guest.idx-topbar__actions--full,
  .idx-page .idx-topbar__actions--guest.idx-topbar__actions--compact,
  .idx-page .idx-topbar__actions--user.idx-topbar__actions--full,
  .idx-page .idx-topbar__actions--user.idx-topbar__actions--compact {
    grid-column: 3;
    justify-self: end;
  }

  .idx-page .idx-aside {
    position: fixed;
    top: calc(var(--idx-topbar-h) + env(safe-area-inset-top, 0px));
    left: 0;
    bottom: auto;
    width: 256px;
    max-width: min(256px, 100vw);
    height: calc(100dvh - var(--idx-topbar-h) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    z-index: 100;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 10px 0 28px rgba(0, 0, 0, 0.38);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 28px);
  }

  .idx-page.idx-drawer-open .idx-aside {
    transform: translateX(0);
  }

  /* 하단 메뉴 + 검색 (태블릿·모바일) */
  .idx-page {
    --idx-find-float-r: clamp(26px, 8.5vw, 36px);
    --idx-find-popup-gap: 10px;
    --idx-find-popup-h: 72px;
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px) + var(--idx-find-float-r));
  }

  .idx-page.idx-find-open {
    padding-bottom: calc(
      70px + env(safe-area-inset-bottom, 0px) + var(--idx-find-float-r) + var(--idx-find-popup-gap) +
        var(--idx-find-popup-h)
    );
  }

  /* body 직속: 뷰포트 전체 덮음 (상단바·하단바는 더 높은 z-index로 위에 그려짐) */
  .idx-find-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    z-index: 38;
    margin: 0;
    padding: 0;
    border: none;
    background-color: #000000b2;
    backdrop-filter: blur(5px) brightness(100%);
    -webkit-backdrop-filter: blur(5px) brightness(100%);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0.28s;
  }

  body.idx-find-backdrop-on .idx-find-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0s;
  }

  /* 찾기 팝업: 기본 숨김(디졸브), 열릴 때만 보임 */
  .idx-page .idx-find-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 422px;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 15px 20px;
    position: fixed;
    left: 50%;
    bottom: calc(
      env(safe-area-inset-bottom, 0px) + 70px + var(--idx-find-float-r) + var(--idx-find-popup-gap)
    );
    transform: translate(-50%, 8px);
    z-index: 39;
    background-color: #212328;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0.28s,
      transform 0.28s ease;
  }

  .idx-page.idx-find-open .idx-find-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition:
      opacity 0.28s ease,
      visibility 0s linear 0s,
      transform 0.28s ease;
  }

  @media (prefers-reduced-motion: reduce) {
    .idx-find-backdrop,
    .idx-page .idx-find-popup {
      transition-duration: 0.01ms;
    }
  }

  .idx-page .idx-find-popup__search {
    display: flex;
    height: 40px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
    align-self: stretch;
    width: 100%;
    box-sizing: border-box;
    background-color: #2f2f30;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #3f3f40;
  }

  .idx-page .idx-find-popup__query {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
    height: 40px;
    margin-top: -10px;
    margin-bottom: -10px;
    padding: 0 20px;
    box-sizing: border-box;
    border: none;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    cursor: text;
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    -webkit-appearance: none;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: var(--text-body);
  }

  .idx-page .idx-find-popup__query::placeholder {
    color: #9e9e9e;
    opacity: 1;
  }

  .idx-page .idx-find-popup__query::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }

  .idx-page .idx-find-popup__action {
    width: 39px;
    justify-content: center;
    display: flex;
    height: 40px;
    align-items: center;
    position: relative;
    flex-shrink: 0;
    margin-top: -10px;
    margin-bottom: -10px;
    border-radius: 10px;
    overflow: hidden;
  }

  .idx-page .idx-find-popup__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .idx-page .idx-find-popup__submit img {
    display: block;
  }

  .idx-page .idx-find-popup__query:focus,
  .idx-page .idx-find-popup__query:focus-visible {
    outline: none;
  }

  .idx-page .idx-find-popup__submit:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
  }

  .idx-page .idx-bottombar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 0;
    background: transparent;
    pointer-events: none;
    line-height: 0;
  }

  .idx-page .idx-bottombar__shell {
    pointer-events: auto;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: transparent;
  }

  .idx-page .idx-bottombar__plate {
    position: relative;
    width: 100%;
    height: 70px;
    overflow: visible;
  }

  /* 하단 바: 이미지 없이 CSS만 */
  .idx-page .idx-bottombar__bg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    pointer-events: none;
    background: rgba(26, 28, 32, 0.95);
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.42);
    z-index: 0;
  }

  /* 플레이트 높이 70px 고정 */
  .idx-page .idx-bottombar__track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    z-index: 1;
    background: transparent;
  }

  /* 5등분: 1·2 버튼 — 3 가운데 빈칸 — 4·5 버튼 (플로팅 검색은 트랙 밖) */
  .idx-page .idx-bottombar__gap {
    flex: 1 1 0;
    min-width: 0;
    height: 70px;
    pointer-events: none;
  }

  .idx-page .idx-bottombar__btn--edge {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    height: 70px;
    min-height: 70px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .idx-page .idx-bottombar__ico {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
  }

  .idx-page .idx-bottombar__ico-img {
    display: block;
    width: 22px;
    height: 22px;
  }

  .idx-page .idx-bottombar__ico-img--float {
    width: clamp(22px, 42%, 28px);
    height: clamp(22px, 42%, 28px);
  }

  .idx-page .idx-bottombar__btn--edge:hover .idx-bottombar__ico-img,
  .idx-page .idx-bottombar__btn--edge:active .idx-bottombar__ico-img {
    filter: brightness(1.18);
  }

  /* 트랙에서 선택된 탭: 아이콘 퍼플 (--purple / #fa52ff 근사) */
  .idx-page .idx-bottombar__btn--edge.idx-bottombar__btn--active .idx-bottombar__ico-img {
    filter: brightness(0) saturate(100%) invert(48%) sepia(84%) saturate(4082%) hue-rotate(270deg) brightness(102%)
      contrast(98%);
  }

  .idx-page .idx-bottombar__btn--edge.idx-bottombar__btn--active:hover .idx-bottombar__ico-img,
  .idx-page .idx-bottombar__btn--edge.idx-bottombar__btn--active:active .idx-bottombar__ico-img {
    filter: brightness(0) saturate(100%) invert(52%) sepia(84%) saturate(4082%) hue-rotate(270deg) brightness(108%)
      contrast(98%);
  }

  /* 중앙 검색 — 레이아웃 미점유, 바 상단에 겹침 */
  .idx-page .idx-bottombar__btn--float {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(52px, 17vw, 72px);
    height: clamp(52px, 17vw, 72px);
    padding: 0;
    border: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-bar);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* 플로팅 아이콘: SVG fill #99A1AF — 어두운 원 배경용 */
  .idx-page .idx-bottombar__btn--float:hover .idx-bottombar__ico-img--float,
  .idx-page .idx-bottombar__btn--float:active .idx-bottombar__ico-img--float {
    filter: brightness(1.15);
  }

  .idx-page.idx-find-open .idx-bottombar__btn--float {
    background: #fa52ff;
    box-shadow: 0 4px 22px rgba(250, 82, 255, 0.42);
  }

  /* 마젠타 배경 위에서는 회색 아이콘 대비 확보 */
  .idx-page.idx-find-open .idx-bottombar__ico-img--float {
    filter: brightness(0) invert(1);
  }

  .idx-page.idx-find-open .idx-bottombar__btn--float:hover .idx-bottombar__ico-img--float,
  .idx-page.idx-find-open .idx-bottombar__btn--float:active .idx-bottombar__ico-img--float {
    filter: brightness(0) invert(1) brightness(1.08);
  }

  .idx-page .idx-bottombar__btn:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: 2px;
  }

  .idx-page .idx-bottombar__btn--edge:focus-visible {
    outline-offset: -2px;
  }

  /* 태블릿·모바일: 하단 푸터(법무·저작권 블록) 숨김 */
  .idx-page .idx-ft {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .idx-page .idx-topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 0 clamp(16px, 4vw, 24px);
    min-height: var(--idx-topbar-h);
  }

  .idx-page .idx-topbar__menu {
    grid-column: 1;
    justify-self: start;
  }

  .idx-page .idx-topbar__start {
    grid-column: 2;
    justify-self: center;
    flex: unset;
    justify-content: center;
    min-width: 0;
  }

  .idx-page .idx-marquee {
    display: none;
  }

  .idx-page .idx-brand {
    justify-content: center;
  }

  .idx-page .idx-topbar__actions--guest.idx-topbar__actions--full {
    display: none !important;
  }

  .idx-page .idx-topbar__actions--guest.idx-topbar__actions--compact {
    display: flex !important;
    grid-column: 3;
    justify-self: end;
    gap: 12px;
  }

  .idx-page.idx-page--logged-in .idx-topbar__actions--user.idx-topbar__actions--compact {
    grid-column: 3;
    justify-self: end;
    gap: 12px;
  }

  .idx-page .idx-cat__tiles {
    flex-direction: column;
  }

  .idx-page .idx-wallet {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    height: 35px;
    padding: 0 12px;
    gap: 4px;
  }
  .idx-page .idx-cat__tiles .idx-tile {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    height: auto;
  }
}
