/* 스포츠 국내 페이지 — 원본 .board (board-list | board-detail | user-board) 레이아웃 */

.idx-sp-page .idx-visually-hidden {
  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-main-wrap-full {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 10px clamp(16px, 4vw, 57px) clamp(16px, 3vw, 30px);
  box-sizing: border-box;
}

/* 스포츠: 메인 랩 10px 패딩·가로 꽉, 3열 최소 너비 합 대비 래퍼 폭 제한 */
.idx-page .idx-main-wrap-full:has(> .idx-main-full.idx-sp-page) {
  max-width: 100%;
  padding: 10px 10px 28px;
  box-sizing: border-box;
}

.idx-page .idx-main-full.idx-sp-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* 리스트·상세는 남은 가로를 1:1, 우측 유저보드는 고정폭으로 분리 */
.idx-sp-page .idx-sp-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  box-sizing: border-box;
  overflow-x: visible;
}

/* 데스크톱: 종목탭 + 리스트를 한 열로 묶음 */
.idx-sp-page .idx-sp-board-list-stack {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  gap: 5px;
}

.idx-sp-page .idx-sp-board-list {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  align-items: stretch;
  gap: 12px;
  padding-bottom: 28px;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-m-tabs::-webkit-scrollbar {
  display: none;
}

/* 상단 스포츠 탭 — 사이드 GAME 메뉴(idx-menu__row)과 동일 톤 */
.idx-sp-page .idx-sp-m-tabs__btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: none;
  background-color: #272a31;
  color: var(--text-body, #d1d5dc);
  cursor: pointer;
  border-radius: var(--radius-sm, 10px);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.idx-sp-page .idx-sp-m-tabs__btn--active {
  background-color: #3b3f46;
  color: #fff;
}

.idx-sp-page .idx-sp-m-tabs__btn--active .idx-sp-m-tabs__ttl {
  color: #fff;
}

.idx-sp-page .idx-sp-m-tabs__btn--active .idx-sp-m-tabs__sub {
  color: rgba(255, 255, 255, 0.88);
}

.idx-sp-page .idx-sp-m-tabs__main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 0 4px;
}

.idx-sp-page .idx-sp-m-tabs__ttl {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-width: 0;
  margin: 0;
  font: 500 14px/1.25 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: var(--text-body, #d1d5dc);
  white-space: nowrap;
}

.idx-sp-page .idx-sp-m-tabs__sub {
  font: 500 12px/1.25 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: var(--text-body, #d1d5dc);
}

@media (min-width: 1025px) {
  /*
   * 사이드(idx-aside)만 문서 흐름 → 높이는 메뉴·배너 콘텐츠 기준(스크롤 없음).
   * 본문(idx-main-wrap-full)은 absolute로 같은 top~bottom에 맞춰 내부만 스크롤.
   * (flex stretch 시 본문 리스트 높이가 사이드까지 늘어나는 문제 방지)
   */
  .idx-page:has(.idx-main-full.idx-sp-page) > .idx-layout {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex: 1 1 auto;
  }

  .idx-page:has(.idx-main-full.idx-sp-page) > .idx-layout > .idx-aside {
    flex: 0 0 auto;
    width: min(256px, 100%);
    overflow: visible;
  }

  .idx-page .idx-main-wrap-full:has(> .idx-main-full.idx-sp-page) {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: min(256px, 100%);
    flex: none;
    width: auto;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px 10px 28px;
  }

  .idx-page .idx-main-full.idx-sp-page {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .idx-sp-page .idx-sp-m-tabs {
    display: none !important;
  }

  .idx-sp-page .idx-sp-body {
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  /* 가로 3열(목록 | 상세 | 슬립) 순서 고정 — 갱신·플렉스 계산 시 상세가 아래 열로 붙는 현상 방지 */
  .idx-sp-page .idx-sp-body > .idx-sp-board-list-stack {
    order: 1;
    flex: 1 1 0;
    min-height: 0;
    align-self: stretch;
    overflow: hidden;
  }

  .idx-sp-page .idx-sp-body > .idx-sp-board-detail {
    order: 2;
    flex: 1 1 0;
    min-height: 0;
    align-self: stretch;
  }

  .idx-sp-page .idx-sp-body > .idx-user-board {
    order: 3;
  }

  .idx-sp-page .idx-sp-board-detail {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  }

  .idx-sp-page .idx-sp-board-detail::-webkit-scrollbar {
    width: 6px;
  }

  .idx-sp-page .idx-sp-board-detail::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
  }

  .idx-sp-page .idx-sp-board-detail > .idx-sp-live,
  .idx-sp-page .idx-sp-board-detail > .idx-sp-board-detail__markets {
    flex-shrink: 0;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs {
    flex: none;
    overflow: visible;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs__panels {
    flex: none;
    min-height: auto;
    overflow: visible;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs__panel {
    flex: none;
    min-height: auto;
  }

  /* 좌측: 종목탭 고정 + 목록만 세로 스크롤 (카드·행 높이는 그대로) */
  .idx-sp-page .idx-sp-catbar {
    flex-shrink: 0;
  }

  .idx-sp-page .idx-sp-board-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
    padding-bottom: 28px;
    box-sizing: border-box;
  }

  /* 실시간: 종목·필터는 고정, 경기 목록만 내부 스크롤 */
  .idx-sp-page .idx-sp-board-list:has(#idx-sl-live-root) {
    overflow-y: hidden;
  }

  .idx-sp-page .idx-sp-board-list > .idx-sp-gl,
  .idx-sp-page .idx-sp-board-list > .idx-sp-bonus,
  .idx-sp-page .idx-sp-board-list > .idx-sp-board-filter,
  .idx-sp-page .idx-sp-board-list > .idx-sd-match,
  .idx-sp-page .idx-sp-board-list > .idx-sp-board-lazy-sentinel {
    flex-shrink: 0;
  }

  /* 실시간: 목록 루트가 남은 높이를 채운 뒤 내부(.idx-sl-live__cols)만 스크롤 */
  .idx-sp-page .idx-sp-board-list > .idx-sl-live {
    flex: 1 1 auto;
    min-height: 0;
  }

  .idx-sp-page .idx-sp-board-list::-webkit-scrollbar {
    width: 6px;
  }

  .idx-sp-page .idx-sp-board-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
  }

  .idx-sp-page .idx-sp-cat__label {
    display: block;
    align-self: stretch;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 1024px) {
  /* 태블릿·모바일: 상단 탭 → 종목 아이콘 → 상세(idx-sp-board-detail) → 리스트 */
  .idx-sp-page .idx-sp-body {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .idx-sp-page .idx-sp-board-list-stack {
    display: contents;
  }

  .idx-sp-page .idx-sp-catbar {
    order: 2;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .idx-sp-page .idx-sp-cat {
    flex: 0 0 auto;
    min-width: 52px;
    gap: 0;
    padding: 6px 4px;
  }

  .idx-sp-page .idx-sp-cat__label {
    display: none;
  }

  .idx-sp-page .idx-sp-board-detail {
    order: 3;
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0;
  }

  .idx-sp-page .idx-sp-board-list {
    order: 4;
    flex: 1 1 auto;
    width: 100%;
    padding-bottom: 28px;
    box-sizing: border-box;
  }

  .idx-sp-page .idx-sp-body > .idx-user-board {
    order: 5;
  }

  .idx-sp-page .idx-sp-m-tabs {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    gap: 4px;
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    order: 1;
    margin-bottom: 0px;
    padding: 0;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .idx-sp-page .idx-sp-m-tabs__btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 42px;
    padding: 5px 4px;
    justify-content: center;
    border-radius: var(--radius-sm, 10px);
  }

  .idx-sp-page .idx-sp-m-tabs__main {
    justify-content: center;
    padding: 0 2px;
  }

  .idx-sp-page .idx-sp-m-tabs__ttl {
    display: block;
    width: 100%;
    text-align: center;
    font: 600 12px/1.2 var(--font-kr, "Noto Sans KR", sans-serif);
    white-space: normal;
  }

  .idx-sp-page .idx-sp-m-tabs__sub {
    display: block;
    margin-top: 1px;
    font: 500 10px/1.2 var(--font-kr, "Noto Sans KR", sans-serif);
    white-space: nowrap;
  }

  /* 목록 배당 행: 픽·라인·마켓 칸 전체가 터치에 반응 (작은 숫자만 맞춰야 하는 문제 완화) */
  .idx-sp-page .idx-sp-gl:not(.idx-sp-gl--detail-markets) .idx-sp-gl__matrix {
    gap: 18px;
    padding: 8px 10px;
  }

  .idx-sp-page .idx-sp-gl:not(.idx-sp-gl--detail-markets) .idx-sp-gl__line-block {
    gap: 12px;
  }

  .idx-sp-page .idx-sp-gl__line {
    gap: 4px;
  }

  .idx-sp-page .idx-sp-gl__slot {
    gap: 4px;
  }

  /* 모바일: 가운데 칸·행 높이만 조정 (3열 그리드는 공통 규칙) */
  .idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line {
    --idx-sp-gl-mid-col: 48px;
    min-height: 48px;
  }

  .idx-sp-page .idx-sp-gl__line {
    min-height: 48px;
    height: auto;
    align-items: stretch;
  }

  .idx-sp-page .idx-sp-gl__slot {
    min-height: 48px;
    height: auto;
    align-items: stretch;
  }

  .idx-sp-page .idx-sp-gl__pick {
    align-self: stretch;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
  }

  .idx-sp-page .idx-sp-gl__mkt {
    align-self: stretch;
    min-height: 48px;
  }

  .idx-sp-page .idx-sp-gl__vs-cap {
    align-self: stretch;
    min-height: 48px;
  }

  .idx-sp-page .idx-sd-mline-block > .idx-sd-mline,
  .idx-sp-page .idx-sd-mline,
  .idx-sp-page .idx-sd-score,
  .idx-sp-page .idx-sd-mline--tri .idx-sd-mline__mid,
  .idx-sp-page .idx-sd-mline--tri .idx-sd-score.idx-sd-score--draw,
  .idx-sp-page .idx-sd-mline--tri.idx-sd-mline--wdl .idx-sd-score--draw {
    min-height: 48px;
    height: auto;
  }

  .idx-sp-page .idx-sl-card__mkt-row,
  .idx-sp-page .idx-sl-card .idx-sl-oddcell.idx-sl-score,
  .idx-sp-page .idx-sl-oddcell,
  .idx-sp-page .idx-sl-cap,
  .idx-sp-page .idx-sl-card .idx-sl-score.idx-sl-oddcell.idx-sl-oddcell--mid-draw,
  .idx-sp-page .idx-sl-mid-stack .idx-sl-score.idx-sl-oddcell {
    min-height: 48px;
    height: auto;
  }

  /* line-block 3열 레이아웃 사용 — 아래 slot:has 그리드는 구조 없는 정적 HTML 폴백 */
  /* 해외: 실시간(.idx-sl-card__mkt-h)처럼 마켓명 상단 */
  .idx-sp-page .idx-sp-gl__line-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .idx-sp-page .idx-sp-gl.idx-sp-gl--detail-markets {
    gap: 18px;
    padding: 8px 10px;
  }

  .idx-sp-page .idx-sp-markets--detail:not(:has(.idx-sp-gl--detail-markets)) {
    gap: 18px;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-dblk {
    gap: 12px;
  }

  .idx-sp-page .idx-sp-dblk__line {
    gap: 4px;
    min-height: 48px;
    align-items: stretch;
  }

  .idx-sp-page .idx-sp-dblk__cell {
    min-height: 48px;
    padding: 4px 10px;
  }
}

.idx-sp-page .idx-sp-board-detail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-items: stretch;
  gap: 5px;
  margin-top: 0;
}

.idx-sp-page .idx-sp-board-detail__topbar {
  display: none;
}

.idx-sp-page .idx-sp-board-detail__list-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 8px;
  background: #303338;
  color: #d1d5dc;
  font: 600 12px/1 var(--font-sans, "Inter", Helvetica, sans-serif);
  cursor: pointer;
}

.idx-sp-page .idx-sp-board-detail__list-btn img {
  display: block;
  transform: rotate(180deg);
}

/* 트래커 열림: 상세 열 상단 마진 없음 */
.idx-sp-page .idx-sp-board-detail:not(.idx-sp-board-detail--tracker-collapsed) {
  margin-top: 0;
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-live {
  gap: 0;
}

/* 종목 탭 (.board-category) */
.idx-sp-page .idx-sp-catbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-cat {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 5px 3px;
  border: none;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  opacity: 0.2;
  color: var(--text, #fff);
}

.idx-sp-page .idx-sp-cat--active {
  opacity: 1;
  background-color: #3b3f46;
  border-radius: 10px;
}

.idx-sp-page .idx-sp-cat:focus-visible {
  outline: 2px solid #eeff00;
  outline-offset: 2px;
}

.idx-sp-page .idx-sp-cat__icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: block;
}

.idx-sp-page .idx-sp-cat__soccer {
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 12.6px;
  background: #fff url(../img/ico-sp-cat-soccer.svg) center / 80% no-repeat;
}

.idx-sp-page .idx-sp-cat__label {
  font: 400 12px/1.2 var(--font-kr, "Noto Sans KR", sans-serif);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* 경기 필터 (국가·리그·팀명) — 보너스 위, 종목 탭·보너스 셀 톤 유지 */
.idx-sp-page .idx-sp-board-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-board-filter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-board-filter__title {
  font: 600 12px/1.4 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #fff;
  padding-left: 2px;
}

.idx-sp-page .idx-sp-board-filter__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background-color: #3b3f46;
  cursor: pointer;
}

.idx-sp-page .idx-sp-board-filter__toggle-ico {
  display: block;
  width: 6px;
  height: 10px;
  object-fit: contain;
  transition: transform 0.28s ease;
}

.idx-sp-page .idx-sp-board-filter__panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-board-filter__toggle:focus-visible {
  outline: 2px solid #eeff00;
  outline-offset: 2px;
}

.idx-sp-page .idx-sp-board-filter__row {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.idx-sp-page .idx-sp-board-filter__row--selects {
  flex-wrap: nowrap;
}

.idx-sp-page .idx-sp-board-filter__field {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.idx-sp-page .idx-sp-board-filter__label {
  font: 400 9px/1.2 var(--font-kr, "Noto Sans KR", sans-serif);
  color: #99a1af;
  padding-left: 2px;
}

.idx-sp-page .idx-sp-board-filter__select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 26px 0 8px;
  border: none;
  border-radius: var(--radius-sm, 10px);
  background-color: #3b3f46;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2399a1af' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: #fff;
  font: 400 11px/1.3 var(--font-kr, "Noto Sans KR", sans-serif);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-overflow: ellipsis;
}

.idx-sp-page .idx-sp-board-filter__select:focus-visible {
  outline: 2px solid #eeff00;
  outline-offset: 1px;
}

.idx-sp-page .idx-sp-board-filter__search {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  background-color: #3b3f46;
  border-radius: var(--radius-sm, 10px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-board-filter__input {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  height: 100%;
  margin: 0;
  padding: 0 10px;
  border: none;
  background: transparent;
  color: #fff;
  font: 400 11px/1.3 var(--font-kr, "Noto Sans KR", sans-serif);
  appearance: none;
  -webkit-appearance: none;
}

.idx-sp-page .idx-sp-board-filter__input::placeholder {
  color: #99a1af;
  opacity: 1;
}

.idx-sp-page .idx-sp-board-filter__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.idx-sp-page .idx-sp-board-filter__input:focus,
.idx-sp-page .idx-sp-board-filter__input:focus-visible {
  outline: none;
}

.idx-sp-page .idx-sp-board-filter__submit {
  flex: 0 0 auto;
  min-width: 52px;
  height: 100%;
  margin: 0;
  padding: 0 10px;
  border: none;
  border-left: 1px solid #272a31;
  background-color: #fa52ff;
  color: #fff;
  font: 600 11px/1 var(--font-kr, "Noto Sans KR", sans-serif);
  cursor: pointer;
  white-space: nowrap;
}

.idx-sp-page .idx-sp-board-filter__submit:focus-visible {
  outline: 2px solid #eeff00;
  outline-offset: -2px;
}

.idx-sp-page .idx-sp-board-filter__field--popular {
  flex: 1 1 100%;
}

/* 다폴더 보너스 (.list-plus) */
.idx-sp-page .idx-sp-bonus {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 14px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-bonus__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-bonus__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background-color: #3b3f46;
  cursor: pointer;
}

.idx-sp-page .idx-sp-bonus__toggle-ico {
  display: block;
  width: 6px;
  height: 10px;
  object-fit: contain;
  transition: transform 0.28s ease;
}

.idx-sp-page .idx-sp-bonus__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 0 2px;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-bonus__toggle:focus-visible {
  outline: 2px solid #eeff00;
  outline-offset: 2px;
}

.idx-sp-page .idx-sp-bonus__title {
  margin: 0;
  padding-left: 2px;
  font: 600 12px/1.4 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: var(--purple, #fa52ff);
}

.idx-sp-page .idx-sp-bonus__note {
  margin: 0;
  font: 400 10px/1.4 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: var(--text-body, #d1d5dc);
}

.idx-sp-page .idx-sp-bonus__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  align-self: stretch;
  width: 100%;
}

.idx-sp-page .idx-sp-bonus__cell {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  min-height: 30px;
  padding: 4px 10px;
  box-sizing: border-box;
  background-color: #3b3f46;
  border-radius: var(--radius-sm, 10px);
  font-size: 10px;
  cursor: pointer;
  user-select: none;
}

.idx-sp-page .idx-sp-bonus__cell--pink .idx-sp-bonus__odds {
  color: #fb9ce7;
  font-weight: 600;
}
.idx-sp-page .idx-sp-bonus__cell--orange .idx-sp-bonus__odds {
  color: #feaf82;
  font-weight: 600;
}
.idx-sp-page .idx-sp-bonus__cell--blue .idx-sp-bonus__odds {
  color: #82dcfe;
  font-weight: 600;
}
.idx-sp-page .idx-sp-bonus__name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.idx-sp-page .idx-sp-bonus__odds {
  flex: 0 0 auto;
  white-space: nowrap;
}
.idx-sp-page .idx-sp-bonus__cell--pink .idx-sp-bonus__name {
  color: #fb9be6;
}
.idx-sp-page .idx-sp-bonus__cell--orange .idx-sp-bonus__name {
  color: #feaf82;
}
.idx-sp-page .idx-sp-bonus__cell--blue .idx-sp-bonus__name {
  color: #82dcfe;
}

@media (max-width: 1024px) {
  .idx-sp-page .idx-sp-bonus__grid {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .idx-sp-page .idx-sp-bonus__cell {
    flex: 0 0 auto;
    width: 100%;
    min-height: 36px;
    padding: 6px 12px;
  }

  .idx-sp-page .idx-sp-bonus__name {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  .idx-sp-page .idx-sp-bonus--collapsed {
    gap: 0;
  }

  .idx-sp-page .idx-sp-bonus__toggle {
    display: inline-flex;
  }

  .idx-sp-page .idx-sp-bonus__head {
    cursor: pointer;
  }

  .idx-sp-page .idx-sp-bonus__panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    gap: 0;
    transition: max-height 0.32s ease, opacity 0.24s ease, gap 0.24s ease;
  }

  .idx-sp-page .idx-sp-bonus:not(.idx-sp-bonus--collapsed) .idx-sp-bonus__panel {
    max-height: 320px;
    opacity: 1;
    gap: 10px;
  }

  .idx-sp-page .idx-sp-bonus:not(.idx-sp-bonus--collapsed) .idx-sp-bonus__toggle-ico {
    transform: rotate(90deg);
  }

  .idx-sp-page .idx-sp-board-filter--collapsed {
    gap: 0;
  }

  .idx-sp-page .idx-sp-board-filter__toggle {
    display: inline-flex;
  }

  .idx-sp-page .idx-sp-board-filter__head {
    cursor: pointer;
  }

  .idx-sp-page .idx-sp-board-filter__panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    gap: 0;
    transition: max-height 0.32s ease, opacity 0.24s ease, gap 0.24s ease;
  }

  .idx-sp-page .idx-sp-board-filter:not(.idx-sp-board-filter--collapsed) .idx-sp-board-filter__panel {
    max-height: 320px;
    opacity: 1;
    gap: 6px;
  }

  .idx-sp-page .idx-sp-board-filter:not(.idx-sp-board-filter--collapsed) .idx-sp-board-filter__toggle-ico {
    transform: rotate(90deg);
  }
}

@media (min-width: 1025px) {
  .idx-sp-page .idx-sp-bonus__panel {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible;
    gap: 10px;
  }

  .idx-sp-page .idx-sp-bonus__toggle {
    display: none !important;
  }

  .idx-sp-page .idx-sp-board-filter__panel {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible;
    gap: 6px;
  }

  .idx-sp-page .idx-sp-board-filter__toggle {
    display: none !important;
  }

  .idx-sp-page .idx-sp-board-filter__head {
    display: none;
  }
}

/* 경기 리스트 카드 (.game-list) */
.idx-sp-page .idx-sp-gl {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 6px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

/* sports_dome .idx-sd-match--active::before 와 동일: 그라데이션 선택 링 */
.idx-sp-page .idx-sp-gl--active::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: var(--radius-md, 16px);
  background: linear-gradient(180deg, #fa52ff 0%, rgba(250, 82, 255, 0.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.idx-sp-page .idx-sp-gl--active > * {
  position: relative;
  z-index: 2;
}

.idx-sp-page .idx-sp-gl__title {
  padding: 5px 10px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
}

.idx-sp-page .idx-sp-gl__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  width: 100%;
  gap: 8px;
}

.idx-sp-page .idx-sp-gl__row--spread {
  flex-wrap: wrap;
}

.idx-sp-page .idx-sp-gl__league {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.idx-sp-page .idx-sp-gl__flag {
  flex-shrink: 0;
}

.idx-sp-page .idx-sp-gl__league-txt {
  font: 400 12px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #fff;
  white-space: nowrap;
}

.idx-sp-page .idx-sp-gl__sport-dot {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  object-fit: contain;
}

.idx-sp-page .idx-sp-gl__teams {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.idx-sp-page .idx-sp-gl__names {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font: 700 12px/1.3 var(--font-kr, "Noto Sans KR", sans-serif);
  color: #fff;
}

.idx-sp-page .idx-sp-gl__vs {
  font-weight: 500;
  color: #ff4e00;
}

.idx-sp-page .idx-sp-gl__time {
  font: 400 10px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #99a1af;
}

.idx-sp-page .idx-sp-gl__bet-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-left: auto;
  background-color: #3b3f46;
  border-radius: 8px;
  font: 600 12px/1 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #eeff00;
  cursor: pointer;
}

/* 배당 3행 (.frame-12 + .contents) — 상세 마켓(.idx-sp-dblk)과 동일 간격 */
.idx-sp-page .idx-sp-gl:not(.idx-sp-gl--detail-markets) .idx-sp-gl__matrix {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 8px 10px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-gl__line-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* PC·모바일 공통: 마켓명 상단 mkt-h (핑크 바 + 회색 텍스트), 행 안 mkt 박스 숨김 */
.idx-sp-page .idx-sp-gl__mkt-h {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 0 2px;
  font: 600 11px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #99a1af;
  background: transparent;
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 0;
}

.idx-sp-page .idx-sp-gl__mkt-bar {
  width: 2px;
  height: 10px;
  border-radius: 2px;
  background-color: #fa52ff;
  flex-shrink: 0;
}

/* 국내·스페셜 목록: 해외와 동일 — PC·모바일 상단 mkt-h, 행 안 cap 숨김 */
.idx-sp-page .idx-sd-mline-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.idx-sp-page .idx-sd-mline-block > .idx-sd-mline .idx-sd-mline__cap {
  display: none !important;
}

.idx-sp-page .idx-sd-mline-block > .idx-sd-mline--tri .idx-sd-score:first-of-type {
  border-radius: 10px 0 0 10px;
}

.idx-sp-page .idx-sd-mline-block > .idx-sd-mline--tri .idx-sd-score:first-of-type.idx-sd-score--selected,
.idx-sp-page .idx-sd-mline-block > .idx-sd-mline--tri .idx-sd-score:first-of-type.sd-cell--value-accent {
  border-radius: 10px 0 0 10px;
}

/* 국내·스페셜·실시간 카드 배당 — 해외 idx-sp-gl 과 동일 타이포·행 높이 */
.idx-sp-page .idx-sd-mline-block > .idx-sd-mline,
.idx-sp-page .idx-sd-mline {
  min-height: 30px;
  align-items: stretch;
}

.idx-sp-page .idx-sd-score {
  min-height: 30px;
  padding: 4px 10px;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sd-score__odd {
  font-size: 11px;
}

.idx-sp-page .idx-sd-mline--tri .idx-sd-mline__mid {
  min-height: 30px;
  font: 600 11px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sd-mline__mid-line--bottom {
  font-size: 10px;
}

.idx-sp-page .idx-sd-mline--tri .idx-sd-score.idx-sd-score--draw,
.idx-sp-page .idx-sd-mline--tri.idx-sd-mline--wdl .idx-sd-score--draw {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 10px;
}

.idx-sp-page .idx-sd-score--draw .idx-sd-score__odd {
  font-size: 11px;
}

/* 원정(우측) 픽 — 해외 idx-sp-gl__pick--tail 과 동일: 배당 왼쪽 고정, 팀명 우측 정렬 */
.idx-sp-page .idx-sd-mline .idx-sd-score:last-of-type:not(.idx-sd-score--draw) {
  align-items: center;
}

.idx-sp-page .idx-sd-mline .idx-sd-score:last-of-type:not(.idx-sd-score--draw) > :first-child {
  flex-shrink: 0;
  align-self: center;
}

.idx-sp-page .idx-sd-mline .idx-sd-score:last-of-type:not(.idx-sd-score--draw) > span:last-child {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.idx-sp-page .idx-sd-mline .idx-sd-score:last-of-type:not(.idx-sd-score--draw):has(> .idx-sp-gl__ou) > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.idx-sp-page .idx-sl-oddcell--end {
  align-items: center;
}

.idx-sp-page .idx-sl-oddcell--end > :first-child {
  flex-shrink: 0;
  align-self: center;
}

.idx-sp-page .idx-sl-oddcell--end > span:last-child {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.idx-sp-page .idx-sl-oddcell--end:has(> .idx-sp-gl__ou) > span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.idx-sp-page .idx-sl-card__mkt-h {
  font: 400 11px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sl-card__mkt-row {
  min-height: 30px;
  align-items: stretch;
}

.idx-sp-page .idx-sl-card .idx-sl-oddcell.idx-sl-score {
  min-height: 30px;
  height: auto;
  padding: 4px 10px;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sl-oddcell {
  min-height: 30px;
  padding: 4px 10px;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sl-odd {
  font-size: 11px;
}

.idx-sp-page .idx-sl-cap {
  min-height: 30px;
  height: 30px;
  padding: 8px 6px;
  font: 600 11px/1 var(--font-sans, "Inter", Helvetica, sans-serif);
}

.idx-sp-page .idx-sl-mid-stack .idx-sl-cap {
  font-size: 11px;
  line-height: 1.15;
}

.idx-sp-page .idx-sl-cap.idx-sl-cap--stacked .idx-sl-cap__paren {
  font-size: 9px;
}

.idx-sp-page .idx-sl-card .idx-sl-score.idx-sl-oddcell.idx-sl-oddcell--mid-draw {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 10px;
}

.idx-sp-page .idx-sl-mid-stack .idx-sl-score.idx-sl-oddcell {
  min-height: 30px;
  padding: 4px 10px;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line .idx-sp-gl__mkt {
  display: none !important;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line .idx-sp-gl__slot:first-child > .idx-sp-gl__pick {
  border-radius: 10px 0 0 10px;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line .idx-sp-gl__slot:first-child > .idx-sp-gl__pick.is-selected,
.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line .idx-sp-gl__slot:first-child > .idx-sp-gl__pick.sd-cell--value-accent {
  border-radius: 10px 0 0 10px;
}

/* 좌·중·우 3열 — 가운데 기준 좌우 동일 너비 (slot은 display:contents 로 평탄화) */
.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line {
  --idx-sp-gl-mid-col: 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--idx-sp-gl-mid-col, 60px) minmax(0, 1fr);
  gap: 4px;
  min-height: 30px;
  height: auto;
  align-items: stretch;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line > .idx-sp-gl__slot {
  display: contents;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line > .idx-sp-gl__slot:first-child > .idx-sp-gl__pick {
  grid-column: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: none;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line > .idx-sp-gl__slot:last-child > .idx-sp-gl__vs-cap {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line > .idx-sp-gl__slot:last-child > .idx-sp-gl__pick--draw {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  max-width: none;
  flex: none;
}

.idx-sp-page .idx-sp-gl__line-block > .idx-sp-gl__line > .idx-sp-gl__slot:last-child > .idx-sp-gl__pick--tail {
  grid-column: 3;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: none;
}

.idx-sp-page .idx-sp-gl__line {
  /* 가운데 무(1X2) / 핸디 라인(idx-sp-gl__vs-cap) 동일 너비 */
  --idx-sp-gl-mid-col: 60px;
  display: flex;
  align-items: center;
  gap: 4px;
  align-self: stretch;
  width: 100%;
  height: 30px;
}

.idx-sp-page .idx-sp-gl__slot {
  height: 30px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 4px;
}

.idx-sp-page .idx-sp-gl__mkt {
  width: 100px;
  min-width: 72px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  box-sizing: border-box;
  background-color: #3b3f46;
  border-radius: 10px 0 0 10px;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #99a1af;
}

.idx-sp-page .idx-sp-gl__pick {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  box-sizing: border-box;
  background-color: #3b3f46;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #fff;
  cursor: pointer;
}

/* 좌측 카드 배당: content-loader 가 부여하는 is-selected / sd-cell--value-accent (슬립·동기화와 동일) */
.idx-sp-page .idx-sp-gl__pick.is-selected,
.idx-sp-page .idx-sp-gl__pick.sd-cell--value-accent {
  background-color: #fa52ff;
  border: 1px solid #232323;
  color: #fff;
}

.idx-sp-page .idx-sp-gl__pick.is-selected .idx-sp-gl__odd,
.idx-sp-page .idx-sp-gl__pick.sd-cell--value-accent .idx-sp-gl__odd {
  color: #fff;
}

.idx-sp-page .idx-sp-gl__pick--tail.is-selected,
.idx-sp-page .idx-sp-gl__pick--tail.sd-cell--value-accent {
  border-radius: 0 10px 10px 0;
}

.idx-sp-page .idx-sp-gl__pick--draw.is-selected,
.idx-sp-page .idx-sp-gl__pick--draw.sd-cell--value-accent {
  color: #fff;
}

.idx-sp-page .idx-sp-gl__pick--tail {
  border-radius: 0 10px 10px 0;
  align-items: center;
}

.idx-sp-page .idx-sp-gl__pick--tail > :first-child {
  flex-shrink: 0;
  align-self: center;
}

/* 원정 팀명: 배당은 왼쪽 고정, 팀명은 최대 2줄·전체 노출·우측 정렬 */
.idx-sp-page .idx-sp-gl__pick--tail > span:last-child {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* 1X2 무 배당 — 좌 홈 · 중 무 · 우 원정 (가운데 너비 = idx-sp-gl__vs-cap 과 동일) */
.idx-sp-page .idx-sp-gl__pick--draw {
  flex: 0 0 var(--idx-sp-gl-mid-col, 60px);
  width: var(--idx-sp-gl-mid-col, 60px);
  min-width: var(--idx-sp-gl-mid-col, 60px);
  max-width: var(--idx-sp-gl-mid-col, 60px);
  border-radius: 0;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 2px 4px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 10px;
  line-height: 1.1;
  color: #ff4e00;
}

.idx-sp-page .idx-sp-gl__pick--draw .idx-sp-gl__odd {
  color: #eeff00;
  font-size: 11px;
}

.idx-sp-page .idx-sp-gl__vs-cap {
  flex: 0 0 var(--idx-sp-gl-mid-col, 60px);
  width: var(--idx-sp-gl-mid-col, 60px);
  min-width: var(--idx-sp-gl-mid-col, 60px);
  max-width: var(--idx-sp-gl-mid-col, 60px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  box-sizing: border-box;
  background-color: #3b3f46;
  font: 600 11px/1 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #ff4e00;
  cursor: pointer;
}

.idx-sp-page .idx-sp-gl__vs-cap--stacked {
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 4px 2px;
  line-height: 1.15;
}

.idx-sp-page .idx-sp-gl__vs-cap-line {
  display: block;
  width: 100%;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
}

.idx-sp-page .idx-sp-gl__vs-cap-line--top {
  font-weight: 600;
  font-size: 11px;
}

.idx-sp-page .idx-sp-gl__vs-cap-line--bottom {
  font-weight: 600;
  font-size: 9px;
  opacity: 0.92;
}

.idx-sp-page .idx-sp-gl__cell--selected {
  background-color: #fa52ff;
}

.idx-sp-page .idx-sp-gl__cell--selected .idx-sp-gl__odd,
.idx-sp-page .idx-sp-gl__vs-cap.idx-sp-gl__cell--selected {
  color: #fff;
}

.idx-sp-page .idx-sp-gl__odd {
  font-weight: 600;
  color: #eeff00;
  font-size: 11px;
}

.idx-sp-page .idx-sp-gl__pick--tail .idx-sp-gl__odd {
  color: #fff;
}

.idx-sp-page .idx-sp-gl__hc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.idx-sp-page .idx-sp-gl__hc img {
  width: 6px;
  height: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

.idx-sp-page .idx-sd-hc img,
.idx-sp-page .idx-sl-odd img {
  width: 6px;
  height: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

.idx-sp-page .idx-sp-gl__ou {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.idx-sp-page .idx-sp-gl__arr {
  width: 7px;
  height: 8px;
  flex-shrink: 0;
  background: url(../img/ico-sp-ou-up.svg) center / 7px 8px no-repeat;
}
.idx-sp-page .idx-sp-gl__arr--dn {
  background-image: url(../img/ico-sp-ou-down.svg);
  background-size: 7px 8px;
}

/* 상세 패널 */
.idx-sp-page .idx-sp-live {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-live__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 10px;
  width: 100%;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-live__head--tight {
  padding: 2px 10px;
}

.idx-sp-page .idx-sp-live__names {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 700 12px/1.3 var(--font-kr, "Noto Sans KR", sans-serif);
  color: #fff;
}

.idx-sp-page .idx-sp-live__tracker {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 5px 10px;
  border: none;
  border-radius: 8px;
  background-color: #303338;
  font: 400 10px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #d1d5dc;
  cursor: pointer;
}

.idx-sp-page .idx-sp-live__tracker-txt--expand {
  display: none;
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-live__tracker-txt--collapse {
  display: none;
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-live__tracker-txt--expand {
  display: inline;
}

.idx-sp-page .idx-sp-live__tracker-chevron {
  flex-shrink: 0;
  display: block;
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-live__tracker-chevron {
  transform: rotate(180deg);
}

/* 트래커: 영상만 슬라이드 접힘 (max-height + 내부 살짝 이동) */
.idx-sp-page .idx-sp-detail-track {
  overflow: hidden;
  max-height: min(72vw, 520px);
  transition: max-height 0.42s cubic-bezier(0.32, 0.72, 0, 1);
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-detail-track {
  max-height: 0;
}

.idx-sp-page .idx-sp-detail-track__inner {
  min-height: 0;
  transform: translateY(0);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-detail-track__inner {
  transform: translateY(-18px);
}

.idx-sp-page .idx-sp-board-detail__markets {
  margin-top: 8px;
  margin-bottom: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #1e2939);
}

.idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-board-detail__markets {
  margin-top: 8px;
}

.idx-sp-page .idx-sp-live__frame {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1.78;
  border-radius: 10px;
  background: url(../img/ico-sp-live-frame.svg) center / cover no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  .idx-sp-page .idx-sp-detail-track,
  .idx-sp-page .idx-sp-detail-track__inner,
  .idx-sp-page .idx-sp-live__tracker-chevron {
    transition: none;
  }

  .idx-sp-page .idx-sp-board-detail--tracker-collapsed .idx-sp-detail-track__inner {
    transform: none;
  }
}

.idx-sp-page .idx-sp-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  flex: none;
  flex-shrink: 0;
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  background-color: #272a31;
  border-radius: var(--radius-md, 16px);
  overflow: hidden;
}

.idx-sp-page .idx-sp-tabs__nav {
  display: flex;
  gap: 1px;
  width: 100%;
  max-width: none;
}

.idx-sp-page .idx-sp-tabs__btn {
  flex: 1;
  padding: 8px 0;
  border: none;
  font: 600 12px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  cursor: pointer;
}

.idx-sp-page .idx-sp-tabs__btn--active {
  background-color: #3b3f46;
  border-radius: 10px;
  color: #fff;
}

.idx-sp-page .idx-sp-tabs__btn--inactive {
  background-color: #272a31;
  color: #99a1af;
  border: none;
  border-radius: 10px;
}

.idx-sp-page .idx-sp-tabs__panels {
  display: flex;
  flex-direction: column;
  flex: none;
  flex-shrink: 0;
  min-height: auto;
  width: 100%;
  align-self: stretch;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-tabs__panel {
  display: flex;
  flex-direction: column;
  flex: none;
  flex-shrink: 0;
  min-height: auto;
  width: 100%;
  box-sizing: border-box;
}

.idx-sp-page .idx-sp-tabs__panel[hidden] {
  display: none !important;
}

.idx-sp-page .idx-sp-markets--detail {
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 8px 10px;
  align-self: stretch;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border-radius: 0 0 10px 10px;
  overflow: visible;
  display: flex;
  align-items: stretch;
  background: #272a31;
}

/* JS 렌더: .idx-sp-markets--detail > article.idx-sp-gl--detail-markets > .idx-sp-dblk */
.idx-sp-page .idx-sp-gl.idx-sp-gl--detail-markets {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 8px 10px;
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border-radius: 0;
  overflow: visible;
}

.idx-sp-page .idx-sp-markets--detail:has(.idx-sp-gl--detail-markets) {
  gap: 0;
  padding: 0;
  background: transparent;
}

.idx-sp-page .idx-sp-board-detail .idx-sp-dblk {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  align-self: stretch;
  width: 100%;
}

.idx-sp-page .idx-sp-dblk__label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  align-self: stretch;
  font: 600 11px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #99a1af;
}

.idx-sp-page .idx-sp-dblk__bar {
  width: 2px;
  height: 10px;
  background: var(--purple, #fa52ff);
  border-radius: 2px;
  flex-shrink: 0;
}

.idx-sp-page .idx-sp-dblk__line {
  display: flex;
  align-items: stretch;
  gap: 4px;
  align-self: stretch;
  width: 100%;
  min-height: 30px;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
}

.idx-sp-page .idx-sp-dblk__cell {
  flex: 1;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  box-sizing: border-box;
  background-color: #303338;
  border-radius: 10px 0 0 10px;
  font: 400 11px/1.3 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #fff;
  cursor: pointer;
}

.idx-sp-page .idx-sp-dblk__cell--mid {
  flex: 0 0 60px;
  flex-direction: column;
  justify-content: center;
  border-radius: 0;
  font: 600 11px/1.2 var(--font-sans, "Inter", Helvetica, sans-serif);
  color: #ff4e00;
  background-color: #303338;
}

.idx-sp-page .idx-sp-dblk__mid-cap--stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  line-height: 1.15;
  text-align: center;
  width: 100%;
}

.idx-sp-page .idx-sp-dblk__mid-cap__line {
  font-weight: 600;
}

.idx-sp-page .idx-sp-dblk__mid-cap__paren {
  font-weight: 600;
  font-size: 10px;
  opacity: 0.92;
}

.idx-sp-page .idx-sp-dblk__cell--end {
  border-radius: 0 10px 10px 0;
  align-items: center;
  gap: 4px;
}

.idx-sp-page .idx-sp-dblk__cell .idx-sp-gl__ou,
.idx-sp-page .idx-sp-dblk__cell .idx-sp-gl__hc {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.idx-sp-page .idx-sp-dblk__cell--end > :first-child {
  flex-shrink: 0;
  align-self: center;
}

/* OU 행: 언더 등 짧은 라벨 */
.idx-sp-page .idx-sp-dblk__cell--end:has(> .idx-sp-gl__ou) > span:last-child {
  margin-left: auto;
  text-align: right;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* 원정 팀명: 배당 왼쪽 고정, 팀명 2줄·우측 정렬 */
.idx-sp-page .idx-sp-dblk__cell--end:not(:has(> .idx-sp-gl__ou)) > span:last-child {
  margin-left: auto;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.idx-sp-page .idx-sp-dblk__cell--selected {
  background-color: #fa52ff;
}

.idx-sp-page .idx-sp-dblk__cell--selected.idx-sp-dblk__cell--mid {
  color: #fff;
}

.idx-sp-page .idx-sp-dblk__cell--selected .idx-sp-dblk__odd {
  color: #fff;
}

/* 실시간: 마켓·배당 종료 후 피드에 없는 셀(패치 경로 방어) */
.idx-sp-page .idx-sp-dblk__cell--closed {
  cursor: default;
  pointer-events: none;
  opacity: 0.55;
}

.idx-sp-page .idx-sp-dblk__cell--closed .idx-sp-dblk__odd {
  color: rgba(255, 255, 255, 0.45);
}

.idx-sp-page .idx-sp-dblk__odd {
  font-weight: 600;
  color: #eeff00;
  font-size: 11px;
}

.idx-sp-page .idx-sp-dblk__cell--end .idx-sp-dblk__odd {
  color: #fff;
}

/* 우측 유저보드: 데스크톱만 슬롯에 고정 폭 (태블릿은 globals.css에서 고정 레이어) */
@media (min-width: 1025px) {
  .idx-sp-page .idx-sp-body > .idx-user-board {
    flex: 0 0 300px;
    width: 300px;
    max-width: 300px;
    align-self: stretch;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  }

  .idx-sp-page .idx-sp-body > .idx-user-board::-webkit-scrollbar {
    width: 6px;
  }

  .idx-sp-page .idx-sp-body > .idx-user-board::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 3px;
  }
}

/* 태블릿·모바일: 상세 패널을 우측 오프캔버스로 숨김 후 bet-tag 클릭 시 노출 */
.idx-sp-detail-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  body.idx-sp-detail-lock-scroll {
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* iOS·안드로이드: body만 막으면 안쪽 .idx-page/.idx-layout 이 스크롤되며 백드롭 뒤가 흔들리는 현상 방지 */
  html:has(body.idx-sp-detail-lock-scroll) {
    overflow: hidden;
    overscroll-behavior: none;
    height: 100%;
  }

  body.idx-sp-detail-lock-scroll .idx-page {
    overflow: hidden;
    max-height: 100dvh;
    overscroll-behavior: none;
  }

  /* 문서 스크롤 위치·overflow 잠금과 무관하게 넥서스 헤더가 상단에 보이도록 고정 */
  body.idx-sp-detail-lock-scroll .idx-page > .idx-topbar {
    position: fixed;
    top: env(safe-area-inset-top, 0px);
    left: 0;
    right: 0;
    z-index: 160;
    width: 100%;
    box-sizing: border-box;
  }

  body.idx-sp-detail-lock-scroll .idx-page .idx-layout,
  body.idx-sp-detail-lock-scroll .idx-page .idx-main-wrap-full {
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* 슬라이드 중 뒤쪽 탭·리스트가 비치지 않도록 숨김 (닫히는 애니메이션 동안 detail-closing 유지) */
  .idx-sp-page.idx-sp-page--detail-open .idx-sp-m-tabs,
  .idx-sp-page.idx-sp-page--detail-open .idx-sp-catbar,
  .idx-sp-page.idx-sp-page--detail-open .idx-sp-board-list,
  .idx-sp-page.idx-sp-page--detail-closing .idx-sp-m-tabs,
  .idx-sp-page.idx-sp-page--detail-closing .idx-sp-catbar,
  .idx-sp-page.idx-sp-page--detail-closing .idx-sp-board-list {
    visibility: hidden;
    pointer-events: none;
  }

  .idx-sp-page .idx-sp-board-detail {
    display: block;
    position: fixed;
    top: calc(var(--idx-topbar-h, 65px) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: auto;
    height: calc(100dvh - var(--idx-topbar-h, 65px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - var(--idx-topbar-h, 65px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
    z-index: 151;
    background-color: var(--bg-page, #141518);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(100%, 0, 0);
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    transition:
      transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0s linear 0.28s;
  }

  .idx-sp-page .idx-sp-board-detail__topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-live,
  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs,
  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs__panels,
  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs__panel {
    flex: none;
    min-height: auto;
  }

  .idx-sp-page .idx-sp-board-detail .idx-sp-tabs {
    overflow: visible;
  }

  .idx-sp-page.idx-sp-page--detail-open .idx-sp-board-detail,
  .idx-sp-page.idx-sp-page--detail-closing .idx-sp-board-detail {
    visibility: visible;
  }

  .idx-sp-page.idx-sp-page--detail-open .idx-sp-board-detail {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    transition:
      transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0s linear 0s;
  }

  .idx-sp-page.idx-sp-page--detail-closing .idx-sp-board-detail {
    transform: translate3d(100%, 0, 0);
    pointer-events: none;
    transition:
      transform 0.28s cubic-bezier(0.32, 0.72, 0, 1),
      visibility 0s linear 0.28s;
  }

  .idx-sp-detail-backdrop {
    position: fixed;
    top: calc(var(--idx-topbar-h, 65px) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100dvh - var(--idx-topbar-h, 65px) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    z-index: 150;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .idx-sp-detail-backdrop.idx-sp-detail-backdrop--open {
    display: block;
  }
}

