/* demo1 Kingdom 테마 — 블랙/골드 3단 레이아웃 (언어 선택 없음) */

.kd-theme.page-shell {
  --mb-gold: #d4af37;
  --mb-gold-light: #f1d77a;
  --mb-gold-rgb: 212, 175, 55;
  --mb-gold-mid: #c9a227;
  --mb-gold-dark: #8a6a12;
  --mb-gold-gradient: linear-gradient(135deg, #f3e0a0 0%, #d4af37 42%, #8a6a12 100%);
  --mb-gold-gradient-v: linear-gradient(180deg, #f1d77a 0%, #c9a227 55%, #8a6a12 100%);
  --mb-gold-glow: rgba(212, 175, 55, 0.35);
  --kd-bg: #070707;
  --kd-panel: #111111;
  --kd-line: rgba(212, 175, 55, 0.28);
  --kd-text: #f5f5f5;
  --kd-muted: #9a9a9a;
  background: var(--kd-bg);
  color: var(--kd-text);
}

.kd-theme .www-ico {
  color: var(--mb-gold);
}

.kd-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--kd-bg);
}

.kd-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #050505;
  border-bottom: 1px solid var(--kd-line);
}

.kd-header-row-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 0 18px;
}

.kd-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.kd-logo-img {
  height: 52px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.kd-top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.kd-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: #eee;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
}

.kd-top-link:hover,
.kd-top-link.is-active {
  color: var(--mb-gold-light);
  border-color: var(--kd-line);
}

.kd-top-ico .www-ico {
  font-size: 15px;
}

.kd-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--kd-line);
  background: #161616;
  color: #fff;
  cursor: pointer;
}

.kd-btn-gold {
  background: var(--mb-gold-gradient);
  color: #1a1404;
  border-color: #e6c86a;
}

.kd-btn-ghost {
  background: #1a1a1a;
  color: #eee;
}

.kd-btn-block {
  width: 100%;
}

.kd-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--mb-gold);
  font-size: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kd-header-mobile-auth {
  display: none;
  gap: 8px;
  padding: 0 16px 12px;
}

.kd-header-mobile-auth .kd-btn {
  flex: 1;
}

.kd-body {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
}

.kd-left,
.kd-right {
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: #0b0b0b;
}

.kd-left {
  width: 232px;
  border-right: 1px solid var(--kd-line);
  padding: 12px 10px 24px;
}

.kd-right {
  width: 252px;
  border-left: 1px solid var(--kd-line);
  padding: 12px 10px 24px;
}

.kd-left-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.kd-left-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: #ddd;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 4px;
}

.kd-left-link.is-active,
.kd-left-link:hover {
  background: rgba(212, 175, 55, 0.08);
  color: var(--mb-gold-light);
}

.kd-left-banners {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kd-promo-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4px;
  line-height: 0;
}

.kd-promo-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.kd-promo-label {
  position: absolute;
  left: 8px;
  bottom: 6px;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-shadow: 0 1px 4px #000;
}

.kd-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--kd-line);
  border-radius: 20px;
  color: #eee;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}

.kd-main {
  flex: 1;
  min-width: 0;
  background: var(--kd-bg);
}

.kd-content-main {
  padding: 16px 18px 28px;
}

.kd-hero {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--kd-line);
}

.kd-hero-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.kd-hero-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 28px 18px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.15) 62%, transparent 100%);
}

.kd-hero-kicker {
  margin: 0;
  color: var(--mb-gold-light);
  letter-spacing: 0.18em;
  font-size: 11px;
  font-weight: 700;
}

.kd-hero-mask h1 {
  margin: 4px 0 6px;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.04em;
}

.kd-hero-mask h1 span {
  color: var(--mb-gold);
}

.kd-hero-sub {
  margin: 0 0 14px;
  color: #ddd;
  font-size: 14px;
}

.kd-hero-feats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kd-hero-feats li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #eee;
  font-size: 12px;
  font-weight: 600;
}

.kd-section {
  margin-top: 22px;
}

.kd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.kd-section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--mb-gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kd-section-head a {
  color: #bbb;
  font-size: 12px;
  text-decoration: none;
}

.kd-hscroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kd-hscroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.kd-theme .kd-left,
.kd-theme .kd-right,
.kd-theme .kd-drawer,
.kd-theme .kd-slot-row,
.kd-theme .mb-casino-popular-grid {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kd-theme .kd-left::-webkit-scrollbar,
.kd-theme .kd-right::-webkit-scrollbar,
.kd-theme .kd-drawer::-webkit-scrollbar,
.kd-theme .kd-slot-row::-webkit-scrollbar,
.kd-theme .mb-casino-popular-grid::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.kd-hscroll .mb-casino-popular-grid,
.kd-slot-row {
  display: flex;
  gap: 10px;
}

.kd-hscroll .mb-casino-tile,
.kd-hscroll .mb-casino-tile-popular {
  flex: 0 0 168px;
  width: 168px;
}

.kd-slot-card {
  flex: 0 0 168px;
  width: 168px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  border: 1px solid var(--kd-line);
  border-radius: 6px;
  overflow: hidden;
  background: #111;
}

.kd-slot-card img,
.kd-slot-card video {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.kd-slot-card em {
  padding: 8px;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.kd-sports {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kd-sport-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--kd-line);
  min-height: 120px;
}

.kd-sport-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.kd-sport-card span {
  position: absolute;
  left: 10px;
  bottom: 8px;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 1px 4px #000;
}

.kd-mid-banner {
  position: relative;
  display: block;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--kd-line);
}

.kd-mid-banner img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.kd-mid-banner-copy {
  position: absolute;
  left: 20px;
  bottom: 16px;
  color: #fff;
}

.kd-mid-banner-copy strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.kd-mid-banner-copy span {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--mb-gold);
  color: var(--mb-gold-light);
  font-size: 12px;
  font-weight: 700;
}

.kd-promo-icons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.kd-promo-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--kd-line);
  border-radius: 6px;
  color: #eee;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  background: #101010;
}

.kd-boards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.kd-board {
  border: 1px solid var(--kd-line);
  border-radius: 6px;
  background: #101010;
  padding: 12px;
}

.kd-board-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kd-board-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--mb-gold-light);
  display: flex;
  gap: 6px;
  align-items: center;
}

.kd-board-head a,
.kd-board time {
  color: #888;
  font-size: 12px;
  text-decoration: none;
}

.kd-board ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kd-board li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.kd-board li a {
  color: #ddd;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kd-join {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid var(--mb-gold);
  color: var(--mb-gold-light) !important;
  font-size: 11px;
  font-weight: 700;
}

.kd-empty {
  color: var(--kd-muted);
  font-size: 13px;
}

.kd-userbox {
  border: 1px solid var(--kd-line);
  border-radius: 6px;
  padding: 12px;
  background: #101010;
  margin-bottom: 12px;
}

.kd-userbox-id {
  font-weight: 800;
  margin-bottom: 8px;
}

.kd-userbox-money {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #aaa;
}

.kd-userbox-money strong {
  margin-left: auto;
  color: var(--mb-gold-light);
  font-size: 14px;
}

.kd-userbox-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.kd-userbox-guest {
  text-align: center;
}

.kd-userbox-avatar {
  display: inline-flex;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--kd-line);
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 8px;
}

.kd-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.kd-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1px solid var(--kd-line);
  border-radius: 4px;
  color: #ddd;
  text-decoration: none;
  font-size: 11px;
  background: #0e0e0e;
  text-align: center;
}

.kd-quick-ico .www-ico {
  font-size: 18px;
}

.kd-telegram {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #229ed9;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
}

.kd-telegram .www-ico {
  color: #fff;
}

.kd-telegram em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  opacity: 0.9;
}

.kd-partners {
  padding: 8px 0;
  border-top: 1px solid var(--kd-line);
}

.kd-footer {
  padding: 16px 18px 24px;
  text-align: center;
  color: #777;
  font-size: 12px;
}

.kd-footer-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.kd-footer-links a {
  color: #aaa;
  text-decoration: none;
}

.kd-footer-sns {
  margin-top: 8px;
}

.kd-floatbar,
.kd-bottomnav {
  display: none;
}

.kd-drawer {
  background: #0a0a0a;
  border-left: 1px solid var(--kd-line);
}

.kd-drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--kd-line);
}

.kd-drawer-close {
  display: inline-flex;
}

.kd-drawer-body {
  padding: 12px;
}

.kd-drawer-list {
  display: flex;
  flex-direction: column;
  margin: 10px 0;
}

.kd-drawer-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 4px;
  color: #eee;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 700;
}

.kd-drawer-link span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kd-app-promo {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 10px;
  border: 1px solid var(--kd-line);
  border-radius: 8px;
}

.kd-app-promo img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 6px;
}

.kd-theme .mb-drawer {
  width: min(360px, 92vw);
  right: -360px;
  background: #0a0a0a;
  z-index: 320;
}

.kd-theme .mb-drawer.open {
  right: 0;
}

.kd-theme .mb-drawer-overlay {
  z-index: 310;
}

.kd-theme .mb-minigame-zone-title .mb-title-gradient,
.kd-theme .mb-title-gradient {
  color: var(--mb-gold-light);
}

/* 회원 메뉴 — 팝업 대신 본문 인라인 */
.kd-theme .menu-popup-layer {
  position: static;
  inset: auto;
  z-index: auto;
  display: none;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.kd-theme .menu-popup-layer.is-open {
  display: block;
}

.kd-theme .menu-popup {
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 8px;
  box-shadow: none;
}

.kd-theme .menu-popup-body {
  overflow: visible;
}

.kd-theme .menu-popup-content {
  height: auto;
  overflow: visible;
  min-height: 280px;
}

.kd-theme .menu-popup-tabs {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.kd-theme .menu-popup-tabs::-webkit-scrollbar {
  display: none;
}

.kd-theme.kd-menu-inline-open .kd-partners {
  display: none;
}

.kd-theme .kd-page-view[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .kd-theme .menu-popup {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 8px;
  }
}

@media (max-width: 1199px) {
  .kd-right {
    display: none;
  }
}

@media (max-width: 991px) {
  .kd-top-nav,
  .kd-header-actions,
  .kd-left {
    display: none;
  }

  .kd-hamburger,
  .kd-bell {
    display: inline-flex;
  }

  .kd-header-row-main {
    justify-content: space-between;
    min-height: 56px;
  }

  .kd-logo-img {
    height: 40px;
    max-width: 210px;
  }

  .kd-header-mobile-auth {
    display: flex;
  }

  .kd-sports,
  .kd-boards,
  .kd-promo-icons {
    grid-template-columns: 1fr 1fr;
  }

  .kd-floatbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 58px;
    z-index: 30;
    justify-content: space-around;
    padding: 8px 12px;
    background: linear-gradient(180deg, transparent, #000 40%);
  }

  .kd-float-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
  }

  .kd-float-btn.is-tg { background: #229ed9; }
  .kd-float-btn.is-phone { background: #c9a227; color: #1a1404; }
  .kd-float-btn.is-inquiry { background: #1f8a4c; }
  .kd-float-btn .www-ico { color: inherit; font-size: 20px; }

  .kd-bottomnav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    height: 58px;
    background: #0a0a0a;
    border-top: 1px solid var(--kd-line);
  }

  .kd-bottom-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #aaa;
    text-decoration: none;
    font-size: 10px;
  }

  .kd-bottom-item.is-active,
  .kd-bottom-item:hover {
    color: var(--mb-gold-light);
  }

  .kd-page {
    padding-bottom: 130px;
  }
}

@media (max-width: 575px) {
  .kd-sports,
  .kd-promo-icons {
    grid-template-columns: 1fr 1fr;
  }

  .kd-boards {
    grid-template-columns: 1fr;
  }

  .kd-hero-feats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
