/* DCC mobile app shell, app-install guide and compact referral UI · v0.18.08 */

:root {
  --dcc-app-shell-surface: #f4f1f9;
  --dcc-app-shell-line: #e3ddec;
  --dcc-app-shell-ink: #2c2540;
  --dcc-app-shell-muted: #7d7588;
  --dcc-app-shell-purple: #6635d8;
}

/* Referral URL: one compact action card. The real URL remains in the button's
 * data attribute and the existing copy handler keeps the same behavior. */
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-card.dcc-referral-copy-card {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 68px !important;
  align-items: center !important;
  gap: 11px !important;
  min-height: 82px !important;
  padding: 12px 12px 12px 14px !important;
  border: 1px solid #e6e0ed !important;
  border-radius: 19px !important;
  background: #fff !important;
  box-shadow: 0 7px 20px rgba(49, 37, 72, .055) !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-icon {
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  place-items: center !important;
  border-radius: 15px !important;
  color: #245fa7 !important;
  background: #eef5ff !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-icon svg {
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-copy strong {
  overflow: hidden !important;
  color: #2d2738 !important;
  font-size: 15px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-copy small {
  display: block !important;
  overflow: hidden !important;
  color: #827a8b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-copy span {
  margin: 0 !important;
  color: #8d8497 !important;
  font-size: 9px !important;
  font-weight: 800 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-copy span b {
  margin-left: 4px !important;
  color: var(--dcc-app-shell-purple) !important;
  font-size: 10px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-copy-referral {
  display: grid !important;
  width: 68px !important;
  min-width: 68px !important;
  min-height: 56px !important;
  padding: 7px 5px !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #fff !important;
  background: #0a5f9f !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-copy-referral svg {
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-copy-referral span {
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 950 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-copy-referral.is-copied {
  background: #14866f !important;
}

/* Home downline summary: one real table instead of two nested cards. */
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network.dcc-home-referral-table-card {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e4deea !important;
  border-radius: 19px !important;
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(48, 36, 72, .05) !important;
}

.dcc-home-referral-table {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

.dcc-home-referral-table col:first-child { width: 45%; }
.dcc-home-referral-table col:nth-child(2) { width: 23%; }
.dcc-home-referral-table col:nth-child(3) { width: 32%; }

.dcc-home-referral-table thead th {
  padding: 9px 10px !important;
  color: #8b8295 !important;
  border: 0 !important;
  border-bottom: 1px solid #ebe6ef !important;
  background: #faf8fc !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

.dcc-home-referral-table thead th:first-child { text-align: left !important; }

.dcc-home-referral-table tbody th,
.dcc-home-referral-table tbody td {
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #eee9f2 !important;
  background: #fff !important;
  text-align: center !important;
}

.dcc-home-referral-table tbody tr:last-child th,
.dcc-home-referral-table tbody tr:last-child td { border-bottom: 0 !important; }

.dcc-home-referral-table tbody a {
  display: flex !important;
  min-height: 58px !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 12px 8px !important;
  color: var(--dcc-app-shell-ink) !important;
  text-decoration: none !important;
}

.dcc-home-referral-table tbody th a {
  align-items: center !important;
  justify-content: flex-start !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  word-break: keep-all !important;
}

.dcc-home-referral-table tbody strong {
  color: #2a2340 !important;
  font-size: 24px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}

.dcc-home-referral-table tbody td:last-child strong { color: var(--dcc-app-shell-purple) !important; }
.dcc-home-referral-table tbody small { color: #6f667b !important; font-size: 11px !important; font-weight: 900 !important; }
.dcc-home-referral-table tbody b { margin-left: 2px !important; color: #9a8aaa !important; font-size: 18px !important; }

/* Beat the older, deliberately high-specificity home-card rules. */
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-table tbody strong {
  color: #2a2340 !important;
  font-size: 24px !important;
  line-height: 1 !important;
}
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-table tbody td:last-child strong {
  color: var(--dcc-app-shell-purple) !important;
}
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-table tbody small {
  display: inline !important;
  color: #6f667b !important;
  font-size: 11px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* v0.18.09 · one home row per direct referral. Each row rolls up the direct
 * member plus that member's entire branch for KST-today MATCH participation. */
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-referral-table tbody th .dcc-home-referral-person {
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: 0 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-referral-account {
  display: grid !important;
  min-width: 0 !important;
  gap: 4px !important;
  text-align: left !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-account strong {
  display: block !important;
  overflow: hidden !important;
  color: #33284e !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-account small {
  display: block !important;
  overflow: hidden !important;
  color: #81788b !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-referral-empty-row td a {
  min-height: 68px !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 14px !important;
  text-align: left !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-referral-empty-row td a > span {
  display: grid !important;
  gap: 4px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-empty-row strong {
  color: #3b304d !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-profile-network .dcc-home-referral-empty-row small {
  display: block !important;
  color: #83798d !important;
  font-size: 10px !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}

/* v0.18.10 · polished direct-referral branch cards on Home. */
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network {
  position: relative !important;
  display: grid !important;
  min-width: 0 !important;
  gap: 11px !important;
  padding: 15px !important;
  overflow: hidden !important;
  border: 1px solid #e2d9ef !important;
  border-radius: 23px !important;
  background:
    radial-gradient(circle at 100% 0, rgba(111, 61, 220, .10), transparent 34%),
    linear-gradient(150deg, #faf7ff 0%, #fff 47%, #f5fbff 100%) !important;
  box-shadow: 0 10px 27px rgba(50, 34, 86, .075) !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network::before {
  position: absolute !important;
  top: -47px !important;
  right: -41px !important;
  width: 112px !important;
  height: 112px !important;
  border: 18px solid rgba(119, 73, 221, .055) !important;
  border-radius: 50% !important;
  content: "" !important;
  pointer-events: none !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network > * {
  position: relative !important;
  z-index: 1 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 1px 2px 2px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > div {
  display: grid !important;
  min-width: 0 !important;
  gap: 2px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > div > span {
  color: #7442da !important;
  font-size: 9px !important;
  font-weight: 950 !important;
  letter-spacing: .12em !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head h2 {
  margin: 0 !important;
  color: #2f2740 !important;
  font-size: 18px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  letter-spacing: -.035em !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head p {
  margin: 0 !important;
  color: #837a8d !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  word-break: keep-all !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > strong {
  display: flex !important;
  min-width: 66px !important;
  min-height: 48px !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 2px !important;
  padding: 9px 8px !important;
  border: 1px solid #ded0f6 !important;
  border-radius: 16px !important;
  color: #6230cc !important;
  background: rgba(242, 236, 255, .88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85) !important;
  font-size: 22px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > strong small,
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > strong em {
  color: #795ca8 !important;
  font-size: 9px !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-list {
  display: grid !important;
  min-width: 0 !important;
  gap: 8px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card {
  --dcc-branch-accent: #6b38d7;
  --dcc-branch-soft: #f2ecff;
  display: grid !important;
  grid-template-columns: 44px minmax(72px, 1fr) repeat(2, minmax(68px, 78px)) 10px !important;
  min-width: 0 !important;
  min-height: 72px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 9px 10px !important;
  border: 1px solid #e7e0ed !important;
  border-left: 3px solid var(--dcc-branch-accent) !important;
  border-radius: 17px !important;
  color: #31283f !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 5px 15px rgba(48, 35, 70, .055) !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card:nth-child(4n + 2) {
  --dcc-branch-accent: #276fc1;
  --dcc-branch-soft: #eaf4ff;
}
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card:nth-child(4n + 3) {
  --dcc-branch-accent: #168579;
  --dcc-branch-soft: #e8f8f5;
}
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card:nth-child(4n) {
  --dcc-branch-accent: #b66b15;
  --dcc-branch-soft: #fff3e4;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 8px rgba(48, 35, 70, .06) !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-avatar {
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  overflow: hidden !important;
  place-items: center !important;
  border: 2px solid #fff !important;
  border-radius: 14px !important;
  background: var(--dcc-branch-soft) !important;
  box-shadow: 0 0 0 1px rgba(105, 58, 205, .18), 0 4px 10px rgba(43, 31, 63, .11) !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-avatar img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account {
  display: grid !important;
  min-width: 0 !important;
  gap: 4px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account strong,
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account strong {
  color: #322742 !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account small {
  color: var(--dcc-branch-accent) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric {
  display: grid !important;
  min-width: 0 !important;
  min-height: 56px !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 4px !important;
  padding: 7px 5px !important;
  overflow: hidden !important;
  border: 1px solid #e4dfea !important;
  border-radius: 13px !important;
  background: #f8f7fa !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric > small {
  color: #837a8b !important;
  font-size: 8px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric > strong {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: baseline !important;
  justify-content: center !important;
  gap: 2px !important;
  overflow: hidden !important;
  color: #342842 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric > strong > b {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  font-size: clamp(15px, 4.5vw, 18px);
  font-weight: 950 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-overflow: clip !important;
  font-variant-numeric: tabular-nums !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric > strong > em {
  font-size: 8px !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric.is-members {
  border-color: #dde3ea !important;
  background: #f5f8fa !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric.is-today {
  border-color: #ded5e9 !important;
  background: #f3eff8 !important;
  box-shadow: none !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric.is-today > small { color: #766886 !important; }
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric.is-today > strong { color: #44364f !important; }
body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric.is-today > small.is-breakdown {
  max-width: 100% !important;
  overflow: hidden !important;
  font-size: 7px !important;
  text-overflow: ellipsis !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-daily-reward-grid > div.is-token {
  background: #f2fbf6 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-daily-reward-grid > div.is-dcc {
  background: #fff7fb !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-arrow {
  width: 10px !important;
  height: 16px !important;
  fill: none !important;
  stroke: var(--dcc-branch-accent) !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2.2 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 12px !important;
  min-height: 76px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px !important;
  border: 1px dashed #d9cceb !important;
  border-radius: 17px !important;
  color: #342943 !important;
  background: rgba(255, 255, 255, .82) !important;
  text-decoration: none !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > i {
  display: grid !important;
  width: 44px !important;
  height: 44px !important;
  place-items: center !important;
  border-radius: 14px !important;
  color: #6e3bd4 !important;
  background: #f0eaff !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > i svg {
  width: 24px !important;
  height: 24px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 1.8 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > span {
  display: grid !important;
  min-width: 0 !important;
  gap: 4px !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > span strong {
  font-size: 14px !important;
  font-weight: 950 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > span small {
  color: #817889 !important;
  font-size: 10px !important;
  font-weight: 750 !important;
  line-height: 1.35 !important;
  word-break: keep-all !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-empty > svg {
  width: 10px !important;
  height: 16px !important;
  fill: none !important;
  stroke: #8b78a3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  stroke-width: 2 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-foot {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 2px 2px 0 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-foot > span {
  display: flex !important;
  min-width: 0 !important;
  align-items: center !important;
  gap: 5px !important;
  color: #81788b !important;
  font-size: 9px !important;
  font-weight: 750 !important;
  line-height: 1.25 !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-foot > span i {
  width: 6px !important;
  height: 6px !important;
  flex: 0 0 auto !important;
  border-radius: 50% !important;
  background: #24a080 !important;
  box-shadow: 0 0 0 3px rgba(36, 160, 128, .11) !important;
}

body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-foot > a {
  flex: 0 0 auto !important;
  color: #6532ce !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

@media (max-width: 370px) {
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network {
    gap: 9px !important;
    padding: 12px 10px !important;
    border-radius: 20px !important;
  }

  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head h2 { font-size: 17px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head p { font-size: 9px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-head > strong { min-width: 58px !important; min-height: 44px !important; font-size: 20px !important; }

  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-card {
    grid-template-columns: 40px minmax(60px, 1fr) repeat(2, minmax(68px, 72px)) 8px !important;
    gap: 4px !important;
    min-height: 68px !important;
    padding: 8px 6px !important;
  }

  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-avatar { width: 40px !important; height: 40px !important; border-radius: 13px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account strong { font-size: 13px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-account small { font-size: 9px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric { min-height: 50px !important; padding: 5px 3px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-branch-metric > strong > b { font-size: clamp(14px, 4.3vw, 16px); }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-home-direct-network-foot > span { font-size: 8px !important; }
}

/* Referral detail summary and each direct member use compact data tables. */
.dcc-referrals-page .dcc-referrals-overview {
  gap: 13px !important;
  padding: 17px !important;
}

.dcc-referrals-summary-table,
.dcc-referral-branch-table {
  width: 100% !important;
  margin: 0 !important;
  border: 1px solid #e5deec !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 16px !important;
  background: #fff !important;
  table-layout: fixed !important;
  overflow: hidden !important;
}

.dcc-referrals-summary-table th,
.dcc-referrals-summary-table td,
.dcc-referral-branch-table th,
.dcc-referral-branch-table td {
  border: 0 !important;
  border-right: 1px solid #ece6f1 !important;
  border-bottom: 1px solid #ece6f1 !important;
  text-align: center !important;
}

.dcc-referrals-summary-table tr > *:last-child,
.dcc-referral-branch-table tr > *:last-child { border-right: 0 !important; }
.dcc-referrals-summary-table tbody tr:last-child > *,
.dcc-referral-branch-table tbody tr:last-child > * { border-bottom: 0 !important; }

.dcc-referrals-summary-table thead th,
.dcc-referral-branch-table thead th {
  padding: 9px 7px !important;
  color: #7d7488 !important;
  background: #faf8fc !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  word-break: keep-all !important;
}

.dcc-referrals-summary-table tbody th {
  padding: 12px 9px !important;
  color: #393047 !important;
  background: #fff !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: left !important;
  word-break: keep-all !important;
}

.dcc-referrals-summary-table tbody td { padding: 11px 7px !important; }
.dcc-referrals-summary-table strong,
.dcc-referral-branch-table strong {
  color: #2b2341 !important;
  font-size: 26px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
}
.dcc-referrals-summary-table td:last-child strong,
.dcc-referral-branch-table td:nth-child(2) strong { color: var(--dcc-app-shell-purple) !important; }
.dcc-referrals-summary-table em,
.dcc-referral-branch-table em {
  margin-left: 3px !important;
  color: #756c81 !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 900 !important;
}

.dcc-referrals-page .dcc-ticket-breakdown {
  display: block !important;
  margin-top: 6px !important;
  color: #766d82 !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

.dcc-referrals-page .dcc-referral-ticket-policy {
  margin: 0 !important;
  padding: 13px 15px !important;
  border: 1px solid #e5deec !important;
  border-radius: 14px !important;
  color: #655d70 !important;
  background: #faf8fc !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.55 !important;
}

.dcc-referral-branch-card { gap: 12px !important; scroll-margin-top: 76px; }
.dcc-referral-branch-table thead th { padding: 8px 5px !important; font-size: 9.5px !important; }
.dcc-referral-branch-table tbody td { padding: 13px 5px !important; background: #fff !important; }
.dcc-referral-branch-table tbody td:nth-child(2) { background: #f8f4ff !important; }
.dcc-referral-branch-table tbody td:nth-child(3) { background: #faf9fb !important; }

/* v0.18.08 · dedicated, one-column app installation guide. Every block keeps
 * natural height so iPhone text scaling and browser toolbar changes cannot
 * make cards overlap. */
.dcc-install-guide-page .dcc-my-page-content {
  gap: 14px !important;
  overflow: visible !important;
}

.dcc-install-hero,
.dcc-install-platform,
.dcc-install-note {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8e1f1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(58, 38, 101, .06);
}

.dcc-install-hero {
  display: grid;
  gap: 8px;
  padding: 20px 18px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.45), transparent 30%),
    linear-gradient(145deg, #f1ebff 0%, #f8f5ff 54%, #eaf7ff 100%);
}

.dcc-install-hero > span,
.dcc-install-platform > header > span {
  color: #6737df;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .13em;
}

.dcc-install-hero h2,
.dcc-install-platform > header h2 {
  min-width: 0;
  margin: 0;
  color: #28213f !important;
  font-size: clamp(23px, 7vw, 30px) !important;
  font-weight: 950 !important;
  line-height: 1.18 !important;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.dcc-install-hero > p {
  margin: 0;
  color: #71697e !important;
  font-size: 13px !important;
  font-weight: 750;
  line-height: 1.5;
  word-break: keep-all;
}

.dcc-install-device-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
}

.dcc-install-device-line b,
.dcc-install-device-line em {
  display: inline-flex;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px !important;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.dcc-install-device-line b { color: #fff !important; background: #6334dc; }
.dcc-install-device-line em { color: #425a70 !important; background: rgba(255,255,255,.78); }

.dcc-install-platform {
  display: grid;
  gap: 13px;
  padding: 16px;
  scroll-margin-top: 72px;
}

.dcc-install-platform > header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 4px 10px;
  min-width: 0;
}

.dcc-install-platform > header > span { grid-column: 1; }
.dcc-install-platform > header h2 { grid-column: 1; font-size: clamp(22px, 6.7vw, 28px) !important; }
.dcc-install-platform > header > b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  padding: 8px 10px;
  border-radius: 999px;
  color: #fff !important;
  background: #6334dc;
  font-size: 10px !important;
  font-weight: 950;
  white-space: nowrap;
}

.dcc-install-platform.is-iphone > header > b { color: #41617c !important; background: #e8f5ff; }

.dcc-install-guide-figure {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #ebe5f2;
  border-radius: 19px;
  background: #faf9fc;
}

.dcc-install-guide-figure img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  object-fit: contain;
}

.dcc-install-primary,
.dcc-install-secondary {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 12px 15px;
  border: 0;
  border-radius: 17px;
  font-family: inherit;
  font-size: 15px !important;
  font-weight: 950;
  line-height: 1.3;
  cursor: pointer;
}

.dcc-install-primary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, #5530d7, #7843e8);
  box-shadow: 0 10px 22px rgba(92, 48, 216, .22);
  text-align: left;
}

.dcc-install-primary > span { min-width: 0; color: inherit; overflow-wrap: anywhere; }
.dcc-install-primary > b { color: inherit !important; font-size: 25px !important; line-height: 1; }
.dcc-install-primary:disabled { color: #567061; background: #e8f5ec; box-shadow: none; cursor: default; }

.dcc-install-status {
  margin: -3px 2px 0;
  color: #777080 !important;
  font-size: 11px !important;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
  word-break: keep-all;
}

.dcc-install-browser-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr);
  gap: 9px;
  min-width: 0;
  border-radius: 18px;
  transition: box-shadow .2s ease, background .2s ease;
}

.dcc-install-browser-grid article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #ebe5f2;
  border-radius: 17px;
  background: #faf9fc;
}

.dcc-install-browser-grid article:first-child { border-color: #dfe8ff; background: #f5f8ff; }
.dcc-install-browser-grid article:last-child { border-color: #e5dcfa; background: #f8f5ff; }
.dcc-install-browser-grid h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: #302845 !important;
  font-size: 14px !important;
  font-weight: 950;
}

.dcc-install-browser-grid h3 i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #3478ed;
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
}

.dcc-install-browser-grid article:last-child h3 i { background: #6b3bdd; }
.dcc-install-browser-grid ol,
.dcc-install-ios-steps ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: dcc-install-step;
}

.dcc-install-browser-grid li,
.dcc-install-ios-steps li {
  display: grid;
  width: 100% !important;
  grid-template-columns: 23px minmax(0,1fr) !important;
  align-items: start;
  gap: 8px;
  min-width: 0;
  color: #625b6d;
  font-size: 12px !important;
  font-weight: 750;
  line-height: 1.45;
  word-break: keep-all;
}

/* A list item must have exactly one content grid cell. Without this wrapper,
 * inline <b> nodes and anonymous Korean text become separate grid items in
 * Safari, and the anonymous text can fall into the 23px number column. */
.dcc-install-browser-grid li > span,
.dcc-install-ios-steps li > span {
  display: block !important;
  grid-column: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
  color: inherit !important;
  line-height: 1.55 !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
  white-space: normal !important;
}

.dcc-install-browser-grid li::before,
.dcc-install-ios-steps li::before {
  counter-increment: dcc-install-step;
  content: counter(dcc-install-step);
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  color: #6738d9;
  background: #ede7ff;
  font-size: 10px;
  font-weight: 950;
}

.dcc-install-browser-grid li b,
.dcc-install-ios-steps li b,
.dcc-install-ios-steps p b { color: #34284c !important; font-weight: 950; }

.dcc-install-ios-steps {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e3edf6;
  border-radius: 17px;
  background: #f7fbff;
}

.dcc-install-ios-steps > p {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #cfdfec;
  color: #647384 !important;
  font-size: 11px !important;
  font-weight: 750;
  line-height: 1.5;
  word-break: keep-all;
}

.dcc-install-secondary {
  color: #3a2d56;
  border: 1px solid #ded5ec;
  background: #f7f3fc;
  text-align: center;
}

.dcc-install-note {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border-color: #dcece5;
  background: #f4fbf7;
}

.dcc-install-note strong { color: #315b46 !important; font-size: 13px !important; font-weight: 950; }
.dcc-install-note p { margin: 0; color: #668071 !important; font-size: 11px !important; font-weight: 700; line-height: 1.5; word-break: keep-all; }
.dcc-install-platform.is-guide-focus,
.dcc-install-browser-grid.is-guide-focus { box-shadow: 0 0 0 4px rgba(105, 58, 223, .18), 0 14px 30px rgba(68, 40, 128, .10); }

@media (min-width: 400px) {
  .dcc-install-browser-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* iPhone/Safari hotfix: keep the browser's normal document flow. Fixed page
 * hosts and nested scrolling caused existing cards to overlap when Safari
 * recalculated its dynamic toolbar height. The established app.css bottom bar
 * remains fixed, while every card participates in ordinary page layout. */
@media (max-width: 782px) {
  html.dcc-member-shell-active,
  html.dcc-member-shell-active body.dcc-game-member-shell {
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
  }

  body.dcc-game-member-shell {
    padding-top: 0 !important;
    background: #e8e3ef !important;
  }

  body.dcc-game-member-shell .dcc-page-host {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    transform: none !important;
  }

  body.dcc-game-member-shell .dcc-page-host > .dcc-app-root.dcc-has-bottom-nav {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    margin: 0 !important;
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  body.dcc-game-member-shell .dcc-app-root.dcc-has-bottom-nav > .dcc-bottom-nav {
    position: fixed !important;
    z-index: 999 !important;
    left: 50% !important;
    right: auto !important;
    bottom: 0 !important;
    width: min(100%, 480px) !important;
    margin: 0 !important;
    padding-bottom: max(7px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
  }

  body.dcc-game-member-shell .dcc-account-page-head {
    position: sticky !important;
    z-index: 40 !important;
    top: 0 !important;
    margin-right: -4px !important;
    margin-left: -4px !important;
    padding: max(10px, env(safe-area-inset-top)) 4px 8px !important;
    background: rgba(244, 241, 249, .96) !important;
    box-shadow: 0 8px 18px rgba(42, 31, 65, .045) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
  }
}

@media (max-width: 360px) {
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-card.dcc-referral-copy-card {
    grid-template-columns: 40px minmax(0, 1fr) 62px !important;
    gap: 8px !important;
    padding-right: 9px !important;
    padding-left: 10px !important;
  }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-referral-icon { width: 40px !important; height: 40px !important; }
  body.dcc-game-page-home .dcc-home-clean-v3 .dcc-referral-copy-card .dcc-copy-referral { width: 62px !important; min-width: 62px !important; }
  .dcc-referrals-summary-table thead th,
  .dcc-referral-branch-table thead th { font-size: 9px !important; }
  .dcc-referrals-summary-table strong,
  .dcc-referral-branch-table strong { font-size: 23px !important; }
  .dcc-install-platform { padding: 13px; }
  .dcc-install-platform > header { grid-template-columns: minmax(0,1fr); }
  .dcc-install-platform > header > span,
  .dcc-install-platform > header h2,
  .dcc-install-platform > header > b { grid-column: 1; }
  .dcc-install-platform > header > b { grid-row: auto; justify-self: start; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .dcc-install-browser-grid,
  .dcc-install-platform,
  .dcc-copy-referral { transition: none !important; }
}
