/* MiKO global member identity — reference-style card */
.miko-global-profile-dock{
  position:fixed;
  left:auto;
  right:20px;
  bottom:76px;
  transform:none;
  z-index:2147482500;
  width:min(350px,calc(100vw - 24px));
  max-width:calc(100vw - 24px);
  font-family:"Noto Sans Thai","Leelawadee UI",Tahoma,sans-serif;
}

.miko-global-profile-identity{
  box-sizing:border-box;
  position:relative;
  display:grid;
  grid-template-columns:62px minmax(0,1fr) 32px;
  align-items:center;
  gap:11px;
  width:100%;
  min-width:0;
  min-height:72px;
  padding:9px 11px 9px 10px;
  overflow:visible;
  border:1px solid #d4e6f5;
  border-radius:18px;
  background:
    radial-gradient(circle at 16% 110%,rgba(61,198,255,.12),transparent 31%),
    linear-gradient(145deg,rgba(255,255,255,.99),rgba(246,251,255,.98));
  box-shadow:
    0 14px 34px rgba(33,78,114,.12),
    inset 0 1px 0 rgba(255,255,255,.96);
  color:#183a5b!important;
  text-decoration:none!important;
  backdrop-filter:blur(14px) saturate(1.05);
  -webkit-backdrop-filter:blur(14px) saturate(1.05);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.miko-global-profile-identity:hover,
.miko-global-profile-identity:focus-visible{
  transform:translateY(-2px);
  border-color:#acd7f3;
  box-shadow:
    0 18px 40px rgba(33,78,114,.16),
    0 0 0 3px rgba(52,164,235,.05),
    inset 0 1px 0 rgba(255,255,255,.98);
  outline:none;
}

/* Left ornament group */
.miko-global-profile-left{
  position:relative;
  display:grid;
  place-items:center;
  width:62px;
  height:62px;
  overflow:visible;
}

.miko-global-profile-avatar{
  position:relative;
  display:block;
  width:50px;
  height:50px;
  border:3px solid #fff;
  border-radius:50%;
  background:#edf7ff;
  box-shadow:
    0 0 0 2px #ccecff,
    0 0 18px rgba(58,197,255,.28),
    0 7px 16px rgba(28,101,153,.14);
  overflow:visible;
}

.miko-global-profile-avatar>img:not(.miko-global-profile-frame){
  position:relative;
  z-index:2;
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:50%!important;
  object-fit:cover!important;
}

.miko-global-profile-frame{
  position:absolute!important;
  z-index:3!important;
  inset:-6px!important;
  width:calc(100% + 12px)!important;
  height:calc(100% + 12px)!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  object-fit:contain!important;
  pointer-events:none!important;
}

/* Keep the aura, replace the old floating emoji with the dedicated bottom lightning */
.miko-global-profile-avatar .miko-nft-aura-layer{
  inset:-8%;
  z-index:0;
}
.miko-global-profile-avatar .miko-nft-float-emoji{
  display:none!important;
}

/* Gold crown at the top-left of the avatar */
.miko-global-profile-crown{
  position:absolute;
  top:-4px;
  left:0;
  z-index:7;
  display:grid;
  place-items:center;
  width:25px;
  height:25px;
  transform:rotate(-13deg);
  filter:drop-shadow(0 4px 5px rgba(177,116,0,.23));
  pointer-events:none;
}
.miko-global-profile-crown svg{
  width:23px;
  height:23px;
  overflow:visible;
  fill:#ffc436;
  stroke:#dc9200;
  stroke-width:1.3;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Lightning centered directly below the profile image */
.miko-global-profile-lightning{
  position:absolute;
  left:50%;
  bottom:-7px;
  z-index:8;
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  transform:translateX(-50%);
  border:2px solid #fff;
  border-radius:50%;
  background:linear-gradient(145deg,#61d8ff,#118cf2);
  box-shadow:
    0 0 0 2px rgba(105,213,255,.34),
    0 5px 12px rgba(20,135,223,.24),
    0 0 16px rgba(73,203,255,.33);
  pointer-events:none;
}
.miko-global-profile-lightning:before,
.miko-global-profile-lightning:after{
  content:"";
  position:absolute;
  top:50%;
  width:16px;
  height:8px;
  transform:translateY(-45%);
  border-radius:80% 20% 80% 20%;
  background:linear-gradient(90deg,rgba(43,157,240,0),rgba(48,180,255,.42));
  filter:blur(.15px);
  z-index:-1;
}
.miko-global-profile-lightning:before{right:19px;transform:translateY(-45%) rotate(11deg)}
.miko-global-profile-lightning:after{left:19px;transform:translateY(-45%) scaleX(-1) rotate(11deg)}
.miko-global-profile-lightning svg{
  width:16px;
  height:16px;
  fill:#ffb52a;
  stroke:#fff0b5;
  stroke-width:.7;
  stroke-linejoin:round;
  filter:drop-shadow(0 2px 2px rgba(130,82,0,.18));
}

/* Profile information */
.miko-global-profile-copy{
  display:block;
  min-width:0;
  padding-top:1px;
}

.miko-global-profile-topline{
  display:flex;
  align-items:center;
  gap:5px;
  min-width:0;
  white-space:nowrap;
}

.miko-global-profile-name{
  display:block;
  min-width:0;
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#153958!important;
  font-size:13px;
  font-weight:900;
  line-height:1.2;
  white-space:nowrap;
}

.miko-global-verified{
  flex:0 0 auto;
  display:inline-grid;
  place-items:center;
  width:16px;
  height:16px;
  border-radius:50%;
  background:linear-gradient(145deg,#3397ff,#1474e8);
  box-shadow:0 3px 7px rgba(26,118,225,.18);
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:950;
  line-height:1;
}

.miko-global-pro{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:16px;
  padding:1px 5px;
  border-radius:999px;
  background:linear-gradient(135deg,#ffd85b,#f3a817);
  color:#6c4700;
  font-size:7px;
  font-weight:950;
  line-height:1;
  letter-spacing:.03em;
}

.miko-global-nft{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-height:17px;
  padding:1px 6px 1px 5px;
  border:1px solid #dfd0ff;
  border-radius:999px;
  background:linear-gradient(135deg,#f4efff,#ede4ff);
  color:#7147ca;
  font-size:7.5px;
  font-style:normal;
  font-weight:950;
  line-height:1;
  letter-spacing:.02em;
}
.miko-global-nft svg{
  width:10px;
  height:10px;
  fill:#8258e8;
  stroke:#633fc6;
  stroke-width:.65;
}

.miko-global-profile-meta{
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
  margin-top:5px;
  overflow:hidden;
  color:#6e8397!important;
  font-size:9.5px;
  font-weight:750;
  line-height:1.25;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.miko-global-profile-meta i{
  color:#94a9ba;
  font-size:8px;
  font-style:normal;
}
.miko-global-level{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  min-height:17px;
  padding:1px 6px;
  border:1px solid #cfe2f7;
  border-radius:999px;
  background:linear-gradient(135deg,#f3f8ff,#eaf4ff);
  color:#2769b8;
  font-size:8px;
  font-weight:950;
  line-height:1;
  letter-spacing:.01em;
}
.miko-global-points{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Arrow */
.miko-global-profile-arrow{
  display:grid;
  place-items:center;
  justify-self:end;
  width:29px;
  height:29px;
  border:1px solid #bfe1f8;
  border-radius:50%;
  background:rgba(246,251,255,.96);
  box-shadow:inset 0 1px 0 #fff,0 4px 10px rgba(40,116,173,.08);
  color:#1778ca;
  transition:background .2s ease,color .2s ease,transform .2s ease,border-color .2s ease;
}
.miko-global-profile-arrow svg{
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.miko-global-profile-identity:hover .miko-global-profile-arrow,
.miko-global-profile-identity:focus-visible .miko-global-profile-arrow{
  transform:translateX(2px);
  border-color:#1883d8;
  background:#1883d8;
  color:#fff;
}

/* NFT effects remain compatible with the existing system */
.miko-nft-effect-frame_gold .miko-global-profile-avatar{
  border-color:#fff8d6;
  box-shadow:0 0 0 3px #d5a72d,0 0 0 5px rgba(245,203,82,.16),0 7px 18px rgba(125,87,0,.18);
}
.miko-nft-effect-glow .miko-global-profile-avatar{
  box-shadow:0 0 0 2px #74c8ff,0 0 19px 6px rgba(32,144,255,.26);
}
.miko-nft-effect-crown .miko-global-profile-avatar{
  box-shadow:0 0 0 3px #e6b83d,0 7px 18px rgba(125,87,0,.2);
}

/* Embedded shortcode version */
.miko-global-profile-identity.is-compact{
  position:relative!important;
  display:grid!important;
  grid-template-columns:58px minmax(0,1fr) 30px!important;
  gap:10px!important;
  width:100%!important;
  max-width:340px!important;
  min-width:0!important;
  min-height:68px!important;
  padding:8px 10px!important;
  border-radius:16px!important;
  overflow:visible!important;
  box-shadow:none!important;
}
.miko-global-profile-identity.is-compact .miko-global-profile-left{
  width:58px;
  height:58px;
}
.miko-global-profile-identity.is-compact .miko-global-profile-avatar{
  width:47px;
  height:47px;
}
.miko-global-profile-identity.is-compact .miko-global-profile-lightning{
  width:25px;
  height:25px;
  bottom:-6px;
}
.miko-global-profile-identity.is-compact .miko-global-profile-crown{
  width:23px;
  height:23px;
}

.miko-global-profile-login{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 15px;
  border-radius:12px;
  background:#126fe8;
  color:#fff!important;
  font-weight:850;
  text-decoration:none!important;
}

body.admin-bar .miko-global-profile-dock{bottom:76px}

@media(max-width:782px){
  .miko-global-profile-dock{
    left:auto;
    right:12px;
    bottom:72px;
    transform:none;
    width:min(334px,calc(100vw - 20px));
    max-width:calc(100vw - 20px);
  }
  .miko-global-profile-identity{
    grid-template-columns:59px minmax(0,1fr) 30px;
    gap:10px;
    min-height:70px;
    padding:8px 10px 8px 9px;
    border-radius:17px;
  }
  .miko-global-profile-left{width:59px;height:59px}
  .miko-global-profile-avatar{width:48px;height:48px}
  .miko-global-profile-name{max-width:110px;font-size:12.5px}
  .miko-global-profile-meta{font-size:9px}
}

@media(max-width:430px){
  .miko-global-profile-dock{
    left:auto;
    right:10px;
    bottom:70px;
    transform:none;
    width:calc(100vw - 20px);
    max-width:calc(100vw - 20px);
  }
  .miko-global-profile-identity{
    grid-template-columns:57px minmax(0,1fr) 29px;
    gap:9px;
    width:100%;
    min-height:68px;
    padding:8px 9px;
  }
  .miko-global-profile-left{width:57px;height:57px}
  .miko-global-profile-avatar{width:46px;height:46px}
  .miko-global-profile-crown{top:-3px;left:0;width:22px;height:22px}
  .miko-global-profile-crown svg{width:20px;height:20px}
  .miko-global-profile-lightning{width:24px;height:24px;bottom:-6px}
  .miko-global-profile-lightning svg{width:14px;height:14px}
  .miko-global-profile-name{max-width:100px;font-size:12px}
  .miko-global-verified{width:15px;height:15px;font-size:8px}
  .miko-global-nft{min-height:16px;padding:1px 5px;font-size:7px}
  .miko-global-profile-meta{margin-top:4px;font-size:8.7px}
  .miko-global-profile-arrow{width:27px;height:27px}
}

@media(max-width:360px){
  .miko-global-profile-identity{
    grid-template-columns:54px minmax(0,1fr) 27px;
    gap:8px;
    padding-left:8px;
    padding-right:8px;
  }
  .miko-global-profile-left{width:54px;height:56px}
  .miko-global-profile-avatar{width:45px;height:45px}
  .miko-global-profile-name{max-width:88px;font-size:11.5px}
  .miko-global-profile-meta{font-size:8.3px}
  .miko-global-profile-arrow{width:26px;height:26px}
}

@media(prefers-reduced-motion:reduce){
  .miko-global-profile-identity,
  .miko-global-profile-arrow{transition:none!important}
}
