/* 미니게임 · 토큰게임 · 가상스포츠(bet365) — GO-V 라이트 (1200px, 다크→화이트)
   DOM/기능 유지. */

.idx-page.idx-page--logged-in {
  --gm-bg: #eef1f4;
  --gm-surface: #ffffff;
  --gm-soft: #f0f3f7;
  --gm-elevated: #f5f7fa;
  --gm-border: #d0d7de;
  --gm-line: #e8ecf0;
  --gm-text: #1a1a1a;
  --gm-muted: #667085;
  --gm-blue: #2b7de9;
  --gm-blue-deep: #1e6ad1;
  --gm-blue-soft: #6ea8f0;
  --gm-amount: #1d7fd6;
  --gm-head: #3a4656;
  --gm-radius: 6px;
}

/* ===== 가로 1200 ===== */
.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-bet-stage),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.idx-bet-stage) {
  width: min(var(--gov-content-w, 1200px), 100%);
  max-width: var(--gov-content-w, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-top: 10px;
  padding-left: var(--gov-content-pad, 12px);
  padding-right: var(--gov-content-pad, 12px);
  padding-bottom: 28px;
  box-sizing: border-box;
}

.idx-page.idx-page--logged-in .idx-main-full.idx-sp-page:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-main-full.idx-sp-page:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-main-full.idx-sp-page:has(.idx-bet-stage),
.idx-page.idx-page--logged-in .idx-sp-body:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-sp-body:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-sp-body:has(.idx-bet-stage) {
  background-color: var(--gm-bg) !important;
}

/* ===== 루트 ===== */
.idx-page.idx-page--logged-in .idx-mg-page,
.idx-page.idx-page--logged-in .element-token-game,
.idx-page.idx-page--logged-in .idx-page-section[data-idx-em="13_Bet365"] .element,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) {
  --purple: #2b7de9;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: var(--gm-text);
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-shell,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-shell__main,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-shell__body,
.idx-page.idx-page--logged-in .element-token-game .home,
.idx-page.idx-page--logged-in .element-token-game .main-content-wrapper,
.idx-page.idx-page--logged-in .element-token-game .main-content,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .home,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .main-content-wrapper,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .main-content {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}

/* 레거시 탑바/사이드 숨김 영역은 그대로 — 본문 패널만 라이트 */

/* ===== 공통: 다크 패널 → 라이트 (자식 title/timer 까지 흰색 칠하지 않음) ===== */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__contents,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history,
.idx-page.idx-page--logged-in .element-token-game .bet-list,
.idx-page.idx-page--logged-in .element-token-game .game-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage {
  background-color: var(--gm-surface) !important;
  background: var(--gm-surface) !important;
  border-color: var(--gm-border) !important;
  color: var(--gm-text) !important;
  box-shadow: none !important;
}

/* 보드 리스트 — 컨테이너는 패딩 없이, 패널끼리만 간격 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__list {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__pick {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 {
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games {
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"],
.idx-page.idx-page--logged-in .element-token-game .board-category > .idx-tg-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active {
  background: var(--gm-blue) !important;
  border-color: var(--gm-blue) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* 벳365 2단(리그) — 미니게임 종목탭처럼 연한 블루 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected {
  background: var(--gm-blue-soft) !important;
  border-color: var(--gm-blue-soft) !important;
  opacity: 1 !important;
  box-shadow: none !important;
}

/* --lead 는 첫 항목 마크업용 — 선택 안 됐을 땐 파란 배경 금지 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-frame,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-frame--lead {
  background: transparent !important;
  opacity: 1 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"] {
  background: var(--gm-blue) !important;
  border-color: var(--gm-blue) !important;
  opacity: 1 !important;
}

/* 다크 토큰 배경 강제 덮기 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__contents,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage,
.idx-page.idx-page--logged-in .element-token-game .board,
.idx-page.idx-page--logged-in .element-token-game .contents,
.idx-page.idx-page--logged-in .element-token-game .contents-wrapper,
.idx-page.idx-page--logged-in .element-token-game .frame-wrapper,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .contents,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list {
  background-color: transparent !important;
  border-color: var(--gm-border) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history,
.idx-page.idx-page--logged-in .element-token-game .bet-list,
.idx-page.idx-page--logged-in .element-token-game .detail-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .bet-list,
.idx-page.idx-page--logged-in .element-token-game .bet-list {
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
}

/* #eeff00 / 흰 글자 잔여 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-x__tw-4,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-x__tw-11,
.idx-page.idx-page--logged-in .element-token-game .text-wrapper-4,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .text-wrapper-4 {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-tg-game-cat-row > .idx-casino-cat-btn,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-tg-game-cat-row > .idx-casino-cat-btn {
  color: var(--gm-text) !important;
  background: var(--gm-soft) !important;
  opacity: 1 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-tg-game-cat-row > .idx-casino-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-tg-game-cat-row > .idx-casino-cat-btn.is-selected {
  color: #fff !important;
  background: var(--gm-blue) !important;
}

/* ===== 글자 가독성 (흰→검정) ===== */
.idx-page.idx-page--logged-in .idx-mg-page,
.idx-page.idx-page--logged-in .element-token-game,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) {
  color: var(--gm-text) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page [class*="text-wrapper"],
.idx-page.idx-page--logged-in .idx-mg-page [class*="__label"],
.idx-page.idx-page--logged-in .idx-mg-page [class*="__title"],
.idx-page.idx-page--logged-in .idx-mg-page [class*="__name"],
.idx-page.idx-page--logged-in .element-token-game [class*="text-wrapper"],
.idx-page.idx-page--logged-in .element-token-game [class*="__label"],
.idx-page.idx-page--logged-in .element-token-game [class*="__title"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="text-wrapper"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="__label"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="__title"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-cat-primary-label {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  text-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected [class*="label"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"] [class*="label"],
.idx-page.idx-page--logged-in .element-token-game .board-category > .idx-tg-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element-token-game .board-category > .idx-tg-cat-btn.is-selected *,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected *:not(.idx-bet-cat-primary-status),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active *:not(.idx-bet-cat-primary-status),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 금액·배당 강조 */
.idx-page.idx-page--logged-in .idx-mg-page [class*="odds"],
.idx-page.idx-page--logged-in .idx-mg-page [class*="amount"],
.idx-page.idx-page--logged-in .element-token-game [class*="odds"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="odds"] {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
}

/* 노랑 네온 → 블루 */
.idx-page.idx-page--logged-in .idx-mg-page [style*="#eeff00"],
.idx-page.idx-page--logged-in .element-token-game [style*="#eeff00"] {
  color: var(--gm-amount) !important;
}

/* 칩 / 버튼 */
.idx-page.idx-page--logged-in .idx-mg-page button,
.idx-page.idx-page--logged-in .element-token-game button,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) button,
.idx-page.idx-page--logged-in .idx-mg-page [class*="btn"],
.idx-page.idx-page--logged-in .element-token-game [class*="btn"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="btn"] {
  box-shadow: none !important;
}

/* ===== 마켓: 배당 셀 + 픽 버튼 (다크 잔여 제거) ===== */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__body,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row {
  background: transparent !important;
  color: var(--gm-text) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__head {
  background: #e8edf2 !important;
  color: #1a1a1a !important;
  border-radius: 4px !important;
  margin: 4px 4px 0 !important;
  padding: 8px 12px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__status,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets [class*="status"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__head button,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__tag {
  background: var(--gm-head) !important;
  border: 1px solid var(--gm-head) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-radius: 4px 0 0 4px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__tag,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__countdown {
  box-sizing: border-box !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__countdown {
  background: var(--gm-blue) !important;
  border: 1px solid var(--gm-blue) !important;
  border-radius: 0 4px 4px 0 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__meta-text {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__event-line,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__title-text {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background: transparent !important;
  font-family: "Inter", Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: -0.06px !important;
  line-height: 1.3 !important;
}

/* 배당 박스 — 히스토리 th 와 같은 연회색 배경 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-left,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-left-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card [class*="odds-"] {
  background: var(--gm-soft) !important;
  border: 1px solid var(--gm-border) !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odd-value,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card [class*="odd-value"] {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* 픽 셀 — 배당과 같은 흰 박스 + 테두리 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__picks,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-cell-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-tie-cell,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-cell-ou,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card [class*="pick-cell"] {
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  box-shadow: none !important;
}

/* 픽 원형 버튼 — 파란/주황 복원 + 흰 글자 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-player,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-a {
  background: #2b7de9 !important;
  background-color: #2b7de9 !important;
  border: none !important;
  color: #fff !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-alt,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-b {
  background: #f66c05 !important;
  background-color: #f66c05 !important;
  border: none !important;
  color: #fff !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-tie {
  background: #5b6573 !important;
  background-color: #5b6573 !important;
  border: none !important;
  color: #fff !important;
  border-radius: 50% !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-long,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick .idx-mg-market-card__pick-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-alt .idx-mg-market-card__pick-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-player .idx-mg-market-card__pick-long,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-tie .idx-mg-market-card__pick-long,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-a .idx-mg-market-card__pick-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-b .idx-mg-market-card__pick-label {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-alt.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-player.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-tie.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-a.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-ou-b.is-selected {
  box-shadow:
    inset 0 0 0 2px #ffee00,
    0 0 0 2px rgba(255, 238, 0, 0.45) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__title,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card [class*="title"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card [class*="name"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets [class*="label"]:not(.idx-mg-market-card__pick-label):not(.idx-mg-market-card__pick-long) {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
}

.idx-page.idx-page--logged-in .element-token-game .game-list [class*="frame"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list [class*="frame"] {
  background: var(--gm-elevated) !important;
  border: 1px solid var(--gm-border) !important;
  color: var(--gm-text) !important;
  border-radius: 4px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list .is-selected:not(.idx-bet365-pick):not(.idx-bet365-sp-dblk__cell) {
  background: var(--gm-blue) !important;
  border-color: var(--gm-blue) !important;
  color: #fff !important;
}

/* 타이틀바류 */
.idx-page.idx-page--logged-in .idx-mg-page .board-title,
.idx-page.idx-page--logged-in .element-token-game .board-title,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-title {
  background: var(--gm-head) !important;
  border: 1px solid var(--gm-head) !important;
  border-radius: 6px 6px 0 0 !important;
  color: #fff !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .board-title *,
.idx-page.idx-page--logged-in .element-token-game .board-title *,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-title * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* ===== 히스토리 테이블 — 바깥 카드만 테두리 (안쪽 history-* 전부 테두리 금지) ===== */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history,
.idx-page.idx-page--logged-in .element-token-game .bet-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .bet-list,
.idx-page.idx-page--logged-in .element-token-game .bet-list {
  background: var(--gm-surface) !important;
  border: 1px solid var(--gm-border) !important;
  color: var(--gm-text) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__head,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__title-chip,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__scroll,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__rows,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .frame-wrapper,
.idx-page.idx-page--logged-in .element-token-game .frame-wrapper,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-title-chip,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-title-chip,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-table,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-page,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-page,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--gm-text) !important;
}

/* 베팅내역 — 내부 스크롤 없이 페이지 단위(20개)로 표시 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__scroll,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content.is-active .idx-mg-history__scroll {
  max-height: none !important;
  overflow: visible !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__title-text {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__th {
  background: var(--gm-soft) !important;
  background-color: var(--gm-soft) !important;
  border: 1px solid var(--gm-border) !important;
  min-height: 34px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__th-text {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell {
  background: #fff !important;
  background-color: #fff !important;
  border: 1px solid var(--gm-line) !important;
  min-height: 34px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell-text {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell-text--hit {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell-text--miss {
  color: #e11d48 !important;
  -webkit-text-fill-color: #e11d48 !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell-text--pending,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__cell-text--cancel {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 4px 10px !important;
  border-radius: 4px !important;
  background: #e23b2f !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  cursor: pointer;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__refresh {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--gm-blue) !important;
  border-radius: 6px !important;
  background: var(--gm-blue) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__refresh img {
  width: 14px !important;
  height: 14px !important;
  filter: brightness(0) invert(1) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__refresh:hover {
  background: var(--gm-blue-deep) !important;
  border-color: var(--gm-blue-deep) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__refresh:disabled,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__refresh.is-loading {
  opacity: 0.65 !important;
  cursor: default !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-history__rows.idx-mg-history__rows--empty {
  color: var(--gm-muted) !important;
  font-size: 13px !important;
}

.idx-page.idx-page--logged-in .element-token-game .page [class*="text-wrapper"],
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .page [class*="text-wrapper"] {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  background: var(--gm-surface) !important;
  border: 1px solid var(--gm-border) !important;
  font-size: 13px !important;
}

/* iframe — JS scale(830 기준)과 충돌하는 max-width 금지 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live__viewport:has(.idx-mg-live__iframe),
.idx-page.idx-page--logged-in .element-token-game .idx-tg-live__viewport:has(iframe),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) [class*="live__viewport"]:has(iframe) {
  /* 네이비 배경은 iframe 하단 빈 공간을 검정 여백처럼 보이게 함 */
  background-color: transparent !important;
  overflow: hidden !important;
}

/* 미니게임 전체(로투스·크라운·스카이·넥슨·넥스트링) — PC/모바일 영상 주변 검정 여백 제거 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live:has(.idx-mg-live__iframe),
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live__viewport:has(.idx-mg-live__iframe),
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring,
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring .idx-mg-live__viewport {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live__iframe,
.idx-page.idx-page--logged-in .element-token-game .idx-tg-live__iframe,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-live__iframe {
  max-width: none !important;
  max-height: none !important;
  background: transparent !important;
}

/* 상단 게임목록·카테고리 글자 키움 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-btn [class*="label"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__list [class*="text"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__list [class*="name"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-row,
.idx-page.idx-page--logged-in .idx-mg-page .idx-tg-game-cat-row > .idx-casino-cat-btn {
  font-size: 13px !important;
}

/* 핑크 글로우 제거 */
.idx-page.idx-page--logged-in .idx-mg-page *,
.idx-page.idx-page--logged-in .element-token-game *,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) * {
  text-shadow: none;
}

/* 마켓 패널 · 카드 — 위아래 여백 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets {
  padding: 10px 8px 14px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets__sections {
  gap: 16px !important;
  padding: 14px 10px 10px !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card {
  gap: 8px !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__body {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row {
  gap: 0 !important;
  background: transparent !important;
}

/* 배당·픽 프레임 — 위아래 맞닿게, 모서리 없음 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-left,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-left-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__odds-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__picks,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-cell-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-tie-cell,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__pick-cell-ou {
  border-radius: 0 !important;
}

/* 위 줄(배당) 아래 테두리 제거 → 아래 줄과 한 선으로 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:first-child .idx-mg-market-card__odds-left,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:first-child .idx-mg-market-card__odds-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:first-child .idx-mg-market-card__odds-left-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:first-child .idx-mg-market-card__odds-mid {
  border-bottom: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:first-child > *:not(:last-child) {
  border-right: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card__row:last-child > *:not(:last-child) {
  border-right: none !important;
}

/* 제공사 아이콘 — 배경칩 없이 회색 실루엣만 (칩+filter 시 사각으로 뭉개짐 방지) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-icon {
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  background: transparent !important;
  filter: brightness(0) invert(38%) !important;
  opacity: 1 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected .idx-mg-board__provider-icon,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"] .idx-mg-board__provider-icon {
  background: transparent !important;
  filter: brightness(0) invert(1) !important;
}

/* 넥슨 N 아이콘 — viewBox 꽉 참 → 다른 제공사와 시각 크기 맞춤 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[data-provider-id="nexon"] .idx-mg-board__provider-icon {
  width: 20px !important;
  height: 20px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__provider-label--alt {
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected .idx-mg-board__provider-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn.is-selected .idx-mg-board__provider-label--alt,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"] .idx-mg-board__provider-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers > .idx-mg-board__provider-btn[aria-pressed="true"] .idx-mg-board__provider-label--alt {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 종목 — 제공사 접두어 숨김, 선택 시 제목·시간 표시 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games {
  height: auto !important;
  min-height: 64px !important;
  padding: 10px 12px !important;
  overflow: visible !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-frame,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-frame--lead {
  height: auto !important;
  min-height: 52px !important;
  padding: 6px 10px !important;
  gap: 4px !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-title-full {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-title-short {
  display: inline !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-title,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-title-short {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

/* 종목 선택 — 참고 UI 파란 탭 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] {
  background: var(--gm-blue) !important;
  background-color: var(--gm-blue) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected .idx-mg-board__game-title,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected .idx-mg-board__game-title-short,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] .idx-mg-board__game-title,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] .idx-mg-board__game-title-short {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-timer,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-status {
  box-sizing: border-box;
  min-height: 18px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-timer {
  background: #e5eaf0 !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-status {
  background: #ffece8 !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected .idx-mg-board__game-timer,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] .idx-mg-board__game-timer {
  background: #fff !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

/* 선택(파란) 탭 — 베팅마감은 흰 알약 + 빨강 글자 (파란 위 파란 제거) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected .idx-mg-board__game-status,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] .idx-mg-board__game-status {
  background: #fff !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
}

/* 히스토리 페이지 번호 — 가로로 늘어난 막대 대신 가운데 칩 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__pager {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  height: auto !important;
  margin-top: 8px !important;
  padding: 4px 0 2px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__pager-num {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 32px !important;
  height: 28px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #e8edf2 !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: 6px !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

@media (max-width: 1024px) {
  .idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-mg-page),
  .idx-page.idx-page--logged-in .idx-main-wrap-full:has(.element-token-game),
  .idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-bet-stage) {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ===== 벳365 마켓·배당·히스토리 — 미니게임 GO-V 완성본과 동일 톤 ===== */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list {
  background: var(--gm-surface) !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
  padding: 10px 8px 14px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  background: #e8edf2 !important;
  border-radius: 4px !important;
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
  height: auto !important;
  min-height: 48px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-match {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-name {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  white-space: normal !important;
  justify-content: flex-start !important;
  text-align: left !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-datetime {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
}

/* 벳365 마켓 — 프리매치 idx-sp-dblk 형태 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-cards.idx-bet365-sp-markets {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  padding: 4px 2px 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 20px !important;
  font: 700 13px/1.2 "Noto Sans KR", Helvetica, sans-serif !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__bar {
  width: 3px !important;
  height: 12px !important;
  background: var(--gm-blue, #3b8fdb) !important;
  border-radius: 1px !important;
  flex-shrink: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__line {
  display: grid !important;
  gap: 4px !important;
  width: 100% !important;
  align-items: stretch !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__line--wdl {
  grid-template-columns: 1fr minmax(52px, 0.55fr) 1fr !important;
}

/* 경마·개경주 1등 맞히기 — 출전 수만큼 칸 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__line--runners {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell--runner {
  justify-content: flex-start !important;
  gap: 6px !important;
  min-height: 88px !important;
  padding: 10px 8px 8px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-runner-no {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 22px !important;
  padding: 0 8px !important;
  border-radius: 999px !important;
  background: #1f2a37 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font: 700 12px/1 "Noto Sans KR", Helvetica, sans-serif !important;
  letter-spacing: -0.02em !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-runner-name {
  display: block !important;
  width: 100% !important;
  min-height: 2.4em !important;
  margin: 0 !important;
  color: #22262e !important;
  -webkit-text-fill-color: #22262e !important;
  font: 600 12px/1.2 "Noto Sans KR", Helvetica, sans-serif !important;
  text-align: center !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell--runner .idx-bet365-sp-dblk__odd {
  margin-top: auto !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__line--pair {
  grid-template-columns: 1fr 1fr !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__line--ou {
  grid-template-columns: 1fr minmax(48px, 0.45fr) 1fr !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 54px !important;
  height: auto !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border: 1px solid var(--gm-border, #d5dbe3) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  text-align: center !important;
  min-width: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell--mid {
  flex-direction: column !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cap {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 54px !important;
  padding: 0 6px !important;
  background: #e8f2fc !important;
  border: 1px solid #cfe0f2 !important;
  color: var(--gm-blue, #3b8fdb) !important;
  -webkit-text-fill-color: var(--gm-blue, #3b8fdb) !important;
  font: 700 13px/1.2 "Noto Sans KR", Helvetica, sans-serif !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__lab {
  color: #22262e !important;
  -webkit-text-fill-color: #22262e !important;
  font: 600 12px/1.2 "Noto Sans KR", Helvetica, sans-serif !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__odd {
  color: #222 !important;
  -webkit-text-fill-color: #222 !important;
  font: 700 14px/1.2 "Noto Sans KR", Helvetica, sans-serif !important;
}

/* 선택색은 아래 프리매치 동일 규칙(.idx-bet365-pick.is-selected)에서 처리 */

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-status-chip {
  background: var(--gm-head) !important;
  border: 1px solid var(--gm-head) !important;
  border-radius: 4px 0 0 4px !important;
  padding: 0 10px !important;
  height: 28px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-status-text {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-timer-chip {
  background: var(--gm-blue) !important;
  border: 1px solid var(--gm-blue) !important;
  border-radius: 0 4px 4px 0 !important;
  padding: 0 10px !important;
  height: 28px !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-timer-chip,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-timer-chip * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-cards {
  gap: 10px !important;
  padding: 4px 4px 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-card {
  gap: 6px !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-card-head .rectangle {
  background: var(--gm-blue) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-card-title,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-card-title-alt {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  width: auto !important;
  line-height: 1.3 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-left,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-center,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-right {
  background: var(--gm-soft) !important;
  border: 1px solid var(--gm-border) !important;
  box-shadow: none !important;
  height: 36px !important;
  min-height: 36px !important;
  border-radius: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-left {
  border-right: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-center {
  border-left: none !important;
  border-right: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-right {
  border-left: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-left-label,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-right-label {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-left-value,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-right-value,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-total-line {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-odds-center-label {
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-odds-cell.is-selected:not(.idx-bet365-pick):not(.idx-bet365-sp-dblk__cell) {
  background: var(--gm-blue) !important;
  box-shadow:
    inset 0 0 0 2px #ffee00,
    0 0 0 2px rgba(255, 238, 0, 0.45) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-odds-cell.is-selected:not(.idx-bet365-pick):not(.idx-bet365-sp-dblk__cell) :is(
  .idx-bet-market-odds-left-label,
  .idx-bet-market-odds-left-value,
  .idx-bet-market-odds-center-label,
  .idx-bet-market-total-line,
  .idx-bet-market-odds-right-value,
  .idx-bet-market-odds-right-label
) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 벳365 마켓 선택 — 프리매치(idx-sp-inter-select)와 동일 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-pick.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-odds-cell.idx-bet365-pick.is-selected {
  background: #f0c94b !important;
  background-color: #f0c94b !important;
  border-color: #e0b63a !important;
  color: #1a1d24 !important;
  -webkit-text-fill-color: #1a1d24 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell.is-selected .idx-bet365-sp-dblk__lab,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell.is-selected .idx-bet365-sp-dblk__odd,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-pick.is-selected .idx-bet365-sp-dblk__lab,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-pick.is-selected .idx-bet365-sp-dblk__odd,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-pick.is-selected * {
  color: #1a1d24 !important;
  -webkit-text-fill-color: #1a1d24 !important;
}

/* 선택 시 번호 배지는 흰 글씨 유지 (검정 배경 + 검정 글씨 방지) */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-pick.is-selected .idx-bet365-runner-no,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet365-sp-dblk__cell.is-selected .idx-bet365-runner-no {
  background: #1f2a37 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-title-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-title-text {
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-cell {
  background: var(--gm-soft) !important;
  border: 1px solid var(--gm-border) !important;
  min-height: 34px !important;
  height: auto !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-text {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell {
  background: #fff !important;
  border: 1px solid var(--gm-line) !important;
  min-height: 34px !important;
  height: auto !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--hit,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--hit {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--miss,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--miss {
  color: #e11d48 !important;
  -webkit-text-fill-color: #e11d48 !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--pending,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--pending,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--cancel,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--cancel {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-action,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #e23b2f !important;
  border-radius: 4px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  cursor: pointer;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-page,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-page {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background: transparent !important;
  height: auto !important;
  min-height: 0 !important;
  margin-top: 8px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-page-num,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-page-num {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 32px !important;
  height: 28px !important;
  margin: 0 auto !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  background: #e8edf2 !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: 6px !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .live-picture,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .live-picture-2 {
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #0d1122 !important;
}

/* ===== 벳365 페이지 전체 — 미니게임 완성본과 동일 레이아웃 톤 ===== */

/* 제공사/종목 바 — 미니게임처럼 흰 카드 + 6px R */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 {
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category {
  height: 80px !important;
  padding: 8px 10px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 {
  height: auto !important;
  min-height: 64px !important;
  padding: 10px 12px !important;
  gap: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-list {
  gap: 8px !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .home,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .main-content,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .main-content-wrapper {
  background: transparent !important;
  box-shadow: none !important;
}

/* 라이브만 직각 — 미니게임 viewport 와 동일 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .live-picture {
  padding: 0 !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: 0 !important;
  background: #0d1122 !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .live-picture:has(.idx-bet365-live__iframe),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .live-picture:has(.live-picture-2--iframe) {
  padding: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .game-list {
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
}

/* 1단 탭 — 선택 시 파란 필 + 라운드 (미니게임 제공사탭) */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-btn,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item {
  opacity: 1 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-btn:not(.is-selected),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item:not(.is-selected):not(.idx-bet-cat-primary-item--active) {
  background: transparent !important;
  opacity: 1 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category .idx-bet-cat-primary-icon {
  width: 26px !important;
  height: 26px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(38%) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected .idx-bet-cat-primary-icon,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active .idx-bet-cat-primary-icon {
  filter: brightness(0) invert(1) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category .idx-bet-cat-primary-label,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category .idx-bet-cat-btn:not(.is-selected),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category .idx-bet-cat-btn:not(.is-selected) *:not(.idx-bet-cat-primary-status) {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected .idx-bet-cat-primary-label,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active .idx-bet-cat-primary-label,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected *:not(.idx-bet-cat-primary-status),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active *:not(.idx-bet-cat-primary-status) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 1단 탭 점검/미사용 — 연한 빨강 알약 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-cat-primary-status {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-top: 2px !important;
  min-height: 16px !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: #ffece8 !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 14px !important;
  letter-spacing: -0.02em !important;
  white-space: nowrap !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .is-selected .idx-bet-cat-primary-status,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category > .idx-bet-cat-primary-item--active .idx-bet-cat-primary-status {
  background: #fff !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
}

/* 2단 리그 탭 — 미니게임 종목탭(연한 블루 + 타이머 칩) */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn {
  opacity: 1 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  min-height: 52px !important;
  padding: 6px 10px !important;
  gap: 4px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn:not(.is-selected) {
  background: transparent !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 .idx-bet-cat-secondary-sport {
  display: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 .idx-bet-cat-secondary-league,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn:not(.is-selected),
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn:not(.is-selected) * {
  color: var(--gm-text) !important;
  -webkit-text-fill-color: var(--gm-text) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 .idx-bet-cat-secondary-league {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 리그 탭 타이머·상태 — 미니게임 종목칩과 동일 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-cat-secondary-timer {
  box-sizing: border-box !important;
  min-height: 18px !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: #e5eaf0 !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
  font-family: "Inter", Helvetica, sans-serif !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-cat-secondary-status {
  box-sizing: border-box !important;
  min-height: 18px !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: #ffece8 !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
  font-family: "Inter", Helvetica, sans-serif !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected .idx-bet-cat-secondary-timer {
  background: #fff !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .board-category-2 > .idx-bet-cat2-btn.is-selected .idx-bet-cat-secondary-status {
  background: #fff !important;
  color: #e23b2f !important;
  -webkit-text-fill-color: #e23b2f !important;
}

/* 히스토리 래퍼·타이틀·새로고침 — 미니게임과 동일 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .bet-list,
.idx-page.idx-page--logged-in .element-token-game .bet-list {
  padding: 10px !important;
  background: #fff !important;
  border: 1px solid var(--gm-border) !important;
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .frame-wrapper,
.idx-page.idx-page--logged-in .element-token-game .frame-wrapper {
  padding: 0 !important;
  gap: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* 토큰: 레거시 .frame-wrapper(30×20 핑크 뱃지)가 배팅내역 타이틀을 짓누르는 문제 */
.idx-page.idx-page--logged-in .element-token-game .bet-list {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  align-self: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  min-width: 0 !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list > .frame-wrapper,
.idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-root .frame-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-title-chip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-title-text {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a !important;
  writing-mode: horizontal-tb !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-list {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-page {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  align-self: stretch !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-page-num {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 32px !important;
  max-width: none !important;
  height: 28px !important;
  margin: 0 !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-row {
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-head-cell,
.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-head-text,
.idx-page.idx-page--logged-in .element-token-game .bet-list .idx-bet-history-cell-text {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-table {
  padding: 0 !important;
  gap: 0 !important;
  border: none !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-title-chip,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-title-chip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  margin-bottom: 8px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-refresh,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-refresh {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 12px !important;
  border: 1px solid var(--gm-blue) !important;
  border-radius: 6px !important;
  background: var(--gm-blue) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  cursor: pointer;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-refresh img,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-refresh img {
  width: 14px !important;
  height: 14px !important;
  filter: brightness(0) invert(1) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-refresh:hover,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-refresh:hover {
  background: var(--gm-blue-deep) !important;
  border-color: var(--gm-blue-deep) !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-refresh:disabled,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-refresh:disabled,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-refresh.is-loading,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-refresh.is-loading {
  opacity: 0.65 !important;
  cursor: default !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-table,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .frame-wrapper,
.idx-page.idx-page--logged-in .element-token-game .frame-wrapper {
  background: transparent !important;
  box-shadow: none !important;
}

/* 넥스트1분링과 동일 — 행 사이 간격 없이 이어진 표 */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-table {
  padding: 10px !important;
  gap: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  border-radius: 0 0 5px 5px !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row {
  display: grid !important;
  /* 일시/회차·내역 넓게, 숫자열 좁게 */
  grid-template-columns:
    minmax(0, 1.55fr)
    minmax(0, 0.7fr)
    minmax(0, 0.85fr)
    minmax(0, 0.95fr)
    minmax(0, 0.7fr)
    minmax(0, 0.95fr)
    minmax(0, 0.75fr)
    minmax(0, 0.65fr) !important;
  gap: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row {
  border-radius: 5px 5px 0 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list > .idx-bet-history-row:last-child,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list > .idx-bet-history-row:last-child,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list > .idx-bet-history-block:last-child,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list > .idx-bet-history-block:last-child {
  border-radius: 0 0 5px 5px !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-block,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-block {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-block > .idx-bet-history-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-block > .idx-bet-history-row {
  border-radius: 0 !important;
}

/* 다중배팅 상세 — 격자 없이 한 줄 정렬 (번호 · 경기 · 선택 · 배당) */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 8px 10px 10px !important;
  background: #f5f7fa !important;
  border: 1px solid var(--gm-line) !important;
  border-top: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__caption,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__caption {
  padding: 0 2px !important;
  color: var(--gm-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.2 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__list,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__list {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__row {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  column-gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 8px 10px !important;
  background: #fff !important;
  border: 1px solid #e6ebf1 !important;
  border-radius: 6px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__no,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__no {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  background: #e8eef5 !important;
  color: var(--gm-muted) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__match,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__match {
  min-width: 0 !important;
  color: var(--gm-text) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__pick,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__pick {
  flex-shrink: 0 !important;
  max-width: 120px !important;
  color: var(--gm-blue-deep, #1e5bb8) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__odds,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__odds {
  flex-shrink: 0 !important;
  min-width: 42px !important;
  color: var(--gm-text) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
}

@media (max-width: 1024px) {
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi {
    padding: 8px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__row {
    grid-template-columns: 20px minmax(0, 1fr) auto auto !important;
    column-gap: 8px !important;
    padding: 7px 8px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__match,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__match,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__pick,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__pick,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__odds,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__odds {
    font-size: 11px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__pick,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__pick {
    max-width: 88px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-multi__odds,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-multi__odds {
    min-width: 36px !important;
  }
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-cell,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell {
  display: flex !important;
  flex-direction: column !important;
  flex: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 34px !important;
  padding: 6px 4px !important;
  box-sizing: border-box !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-text,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
  line-height: 1.3 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell--datetime,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell--datetime {
  flex-direction: column !important;
  gap: 2px !important;
  height: auto !important;
  min-height: 40px !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--sub,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--sub {
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list--empty,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list--empty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 80px !important;
  padding: 16px 10px !important;
  color: var(--gm-muted) !important;
  -webkit-text-fill-color: var(--gm-muted) !important;
  font-size: 13px !important;
  text-align: center !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-event-line {
  flex: 1 1 auto !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-status-row {
  display: inline-flex !important;
  align-items: stretch !important;
  flex: 0 0 auto !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-trend-value-a,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-trend-value-b {
  color: var(--gm-amount) !important;
  -webkit-text-fill-color: var(--gm-amount) !important;
}

/* 스테이지 6:4 — 미니게임 live:markets (JS가 game-list 를 market-stack 으로 감쌈) */
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage {
  gap: 6px !important;
  align-items: stretch !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-stack {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-market-stack > .game-list {
  width: 100% !important;
  max-width: 100% !important;
  /* 패널 스크롤 시 카드가 줄어들지 않도록 — 다음 경기까지 자연 높이 유지 */
  flex: 0 0 auto !important;
  align-self: stretch !important;
  overflow: visible !important;
}

@media (min-width: 1025px) {
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage > .live-picture {
    flex: 6 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    align-self: flex-start !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage > .game-list,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-stage > .idx-bet-market-stack {
    flex: 4 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    /* max-height 는 JS: 기본 2경기 높이, 3번째는 패널 스크롤 */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .user-board,
.idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-user-board {
  border-radius: var(--gm-radius) !important;
  box-shadow: none !important;
}

/* 벳365 PC: idx-sp-body overflow:hidden 때문에 하단 베팅내역이 잘림
   → 미니게임과 같이 페이지 섹션만 세로 스크롤 */
.idx-sp-page .idx-sp-body:has(.idx-bet-stage),
.idx-sp-page .idx-sp-body:has([data-idx-em="13_Bet365"]) {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.idx-sp-page .idx-sp-body > .idx-page-section:has(.idx-bet-stage),
.idx-sp-page .idx-sp-body > .idx-page-section[data-idx-em="13_Bet365"] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: auto;
  max-height: none;
  overflow: visible;
}

.idx-sp-page .idx-sp-body > .idx-page-section:has(.idx-bet-stage) .element,
.idx-sp-page .idx-sp-body > .idx-page-section[data-idx-em="13_Bet365"] .element,
.idx-sp-page .idx-sp-body > .idx-page-section:has(.idx-bet-stage) .bet-list,
.idx-sp-page .idx-sp-body > .idx-page-section[data-idx-em="13_Bet365"] .bet-list {
  overflow: visible !important;
}

@media (min-width: 1025px) {
  .idx-sp-page .idx-sp-body:has(.idx-bet-stage),
  .idx-sp-page .idx-sp-body:has([data-idx-em="13_Bet365"]) {
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .idx-sp-page .idx-sp-body > .idx-page-section:has(.idx-bet-stage),
  .idx-sp-page .idx-sp-body > .idx-page-section[data-idx-em="13_Bet365"] {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

/* 모바일 베팅내역 — 넥스트1분링(미니게임)과 동일 5열
   일시/회차 · 베팅내역 · 금액 · 적중 · 삭제 (베팅시간·배당·당첨금 숨김) */
@media (max-width: 1024px) {
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .bet-list,
.idx-page.idx-page--logged-in .element-token-game .bet-list {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-table,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-table {
    overflow-x: hidden !important;
    padding: 8px 6px !important;
    box-sizing: border-box !important;
    gap: 0 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list {
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(2),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(2),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(5),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(5),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(6),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(6),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(2),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(2),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(5),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(5),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(6),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(6) {
    display: none !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.7fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.55fr) !important;
    align-items: stretch !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(1),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(1),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(1),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(1) {
    grid-column: 1 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(3),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(3),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(3),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(3) {
    grid-column: 2 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(4),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(4),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(4),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(4) {
    grid-column: 3 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(7),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(7),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(7),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(7) {
    grid-column: 4 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(8),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-row > .idx-bet-history-head-cell:nth-child(8),
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-row > .idx-bet-history-cell:nth-child(8),
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-row > .idx-bet-history-cell:nth-child(8) {
    grid-column: 5 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-cell,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell {
    flex: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 6px 4px !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell--datetime,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell--datetime {
    min-height: 44px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-title-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-title-text {
    font-size: 13px !important;
    line-height: 18px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-head-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-head-text,
  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-text--sub,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-text--sub {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-cell-action,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-cell-action {
    font-size: 11px !important;
    line-height: 1.3 !important;
    padding: 4px 8px !important;
  }

  .idx-page.idx-page--logged-in .element:has(.idx-bet-stage) .idx-bet-history-list--empty,
.idx-page.idx-page--logged-in .element-token-game .idx-bet-history-list--empty {
    font-size: 13px !important;
  }
}

/* 로투스/크라운은 상단메뉴로 분리 — 보드 안 제공사 탭 숨김 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__providers,
.idx-page.idx-page--logged-in .idx-mg-page [data-idx-mg-providers] {
  display: none !important;
}

/* 종목 탭 · 제목 — 패널 자체에만 여백 (전체 wrap 패딩 X) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading {
  width: calc(100% - 28px) !important;
  max-width: calc(100% - 28px) !important;
  margin-left: 14px !important;
  margin-right: 14px !important;
  box-sizing: border-box !important;
  border-radius: var(--gm-radius) !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
}

/* 페이지 상단 현재 게임 제목 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 44px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 10px 14px !important;
  background: #4a4a4a !important;
  border: 1px solid #3d3d3d !important;
  text-align: center !important;
}

/* 토큰게임 — 메뉴+iframe 한 박스 (페이지 회색 배경 위 독립 카드) */
.idx-page.idx-page--logged-in .element-token-game .idx-tkbox {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: #1a1a1a !important;
  border: 1px solid #2a2a2a !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  padding: 16px 8px 8px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header__eng {
  margin: 0 0 12px !important;
  padding: 0 !important;
  text-align: center !important;
  font-family: "Times New Roman", "Noto Serif KR", Georgia, serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  color: #f2f2f2 !important;
  -webkit-text-fill-color: #f2f2f2 !important;
  line-height: 1.3 !important;
  text-transform: uppercase !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .board-category,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-header__nav {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .board-category > .idx-tg-cat-btn {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 10px 4px 12px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  color: #e8e8e8 !important;
  -webkit-text-fill-color: #e8e8e8 !important;
  cursor: pointer !important;
  position: relative !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn + .idx-tg-cat-btn {
  border-left: 1px solid rgba(255, 255, 255, 0.18) !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn:not(.is-selected) {
  opacity: 0.72 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .board-category > .idx-tg-cat-btn.is-selected,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .board-category > .idx-tg-cat-btn.is-selected * {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-icon {
  display: block !important;
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.35)) !important;
  pointer-events: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn.is-selected .idx-tg-cat-icon {
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.55)) !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-label {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

/* tk-contents: 헤더 바로 아래 iframe — JS scale-to-fit (--tg-iframe-visual-h) */
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents.idx-tg-board__contents {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #111 !important;
  border: none !important;
  border-radius: 0 !important;
  flex: 0 0 auto !important;
  min-height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  height: auto !important;
  overflow: visible !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .idx-tg-game-content {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .idx-tg-game-content.is-active {
  display: block !important;
  flex: 0 0 auto !important;
  min-height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  height: auto !important;
  overflow: visible !important;
  max-width: 100% !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents__frame,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .live-picture-wrapper,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .live-picture,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .live-picture-2 {
  display: block !important;
  position: relative !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  /* 좁은 폭: JS scale — 가로 스크롤로 깨지지 않게 */
  overflow: hidden !important;
  box-shadow: none !important;
  aspect-ratio: auto !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .idx-tg-live__iframe,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents iframe.idx-tg-live__iframe {
  display: block !important;
  width: var(--tg-iframe-w, 1000px) !important;
  max-width: none !important;
  height: var(--tg-iframe-h, 800px) !important;
  min-height: var(--tg-iframe-h, 800px) !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  z-index: 1 !important;
  /* transform/position 은 JS fitTgLiveIframe 이 important 로 지정 */
}

/* 토큰: board-list 흰 통짜 카드 해제 — 패널(게임박스/배팅내역)만 카드 */
.idx-page.idx-page--logged-in .element-token-game .board,
.idx-page.idx-page--logged-in .element-token-game .board-list,
.idx-page.idx-page--logged-in .element-token-game .board-list[data-idx-tg-board-root] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .board-list[data-idx-tg-board-root] {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: calc(100% - 28px) !important;
  max-width: calc(100% - 28px) !important;
  margin: 10px 14px 24px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-root {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-root .bet-list {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  max-height: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-content {
  display: none !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-content.is-active {
  display: block !important;
}

@media (max-width: 720px) {
  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header {
    padding: 12px 4px 6px !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header__eng {
    font-size: 17px !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 8px !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header__nav {
    flex-wrap: wrap !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-btn {
    flex: 1 1 20% !important;
    min-width: 72px !important;
    padding: 10px 2px 12px !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tk-header .idx-tg-cat-label {
    font-size: 13px !important;
  }

  /* 모바일: 프레임은 화면 폭에 맞춤 — 실제 iframe 은 JS scale-to-fit */
  .idx-page.idx-page--logged-in .element-token-game .idx-tk-contents__frame,
  .idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .live-picture-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    min-height: var(--tg-iframe-visual-h, 240px) !important;
    height: var(--tg-iframe-visual-h, 240px) !important;
  }
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading__title {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  line-height: 1.35 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading__name {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading__sub {
  margin-left: 6px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #c8c8c8 !important;
  -webkit-text-fill-color: #c8c8c8 !important;
}

/* 종목 탭 — 참고 UI(바카라/홀짝/식보) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  padding: 4px !important;
  overflow-x: auto !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  min-height: 56px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  border-radius: 6px !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games > .idx-mg-board__game-btn[aria-pressed="true"] {
  background: var(--gm-blue) !important;
  background-color: var(--gm-blue) !important;
}

/* ===== 미니게임 인페이지 배팅카트 (로투스·크라운) — 장바구니 아님 ===== */
.idx-page.idx-page--logged-in .idx-sp-body:has(.idx-mg-page) > .idx-user-board,
.idx-page.idx-page--logged-in .idx-user-board.idx-user-board--mg-hidden {
  display: none !important;
}

.idx-page.idx-page--logged-in.idx-cart-board-open:has(.idx-mg-page) #idx-cart-board-backdrop,
.idx-page.idx-page--logged-in:has(.idx-mg-page) #idx-topbar-cart,
.idx-page.idx-page--logged-in:has(.idx-mg-page) #idx-floating-cart,
.idx-page.idx-page--logged-in:has(.idx-mg-page) .floating-cart-wrap {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.floating-cart-enabled:has(.idx-mg-page) #idx-floating-cart,
body:has(.idx-mg-page) #idx-floating-cart {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.idx-mg-page),
.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.element-token-game),
.idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-bet-stage),
.idx-page.idx-page--logged-in .idx-main-wrap:has(.idx-bet-stage) {
  width: min(1480px, 100%) !important;
  max-width: 1480px !important;
  /* 전체 wrap 패딩으로 띠 만들지 않음 — 패널 margin만 사용 */
  padding-top: 0 !important;
}

/* 토큰게임 iframe — scale-to-fit 시각 높이 / 가로 잘림 금지 */
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents__frame,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .live-picture-wrapper:has(.idx-tg-live__iframe),
.idx-page.idx-page--logged-in .element-token-game .idx-tg-game-content.is-active .idx-tk-contents__frame {
  display: block !important;
  position: relative !important;
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  height: var(--tg-iframe-visual-h, var(--tg-iframe-h, 800px)) !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents .idx-tg-live__iframe,
.idx-page.idx-page--logged-in .element-token-game .idx-tk-contents iframe {
  width: var(--tg-iframe-w, 1000px) !important;
  max-width: none !important;
  height: var(--tg-iframe-h, 800px) !important;
  min-height: var(--tg-iframe-h, 800px) !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: block !important;
  box-sizing: border-box !important;
  z-index: 1 !important;
}

/* 토큰게임: idx-sp-body overflow:hidden 때문에 iframe 하단 잘림
   → 미니게임/벳365와 같이 섹션에서 세로 스크롤, iframe 영역은 축소 금지 */
.idx-sp-page .idx-sp-body:has(.element-token-game) {
  display: flex !important;
  flex: 1 1 auto !important;
  align-items: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.idx-sp-page .idx-sp-body > .idx-page-section:has(.element-token-game) {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  align-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

.idx-page.idx-page--logged-in .element-token-game.idx-em-surface,
.idx-page.idx-page--logged-in .element-token-game .home,
.idx-page.idx-page--logged-in .element-token-game .main-content-wrapper,
.idx-page.idx-page--logged-in .element-token-game .main-content,
.idx-page.idx-page--logged-in .element-token-game .board,
.idx-page.idx-page--logged-in .element-token-game .board-list[data-idx-tg-board-root] {
  overflow: visible !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* 상단 카테고리 탭(토큰/미니/카지노…) — 본문과 간격 */
.idx-page.idx-page--logged-in .element-token-game .idx-tg-game-cat-row {
  margin: 8px 14px 0 !important;
  width: calc(100% - 28px) !important;
  max-width: calc(100% - 28px) !important;
  box-sizing: border-box !important;
}

@media (max-width: 720px) {
  .idx-page.idx-page--logged-in .element-token-game .board-list[data-idx-tg-board-root] {
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
    margin: 8px 8px 20px !important;
    gap: 10px !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tg-game-cat-row {
    margin: 6px 8px 0 !important;
    width: calc(100% - 16px) !important;
    max-width: calc(100% - 16px) !important;
  }

  .idx-page.idx-page--logged-in .element-token-game .idx-tg-bet-root .bet-list {
    padding: 10px 10px !important;
  }
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
  align-items: stretch !important;
  gap: 10px !important;
}

/* 로투스 — 공식 STANDARD SIZE + JS scale-to-fit (PC 1186×620/644, MO 945×1230, 식보 MO 945×1300) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="lotus"] .idx-mg-live,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="lotus"] .idx-mg-live:has(.idx-mg-live__iframe) {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  align-self: flex-start !important;
  height: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="lotus"] .idx-mg-live__viewport,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="lotus"] .idx-mg-live__viewport:has(.idx-mg-live__iframe) {
  width: 100% !important;
  max-width: 100% !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  /* iframe 크롭 후에도 보이던 네이비 여백 제거 */
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="lotus"] .idx-mg-live__iframe {
  /* width/height는 fitLotusLiveIframe이 담당 — PC width:100% 금지 */
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
}

/* 넥스트 1분링 — crown_box 830×640 스케일 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="nextring"] .idx-mg-live,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="nextring"] .idx-mg-live:has(.idx-mg-live__iframe),
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  align-self: flex-start !important;
  height: auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="nextring"] .idx-mg-live__viewport,
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring .idx-mg-live__viewport {
  width: 100% !important;
  max-width: 100% !important;
  /* 높이는 JS scale fit — aspect-ratio 고정 시 모바일 우측 잘림 */
  aspect-ratio: auto !important;
  overflow: hidden !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

@media (max-width: 1024px) {
  .idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-board__stage,
  .idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="nextring"] .idx-mg-live {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content[data-provider-id="nextring"] .idx-mg-live__iframe,
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-live--next-ring .idx-mg-live__iframe {
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
}

/* 넥스트 1분링 — 단일 종목이라 탭 줄 숨김, 제목에 상단 여백 */
.idx-page.idx-page--logged-in .idx-mg-page--next-ring [data-idx-mg-panels],
.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-board__games {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page--next-ring .idx-mg-page-heading {
  margin-top: 14px !important;
}

@media (min-width: 1025px) {
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
    display: flex !important;
    flex-direction: row !important;
    /* stretch 시 마켓보다 짧은 영상에 검정 여백이 생김 → 상단 정렬 */
    align-items: flex-start !important;
    gap: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
    /* 좌·우 여백은 스테이지 흰 배경으로만 — 카트 패널 폭은 그대로 */
    background: #fff !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-live {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: none !important;
    align-self: flex-start !important;
    height: auto !important;
    background: transparent !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-markets.idx-mg-betcart {
    flex: 0 0 340px !important;
    width: 340px !important;
    min-width: 340px !important;
    max-width: 340px !important;
    max-height: none !important;
    align-self: flex-start !important;
    margin: 0 !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live__viewport {
    width: 100% !important;
    max-width: 100% !important;
  }
  /* crown 등: 컬럼에 맞춤. lotus/nextring은 JS가 945×1230 등 px+scale (타사 lotusoddeven_box와 동일 Mobile UI) */
  .idx-page.idx-page--logged-in
    .idx-mg-page
    .idx-mg-board__game-content:not([data-provider-id='lotus']):not([data-provider-id='nextring'])
    .idx-mg-live__iframe {
    width: 100% !important;
    max-width: 100% !important;
  }
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets.idx-mg-betcart {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  background: #fff !important;
  /* 바깥 테두리 없음 — 안쪽 카드/요약 패널 배경으로만 구분 */
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

/* 일반 마켓 패딩·테두리가 배팅카트에 안 먹게 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets.idx-mg-betcart,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets.idx-mg-betcart.idx-mg-markets {
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ===== 배팅카트 — 참고 UI (헤더/픽/요약/칩) ===== */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets.idx-mg-betcart > .idx-mg-markets__head.idx-mg-betcart__head {
  display: block !important;
  margin: 0 !important;
  padding: 18px 16px 14px !important;
  background: #fff !important;
  border: none !important;
  border-bottom: 1px solid #e5e7eb !important;
  border-radius: 0 !important;
  text-align: center !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__head-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__meta-row,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__tag {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__round-title,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__round-title .idx-mg-markets__event-line {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  -webkit-line-clamp: unset !important;
  display: block !important;
  text-align: center !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__countdown {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__countdown {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__countdown .idx-mg-markets__meta-text,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__countdown .idx-mg-markets__meta-text {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

/* 남은시간일 때만 크게·빨강 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__countdown.is-timer .idx-mg-markets__meta-text,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__countdown .idx-mg-markets__meta-text.is-timer {
  color: #e53935 !important;
  -webkit-text-fill-color: #e53935 !important;
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__sections {
  display: flex !important;
  flex-direction: column !important;
  padding: 12px 0 0 !important;
  gap: 12px !important;
  overflow: visible !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  background: transparent !important;
  border: none !important;
  margin: 0 0 16px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card {
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #c5d0dc !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden !important;
}

/* 마켓 패널 헤드 — 패널 상단 라벨 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__head {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0b5cab !important;
  -webkit-text-fill-color: #0b5cab !important;
  padding: 10px 10px !important;
  background: #e8f3fc !important;
  border: none !important;
  border-bottom: 1px solid #b7d6f0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__label {
  color: #0b5cab !important;
  -webkit-text-fill-color: #0b5cab !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__marker {
  display: none !important;
}


.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100% !important;
  padding: 10px !important;
  box-sizing: border-box !important;
  background: #fff !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__odds-left,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__odds-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__odds-left-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__odds-mid,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:first-child {
  display: none !important;
}

/* 2열 픽 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:last-child {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  align-items: stretch !important;
}

/* 3웨이: 위=플레이어|뱅커, 아래=타이 풀폭 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:last-child:has(.idx-mg-market-card__pick-tie-cell) {
  grid-template-columns: 1fr 1fr !important;
  grid-template-areas:
    "player banker"
    "tie tie" !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:last-child:has(.idx-mg-market-card__pick-tie-cell) > .idx-mg-market-card__picks {
  grid-area: player !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:last-child:has(.idx-mg-market-card__pick-tie-cell) > .idx-mg-market-card__pick-tie-cell {
  grid-area: tie !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__body > .idx-mg-market-card__row:last-child:has(.idx-mg-market-card__pick-tie-cell) > .idx-mg-market-card__pick-cell-ou {
  grid-area: banker !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__picks,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-cell-right,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-tie-cell,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-cell-ou {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-alt,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-player,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-tie,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-a,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-b {
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 52px !important;
  border: 2px solid #1e88e5 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #1e88e5 !important;
  -webkit-text-fill-color: #1e88e5 !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  box-shadow: none !important;
  padding: 10px 8px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-label,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-long {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-alt,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-b,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="red"] {
  border-color: #c62828 !important;
  color: #c62828 !important;
  -webkit-text-fill-color: #c62828 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="blue"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-player,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-a {
  border-color: #1e88e5 !important;
  color: #1e88e5 !important;
  -webkit-text-fill-color: #1e88e5 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-tie,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="black"] {
  border-color: #111 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick[aria-pressed="true"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-a.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-player.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="blue"].is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="blue"][aria-pressed="true"] {
  background: #1e88e5 !important;
  border-color: #1e88e5 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-alt.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-alt[aria-pressed="true"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-ou-b.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="red"].is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="red"][aria-pressed="true"] {
  background: #c62828 !important;
  border-color: #c62828 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-tie.is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card__pick-tie[aria-pressed="true"],
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="black"].is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="black"][aria-pressed="true"] {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 1옵션(트리플 등) — 전체 폭 픽 (배팅카트 2열 그리드 예외) */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card--one .idx-mg-market-card__body > .idx-mg-market-card__row:last-child {
  grid-template-columns: 1fr !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card--one .idx-mg-market-card__picks--full,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-market-card--one .idx-mg-market-card__picks--full {
  width: 100% !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card--one .idx-mg-market-card__pick {
  width: 100% !important;
  justify-content: center !important;
}

/* 4옵션 — 2웨이와 동일 픽 버튼, 2×2만 다름 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card--four .idx-mg-market-card__body > .idx-mg-market-card__row--odds {
  display: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card--four .idx-mg-market-card__body > .idx-mg-market-card__row--picks {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
  width: 100% !important;
  align-items: stretch !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="yellow"] {
  border-color: #ca8a04 !important;
  color: #ca8a04 !important;
  -webkit-text-fill-color: #ca8a04 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="yellow"].is-selected,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart [data-mg-tone="yellow"][aria-pressed="true"] {
  background: #ca8a04 !important;
  border-color: #ca8a04 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* 인페이지 카트 — 우측 idx-user-board 슬립과 같은 톤 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary.idx-user-board__bet-cal {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  order: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  border: 1px solid #d5d9e0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: hidden !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-bottom: 1px solid #d5d9e0 !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row:last-child {
  border-bottom: none !important;
}

/* 사이드바는 balance 숨김 — 인페이지 카트는 보유금 표시 */
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row[data-total="balance"] {
  display: grid !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-label {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  background: #f3f4f6 !important;
  border: none !important;
  border-right: 1px solid #d5d9e0 !important;
  color: #555 !important;
  -webkit-text-fill-color: #555 !important;
  font: 600 14px/1.3 "Noto Sans KR", Helvetica, sans-serif !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-values {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  align-self: stretch !important;
  gap: 2px !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  background: #fff !important;
  border: none !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  font: 600 15px/1.3 "Noto Sans KR", Helvetica, sans-serif !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row[data-total="odds"] .idx-user-board__total-values::before {
  content: "x " !important;
  font-weight: 600 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row[data-total="payout"] .idx-user-board__total-values,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary .idx-user-board__total-row[data-total="payout"] .idx-user-board__stat-unit {
  color: #1d7fd6 !important;
  -webkit-text-fill-color: #1d7fd6 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 10px 12px 8px !important;
  border: none !important;
  background: transparent !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake .idx-user-board__bet-cash {
  background: transparent !important;
  padding: 0 !important;
  gap: 0 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake .idx-user-board__stake-input-row {
  width: 100% !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__amount.idx-user-board__stake-input,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-user-board__stake-input.idx-mg-betcart__amount {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  height: 48px !important;
  min-height: 48px !important;
  text-align: right !important;
  font: 600 18px/1.3 "Noto Sans KR", Helvetica, sans-serif !important;
  border: 1px solid #d5d9e0 !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  padding: 8px 14px !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips.idx-user-board__bet-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  background: transparent !important;
  padding: 0 !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips .idx-user-board__chip-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 6px !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips .idx-user-board__chip-row:last-child {
  grid-template-columns: 1fr 1fr !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips .idx-user-board__chip {
  height: 40px !important;
  min-height: 40px !important;
  border: 1px solid #cfd4dc !important;
  border-radius: 4px !important;
  background: #fff !important;
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
  font: 600 13px/1 "Noto Sans KR", Helvetica, sans-serif !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips .idx-user-board__chip--active,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__chips .idx-user-board__chip--accent {
  border-color: #03a4ed !important;
  color: #03a4ed !important;
  -webkit-text-fill-color: #03a4ed !important;
  background: #fff !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake .idx-mg-betcart__submit.idx-user-board__bet,
.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__submit.idx-user-board__bet {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  order: unset !important;
  box-sizing: border-box !important;
  margin: 4px 0 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 18px !important;
  border: none !important;
  border-radius: 6px !important;
  background: #2f8fde !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font: 700 16px/1 "Noto Sans KR", Helvetica, sans-serif !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__history {
  display: none !important;
}

@media (max-width: 1024px) {
  .idx-page.idx-page--logged-in .idx-mg-page,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__list,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__contents,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-live,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-markets.idx-mg-betcart {
    flex: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live:has(.idx-mg-live__iframe) {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-live__viewport {
    /* JS scale 높이가 우선 — 고정 min-height 시 검정 여백 */
    min-height: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .idx-page.idx-page--logged-in .idx-main-wrap-full:has(.idx-mg-page),
  .idx-page.idx-page--logged-in .idx-main-wrap:has(.idx-mg-page) {
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
  /* 리스트는 패딩 없이, 패널끼리 간격만 */
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__list {
    gap: 10px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* 종목탭·제목 패널만 상·좌·우 여백 (영상/카트는 풀폭 유지) */
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    margin-left: 14px !important;
    margin-right: 14px !important;
    border-radius: 8px !important;
    border: 1px solid var(--gm-border) !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__games {
    margin-top: 10px !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-page-heading {
    border-color: #3d3d3d !important;
  }

  /* 스테이지·카트 흰배경 — 좌우 여백 없이 풀폭 */
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__contents,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__game-content,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage {
    display: flex !important;
    flex-direction: column !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-live,
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-board__stage > .idx-mg-markets.idx-mg-betcart {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-markets.idx-mg-betcart {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 0 16px !important;
    background: #fff !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart > .idx-mg-markets__head.idx-mg-betcart__head {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 카트 안 컨텐츠만 좌우 여백 */
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-markets__sections {
    padding: 14px 14px 0 !important;
    margin: 0 0 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart .idx-mg-market-card {
    width: 100% !important;
    max-width: 100% !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__summary.idx-user-board__bet-cal {
    width: calc(100% - 28px) !important;
    max-width: calc(100% - 28px) !important;
    margin: 16px 14px 0 !important;
    border: 1px solid #d5d9e0 !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 14px 0 !important;
    box-sizing: border-box !important;
  }
  .idx-page.idx-page--logged-in .idx-mg-page .idx-mg-betcart__stake .idx-mg-betcart__submit.idx-user-board__bet {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 0 !important;
  }
}
